<%@ Page Language="C#" MasterPageFile="../Admin.Master" AutoEventWireup="true"
    ValidateRequest="false" CodeBehind="PayAdd.aspx.cs" Inherits="ETongJin.YM.Web.Admin.PayAdd"
     %>

<%@ Register Assembly="ETongJin.YM.UI" Namespace="ETongJin.YM.UI.Controls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script type="text/javascript">
    var imageObject;

    function ResizeImage(F, D, G) {
        if (F != null) {
            imageObject = F;
        }

        if (document.all) {
            if (imageObject.readyState != "complete") {
                setTimeout("ResizeImage(null," + D + "," + G + ")", 50);
                return;
            }
        }
        else if (!imageObject.complete) {
            setTimeout("ResizeImage(null," + D + "," + G + ")", 50);
            return;
        }

        var B = new Image();
        B.src = imageObject.src;
        var A = B.width;
        var C = B.height;
        if (A > D || C > G) {
            a = A / D;
            b = C / G;
            if (b > a) {
                a = b;
            }
            A = A / a;
            C = C / a;
        }
        if (A > 0 && C > 0) {
            imageObject.width = A;
            imageObject.height = C;
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <!-- 支付方式名称-->
    <table cellspacing="0" cellpadding="0" style="border: solid 1px #ffffff; padding: 3px;">
        <tr>
            <th colspan="3">
                <table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td style="color: #990000; font-weight: bold;">
                            添加支付方式 ：<br />
                        </td>
                    </tr>
                    <tr>
                        <td style="color: #333333;">
                            (从系统现有的支付接口类型中选择添加适合店铺的支付方式)
                        </td>
                    </tr>
                </table>
            </th>
        </tr>
        <cc1:PaymentModeView ID="paymentModeView" runat="server">
            <SkinTemplate>
            <tr>
                <td style="width: 100px;">
                    支付方式名称：
                </td>
                <td>
                    <asp:TextBox ID="txtName" runat="server" Columns="40" MaxLength="200"></asp:TextBox>
                </td>
                <td>
                    <div id="txtNameTip" runat="server">
                        <span id="msg_update">必填<br />
                            支付方式名称的长度限制在50个字符以内</span></div>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblGateway" runat="server" Text="接口类型："></asp:Label>
                </td>
                <td>
                    <cc1:PayInterfaceDropDownList ID="dropPayInterface" runat="server" AutoPostBack="true">
                    </cc1:PayInterfaceDropDownList>
                    <br />
                    <asp:HyperLink ID="hlinkImage" runat="server" Target="_blank">
                        <asp:Label ID="lblimage" runat="server"></asp:Label>
                    </asp:HyperLink>
                </td>
                <td>
                    <div id="dropPayInterfaceTip" runat="server">
                        <span id="msg_update0">必填<br />
                            在选择一个接口类型之前，必须具备一个在该支付公司注册过的账号，然后按照支付公司提供的账户信息填写此支付方式所需的信息，不同的接口类型要求填写的信息可能会不一样</span></div>
                </td>
            </tr>
            <tr id="tblrMerchantCode" runat="server">
                <td>
                    <asp:Label ID="lblMerchantCode" runat="server" Text="商户号："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtMerchantCode" runat="server" Columns="40" MaxLength="200"></asp:TextBox>
                </td>
                <td>
                    <div id="txtMerchantCodeTip" runat="server">
                        <span id="msg_update1">为了保证支付的安全性和真实性，很多支付公司都为商家提供了一个密钥并要求使用此密钥验证支付信息，也有的支付公司称之为校验码或验证码
                        </span>
                    </div>
                </td>
            </tr>
            <!-- 显示隐藏容器 邮件地址 -->
            <tr id="tblrImage" runat="server">
                <td>
                    <asp:Label ID="lblEmailAddress" runat="server" Text="商户邮件："></asp:Label>
                </td>
                <td>
                    <label>
                        <asp:TextBox ID="txtEmailAddress" runat="server" Columns="40" MaxLength="200"></asp:TextBox>
                    </label>
                </td>
                <td>
                </td>
            </tr>
            <!-- 显示隐藏容器 商户密钥 -->
            <tr id="tblrSecretKey" runat="server">
                <td>
                    <asp:Label ID="lblSecretKey" runat="server" Text="商户密钥"></asp:Label>
                </td>
                <td>
                    <label>
                        <asp:TextBox ID="txtSecretKey" runat="server" Columns="40" MaxLength="200"></asp:TextBox>
                    </label>
                </td>
                <td>
                    <div class="msgNormal">
                    </div>
                </td>
            </tr>
            <!-- 显示隐藏容器 第二密钥 -->
            <tr id="tblrSecondKey" runat="server">
                <td>
                    <asp:Label ID="lblSecondKey" runat="server" Text="商户第二密钥："></asp:Label>
                </td>
                <td>
                    <label>
                        <asp:TextBox ID="txtSecondKey" runat="server" Columns="40" MaxLength="200"></asp:TextBox>
                    </label>
                </td>
                <td>
                </td>
            </tr>
            <!-- 显示隐藏容器 商户密码 -->
            <tr id="tblrPassword" runat="server">
                <td>
                    <asp:Label ID="lblPassWord" runat="server" Text="商户密码："></asp:Label>
                </td>
                <td>
                    <label>
                        <asp:TextBox ID="txtPassword" runat="server" Columns="40" MaxLength="200" TextMode="Password"></asp:TextBox>
                    </label>
                </td>
                <td>
                    <div class="msgNormal">
                    </div>
                </td>
            </tr>
            <!-- 显示隐藏容器 合作伙伴 -->
            <tr id="tblrPartner" runat="server">
                <td>
                    <asp:Label ID="lblPartner" runat="server" Text="合作伙伴："></asp:Label>
                </td>
                <td>
                    <label>
                        <asp:TextBox ID="txtPartner" runat="server" Columns="40" MaxLength="200"></asp:TextBox>
                    </label>
                </td>
                <td>
                </td>
            </tr>
            <tr id="tblrCurrencys" runat="server">
                <td>
                    <asp:Label ID="lblCurrencys" runat="server" Text="支持的货币类型："></asp:Label>
                </td>
                <td style="width: 37%">
                    <label>
                        <asp:CheckBoxList ID="chkCurrencysList" runat="server" RepeatDirection="Horizontal"
                            RepeatColumns="4">
                        </asp:CheckBoxList>
                    </label>
                </td>
                <td>
                    <div class="msgNormal">
                        <span id="msg_update2">系统列举出了此接口类型支持的所有货币类型，您需要在这些货币类型中选择店铺接受支付的货币类型</span></div>
                </td>
            </tr>
            <tr id="tblCharge" runat="server">
                <td>
                    <asp:Label ID="lblCharge" runat="server" Text="手续费："></asp:Label>
                </td>
                <td>
                    <label>
                        <asp:TextBox ID="txtCharge" runat="server" Text="0" Columns="5"></asp:TextBox>
                        <asp:CheckBox ID="chkIsPercent" runat="server" Text="按百分比收取" />
                    </label>
                </td>
                <td>
                    <div id="txtChargeTip" runat="server">
                        <span id="msg_update3">必填<br />
                            设置顾客选择此支付方式时需要额外支付的手续费，如果选中百分比，则表示支付手续费的金额根据订单金额按照设置的百分比收取，如果不需要顾客支付手续费，则设为0</span></div>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblDisplaySequence" runat="server" Text="显示顺号："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtDisplaySequence" runat="server" Text="1" Columns="5"></asp:TextBox>
                </td>
                <td>
                    <div id="txtDisplaySequenceTip" runat="server">
                        <span id="msg_update4">必填<br />
                            设置顾客下订单选择支付方式时，此支付方式显示的位置</span></div>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblDescription" runat="server" Text="详细介绍："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="fcContent" runat="server" Width="100%" Height="200px">
                    </asp:TextBox>
                </td>
                <td>
                    &nbsp; 关于此支付方式的一些描述信息
                </td>
            </tr>
            <tr>
                <td class="bottonLeftTD">
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnCreate" runat="server" Text=" 添 加 " OnClick="btnCreate_Click" />
                    <input type="reset" value="返 回" />
                </td>
                <td>
                    &nbsp;
                </td>
            </tr></SkinTemplate>
        </cc1:PaymentModeView>
    </table>
</asp:Content>
