private void btnRegister_Click(object sender, EventArgs e) { try { patient = new HIS.MZ_BLL.RegPatient( ); if (controller.ProcessRegister()) { if (showDialog) { this.DialogResult = DialogResult.OK; this.Close( ); } else { ClearInfo( ); controller.Refresh( ); //txtHisCard.Focus( ); txtPatName.Focus( ); } } } catch (Exception err) { MessageBox.Show(err.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void ClearInfo() { patient = null; txtHisCard.Text = ""; txtPatName.Text = ""; cboSex.Text = ""; cboFeeType.SelectedIndex = 0; cboAgeUnit.Text = "岁"; txtRegDept.MemberValue = null; txtRegDept.Text = ""; txtRegDoc.MemberValue = null; txtRegDoc.Text = ""; txtRegType.MemberValue = null; txtRegType.Text = ""; }