<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GatheringDetail.aspx.cs"
    Inherits="PowerEasy.Module.Promotion.WebSite.User.Promotion.GatheringDetail" %>

<%@ Import Namespace="PowerEasy.Framework.Common" %>
<!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 runat="server">
    <title></title>
</head>
<body>
    <pe:ExtendedSiteMapPath ID="YourPosition" SiteMapProvider="UserMapProvider" runat="server" />
    <form id="MainForm" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <script language="javascript" type="text/javascript">
        function ShowTabs(ID) {                
               for (i=0;i< <%=ShowPayMonthly%>;i++){
                    if(i == ID){
                        document.getElementById("TabTitle" + i).className="hover";
                        document.getElementById("Tabs" + i).style.display="";
                        if (i==2)
                       {
                          document.getElementById("tbtime").style.display="none";
                       }
                       else
                       {
                        document.getElementById("tbtime").style.display="";
                       }
                    }
                    else{
                        document.getElementById("TabTitle" + i).className="";
                        document.getElementById("Tabs" + i).style.display="none"; 
                       
                    }
               }
              
               
          } 
    </script>
    <div class="model_info_list">
        <div class="model_info_sate mtop10">
            <ul>
                <li id="TabTitle0" class="hover" onclick="ShowTabs(0)"><span><a href="javascript:void(0)">
                    <asp:Localize ID="Localize12" Text="<%$ Res: User_Promotion_GatheringDetail_Query,提现查询%>"
                        runat="server" /></a></span></li>
                <li id="TabTitle1" onclick="ShowTabs(1)"><span><a href="javascript:void(0)">
                    <asp:Localize ID="Localize13" Text="<%$ Res: User_Promotion_GatheringDetail_ApplyDetails,提现申请明细%>"
                        runat="server" /></a></span></li>
                <li id="TabTitle2" onclick="ShowTabs(2)" runat="server"><span><a href="javascript:void(0)">
                    <asp:Localize ID="Localize14" Text="<%$ Res: User_Promotion_GatheringDetail_apply,申请提现%>"
                        runat="server" /></a></span></li>
            </ul>
        </div>
        <div class="model_info_content">
            <table style="background-color: white;" width="100%" border="0" cellspacing="1" cellpadding="0">
                <tbody id="Tabs0">
                    <tr>
                        <td>
                            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                <ContentTemplate>
                                    <pe:MemberExtendedGridView ID="EgvGatheringDetail" runat="server" AutoGenerateColumns="False"
                                        CheckBoxFieldHeaderWidth="3%" DataSourceID="OdsGahteringDetail" IsHoldState="True"
                                        SerialText="" AllowPaging="True">
                                        <Columns>
                                            <pe:TemplateField HeaderText='<%$ Res: User_Promotion_GatheringDetail_ApplicationAmount,申请金额%>'
                                                SortExpression="Amount">
                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                <ItemTemplate>
                                                    <%# Eval("Amount","{0:N2}")%>
                                                    <asp:Localize ID="Localize7" Text="<%$ Res: User_Promotion_GatheringDetail_RMBYuan,元%>"
                                                        runat="server" />
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                            <pe:TemplateField HeaderText='<%$ Res: User_Promotion_GatheringDetail_ActuallyPaid,实际支付%>'
                                                SortExpression="RealityAmount">
                                                <ItemStyle HorizontalAlign="Center" Width="10%" />
                                                <ItemTemplate>
                                                    <%# Eval("RealityAmount", "{0:N2}")%><asp:Localize ID="Localize8" Text="<%$ Res: User_Promotion_GatheringDetail_RMBYuan,元%>"
                                                        runat="server" />
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                            <pe:TemplateField HeaderText='<%$ Res: User_Promotion_GatheringDetail_OperatingTime,提现操作时间%>'
                                                SortExpression="CreateTime">
                                                <ItemStyle HorizontalAlign="Center" />
                                                <ItemTemplate>
                                                    <%# Eval("CreateTime", "{0:yyyy-MM-dd HH:mm:ss}")%>
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                            <pe:TemplateField HeaderText="<%$ Res: User_Promotion_GatheringDetail_State,状态%>"
                                                SortExpression="State">
                                                <ItemStyle HorizontalAlign="Center" />
                                                <ItemTemplate>
                                                    <%#PowerEasy.Module.Promotion.BusinessLogic.ApplyGathering.GetState(DataConverter.ToInt32(Eval("State")))%>
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                            <pe:TemplateField HeaderText='<%$ Res: User_Promotion_GatheringDetail_Remark,备注%>'
                                                SortExpression="Remark">
                                                <ItemStyle HorizontalAlign="Left" Width="50%" />
                                                <ItemTemplate>
                                                    <%# Eval("Remark")%>
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                        </Columns>
                                    </pe:MemberExtendedGridView>
                                    <asp:ObjectDataSource ID="OdsGahteringDetail" runat="server" SelectMethod="GetApplyGatheringInfoList" 
                                        TypeName="PowerEasy.Module.Promotion.BusinessLogic.ApplyGathering" SelectCountMethod="GetTotalOfApplyGatheringByTime"
                                        EnablePaging="True" StartRowIndexParameterName="startRowIndexId" MaximumRowsParameterName="maxNumberRows">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="HdnKey" Name="userName" PropertyName="Value" Type="String" />
                                            <asp:ControlParameter ControlID="HdnState" Name="state" PropertyName="Value" Type="String"
                                                DefaultValue="2" />
                                            <asp:ControlParameter ControlID="DpkStartDate" Name="startDate" PropertyName="Text"
                                                Type="DateTime" />
                                            <asp:ControlParameter ControlID="DpkEndDate" Name="endDate" PropertyName="Text" Type="DateTime" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                </tbody>
                <tbody id="Tabs1" style="display: none">
                    <tr>
                        <td>
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <pe:MemberExtendedGridView ID="EgvApplyGathering" runat="server" CheckBoxFieldHeaderWidth="3%"
                                        IsHoldState="True" SerialText="" AutoGenerateColumns="False" DataSourceID="OdsApplyGathering"
                                        AllowPaging="True">
                                        <Columns>
                                            <pe:TemplateField HeaderText="<%$ Res: User_Promotion_GatheringDetail_applyID,申请单号%>"
                                                SortExpression="ID">
                                                <ItemStyle HorizontalAlign="Center" Width="15%" />
                                                <ItemTemplate>
                                                    <%# Eval("ID")%>
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                            <pe:TemplateField HeaderText="<%$ Res: User_Promotion_GatheringDetail_ApplicationAmount,申请金额%>"
                                                SortExpression="Amount">
                                                <ItemStyle HorizontalAlign="Center" Width="25%" />
                                                <ItemTemplate>
                                                    <%# Eval("Amount","{0:N2}")%><asp:Localize ID="Localize9" Text="<%$ Res: User_Promotion_GatheringDetail_RMBYuan,元%>"
                                                        runat="server" />
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                            <pe:TemplateField HeaderText="<%$ Res: User_Promotion_GatheringDetail_applyTime,申请时间%>"
                                                SortExpression="CreateTime">
                                                <ItemStyle HorizontalAlign="Center" Width="30%" />
                                                <ItemTemplate>
                                                    <%# Eval("CreateTime", "{0:yyyy-MM-dd HH:mm:ss}")%>
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                            <pe:TemplateField HeaderText="<%$ Res: User_Promotion_GatheringDetail_State,申请时间%>"
                                                SortExpression="State">
                                                <ItemStyle HorizontalAlign="Center" />
                                                <ItemTemplate>
                                                    <%#PowerEasy.Module.Promotion.BusinessLogic.ApplyGathering.GetState(DataConverter.ToInt32(Eval("State")))%>
                                                </ItemTemplate>
                                            </pe:TemplateField>
                                        </Columns>
                                    </pe:MemberExtendedGridView>
                                    <asp:ObjectDataSource ID="OdsApplyGathering" runat="server" SelectMethod="GetApplyGatheringInfoListByUserName"
                                        TypeName="PowerEasy.Module.Promotion.BusinessLogic.ApplyGathering" SelectCountMethod="GetTotalOfApplyGatheringByTime"
                                        EnablePaging="True" StartRowIndexParameterName="startRowIndexId" MaximumRowsParameterName="maxNumberRows">
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="HdnKey" Name="userName" PropertyName="Value" Type="String" />
                                            <asp:ControlParameter ControlID="DpkStartDate" Name="startDate" PropertyName="Text"
                                                Type="DateTime" />
                                            <asp:ControlParameter ControlID="DpkEndDate" Name="endDate" PropertyName="Text" Type="DateTime" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                                    <asp:HiddenField ID="HdnKey" runat="server" />
                                    <asp:HiddenField ID="HdnState" runat="server" />
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </td>
                    </tr>
                </tbody>
                <tbody id="Tabs2" style="display: none">
                    <tr>
                        <td>
                            <br />
                            <table cellpadding="2" cellspacing="1" align="center" width="90%">
                                <tr>
                                    <td bgcolor="f4f9fe">
                                        <table border="0" align="left" width="240px" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td colspan="2" height="5px">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="115px">
                                                    &nbsp;&nbsp;<asp:Localize ID="Localize1" Text="<%$ Res: User_Promotion_GatheringDetail_CurrentBalance,您当前可用余额 %>"
                                                        runat="server" />
                                                </td>
                                                <td align="left" width="100px">
                                                    <asp:Label ID="LblCurrentBalance" runat="server" Text="0.00"></asp:Label>
                                                    <asp:Localize ID="Localize6" Text="<%$ Res: User_Promotion_GatheringDetail_RMBYuan,元%>"
                                                        runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    &nbsp;&nbsp;<asp:Localize ID="Localize2" Text="<%$ Res: User_Promotion_GatheringDetail_AvailableBalance,您当前可提现余额%>"
                                                        runat="server" />
                                                </td>
                                                <td>
                                                    <asp:Label ID="LblAvailableBalance" runat="server" Text="0.00"></asp:Label>
                                                    <asp:Localize ID="Localize3" Text="<%$ Res: User_Promotion_GatheringDetail_RMBYuan,元%>"
                                                        runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" height="5px">
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong>
                                <asp:Localize ID="Localize4" Text="<%$ Res: User_Promotion_GatheringDetail_enteryouramount,请输入您要提现的金额%>"
                                    runat="server" />
                            </strong>
                        </td>
                    </tr>
                    <tr>
                        <td class="ok_tab">
                            &nbsp;<asp:TextBox ID="TxtMoney" runat="server" CssClass="inputxt"></asp:TextBox>&nbsp;<asp:Localize
                                ID="Localize5" Text="<%$ Res: User_Promotion_GatheringDetail_RMBYuan,元%>" runat="server" />&nbsp;&nbsp;&nbsp;<asp:Button
                                    ID="BtnAction" runat="server" CssClass="submit_button" Text='<%$ Res: User_Promotion_GatheringDetail_Submit,提交%>'
                                    OnClick="BtnAction_Click" ValidationGroup="AddAction" />
                            <pe:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtMoney"
                                Display="Dynamic" ValidationGroup="AddAction"><asp:Localize
                        ID="Localize16" Text="<%$ Res: User_Promotion_GatheringDetail_enteryouramount,请填写申请提现金额！%>" runat="server" /></pe:RequiredFieldValidator>
                            <pe:RegexValidator ValidateType="Money" ID="Vmoney" runat="server" ControlToValidate="TxtMoney"
                                Display="Dynamic" ErrorMessage="<%$ Res: User_Promotion_GatheringDetail_ListItem9,请正确填写金额！%>"
                                ValidationGroup="AddAction"></pe:RegexValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="ok_tab" height="30px">
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="clear">
    </div>
    <div id="tbtime" class="model_list_manage">
        <asp:Localize ID="Localize10" Text="<%$ Res: User_Promotion_GatheringDetail_Starttime,开始时间%>"
            runat="server" />：
        <pe:DatePicker ID="DpkStartDate" runat="server" Width="80" ValidationGroup="Vdate"
            CssClass="inputxt" DateImage="~/User/Images/Calendar.gif"></pe:DatePicker>
        <pe:RequiredFieldValidator ID="ValrDpkStartDate" ControlToValidate="DpkStartDate"
            runat="server" ErrorMessage="<%$ Res: User_Promotion__CommissionDetail_ListItem16,开始日期不能为空%>"
            Display="Dynamic" RequiredText="" ValidationGroup="Vdate"></pe:RequiredFieldValidator><pe:RegexValidator
                ValidateType="Date" ID="VdateStartDate" runat="server" ControlToValidate="DpkStartDate"
                Display="Dynamic" ErrorMessage="日期不正确！" SetFocusOnError="true" ValidationGroup="Vdate"></pe:RegexValidator>
        &nbsp;<asp:Localize ID="Localize11" Text="<%$ Res: User_Promotion_GatheringDetail_Endtime,结束时间%>"
            runat="server" />：
        <pe:DatePicker ID="DpkEndDate" runat="server" Width="80" ValidationGroup="Vdate"
            CssClass="inputxt" DateImage="~/User/Images/Calendar.gif"></pe:DatePicker><pe:RequiredFieldValidator
                ID="ValrDpkEndDate" ControlToValidate="DpkEndDate" runat="server" ErrorMessage="<%$ Res: User_Promotion__CommissionDetail_ListItem17,结束日期不能为空%>"
                Display="Dynamic" RequiredText="" ValidationGroup="Vdate"></pe:RequiredFieldValidator>
        <pe:RegexValidator ValidateType="Date" ID="VdateEndDate" runat="server" ControlToValidate="DpkEndDate"
            Display="Dynamic" ErrorMessage="日期不正确！" SetFocusOnError="true" ValidationGroup="Vdate"></pe:RegexValidator>
        &nbsp;
        <asp:Button ID="BtnSearch" runat="server" Text=" <%$ Res: User_Promotion__CommissionDetail_ListItem15,查询%> "
            OnClick="BtnSearch_Click" ValidationGroup="Vdate" CssClass="submit_button" />
    </div>
    <div class="model_Info_Tips">
        <dl>
            <dd>
                <asp:Label ID="LblMinimumAmount" Text="<%$ Res: User_Promotion__GatheringDetail_ListItem9,''%>"
                    runat="server"></asp:Label>
            </dd>
            <dd>
                <asp:Label ID="LblUnitAmount" Text="<%$ Res: User_Promotion__GatheringDetail_ListItem8,''%>"
                    runat="server"></asp:Label>
            </dd>
        </dl>
    </div>
    </form>
</body>
</html>
