62,072
社区成员
发帖
与我相关
我的任务
分享
if (txt_name.Text.Trim() == "")
{
ScriptManager.RegisterStartupScript(Page, GetType(), "click", "alert('请输入账号!');", true);
return;
}
if (txt_name.Text.Trim().Length < 19)
{
ScriptManager.RegisterStartupScript(Page, GetType(), "click", "alert('账号必须是19位!');", true);
return;
}
string zh = txt_name.Text.Trim();
string sql = " select * from newzh where newzh_account ='" + zh + "'";
//判断下账号是否存在
DataTable dt = new DataTable();
dt = DAL.DataBaseWj.Exe_dt(sql);
if (dt.Rows.Count == 0)
{
dt.Dispose();
ScriptManager.RegisterStartupScript(this.Button1, GetType(), "click", "alert(无此账号!');", true);
return;
}
dt.Dispose();
getData1();
}
ScriptManager.RegisterStartupScript(this, this.GetType(), "ksjfkd", "alert('账号必须是19位!')", true);