<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NetGate_Edit.aspx.cs" Inherits="JRAPI.Admin.Channel.NetGate_Edit" %>
<%@ Register src="../Controls/SubPageTop.ascx" tagname="SubPageTop" tagprefix="uc1" %>
<uc1:SubPageTop ID="SubPageTop1" runat="server" />
<body>
<style type="text/css">
	html{_overflow-y:scroll}
</style>
<script type="text/javascript">
<!--
            $(function () {
                $.formValidator.initConfig({ autotip: true, formid: "myform", onerror: function (msg) { } });
                $("#txtGateName").formValidator({ onshow: "请输入网关名称", onfocus: "网关名称应该为2-50位之间" }).inputValidator({ min: 2, max: 50, onerror: "网关名称应该为2-50位之间" });
                $("#dpdGateType").formValidator({ onshow: "请选择网关类别", onfocus: "请选择网关类别" }).inputValidator({ min: 1, onerror: "请选择网关类别" });
                $("#txtGateCode").formValidator({ onshow: "请输入接口标识", onfocus: "请输入接口标识" }).inputValidator({ min: 1, max: 50, onerror: "请正确输入接口标识" });
                $("#txtGateUserID").formValidator({ onshow: "请输入商户ID", onfocus: "请输入商户ID" }).inputValidator({ min: 1, max: 50, onerror: "请正确输入商户ID" });
                $("#txtUserKey").formValidator({ onshow: "请输入商户KEY", onfocus: "请输入商户KEY" }).inputValidator({ min: 1, onerror: "请正确输入商户KEY" });
                $("#txtGateUrl").formValidator({ onshow: "请填写接入地址", onfocus: "请填写接入地址", tipcss: { width: '300px' }, empty: false }).inputValidator({ onerror: "请填写接入地址" }).regexValidator({ regexp: "url", datatype: "enum", onerror: "请填写正确的接入地址" });
            })
//-->
</script>
<form method="post" runat="server" id="myform" >
<div class="pad-10">
<div class="col-tab">
<ul class="tabBut cu-li">
            <li id="tab_setting_1" class="on" onclick="SwapTab('setting','on','',2,1);">基本信息</li>
            <li id="tab_setting_2" onclick="SwapTab('setting','on','',2,2);">成本比例</li>

</ul>
<div id="div_setting_1" class="contentList pad-10">
<table width="100%" class="table_form contentWrap">
<tr>
<td width="80">网关名称</td> 
<td><asp:TextBox ID="txtGateName" runat="server" CssClass="input-text" Columns="50"></asp:TextBox></td>
</tr>
<tr>
<td width="80">网关类别</td> 
<td>
    <asp:DropDownList ID="dpdGateType" runat="server">
    </asp:DropDownList>
</td>
</tr>
<tr>
<td>接口标识</td> 
<td><asp:TextBox ID="txtGateCode" runat="server" CssClass="input-text" Columns="50"></asp:TextBox></td>
</tr>
<tr>
<td>商户ID</td> 
<td><asp:TextBox ID="txtGateUserID" runat="server" CssClass="input-text"  Columns="50"></asp:TextBox></td>
</tr>
<tr>
<td>商户KEY</td>
<td>
<asp:TextBox ID="txtUserKey" runat="server" CssClass="input-text" Columns="80"></asp:TextBox>
</td>
</tr>
<tr>
<td>邮件地址</td>
<td>
<asp:TextBox ID="txtUserEmail" runat="server" CssClass="input-text" Columns="50"></asp:TextBox>
</td>
</tr>
<tr>
<td>接入地址</td>
<td>
<asp:TextBox ID="txtGateUrl" runat="server"  Columns="80"></asp:TextBox>
</td>
</tr>
<tr>
<td>启用跳转</td>
<td>
    <asp:CheckBox ID="cboxJump" runat="server" />
</td>
</tr>
<tr>
<td>跳转地址</td>
<td>
<asp:TextBox ID="txtGateJumpUrl" runat="server"  Columns="80"></asp:TextBox>
</td>
</tr>
<tr>
<td>备注(可作为附加字段使用)</td>
<td>
<asp:TextBox ID="txtGateRemark" runat="server"  Columns="80"></asp:TextBox>
</td>
</tr>
</table>
</div>
<div id="div_setting_2" class="contentList pad-10 hidden">
<div  class="div_list">
<ul>
<li  style="width:300px"><span>网银通道</span><input name="Rate0" type="text" id="GateRate0" value="<%=getChannelRate(0) %>" size="10" maxlength="6" Class="input-text NumDecText"/>%</li>
    <asp:Repeater ID="repChannel" runat="server">
    <ItemTemplate>
      <li style="width:300px"><span><%# Eval("ChannelName")%></span><input name="Rate<%# Eval("Channelid") %>" type="text" id="GateRate<%# Eval("Channelid") %>" value="<%# getChannelRate(JRAPI.Common.TypeConverter.ObjectToInt(Eval("Channelid"))) %>" size="10" maxlength="6" Class="input-text NumDecText"/>%</li>
    </ItemTemplate>
    </asp:Repeater>     
</ul>
  </div>
</div>

    <div class="bk15"></div>
<asp:Button ID="btnSubmit" runat="server" Text="提交" CssClass="button" 
    onclick="btnSubmit_Click" />
</div>
</div>
</form>
</body>
<script type="text/javascript">
    function SwapTab(name, cls_show, cls_hide, cnt, cur) {
        for (i = 1; i <= cnt; i++) {
            if (i == cur) {
                $('#div_' + name + '_' + i).show();
                $('#tab_' + name + '_' + i).attr('class', cls_show);
            } else {
                $('#div_' + name + '_' + i).hide();
                $('#tab_' + name + '_' + i).attr('class', cls_hide);
            }
        }
    }
</script>
</html>