<%@ page language="C#" autoeventwireup="true" inherits="Admin_Order_List, ShopNum1Deploy" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ShopNum1" %>
<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>
<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="ShopNum1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
       <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
<script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>

</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
      <%--  <asp:ScriptManager ID="ScriptManager1" runat="server">
   </asp:ScriptManager>--%>
<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>--%>
     <div class="navigator">【 订单列表 】</div>
     <div class="query">
    <table style="width:100%">
            <tr>
                <td align="right">
                    <asp:Label ID="LabelOrderNumber" runat="server" Text="订单号："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxOrderNumber" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelMemLoginID" runat="server" Text="购买人："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxMemLoginID" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelOderStatus" runat="server" Text="订单状态："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListOderStatus" runat="server"  CssClass="select1">
                    </asp:DropDownList>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelAddress" runat="server" Text="详细地址："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxAddress" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelPostalcode" runat="server" Text="邮编："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxPostalcode" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                <td align="right">
                    <asp:Label ID="LabelPaymentGuid" runat="server" Text="支付方式："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListPaymentGuid" runat="server" CssClass="select1">
                    </asp:DropDownList>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelMobile" runat="server" Text="手机号码："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxMobile" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelEmail" runat="server" Text="电子邮件："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxEmail" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                <td align="right">
                    <asp:Label ID="LabelDispatchModeGuid" runat="server" Text="配送方式："></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="DropDownListDispatchModeGuid" runat="server" 
                        CssClass="select1">
                    </asp:DropDownList>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelTel" runat="server" Text="联系电话："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxTel" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="LabelName" runat="server" Text="收货人："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxName" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelShouldPayPrice" runat="server" Text="应付金额："></asp:Label>
                </td>
                <td colspan="5" class="style1">
                    <asp:TextBox ID="TextBoxShouldPayPrice1" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorShouldPayPrice1" 
                            runat="server" ControlToValidate="TextBoxShouldPayPrice1" Display="Dynamic" 
                            ErrorMessage="输入格式不正确" 

                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-<asp:TextBox ID="TextBoxShouldPayPrice2" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorShouldPayPrice2" 
                            runat="server" ControlToValidate="TextBoxShouldPayPrice2" Display="Dynamic" 
                            ErrorMessage="输入格式不正确" 
                            
                            ValidationExpression="^[0-9]+(.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                </td>
                <td align="right">
                    </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelCreateTime" runat="server" Text="下单日期："></asp:Label>
                </td>
                <td colspan="5">
                    <asp:TextBox ID="TextBoxCreateTime1" runat="server" CssClass="input1"></asp:TextBox>
                     <img id="imgCalendarCreateTime1" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorCreateTime1" 
                            runat="server" ControlToValidate="TextBoxCreateTime1" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                            <ShopNum1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
                                        EnableScriptGlobalization="True" EnableScriptLocalization="True">
                            </ShopNum1:ToolkitScriptManager>
                            &nbsp;<ShopNum1:CalendarExtender 
                                      ID="CalendarExtender1" runat="server" TargetControlID="TextBoxCreateTime1" 
                                      PopupButtonID="imgCalendarCreateTime1" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender>-<asp:TextBox ID="TextBoxCreateTime2" runat="server" CssClass="input1"></asp:TextBox>
                        <img id="imgCalendarCreateTime2" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorCreateTime2" 
                            runat="server" ControlToValidate="TextBoxCreateTime2" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                            <ShopNum1:CalendarExtender 
                                     ID="CalendarExtender2" runat="server" TargetControlID="TextBoxCreateTime2" 
                         PopupButtonID="imgCalendarCreateTime2" CssClass="ajax__calendar">
                        </ShopNum1:CalendarExtender>
                </td>
                <td style="width: 42px; height: 25px">
                    <asp:Button ID="ButtonSearch" runat="server" 
                        onclick="ButtonSearch_Click" Text="查询" CssClass="bt2" />
                </td>
            </tr>
            </table></div>
<table  style="width:100%">
  <tr>
                        <td align="left">
                        <div class="vote">
                            <asp:Button ID="ButtonReport" runat="server" onclick="ButtonReport_Click" Text="导出到Excel" 
                                CausesValidation="False"  CssClass="bt3"/>
                            <asp:RadioButtonList ID="RadioButtonListOutPage" runat="server" 
                                AutoPostBack="True" RepeatDirection="Horizontal">
                                <asp:ListItem Selected="True" Value="0">仅打印当前页</asp:ListItem>
                                <asp:ListItem Value="1">打印所有查询记录</asp:ListItem>
                            </asp:RadioButtonList>
                            </div>                     
               </td>                    
                    </tr>
                    <tr>
                        <td align="left">
                            
            <cc1:Num1GridView ID="Num1GridViewShow" runat="server" 
                AutoGenerateColumns="False" 
                AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif" 
                DescendingImageUrl="~/images/SortDesc.gif" Width="100%" AddSequenceColumn="False" 
                                AllowMultiColumnSorting="False" BorderColor="#CCDDEF" BorderStyle="Solid" 
                                BorderWidth="1px" CellPadding="4" Del="False" DeletePromptText="确实要删除指定的记录吗？" 
                                Edit="False" FixHeader="False" GridViewSortDirection="Ascending" 
                                PagingStyle="None" style="margin-left: 2px;" TableName="" 
                                Font-Size="Small" DataSourceID="ObjectDataSourceData" 
                                onrowdatabound="Num1GridViewShow_RowDataBound">          
<HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF"></HeaderStyle>

<PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                       <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" 
                            type="checkbox"  />
                    </HeaderTemplate>
                    <ItemTemplate>
<%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                         <input id="checkboxItem"   value='<%# Eval("Guid") %>'  type="checkbox" />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" >
                        <HeaderStyle CssClass="hidden" />
                        <ItemStyle CssClass="hidden" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="OrderNumber" HeaderText="订单号" 
                        SortExpression="OrderNumber" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CreateTime" HeaderText="下单日期" 
                        SortExpression="CreateTime" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="收货人" DataField="Name" 
                        SortExpression="Name">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="MemLoginID" HeaderText="购买人" 
                        SortExpression="MemLoginID">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="PaymentName" HeaderText="支付方式" 
                        SortExpression="PaymentName">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ProductPrice" HeaderText="商品总金额" 
                        SortExpression="ProductPrice">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>     
                    <asp:BoundField HeaderText="应付金额" DataField="ShouldPayPrice" 
                        SortExpression="ShouldPayPrice">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="订单状态" SortExpression="OderStatus">                     
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text= '<%# ChangeOderStatus(DataBinder.Eval(Container, "DataItem(OderStatus)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                       <asp:TemplateField HeaderText="支付状态" SortExpression="OderStatus">                     
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text= '<%# ChangePaymentStatus(DataBinder.Eval(Container, "DataItem(PaymentStatus)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="发货状态" SortExpression="OderStatus">                     
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text= '<%# ChangeShipmentStatus(DataBinder.Eval(Container, "DataItem(ShipmentStatus)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                            <asp:BoundField DataField="BuyType" HeaderText="是否为团购订单">
                                <HeaderStyle CssClass="hidden" />
                                <ItemStyle CssClass="hidden" />
                    </asp:BoundField>
                            </Columns>
            </cc1:Num1GridView>
                        </td>
                    </tr>
                       <tr>
                        <td align="left">
                        <div class="vote">
                        <asp:Button ID="ButtonAdd" runat="server" onclick="ButtonAdd_Click" 
                                onclientclick="GetCheckedBoxValues()" Text="添加" CausesValidation="False" CssClass="bt2" />
                            <asp:Button ID="ButtonEdit" runat="server" onclick="ButtonEdit_Click" 
                                onclientclick="return EditButton()" Text="查看" CausesValidation="False" CssClass="bt2"/>
                            <asp:Button ID="ButtonDelete" runat="server" onclick="ButtonDelete_Click" 
                                onclientclick="return DeleteButton()" Text="删除" CausesValidation="False" CssClass="bt2"/>                       
                            <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" CssClass="bt2"/>
                            </div></td>                    
                    </tr>
</table>
        <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%><br />
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
        
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_OrderInfo_Action" 
        >
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxOrderNumber" Name="orderNumber" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxMemLoginID" Name="memLoginID" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxName" Name="name" PropertyName="Text" 
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxAddress" 
                Name="address" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxPostalcode" Name="postalcode" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxTel" Name="tel" PropertyName="Text" 
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxMobile" Name="mobile" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxEmail" Name="email" PropertyName="Text" 
                Type="String" />
            <asp:ControlParameter ControlID="DropDownListDispatchModeGuid" 
                Name="dispatchModeGuid" PropertyName="SelectedValue" Type="String" />
            <asp:ControlParameter ControlID="DropDownListPaymentGuid" Name="paymentGuid" 
                PropertyName="SelectedValue" Type="String" />
            <asp:ControlParameter ControlID="DropDownListOderStatus" Name="oderStatus" 
                PropertyName="SelectedValue" Type="String" />
            <asp:ControlParameter ControlID="TextBoxShouldPayPrice1" Name="shouldPayPrice1" 
                PropertyName="Text" Type="Decimal" />
            <asp:ControlParameter ControlID="TextBoxShouldPayPrice2" Name="shouldPayPrice2" 
                PropertyName="Text" Type="Decimal" />
            <asp:ControlParameter ControlID="TextBoxCreateTime1" Name="createTime1" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxCreateTime2" Name="createTime2" 
                PropertyName="Text" Type="String" />
            <asp:Parameter Name="isDeleted" Type="Int32" DefaultValue="0" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>