<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Admin_System_OnlinePayment" Title="打款平台管理" Codebehind="KS.OnlinePayment.aspx.cs" %>

<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Newtonsoft.Json" %>
<%@ Import Namespace="Newtonsoft.Json.Linq" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="Server">
    <asp:Panel ID="listPanel" runat="server" Width="100%">
        <div class="content-area mt20">
            <div class="myTitle">
              在线打款设置
            </div>
            <table width="99%" border="0" cellpadding="0" cellspacing="0" class="CTable no-borderTable">
                <tr>
                    <td width="60"><b>是否启用：</b></td>
                    <td width="600">
                        <asp:RadioButtonList ID="RdbApiAutoCreateUser" RepeatDirection="Horizontal" runat="server">
                            <asp:ListItem Value="1" Selected>启用</asp:ListItem>
                            <asp:ListItem Value="0">不启用</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                    <td width="600"></td>
                </tr>
            </table>
            <asp:Panel ID="Panel2" runat="server" Width="100%">
                <div class="courseList">
                    <asp:Repeater ID="list" runat="server">
                        <HeaderTemplate>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="CTable">
                                <tr class="CTitle">
                                    <td width="50">序号</td>
                                    <td width="150">名称</td>
                                    <td width="150">简要介绍</td>
                                    <td width="50">默认</td>
                                    <td style="width: 150px">操作</td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr onmouseover="this.className=&#39;CtrMouseOver&#39;" onmouseout="this.className=&#39;CtrMouseOut&#39;" onclick="chk(this)">
                                <td class="Ctd" style="text-align: center"><%#this.list.Items.Count + 1%></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("name") %></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("intro") %> </td>
                                <td class="courseList" style="text-align: center">
                                    <div class="input">
                                        <input type="radio" name="browser" <%#Eval("enable").ToString()=="true"?"checked='checked'":"" %> value="<%#Eval("ID") %>" />
                                    </div>
                                </td>
                                <td class="Ctd" style="text-align: center">
                                    <a onclick="doNone(event);" href="?id=<%#Eval("id") %>" class="edit" title="修改配置信息"></a>&nbsp;&nbsp;&nbsp;
                                    <a class="plicon" href="KS.OnlinePayment.aspx?action=Record&Contractype=1" title="打款记录查询"></a>&nbsp;&nbsp;&nbsp;
                                    <a  class="plicon" href="KS.OnlinePayment.aspx?action=Recharge&Contractype=2" title="充值记录查询"></a>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            <tr style="display: <%# bool.Parse((list.Items.Count==0).ToString())?"":"none"%>">
                                <td align="center" colspan="7">
                                    <div class="empty">没有添加任何记录</div>
                                </td>
                            </tr>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
                <asp:Label ID="Label_where" Visible="false" runat="server"></asp:Label>
                <div class="h20"></div>
                <%--<asp:Label ID="LabPage" runat="server"  ></asp:Label>--%>
                <KS:Page ID="Page2" runat="server" />
            </asp:Panel>


            <script type="text/javascript">
                showtips('<span class="state"><strong>注意事项：</strong></span>');
            </script>


            <div style="display: none">

                <KS:Page ID="Page1" runat="server" />
            </div>
            <asp:Panel ID="Panel1" runat="server" Height="30px" CssClass="main-button">
                &nbsp;&nbsp;<asp:Button ID="Button1" CssClass="button" runat="server" Text="保存云存储接口API配置" OnClick="Button1_Click" />&nbsp;
            </asp:Panel>
        </div>
    </asp:Panel>
    <asp:Panel ID="addPanel" runat="server" Width="100%" Visible="false">
        <div class="content-area mt20">
            <div class="myTitle">修改在线打款配置信息</div>
            <asp:HiddenField ID="HidID" runat="server" />
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="CTable no-borderTable">
                <tr>
                    <td class="lefttd" height="30" align="right" style="width: 198px"><b>打款平台名称：</b></td>
                    <td class="righttd"> <asp:TextBox ID="L_name" runat="server" CssClass="textbox" Width="300px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="lefttd" height="30" style="width: 198px">
                        <strong>备注说明：</strong></td>
                    <td class="righttd">&nbsp;<asp:TextBox CssClass="textbox" ID="TxtRemark" runat="server" Height="84px" TextMode="MultiLine"
                        Width="302px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td align="right" class="lefttd" height="30" style="width: 198px">
                        <strong>3Des：</strong></td>
                    <td class="righttd">
                        <asp:TextBox ID="T_des" runat="server" CssClass="textbox" Width="300px"></asp:TextBox>
                        <span style="color: #ff0000">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="T_des"
                            ErrorMessage="请输入des!"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="lefttd" height="30" style="width: 198px">
                        <strong>AppKey：</strong></td>
                    <td class="righttd">
                        <asp:TextBox ID="T_appkey" runat="server" CssClass="textbox" Width="300px"></asp:TextBox>
                        <span style="color: #ff0000">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="T_appkey"
                            ErrorMessage="请输入AppKey!"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="lefttd" height="30" style="width: 198px">
                        <strong>商户代码：</strong></td>
                    <td class="righttd">
                        <asp:TextBox ID="T_dealerid" runat="server" CssClass="textbox" Width="300px"></asp:TextBox>
                        <span style="color: #ff0000">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="T_dealerid"
                            ErrorMessage="请输入商户代码!"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="lefttd" height="30" style="width: 198px">
                        <strong>代征主体：</strong></td>
                    <td class="righttd">
                        <asp:TextBox ID="T_brokerid" runat="server" CssClass="textbox" Width="300px"></asp:TextBox>
                        <span style="color: #ff0000">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="T_brokerid"
                            ErrorMessage="请输入代征主体!"></asp:RequiredFieldValidator>
                    </td>
                </tr>

            </table>
            <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
        </div>
    </asp:Panel>
    <asp:Panel ID="RecordPanel" runat="server" Width="100%" Visible="false">
        <div class="content-area mt20">
             <div class="myTitle">
              打款记录查询
               <a href="KS.OnlinePayment.aspx?action=Contrac&Contractype=" class="fr button mr20"><span>返回</span></a>
            </div>
            <table width="99%" border="0" cellpadding="0" cellspacing="0" class="CTable no-borderTable">
                <tr>
                    <td width="150"><b>获取今天订单文件：</b></td>
                    <td width="200">
                        <asp:TextBox ID="TextOrder" onfocus="this.blur()" placeholder="格式：YYYY-MM-DD" Width="200px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox></td>
                    <td width="600">
                        <asp:Button ID="ButOrder" CssClass="button" runat="server" Text="获取文件" OnClick="ButOrder_Click" />
                        <span>(如果查询的是当天的数据，请明天再查询)</span>
                    </td>
                    <td width="600"></td>
                </tr>
                <tr>
                    <td width="150"><b>获取今日流水文件：</b></td>
                    <td width="200">
                        <asp:TextBox ID="TextWater" onfocus="this.blur()" placeholder="格式：YYYY-MM-DD" Width="200px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox></td>
                    <td width="600">
                        <asp:Button ID="ButWater" CssClass="button" runat="server" Text="获取文件" OnClick="ButWater_Click" />
                        <span>(如果查询的是当天的数据，请明天再查询)</span>
                    </td>
                    <td width="600"></td>
                </tr>
            </table>
        </div>
    </asp:Panel>
    <asp:Panel ID="RechargePanel" runat="server" Width="100%" Visible="false">
        <div class="content-area mt20">
             <div class="myTitle">
              充值记录查询
               <a href="KS.OnlinePayment.aspx?action=Contrac&Contractype=" class="fr button mr20"><span>返回</span></a>
            </div>
            <div class="clear"></div>
            <div class="quickSearch clearfix noBorderBottom">
                <div class="longquickSearch">
                    <div class="SearchBox fl">
                        <b>开始时间:</b>
                        <asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="200px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
                        <b>结束时间:</b>
                        <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="200px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
                        <asp:Button ID="Search" runat="server" CssClass="button" Text="查询" OnClick="Search_Click" />
                    </div>
                </div>
                <div class="fr liwrap longliwrap">
                    <asp:Button ID="Button4" runat="server" CssClass="button button_on" Text="导出记录" OnClick="Button4_Click" />
                </div>
            </div>
            <asp:Panel ID="Panel3" runat="server" Width="100%">
                <div class="courseList">
                    <asp:Repeater ID="ChatlistRepeater" runat="server">
                        <HeaderTemplate>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="CTable">
                                <tr class="CTitle">
                                    <td>序号</td>
                                    <td>充值记录ID</td>
                                    <td>实际到账金额</td>
                                    <td>充值金额</td>
                                    <td>创建时间</td>
                                    <td>资金用途</td>
                                </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr onmouseover="this.className=&#39;CtrMouseOver&#39;" onmouseout="this.className=&#39;CtrMouseOut&#39;" onclick="chk(this)">
                                <td class="Ctd" style="text-align: center"><%#this.ChatlistRepeater.Items.Count + 1%></td>
                                <td class="Ctd" style="text-align: left"><%#Eval("rechargeid") %></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("actualamount")  %></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("amount") %></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("createdat")  %></td>
                                <td class="Ctd" style="text-align: center"><%#Eval("rechargechannel") %></td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            <tr style="display: <%# bool.Parse((ChatlistRepeater.Items.Count==0).ToString())?"":"none"%>">
                                <td align="center" colspan="10">
                                    <div class="empty">
                                        没有查询到记录
                                    </div>
                                </td>
                            </tr>
                            </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
                <div class="listedit">
                    <div class="floatLeft allCheck">
                    </div>
                    <ul class="fl">
                        <asp:Label ID="LabPage1" runat="server"></asp:Label>
                        <asp:Button ID="Button2" class="button" runat="server" Text="上一页" Width="120px" OnClick="Button2_Click" />
                        <asp:Button ID="Button3" class="button" runat="server" Text="下一页" Width="120px" OnClick="Button3_Click" />
                    </ul>
                </div>
                <div class="h20"></div>
                <asp:Label ID="LabPage" runat="server"></asp:Label>
            </asp:Panel>
        </div>
    </asp:Panel>   
</asp:Content>

