<%@ page language="C#" autoeventwireup="true" inherits="Score_Order_List, GroupTGWeb_deploy" %>

<%@ 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" width="10%">
                    <asp:Label ID="LabelOrderNumber" runat="server" Text="订单号："></asp:Label>
                </td>
                <td width="20%">
                    <asp:TextBox ID="TextBoxOrderNumber" MaxLength="20" runat="server" CssClass="input1"></asp:TextBox>
                    <%-- <asp:RegularExpressionValidator ID="RegularExpressionValidatorRepertoryTextBoxOrderNumber"
                        runat="server" ControlToValidate="TextBoxOrderNumber" ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"
                        Display="Dynamic"></asp:RegularExpressionValidator>--%>
                </td>
                <td align="right" width="10%">
                    <asp:Label ID="LabelMemLoginID" runat="server" Text="收货人："></asp:Label>
                </td>
                <td width="20%">
                    <asp:TextBox ID="TextBoxMemLoginID" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right" width="10%">
                    <asp:Label ID="LabelOderStatus" runat="server" Text="订单状态："></asp:Label>
                </td>
                <td width="30%">
                    <asp:DropDownList ID="DropDownListOderStatus" runat="server" CssClass="select1">
                    </asp:DropDownList>
                </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>
            </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>
            </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="LabelShouldCostTotalScore" runat="server" Text="兑换积分："></asp:Label>
                </td>
                <td colspan="3">
                    <asp:TextBox ID="TextBoxCostTotalScore1" MaxLength="9" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorShouldPayPrice1" runat="server"
                        ControlToValidate="TextBoxCostTotalScore1" Display="Dynamic" ErrorMessage="输入格式不正确"
                        ValidationExpression="^[0-9]{1,9}$"></asp:RegularExpressionValidator>
                    -<asp:TextBox ID="TextBoxCostTotalScore2" runat="server" MaxLength="9" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorShouldPayPrice2" runat="server"
                        ControlToValidate="TextBoxCostTotalScore2" Display="Dynamic" ErrorMessage="输入格式不正确"
                        ValidationExpression="^[0-9]{1,9}$"></asp:RegularExpressionValidator>
                    <asp:CompareValidator ID="CompareValidatorTextBoxCostTotalScore2" runat="server"
                        ControlToValidate="TextBoxCostTotalScore2" Display="Dynamic" ErrorMessage="开始积分应当少于末尾积分"
                        Operator="GreaterThan" ControlToCompare="TextBoxCostTotalScore1"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelCreateTime" runat="server" Text="下单日期："></asp:Label>
                </td>
                <td colspan="4">
                    <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>
                    <asp:CompareValidator ID="CompareValidatorTextBoxCreateTime2" runat="server" ControlToValidate="TextBoxCreateTime2"
                        Display="Dynamic" ErrorMessage="结束时间必须大于开始时间" Operator="GreaterThan" Type="Date"
                        ControlToCompare="TextBoxCreateTime1"></asp:CompareValidator>
                    <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>
            <tr style="display: none;">
                <td align="right">
                    <asp:Label ID="Label2" runat="server" Text="收货人："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxName" runat="server" CssClass="input1"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
    <table style="width: 100%">
        <tr>
            <td align="left">
                <div class="vote">
                    <table>
                        <tr>
                            <td>
                                <asp:Button ID="ButtonReport" runat="server" OnClick="ButtonReport_Click" Text="导出到Excel"
                                    CausesValidation="False" CssClass="bt3" />
                            </td>
                            <td>
                                <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>
                            </td>
                        </tr>
                    </table>
                </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="" 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:TemplateField HeaderText="订单号">
                            <ItemTemplate>
                                <a href='<%# ReturnOrderDetailUrl(Eval("Guid")) %>'>
                                    <asp:Label ID="LabelScoreOrderNumber" runat="server" Text='<%# Eval("OrderNumber") %>'></asp:Label></a>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <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="PaymentName" HeaderText="支付方式" SortExpression="PaymentName">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="CostTotalScore" HeaderText="商品总积分" SortExpression="CostTotalScore">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="应付金额" DataField="TotaltPrice" SortExpression="TotaltPrice">
                            <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:TemplateField HeaderText="会员处理状态">
                            <ItemTemplate>
                                <asp:Label ID="LabelMemberOrderState" runat="server" Text='<%# Eval("IsDeleted") %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </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" Style="display: none;" />
                    <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="if(Page_ClientValidate()) return DeleteButton();return false;"
                        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_ScoreOrderInfo_Action">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxOrderNumber" Name="orderNumber" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxName" Name="memLoginID" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxMemLoginID" 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="TextBoxCostTotalScore1" Name="shouldPayScore1" PropertyName="Text"
                Type="Decimal" />
            <asp:ControlParameter ControlID="TextBoxCostTotalScore2" Name="shouldPayScore2" 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="-1" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
