现在的位置: 首页 > 综合 > 正文

javascript 调用CS 后台

2014年03月03日 ⁄ 综合 ⁄ 共 608字 ⁄ 字号 评论关闭

var amount=<%=DDamount()%>;
            if(document.getElementById("TextBox4").value>amount)
            {
                alert('对不起!入库数量不能大于订单可入库数量!');
                return false;
            }

//后台

//检查入库数量是否过大
    protected string DDamount()
    {
        if (GridView1.Rows.Count > 0)
        {
            try
            {
                double aa = Convert.ToDouble(GridView1.Rows[0].Cells[3].Text) - Convert.ToDouble(GridView1.Rows[0].Cells[4].Text);
                return aa.ToString();
            }
            catch
            {
                return GridView1.Rows[0].Cells[3].Text;
            }
        }
        else
            return "0";
    }

抱歉!评论已关闭.