<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="get_numCaculator.aspx.cs" Inherits="VA.Modules.JDingMember.datasrc.get_numCaculator" %>
<!DOCTYPE HTML>
<html>
<head>
<title>数量值编辑</title>    
    <!--#include virtual="/include/css/edit.aspx"-->
    <!--#include virtual="/include/js/edit.aspx"--> 

    <style type="text/css">
        #container {
            border:solid 1px #B9CAD3;   
            height:1%;
            overflow:hidden;
            background-color:#EDF6FA;
            height:36px;
            font-size:14px;
        }
        #container .title{
            float:left;
            height:100%;
            line-height:35px;
            width:60px;
            font-weight:bold;
            text-align:center;
        }
        #container .textBox{
            float:left;
            border-left:solid 1px #B9CAD3;
            border-right:solid 1px #B9CAD3;
            height:100%;
            margin-left:-1px;
            width:84px;
            overflow:hidden;
            text-align:center;
        }
        #container .textBox .input{
           
        }
        #container .textBox .input:hover{
            background-color:#FFFFDD;
        }
        #container .showAll{
            float:left;
            height:100%;
            margin-left:-1px;
    
            font-size:14px;
            overflow:hidden;
        }
        #container .showAll input{
            border:0px;
            outline:none;
            height:27px;
            width:100%;    
            background-color:#3D96C9;
            color:#ffffff;

             /*圆角效果*/
            -moz-border-radius:0px 0px 0px 0px;      /* Gecko browsers */
            -webkit-border-radius: 0px 0px 0px 0px;   /* Webkit browsers */
            border-radius:0px 0px 0px 0px;            /* W3C syntax */
        }
        #container .showAll input:hover{
            background-color:#ff6600; 
        }
    </style>
</head>
<body>
<form id="Form1" method="post" runat="server">

<div class="editPageWrapper">

    <div id="container">                            
        <div class="title">数量</div>
        <div class="textBox">
            <input id="txtNumber" type="number" class="input" style="width:84px;height:36px;font-size:20px;font-weight:bold;text-align:center;outline:0px;border:0px solid #dddddd;" min="1" max="100000" value="<% = Request.QueryString["oldvalue"] %>" />  
        </div>
        <div class="showAll"><input type="button" id="btnSubmit" class="showAll" style="height:36px;width:111px;" onclick="ok()" value="确定" /></div>                
    </div> 

</div><!--editPageWrapper.END-->

<script type="text/javascript">

function ok() {
    
    var num = $("#txtNumber").val().trim();    
    if (num == "") {
        JTongAlert('提示', '“数量”为空或不是有效的数字！', 'error');
        return;
    }

    var validator = new DataValidator();    
    if (!validator.isFloat(num)) {
        JTongAlert('提示', '“数量”不是有效的数字！', 'error');
        return;
    }

    <%
        string callBack = Request.QueryString["callback"];
        if (String.IsNullOrEmpty(callBack))
        {
            Response.Write("window.parent.takeQuantityCallback(num);");
        }
        else
        {
            Response.Write("window.parent." + callBack + "(num);");
        }
    %>

}

</script>


</form>
</body>
</html> 