<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_InvoiceView, HoWaveVGO" title=" 发 票 信 息 列 表" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
<div class="pageTitle">开发票记录</div>
<br />
    <table class="SearchTableStyle">
         <tr>
            <td> 客户：</td>
            <td><asp:TextBox ID="TxtUserName" runat="server" Height="16px"/></td>
            <td>起始日期：</td>
            <td><asp:TextBox ID="TxtBeginDate" runat="server" Height="16px"/></td>
            <td>结束日期：</td>
            <td><asp:TextBox ID="TxtEndDate" runat="server" Height="16px"/></td>
            <td><asp:Button ID="QuickSearchBtn" runat="server" Text="查询" />
        </tr>
    </table>
    <br />
    <table class="SearchTableStyle">
        <tr>
            <td>
        你现在查看的是：<asp:DropDownList ID="DropInvoiceType" runat="server" AutoPostBack="True">
                   <asp:ListItem Value="-1" Text="所有" Selected="true"/>
                   <asp:ListItem Value="0" Text="地税普通发票"/>
                   <asp:ListItem Value="1" Text="国税普通发票"/>
                   <asp:ListItem Value="2" Text="增值税发票"/>
                </asp:DropDownList>
    </td></tr></table>
    <br />
    <asp:UpdatePanel ID="UpdatePanel4" runat="server" >
        <ContentTemplate>
            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
                OnDataBound="GridView2_DataBound"  AllowPaging="True" PageSize="15" CssClass="tableHead">
                <Columns>
                    <asp:TemplateField HeaderText="客户">
                        <EditItemTemplate>
                         <a HREF="../../Shop/Shop1/shop_review.aspx?UserID=<%#Eval("UserID") %>" target="_blank">  <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("UserName") %>'></asp:TextBox></a>
                        </EditItemTemplate>
                        <ItemTemplate>
                           <a HREF="../../Shop/Shop1/shop_review.aspx?UserID=<%#Eval("UserID") %>" target="_blank">    <asp:Label ID="Label1" runat="server" Text='<%# Bind("UserName") %>'></asp:Label></a>
                        </ItemTemplate>
                         
                    </asp:TemplateField>
                    <asp:BoundField DataField="InvoiceDate" HeaderText="日期" HeaderStyle-Width="10%"　/>
                    <asp:BoundField DataField="InvoiceType" HeaderText="发票类型" HeaderStyle-Width="10%"　 />
                    <asp:BoundField DataField="InvoiceNum" HeaderText="发票号码" HeaderStyle-Width="10%"　 />
                    <asp:BoundField DataField="Invoicetitle" HeaderText="抬头" HeaderStyle-Width="10%"　/>
                    <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="shop_order.aspx?OrderFormNum={0}"
                        DataTextField="OrderFormNum" HeaderText="订单" HeaderStyle-Width="10%"　 />
                    <asp:BoundField DataField="Drawer" HeaderText="开票人" HeaderStyle-Width="10%"　/>
                    <asp:BoundField DataField="Inputer" HeaderText="录入员" HeaderStyle-Width="10%"　/>
                    <asp:BoundField DataField="totalmoney" HeaderText="金额" HeaderStyle-Width="10%"　/>
                    <asp:BoundField DataField="InputTime" HeaderText="录入时间" HeaderStyle-Width="10%"　/>
                     
                   
                </Columns>
                 <EmptyDataTemplate >                   
                      <div style="padding:10px;">没有符合查询条件的记录！</div>                      
                    </EmptyDataTemplate> 
            </asp:GridView>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="DropInvoiceType"/>
        </Triggers>
    </asp:UpdatePanel>
    <br />
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetInvoiceBySalerIDUserNameBegindateEndDate"
        TypeName="Shop_InvoiceItem">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="SalerID" SessionField="Howave_UserID"
                Type="Int32" />
            <asp:ControlParameter ControlID="TxtUserName" DefaultValue="" Name="UserName" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TxtBeginDate" DefaultValue="2006-01-01" Name="BeginDate"
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TxtEndDate" DefaultValue="2500-01-01" Name="EndDate"
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropInvoiceType" DefaultValue="-1" Name="InvoiceType"
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

