Ejemplo n.º 1
0
    //点击事件

    protected void txtEndNo_TextChanged1(object sender, EventArgs e)
    {
        try
        {
            //面单结束号的验证
            string end  = txtEndNo.Text.Trim();
            int    cnnt = regMan.GetAllend(end);
            if (cnnt <= 0)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('该面单号不属于本公司!!!')</script>");
                return;
            }


            int    cid = Convert.ToInt32(ddlCompany.SelectedValue);
            object obj = ComMan.GetCarrieCompanyMon(cid);
            int    cnt = Convert.ToInt32(obj);

            long Begin = Convert.ToInt64(txtBeginNo.Text);

            long End  = Convert.ToInt64(txtEndNo.Text);
            long sums = (End - Begin + 1) * cnt;

            txtmoney.Text = sums.ToString();
        }
        catch (Exception ex)
        {
            Response.Write("<script>alter('输入值的格式不正确!')</script>");
            return;
        }
    }