private void button_OnOK_Click(object sender, EventArgs e) { this.userControl_ReviveQCBase1.FillClass(); String str_ErrMessage; str_ErrMessage = this.myClass_ReviveQC.CheckField(); if (str_ErrMessage != null) { this.DialogResult = DialogResult.None; this.label_ErrMessage.Text = str_ErrMessage; return; } if (this.bool_Add) { if (Class_ReviveQC.ExistSecond(this.myClass_ReviveQC.ExaminingNo)) { this.label_ErrMessage.Text = "同一张证书不能重复激活!"; this.DialogResult = DialogResult.None; return; } if (this.myClass_ReviveQC.AddAndModify(Enum_zwjKindofUpdate.Add)) { this.userControl_ReviveQCBase1.myClass_QC.AddAndModify(Enum_zwjKindofUpdate.Modify); } else { this.label_ErrMessage.Text = "添加不成功!"; this.DialogResult = DialogResult.None; return; } } else { this.myClass_ReviveQC.AddAndModify(Enum_zwjKindofUpdate.Modify); this.userControl_ReviveQCBase1.myClass_QC.AddAndModify(Enum_zwjKindofUpdate.Modify); } }