<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopSendOrderView, HoWaveVGO" title=" 退 发 货 信 息 列 表" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<!--Modify By Jackie 2007-8-6-->
<table class="adminheading">
   <tr>
      <th valign="middle" class="menus" align="left">订单管理</th>
      <td align="right">
      <div style="width:400px">
            <a href="Admin_ShopTradeOrder.aspx" >交易记录管理</a>&nbsp;|&nbsp;
            <a href="Admin_ShopSendOrderView.aspx?add=1">发退货管理</a>&nbsp;|&nbsp;
            <a href="Admin_ShopInvoiceView.aspx">开发票记录管理</a>&nbsp;|&nbsp;
            <a href="Admin_ShopPayInfoView.aspx">在线支付管理</a>&nbsp;<br />                
      </div>
      </td>         
   </tr>                     
</table>

       <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="TextBox1" runat="server" AutoPostBack="True" /></td>
            <td class="ltd">卖家列表</td>
            <td class="rtd" style="width:35%">
                 <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource2"
                            DataTextField="username" DataValueField="userid" AppendDataBoundItems="True">
                            <asp:ListItem Value="-1">所有</asp:ListItem>
                 </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="ltd">经手人</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtHanderName" runat="server"  AutoPostBack="True"/></td>
            <td class="ltd">客户：</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtUserName" runat="server"  AutoPostBack="True"/></td>
        </tr>
        <tr>
            <td class="ltd">起始日期：</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtBeginDate" runat="server" AutoPostBack="True" /></td>
            <td class="ltd">结束日期:</td>
            <td class="rtd" style="width:35%"><asp:TextBox ID="TxtEndDate" runat="server" AutoPostBack="True" /></td>
        </tr>
        <tr>
            <td class="ltd">方向</td>
            <td class="rtd" style="width:35%">
                <asp:DropDownList ID="DropDeliverType" runat="server" AutoPostBack="True" Width="97px">
                    <asp:ListItem Selected="True" Value="-1">所有</asp:ListItem>
                    <asp:ListItem Value="0">发货</asp:ListItem>
                    <asp:ListItem Value="1">退货</asp:ListItem>
                </asp:DropDownList></td>
            <td class="ltd">
            </td>
            <td class="rtd" >
            </td>
        </tr>
    </table>
    <br />
            
        <asp:GridView  DataKeyNames="deliverid"  ID="GridView3" OnRowDataBound="GridView3_RowDataBound" CssClass="adminlist" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" RowStyle-HorizontalAlign="Center" AllowPaging="True" 
             OnDataBound="GridView3_DataBound" >
            <Columns>
                <asp:BoundField DataField="DeliverDate" HeaderText="日期" >
                    <HeaderStyle Width="8%" />
                </asp:BoundField>
                <asp:BoundField DataField="DeliverType" HeaderText="方向" >
                    <HeaderStyle Width="5%" />
                </asp:BoundField>
                   <asp:TemplateField HeaderText="客户">                    
                    <ItemTemplate>
                       <a HREF="Admin_UserDetail.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 
                    HeaderText="订单号" DataTextField="OrderFormNum" >
                    <HeaderStyle Width="15%" />
                </asp:HyperLinkField>
                <asp:BoundField DataField="DeliverCompany" HeaderText="快递公司" >
                    <HeaderStyle Width="8%" />
                </asp:BoundField>
                <asp:BoundField DataField="ExpressNumber" HeaderText="快递号" >
                    <HeaderStyle Width="8%" />
                </asp:BoundField>
                <asp:BoundField DataField="HandlerName" HeaderText="经手人" >
                    <HeaderStyle Width="8%" />
                </asp:BoundField>
                <asp:BoundField DataField="ContacterName" HeaderText="收货人" >
                    <HeaderStyle Width="10%" />
                </asp:BoundField>
                <asp:CheckBoxField DataField="Received" HeaderText="客户签收" ReadOnly="True" Text="是" >
                    <HeaderStyle Width="10%" />
                </asp:CheckBoxField>
                <asp:BoundField DataField="Remark" HeaderText="备注">                  
                    <HeaderStyle Width="15%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="删除" ShowHeader="False" HeaderStyle-Width="10%" >
                    <ItemTemplate >
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName='<%#Eval("deliverid") %>' OnCommand="My_DeleteDeliverItem" OnClientClick="if(confirm('确定删除吗？'))return true;return false;"
                            Text="删除" ></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <tr>
                    <th>日期</th>
                    <th>方向</th>
                    <th>客户</th>
                    <th>订单号</th>
                    <th>快递公司</th>
                    <th>快递号</th>
                    <th>经手人</th>
                    <th>收货人</th>
                    <th>客户签收</th>
                    <th>备注</th>
                </tr>
                <tr><td colspan="10">暂无信息！</td></tr>
            </EmptyDataTemplate>
            <RowStyle HorizontalAlign="Center" />
        </asp:GridView>

   

 <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetUserLikeUserName"  TypeName="UserBLL">
    <SelectParameters>
        <asp:ControlParameter ControlID="TextBox1" Name="UserName" PropertyName="Text" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>   
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetDeliverByUserNameInputerBegindDateEndDateType"
    TypeName="Shop_DeliverItem" OldValuesParameterFormatString="{0}">
    <SelectParameters>
        <asp:ControlParameter ControlID="DropDownList1" DefaultValue="-1" Name="InputerID"
            PropertyName="SelectedValue" 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>   
</asp:Content>

