private void ok_Click(object sender, EventArgs e) { if (textBoxMrn.Text.Length == 0) { MessageBox.Show("Please enter a medical record number to add an appointment"); return; } if (!init) { init = true; this.Enabled = false; this._appointment.MRN = this.textBoxMrn.Text; this._appointment.Load(); frmAddEditAppointment addAppt; if (this._appointment.apptid.HasValue) { addAppt = new frmAddEditAppointment(frmAddEditAppointment.COPY, this._appointment.apptid.Value); addAppt.setClinic(this._clinicId); } else { addAppt = new frmAddEditAppointment(frmAddEditAppointment.ADD); addAppt.setUnitNum(this.textBoxMrn.Text); } addAppt.ShowDialog(); this.Close(); } }
private void ok_Click(object sender, EventArgs e) { if (textBoxMrn.Text.Length == 0) { MessageBox.Show("Please enter a medical record number to add an appointment"); return; } if (!init) { init = true; this.Enabled = false; this._appointment.MRN = this.textBoxMrn.Text; this._appointment.Load(); frmAddEditAppointment addAppt; if (this._appointment.apptid.HasValue) { addAppt = new frmAddEditAppointment(frmAddEditAppointment.COPY, this._appointment.apptid.Value); addAppt.setClinic(this._clinicId); } else { addAppt = new frmAddEditAppointment(frmAddEditAppointment.ADD); addAppt.setUnitNum(this.textBoxMrn.Text); } addAppt.ShowDialog(); this.Close(); } }