<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_SendOrderView, 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="TxtHanderName" runat="server" Width="80px"/></td>
            <td>客户：</td>
            <td><asp:TextBox ID="TxtUserName" runat="server" Width="80px"/></td>
            <td>起始日期：</td>
            <td><asp:TextBox ID="TxtBeginDate" runat="server" Width="80px"/></td>
            <td>结束日期：</td>
            <td><asp:TextBox ID="TxtEndDate" runat="server" Width="80px"/></td>
            <td><asp:Button ID="QuickSearchBtn" runat="server" Text="查询" /></td>
        </tr>
    </table>
    <br />
    <table class="SearchTableStyle">
    <tr><td>
       你现在查看的是：<asp:DropDownList ID="DropDeliverType" runat="server" AutoPostBack="True">
                    <asp:ListItem Selected="True" Value="-1">所有</asp:ListItem>
                    <asp:ListItem Value="0">发货</asp:ListItem>
                    <asp:ListItem Value="1">退货</asp:ListItem>
                </asp:DropDownList>
    </td></tr>
    </table>
    <br />
    <asp:UpdatePanel ID="UpdatePanel4" runat="server" >
        <ContentTemplate>
            <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" AllowPaging="True" 
                OnDataBound="GridView3_DataBound" CssClass="tableHead" >
                <Columns>
                    <asp:BoundField DataField="DeliverDate" HeaderText="日期" >
                        <HeaderStyle Width="10%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="DeliverType" HeaderText="方向" >
                        <HeaderStyle Width="7%" />
                    </asp:BoundField>
                       <asp:TemplateField HeaderText="客户">                     
                        <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>                        
                         <HeaderStyle Width="8%" />
                    </asp:TemplateField>
                    <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="shop_buyorder.aspx?OrderFormNum={0}"
                        HeaderText="订单" DataTextField="OrderFormNum" >
                        <HeaderStyle Width="15%" />
                    </asp:HyperLinkField>
                    <asp:BoundField DataField="DeliverCompany" HeaderText="快递公司" >
                        <HeaderStyle Width="12%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ExpressNumber" HeaderText="快递号" >
                        <HeaderStyle Width="10%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="HandlerName" HeaderText="经手人" >
                        <HeaderStyle Width="8%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ContacterName" HeaderText="收货人" >
                        <HeaderStyle Width="8%" />
                    </asp:BoundField>
                    <asp:CheckBoxField DataField="Received" HeaderText="签收" ReadOnly="True"  >
                        <HeaderStyle Width="7%" />
                    </asp:CheckBoxField>
                    <asp:BoundField DataField="Remark" HeaderText="备注">                       
                        <HeaderStyle Width="12%" />
                    </asp:BoundField>
                </Columns>
                <EmptyDataTemplate >                   
                      <div style="padding:10px;">没有符合查询条件的记录！</div>
                    </EmptyDataTemplate> 
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetDeliverByUserNameInputerBegindDateEndDateType"
                TypeName="Shop_DeliverItem">
                <SelectParameters>
                    <asp:SessionParameter DefaultValue="0" Name="InputerID" SessionField="Howave_UserID"
                        Type="Int32" />
                    <asp:ControlParameter ControlID="TxtHanderName" Name="HanderName" PropertyName="Text"
                        Type="String" />
                    <asp:ControlParameter ControlID="TxtUserName" DefaultValue="" Name="UserName" PropertyName="Text"
                        Type="String" />
                    <asp:ControlParameter ControlID="TxtBeginDate" Name="BeginDate" PropertyName="Text"
                        Type="String" DefaultValue="2006-01-01" />
                    <asp:ControlParameter ControlID="TxtEndDate" Name="EndDate" PropertyName="Text"
                        Type="String" DefaultValue="2500-01-01" />
                    <asp:ControlParameter ControlID="DropDeliverType" DefaultValue="-1" Name="DeliverType"
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </ContentTemplate>
        <Triggers>
         <asp:AsyncPostBackTrigger ControlID="TxtHanderName"  /> 
            <asp:AsyncPostBackTrigger ControlID="TxtUserName"  />
            <asp:AsyncPostBackTrigger ControlID="TxtBeginDate" />
            <asp:AsyncPostBackTrigger ControlID="TxtEndDate"  />
            <asp:AsyncPostBackTrigger ControlID="DropDeliverType"  />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>

