<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_SendOrderView, WebApp_deploy" 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/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 >
                 <table style="width:98%">
                 <tr>
                 <th>日期</th>
                 <th>方向</th>
                 <th>客户</th>
                 <th>快递公司</th>
                 <th>快递号</th>
                 <th>经手人</th>
                 <th>收货人</th>
                 <th>签收</th>
                 <th>备注</th>
                 </tr>
                 <tr><td colspan="9">没有符合查询条件的记录！</td></tr>
                 </table>
                    </EmptyDataTemplate> 
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetDeliverByUserNameInputerBegindDateEndDateType"
                TypeName="HoWave.Web.Shop_DeliverItem">
                <SelectParameters>
                    <asp:Parameter DefaultValue="0" Name="InputerID" 
                        Type="Int32" />
                    <asp:ControlParameter ControlID="TxtHanderName" Name="HanderName" PropertyName="Text"
                        Type="String"   ConvertEmptyStringToNull="false"/>
                    <asp:ControlParameter ControlID="TxtUserName" DefaultValue="" Name="UserName" PropertyName="Text"
                        Type="String"   ConvertEmptyStringToNull="false"/>
                    <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>

