<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_StockManage_EditPriceRecord, WebApp_deploy" title="改价单记录管理" %>

<asp:Content ID="cphContent" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="pageTitle" style="line-height: 30px; vertical-align: middle;">
        &nbsp;&nbsp;&nbsp;&nbsp;<asp:Literal ID="ltrTitle" runat="server">改价单记录管理</asp:Literal></div>
    <div id="MainMenu">
        <div class="TabText">
            <div style="line-height: 2px;">
                &nbsp;</div>
            <%--列表 begin--%>
            <asp:Panel ID="pnlManage" runat="server">
                <table class="SearchTableStyle">
                    <tr>
                        <th colspan="3" style="float: left; text-align: left">
                            &nbsp;<b>高级查询：</b>
                        </th>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;时间：&nbsp;<asp:TextBox ID="txtSearchBeginDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate"></asp:TextBox>
                            &nbsp;&nbsp;至&nbsp;&nbsp;<asp:TextBox ID="txtSearchEndDate" runat="server" onfocus="WdatePicker()"
                                CssClass="Wdate"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;单据编号：<asp:TextBox ID="txtSearchInfoNumber" CausesValidation="false" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;<asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
                <div style="line-height: 2px;">
                    &nbsp;</div>
                <asp:GridView ID="gvManage" CssClass="tableHead" runat="server" AllowPaging="True"
                    OnPageIndexChanging="gridView_PageIndexChanging" OnRowDataBound="gridView_RowDataBound"
                    AutoGenerateColumns="false" PageSize="10" RowStyle-HorizontalAlign="Center">
                    <Columns>
                        <asp:HyperLinkField DataNavigateUrlFields="InfoOrderID" DataTextField="InfoNumber"
                            DataNavigateUrlFormatString="EditPriceRecord.aspx?Action=checkinfo&infoOrderID={0}"
                            HeaderText="单据编号">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:HyperLinkField>
                        <asp:BoundField DataField="StockDate" HeaderText="时间">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="总金额">
                            <ItemTemplate>
                                <%#Eval("TotalMoney") %>&nbsp;&nbsp;
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Right" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                                <%#Eval("Remark") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <a href='EditPriceRecord.aspx?Action=checkinfo&infoOrderID=<%# Eval("InfoOrderID") %>'>
                                    详细</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EmptyDataTemplate>
                        <table class="tableHeader" style="width: 100%">
                            <tr>
                                <th>
                                    单据编号
                                </th>
                                <th>
                                    时间
                                </th>
                                <th>
                                    总金额
                                </th>
                                <th>
                                    备注
                                </th>
                                <tr>
                                    <td colspan="4">
                                        没有符合查询条件的记录！
                                    </td>
                                </tr>
                        </table>
                    </EmptyDataTemplate>
                    <PagerStyle CssClass="productPageStyle" />
                </asp:GridView>
                <div style="text-align: center;">
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal>
                </div>
            </asp:Panel>
            <%--列表 end--%>
            <%--详细信息 begin--%>
            <asp:Panel ID="pnlDetail" runat="server">
                <table class="ShopOrderStyle">
                    <caption style="line-height: 30px">
                        详细信息</caption>
                    <tr>
                        <td class="OrderTitle">
                            单据编号 ：
                        </td>
                        <td style="width: 220px">
                            <asp:Label ID="lblStockNumber" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            记录时间 ：
                        </td>
                        <td style="width: 220px">
                            <asp:Label ID="lblInputTime" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            记录人 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInputer" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            发票差额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblInvoice_TotalPrice" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            商品差额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblMoneyGoods" runat="server"></asp:Label>
                        </td>
                        <td class="OrderTitle">
                            总差额 ：
                        </td>
                        <td>
                            <asp:Label ID="lblMoney" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="OrderTitle">
                            备注 ：
                        </td>
                        <td colspan="3">
                            <asp:Label ID="lblRemarks" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
                <asp:GridView ID="gvItem" CssClass="tableHead" runat="server" RowStyle-HorizontalAlign="Center"
                    AutoGenerateColumns="false">
                    <Columns>
                        <asp:TemplateField HeaderText="商品图片">
                            <ItemTemplate>
                                <asp:Image ID="Image1" runat="server" ImageUrl='<%# (Convert.ToString(Eval("ProductSmallImageUrl"))==""?"~/Images/show_nopic.gif":"~/"+Eval("ProductSmallImageUrl").ToString()) %>'
                                    Height="80px" Width="80px" />
                                <asp:HiddenField ID="hfProductID" runat="server" Value='<%#Eval("ProductID") %>' />
                                <asp:HiddenField ID="hfOrderID" runat="server" Value='<%#Eval("OrderID") %>' />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="商品名称" DataField="ProductName"></asp:BoundField>
                        <asp:BoundField HeaderText="单位" DataField="Unit">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="数量" DataField="StockCount">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="原价" DataField="OldPrice">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="价格" DataField="Price">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="差额"></asp:BoundField>
                    </Columns>
                    <EmptyDataTemplate>
                        <table class="tableHeader" width="100%">
                            <tr>
                                <th style='text-align: center;'>
                                    商品图片
                                </th>
                                <th style='text-align: center;'>
                                    商品名称
                                </th>
                                <th style='text-align: center;'>
                                    单位
                                </th>
                                <th style='text-align: center;'>
                                    数量
                                </th>
                                <th>
                                    原价
                                </th>
                                <th style='text-align: center;'>
                                    价格
                                </th>
                                <th style='text-align: center;'>
                                    差额
                                </th>
                            </tr>
                            <tr>
                                <td colspan="7" align="center">
                                    没有数据！
                                </td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                </asp:GridView>
                <div style="text-align: center;">
                    &nbsp;&nbsp;<input id="btnBack" type="button" onclick="history.back()" value="返回" />
                </div>
            </asp:Panel>
            <%--详细信息 end--%>
            <div style="line-height: 6px;">
                &nbsp;</div>
        </div>
    </div>
</asp:Content>
