为什么我的修改按钮执行以后会进行统一修改,代码如下
if (M_int_judge == 1){
if (txtAID.Text == "")
{
MessageBox.Show("畜只编号不能为空!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
if (!doperate.validateNum(txtAge.Text.Trim()))
{
errorASex.Clear();
errorAAge.SetError(txtAge, "这里必须输入数字");
}
else if (!doperate.validateSex(cboxSex.Text.Trim()))
{
errorAAge.Clear();
errorASex.SetError(cboxSex, "畜只性别格式不正确");
}
else
{
errorAAge.Clear();
errorASex.Clear();
datacon.getcom("update tb_AnimalsInfo set ASex='" + cboxSex.Text.Trim() + "',AAge='" + txtAge.Text.Trim() + "',AType='"
+ cboxType.Text.Trim() + "',APlace='" + txtPlace.Text.Trim() + "',ARemark='"
+ txtRemark.Text.Trim() + "'");
frmAniInfoManage_Load(sender, e);
MessageBox.Show("畜只信息修改成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
tsbtnSave.Enabled = false;
}