// list all appointments button: private void button13_Click_1(object sender, EventArgs e) { OutputText o = new Medical_Database.OutputText(); o.Show(); o.ResetText(); foreach (var data in MD.Appointment.appointments) { o.AddAllAppointmentToListBox(data); } }
// list all doctors button: private void button11_Click_1(object sender, EventArgs e) { OutputText o = new Medical_Database.OutputText(); o.Show(); o.ResetText(); foreach (var data in MD.Doctor.doctors) { o.AddAllDoctorToListBox(data); } }
// search patients button: private void button1_Click(object sender, EventArgs e) { string patient_id = maskedTextBox1.Text; string first_name = maskedTextBox2.Text; string last_name = maskedTextBox3.Text; string needed_specialization = maskedTextBox6.Text; string email = maskedTextBox5.Text; string phone_number = maskedTextBox4.Text; string address = maskedTextBox9.Text; string ssn = maskedTextBox8.Text; string current = maskedTextBox7.Text; Boolean found = false; OutputText o = new Medical_Database.OutputText(); o.Show(); o.ResetText(); foreach (var data in MD.Patient.patients) { if (patient_id == data.patient_id || first_name == data.first_name || last_name == data.last_name || phone_number == data.phone_number || email == data.email || phone_number == data.phone_number || address == data.address || ssn == data.ssn || current == data.current) { found = true; o.AddSearchPatientToListBox(data); } } if (found == false) { o.DoesNotExist(); } maskedTextBox1.Clear(); maskedTextBox2.Clear(); maskedTextBox3.Clear(); maskedTextBox4.Clear(); maskedTextBox5.Clear(); maskedTextBox6.Clear(); maskedTextBox7.Clear(); maskedTextBox8.Clear(); maskedTextBox9.Clear(); }
// search appointments button: private void button1_Click(object sender, EventArgs e) { string appointment_id = maskedTextBox1.Text; string doctor_id = maskedTextBox2.Text; string patient_id = maskedTextBox3.Text; string date = maskedTextBox6.Text; string time = maskedTextBox5.Text; string needed_specialization = maskedTextBox4.Text; string details = maskedTextBox9.Text; string needs_follow_up = maskedTextBox8.Text; string current = maskedTextBox7.Text; Boolean found = false; OutputText o = new Medical_Database.OutputText(); o.Show(); o.ResetText(); foreach (var data in MD.Appointment.appointments) { if (appointment_id == data.appointment_id || doctor_id == data.doctor_id || patient_id == data.patient_id || date == data.date || time == data.time || needed_specialization == data.needed_specialization || details == data.details || needs_follow_up == data.needs_follow_up || current == data.current) { found = true; o.AddSearchAppointmentToListBox(data); } } if (found == false) { o.DoesNotExist(); } maskedTextBox1.Clear(); maskedTextBox2.Clear(); maskedTextBox3.Clear(); maskedTextBox4.Clear(); maskedTextBox5.Clear(); maskedTextBox6.Clear(); maskedTextBox7.Clear(); maskedTextBox8.Clear(); maskedTextBox9.Clear(); }