private void appointmentsCreate_Button_Click(object sender, EventArgs e) { Main.AppointmentIndex = null; var appointment_Form = new Appointment_Form(); appointment_Form.AppointmentFormClosed += new EventHandler(appointmentForm_Closed); appointment_Form.Show(); this.Enabled = false; }
private void appointmentsEdit_Button_Click(object sender, EventArgs e) { if (Main.AppointmentIndex == null) { MessageBox.Show("Must select item to edit", "Invalid Selection"); return; } var appointment_Form = new Appointment_Form(); appointment_Form.AppointmentFormClosed += new EventHandler(appointmentForm_Closed); appointment_Form.Show(); this.Enabled = false; }