<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_ShopSendOrderView, 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" style="width:15%;">物流编号：</td>
            <td class="rtd" style="width:33%;"><asp:TextBox ID="TxtDeliverNum" runat="server" /></td>
            <td class="ltd" style="width:15%;">订单编号：</td>
            <td class="rtd"><asp:TextBox ID="TxtOrderNum" runat="server"/></td>
        </tr>
        <tr>
            <td class="ltd" style="width:15%;">卖家帐号：</td>
            <td class="rtd" style="width:33%;"><asp:TextBox ID="TxtSalerName" runat="server" /></td>
            <td class="ltd" style="width:15%;">买家帐号：</td>
            <td class="rtd"><asp:TextBox ID="TxtUserName" runat="server" /></td>
        </tr>
        <tr>
            <td class="ltd" style="width:15%;">起始日期：</td>
            <td class="rtd" style="width:33%;"><asp:TextBox ID="TxtBeginDate" runat="server"  /></td>
            <td class="ltd" style="width:15%;">结束日期：</td>
            <td class="rtd"><asp:TextBox ID="TxtEndDate" runat="server"/></td>
        </tr>
        <tr>
            <td class="ltd" style="width:15%;">发退方向：</td>
            <td class="rtd" style="width:33%;">
                <asp:DropDownList ID="DropDeliverType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="Button1_OnClick" Width="97px">
                    <asp:ListItem Selected="True" Value="">所有</asp:ListItem>
                    <asp:ListItem Value="0">发货</asp:ListItem>
                    <asp:ListItem Value="1">退货</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td class="ltd" style="width:15%;"></td>
            <td class="rtd">
                <asp:Button ID="Button1" runat="server" Text=" 搜 索 " OnClick="Button1_OnClick" />
            </td>
        </tr>
    </table>
            
        <asp:GridView  DataKeyNames="deliverid"  ID="GridView3" OnRowDataBound="GridView3_RowDataBound" CssClass="adminlist" runat="server" AutoGenerateColumns="False" RowStyle-HorizontalAlign="Center" PageSize="20" >
            <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("deliverid") %>" type="checkbox" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField DataNavigateUrlFields="deliverid" DataNavigateUrlFormatString="?id={0}" DataTextField="ExpressNumber" HeaderText="物流号"  HeaderStyle-Width="18%" />
                <asp:BoundField DataField="DeliverName" HeaderText="物流方式"  HeaderStyle-Width="10%" />
                <asp:HyperLinkField HeaderText="订单号" HeaderStyle-Width="15%" DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="Admin_ShowOrder.aspx?orderID={0}" DataTextField="OrderFormNum" />
                <asp:TemplateField HeaderText="买家" HeaderStyle-Width="15%">                    
                    <ItemTemplate>
                       <asp:HyperLink ID="Label1" NavigateUrl='<%# "Admin_UserDetail.aspx?UserID="+Eval("UserID") %>' runat="server" Text='<%# Bind("UserName") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="方向" HeaderStyle-Width="6%" >
                    <ItemTemplate>
                        <asp:Literal ID="litDeliverType" runat="server" Text='<%# (Eval("DeliverType").ToString()=="0")?"发货":"退货" %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DeliverDate" HeaderText="日期" HeaderStyle-Width="15%" />
                <asp:CheckBoxField DataField="Received" HeaderText="客户签收" ReadOnly="True" Text="是"  HeaderStyle-Width="8%" />
                <asp:TemplateField HeaderText="操作" ShowHeader="False"  >
                    <ItemTemplate >
                        <asp:HyperLink runat="server" ID="butedit" Text="详细"  NavigateUrl='<%# "?id="+Eval("deliverid") %>' />
                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName='<%#Eval("deliverid") %>' OnCommand="My_DeleteDeliverItem" OnClientClick="if(confirm('确定删除吗？'))return true;return false;" Text="删除" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <tr>
                    <th>ID</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>
	
	<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="deliverid" 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="Literal6" runat="server" Text='<%# (Eval("DeliverType").ToString()=="0")?"发货":"退货" %>' /></td>
                </tr>
                <tr>
                    <td class="ltd">
                        物流号：</td>
                    <td class="rtd"><asp:Literal ID="TxtExpressNum" runat="server" Text='<%# Eval("ExpressNumber") %>' /></td>
                </tr>
                <tr>
                    <td class="ltd">
                        物流公司：</td>
                    <td class="rtd"><asp:Literal ID="TxtDeliverCompany" runat="server"  Text='<%# Eval("DeliverCompany") %>' /></td>
                </tr>
                <tr>
                    <td class="ltd">
                        物流方式：</td>
                    <td class="rtd"><asp:Literal ID="TxtDeliverName" runat="server"  Text='<%# Eval("DeliverName") %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        发货日期：</td>
                    <td class="rtd"><asp:Literal ID="Literal5" runat="server" Text='<%# Eval("DeliverDate") %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        收货人：</td>
                    <td class="rtd"><asp:Literal ID="TxtConnetionName" runat="server" Text='<%# Eval("ConnetionName") %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        经手人：</td>
                    <td class="rtd"><asp:Literal ID="Literal1" runat="server" Text='<%# Eval("HandlerName") %>'/></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("Received").ToString()=="True")?"已签收":"未签收" %>'/></td>
                </tr>
                <tr>
                    <td class="ltd">
                        备注：</td>
                    <td class="rtd"><asp:TextBox ID="Literal3" runat="server" TextMode="MultiLine" Width="400" Height="60" Text='<%# Eval("Remark") %>'/></td>
                </tr>
            </table>
            <div style="padding:5px;">
                <input name="f" type="button" id="f" value=" 返 回 " onclick="history.back()" />
            </div>
        </ItemTemplate>
    </asp:FormView>
    
</asp:PlaceHolder>

	<br />
	<br />

</asp:Content>

