Ejemplo n.º 1
0
        private void Button_IdentificationCardModify_Click(object sender, EventArgs e)
        {
            this.userControl_WelderBase1.FillClass();
            string        str_NewIdentificationCard = "";
            Form_InputBox myForm = new Form_InputBox();

            myForm.str_DefaultResponse = this.myClass_Welder.IdentificationCard;
            myForm.str_Prompt          = "请输入身份证号码:";
            myForm.str_Title           = "输入身份证号码";
            if (myForm.ShowDialog() == DialogResult.OK)
            {
                str_NewIdentificationCard = myForm.str_DefaultResponse;
            }
            else
            {
                return;
            }
            if (!Class_DataValidateTool.CheckIdentificationCard(str_NewIdentificationCard, this.myClass_Welder.Sex))
            {
                MessageBox.Show("身份证号码格式错误,操作失败!");
                return;
            }
            if (Class_Welder.ExistAndCanDeleteAndDelete(str_NewIdentificationCard, ZCCL.ClassBase.Enum_zwjKindofUpdate.Exist) == true)
            {
                MessageBox.Show("身份证号码重复,操作失败!");
                return;
            }
            this.myClass_Welder.IdentificationCardModify(str_NewIdentificationCard, this.myClass_Welder.Sex);
            this.userControl_WelderBase1.InitControl(this.myClass_Welder, false);
        }