protected void btnAdd_Click(object sender,EventArgs e)
{
txtEmpID.Text = Coeno.Utility.String.CleanUpInput(txtEmpID.Text);
txtEmpName.Text= Coeno.Utility.String.CleanUpInput(txtEmpName.Text);
txtEmpCardID.Text = Coeno.Utility.String.CleanUpInput(txtEmpCardID.Text);
--(点击按钮触发事件调用存储过程2)
string EmpCardID = txtEmpCardID.Text + "-" + txtEmpID.Text;
if(string.IsNullOrEmpty(txtEmpID.Text))\
{
lblMsg.Text = "工号不可为空";
lblMsg.ForeColor = System.Drawing.Color.Red;
return;
}
if(string.IsNullOrEmpty(txtEmpCard.Text))
{
lblMsg.Text="卡号不可为空";
lblMsg.ForeColor=System.Drawing.Color.Red;
return;
}
if(txtEmpCardID.Text.Length!=10)
{
lblMsg.Text="卡号必须是10位";
lblMsg.ForeColor=System.Drawing.Color.Red;
return;
}
string ReturnStatus = "";
string ReturnID="";
string ReturnMsg="";
try
{
}
catch(Exception ed)
{
}
}
原文地址:https://www.cnblogs.com/ximi07/p/11143387.html