Beispiel #1
0
        private bool CheckValue()
        {
            if (string.IsNullOrEmpty(Txtdept_id.Text))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('部门编号不能为空!');", true);
                Txtdept_id.Focus();
                return(false);
            }
            //if (string.IsNullOrEmpty(Txtdept_name.Text))
            //{
            //    ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('部门名称不能为空!');", true);
            //    Txtdept_name.Focus();
            //    return false;
            //}


            return(true);
        }
Beispiel #2
0
        private bool CheckValue()
        {
            if (string.IsNullOrEmpty(Txtid.Text))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('子管理员账号不能为空!');", true);
                Txtid.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(Txtpsw.Text))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('密码不能为空!');", true);
                Txtpsw.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(Txtdept_id.Text))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('所属部门不能为空!');", true);
                Txtdept_id.Focus();
                return(false);
            }

            return(true);
        }