<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.EnterPrise.KS_CsEpAddDuanXin" Codebehind="KS.TcSmsAdd.aspx.cs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
    <script>
        $(window).load(function () {
            $("#<%=TxtDuanxin.ClientID%>").val($("#Tiaoshu").html());
            var v = parseFloat($("#<%=TxtDuanxin.ClientID%>").val()) * parseFloat($("#money").html());
            if (isNaN(v)) {
                $("#<%=Label1.ClientID%>").html("0");
            }
            else {
                $("#<%=Label1.ClientID%>").append(v);
            }
        });
        function getMoney() {
            var v = jQuery("#<%=this.TxtDuanxin.ClientID %>").val();
            if (v == '') {
                $("#ctl00_KSContent_Label1").html(0);
            }
            else {
                var m = parseFloat($("#<%=TxtDuanxin.ClientID%>").val()) * parseFloat($("#money").html());
                $("#ctl00_KSContent_Label1").html(m);
            }
        }

        function CheckForm() {
            var duanxin = $("#<%=TxtDuanxin.ClientID%>").val();

            if (duanxin == '') {
                KesionJS.Alert('请输入短信条数！', '$("#<%=TxtDuanxin.ClientID%>").focus()');
                return false;
            }
            else {
                if (parseInt(duanxin) <= 0) {
                    KesionJS.Alert('请输入正确短信条数！', '$("#<%=TxtDuanxin.ClientID%>").focus()');
                    return false;
                }
            }
            return true;

        }
    </script>
    <asp:Panel ID="AddPanel" runat="server" Width="100%">
	<div class="t_tybox">	
       <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" class="CTable no-borderTable"> 
         <tr>
             <td class="lefttd" height="30" align="right" style="width:120px;">
                短信条数：</td>
            <td class="tag_left">
                <asp:TextBox ID="TxtDuanxin" runat="server" CssClass="textbox"  onBlur="getMoney();" onKeyUp="getMoney();" onFocus="getMoney();" ></asp:TextBox>条 
            </td>
        </tr> 
        <tr style="display:none;">
            <td class="lefttd" height="30" align="right" style="width:120px;">
                短信费用：</td>
            <td class="tag_left">
               <asp:Label ID="Label1" ForeColor="Red" runat="server" style=" font-size:30px;color:#f14e29;"></asp:Label> 元
                <span class="tips" >一条<font color="red"><span id="money"><%=ep.GetEpConfig("Setting", 17)%></span></font>元</span>
            </td>
        </tr>
        <tr>
        	<td class="lefttd" height="30" align="right" style="width:120px;"></td>
            <td class="tag_left">
               <asp:Button ID="Button2"  CssClass="button button_on" runat="server" OnClientClick="return(CheckForm());" Text="确定充值" OnClick="Button2_Click" />
            </td>
        </tr>  
      </table>
      <div class="message">当前用户的短信条数有<font color="red" style=" font-size:20px; margin-left:5px;"><%=DuanXinTiaoshu %></font>条</div>  
   </div>
   
</asp:Panel>
</asp:Content>

