private void New_Click(object sender, EventArgs e) { AddAppointment newform = new AddAppointment(); newform.ShowDialog(); var status = newform.ActiveControl.Text; if (status == "Save") { var newAppointment = newform.Appointment; SaveNewAppointment(newAppointment); AddAppointmentToListView(newAppointment); listView1.Refresh(); } }
private void New_Click(object sender, EventArgs e) { AddAppointment newform = new AddAppointment(); newform.ShowDialog(); var status = newform.ActiveControl.Text; if (status == "Save") { var newAppointment = newform.Appointment; SaveNewAppointment(newAppointment); AddAppointmentToListView(newAppointment); listView1.Refresh(); } }