<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_ShopInvoiceView, mallz" title="发 票 信 息 列 表" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<asp:PlaceHolder runat="server" ID="ListPanel">
       <table class="nick"><tr><td colspan="4" class="tit">高级查找</td></tr>
        <tr>
            <td class="ltd">发票编号：</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtInvoiceNum" runat="server"/></td>
            <td class="ltd">订单编号：</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtOrderNum" runat="server" /></td>
        </tr>
        <tr>
            <td class="ltd">买家帐号：</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtUserName" runat="server" /></td>
            <td class="ltd">卖家帐号：</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtSalerName" runat="server"/></td>
        </tr>
        <tr>
            <td class="ltd">起始日期：</td>
            <td class="rtd" style="width:35%">
                <asp:TextBox ID="TxtBeginDate" runat="server" />               
            </td>
            <td class="ltd">结束日期：</td>
            <td class="rtd" style="width:35%">
                <asp:TextBox ID="TxtEndDate" runat="server"/>
            </td>
        </tr>
        <tr>
            <td class="ltd">发票类型：</td>
            <td class="rtd" style="width:35%">
                <asp:DropDownList ID="DropInvoiceType" runat="server" AutoPostBack="True" AppendDataBoundItems="true" DataTextField="Name" DataValueField="value" OnSelectedIndexChanged="Button1_OnClick">
                   <asp:ListItem Value="" Text="所有"/>
                </asp:DropDownList>
            </td>
            <td class="ltd"></td>
            <td class="rtd" style="width:35%">
                <asp:Button ID="Button1" runat="server" Text="搜 索" OnClick="Button1_OnClick" />
            </td>
        </tr>
    </table>

            <asp:GridView ID="GridView2" class="adminlist" runat="server" DataKeyNames="InvoiceID" AutoGenerateColumns="False" OnRowDataBound="GridView2_RowDataBound">
                <Columns>
                    <asp:TemplateField HeaderStyle-Width="4%">
                        <HeaderTemplate>
                        <input id="chkAll" onclick="SelectAllCheckboxes(this,'ids');" type="checkbox" />
                        </HeaderTemplate>
                        <ItemTemplate>
                            <input id="ids" name="ids" value="<%# Eval("InvoiceID") %>" type="checkbox" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:HyperLinkField DataTextField="InvoiceNum" DataNavigateUrlFields="InvoiceID" DataNavigateUrlFormatString="?id={0}" HeaderText="发票号码" HeaderStyle-Width="18%" />
                    <asp:HyperLinkField HeaderText="买家帐号" DataNavigateUrlFields="UserID" DataNavigateUrlFormatString="Admin_UserDetail.aspx?UserID={0}" DataTextField="UserName" HeaderStyle-Width="15%" />
                    <asp:HyperLinkField  DataTextField="OrderFormNum" DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="Admin_ShowOrder.aspx?orderID={0}" HeaderText="订单号" HeaderStyle-Width="15%" />
                    <asp:TemplateField HeaderText="发票类型" HeaderStyle-Width="10%" >
                        <ItemTemplate>
                            <asp:Literal ID="InvoiceType" runat="server" Text='<%# GetInvoiceType(Eval("InvoiceType").ToString()) %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="totalmoney" HeaderText="发票金额" HeaderStyle-Width="8%" />
                    <asp:BoundField DataField="InputTime" HeaderText="录入时间" HeaderStyle-Width="10%" />
                    <asp:BoundField DataField="InvoiceDate" HeaderText="发票日期" HeaderStyle-Width="10%" />
                    <asp:TemplateField HeaderText="操作" >
                      <ItemTemplate>
                        <asp:HyperLink ID="LinkButton1" runat="server" NavigateUrl='<%# "?id=" + Eval("InvoiceID") %>' Text="详细" />
                        <asp:LinkButton ID="cl" runat="server" OnClientClick="if(confirm('确定删除吗？'))return true; return false;" OnCommand="Delete_ButtonOnClick" CommandName='<%# Eval("InvoiceID") %>' Text="删除" />
                      </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                        <tr>
                            <th>发票号码</th>
                            <th>买家帐号</th>
                            <th>订单编号</th>
                            <th>发票类型</th>
                            <th>发票金额</th>
                            <th>录入时间</th>
                            <th>发票日期</th>
                            <th>操作</th>
                        </tr>
                        <tr><td colspan="11">暂无信息！</td></tr>
                </EmptyDataTemplate>
            </asp:GridView>
            
    <div class="page">
	<asp:Label runat="server" ID="PagePanel" />
	</div>
</asp:PlaceHolder>

<asp:PlaceHolder runat="server" ID="ViewPanel" Visible="false">
    
    <asp:FormView ID="FormView1" DataKeyNames="InvoiceID" runat="server" Width="100%">
        <ItemTemplate>
            <table class="nick">
                <tr><td colspan="4" class="tit">发票记录详细</td></tr>
                <tr>
                    <td class="ltd">
                        发票编号：</td>
                    <td class="rtd"><asp:Literal ID="TxtInvoiceNum" runat="server" Text='<%# Eval("InvoiceNum") %>' /></td>
                </tr>
                <tr>
                    <td class="ltd">
                        发票头：</td>
                    <td class="rtd"><asp:Literal ID="TxtInvoiceTitle" runat="server"  Text='<%# Eval("InvoiceTitle") %>' /></td>
                </tr>
                <tr>
                    <td class="ltd">
                        发票类型：</td>
                    <td class="rtd"><asp:Literal ID="TxtInvoiceType" runat="server"  Text='<%# GetInvoiceType(Eval("InvoiceType").ToString()) %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        发票日期：</td>
                    <td class="rtd"><asp:Literal ID="Literal5" runat="server" Text='<%# Eval("InvoiceDate") %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        发票额：</td>
                    <td class="rtd"><asp:Literal ID="TxtTotalMoney" runat="server" Text='<%# Eval("TotalMoney") %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        录入者（卖家）：</td>
                    <td class="rtd"><asp:Literal ID="Literal4" runat="server" Text='<%# Eval("Inputer") %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        录入时间：</td>
                    <td class="rtd"><asp:Literal ID="Literal2" runat="server" Text='<%# Eval("InputTime") %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        发票内容：</td>
                    <td class="rtd"><asp:TextBox ID="Literal3" runat="server" TextMode="MultiLine" Width="400" Height="60" Text='<%# Eval("InvoiceContent") %>'/></td>
                </tr>
            </table>
            <div style="padding:5px;">
                <input name="f" type="button" id="f" value=" 返 回 " onclick="history.back()" />
            </div>
        </ItemTemplate>
    </asp:FormView>
    
</asp:PlaceHolder>

</asp:Content>

