<%@ page language="C#" autoeventwireup="true" inherits="Admin_CollectionBill_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">
                    <asp:Label ID="LabelOrderNumber" runat="server" Text="订单号："></asp:Label>
                </td>
                <td>
                    <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">
                    <asp:Label ID="LabelMemLoginID" runat="server" Text="付款人："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxMemLoginID" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td>
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelPaymentGuid" runat="server" Text="支付方式："></asp:Label>
                </td>
                <td colspan="4">
                    <asp:DropDownList ID="DropDownListPaymentGuid" runat="server" CssClass="select1">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelShouldPayPrice" runat="server" Text="已付金额："></asp:Label>
                </td>
                <td colspan="4" class="style1">
                    <asp:TextBox ID="TextBoxShouldPayPrice1" runat="server" CssClass="input1" onchange="checkFirstToSecond(this.id)"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorShouldPayPrice1" runat="server"
                        ControlToValidate="TextBoxShouldPayPrice1" Display="Dynamic" ErrorMessage="输入格式不正确"
                        ValidationExpression="^[0-9]{1,7}(\.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-<asp:TextBox ID="TextBoxShouldPayPrice2" runat="server"
                        CssClass="input1" onchange="checkSecondToFirst(this.id)"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorShouldPayPrice2" runat="server"
                        ControlToValidate="TextBoxShouldPayPrice2" Display="Dynamic" ErrorMessage="输入格式不正确"
                        ValidationExpression="^[0-9]{1,7}(\.[0-9]{1,3})?$"></asp:RegularExpressionValidator>
                    <%--<asp:CompareValidator ID="CompareValidatorTextBoxShouldPayPrice2" runat="server" ControlToValidate="TextBoxShouldPayPrice2"
                            Display="Dynamic" ErrorMessage="开始金额必须小于末尾金额" Operator="GreaterThan" Type="Date"
                            ControlToCompare="TextBoxShouldPayPrice1"></asp:CompareValidator>--%>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelCreateTime" runat="server" Text="付款日期："></asp:Label>
                </td>
                <td colspan="3">
                    <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="RegularExpressionValidatorTextBoxCreateTime2"
                        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>
        </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" />&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="ButtonHtml" runat="server" Text="导出到Html" CausesValidation="False"
                        CssClass="bt3" OnClick="ButtonHtml_Click" OnClientClick="javascript:document.getElementById('form1').target='_blank';window.location.href=window.location.href;" />
                    <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="" DataSourceID="ObjectDataSourceData">
                    <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='<%# "CollectionBill_Detail.aspx?Guid="+Eval("Guid") %>'>
                                    <%# Eval("OrderNumber") %></a>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="CreateTime" HeaderText="下单日期" SortExpression="CreateTime">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField DataField="PayTime" HeaderText="付款日期" SortExpression="PayTime">
                            <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:TemplateField HeaderText="支付方式">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# ChangePayment(DataBinder.Eval(Container, "DataItem(PaymentType)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="商品总金额" DataField="ProductPrice" SortExpression="ProductPrice">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="已付金额" DataField="AlreadPayPrice" SortExpression="AlreadPayPrice">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="收款单备注" DataField="Note" SortExpression="Note">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                    </Columns>
                </cc1:Num1GridView>
            </td>
        </tr>
        <tr>
            <td align="left">
                <div class="vote">
                    <asp:Button ID="ButtonEdit" runat="server" OnClick="ButtonEdit_Click" OnClientClick="return EditButton()"
                        Text="查看详细" CausesValidation="False" CssClass="bt3" />
                    <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:HiddenField ID="HiddenFieldMember" runat="server" Value="0" />
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="Search"
        TypeName="ShopNum1.BusinessLogic.ShopNum1_CollectionBillInfo_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="DropDownListPaymentGuid" Name="PaymentGuid" 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 DefaultValue="0" Name="IsDelete" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
