private void appointmentGridView_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { appointment = appointmentService.GetAppointmentById(int.Parse(appointmentGridView.Rows[e.RowIndex].Cells[0].Value.ToString())); var appointmentId = int.Parse(appointmentGridView.Rows[e.RowIndex].Cells[0].Value.ToString()); foreach (var dApp in appointmentsToDisplay) { if (dApp.appointment_id == appointmentId) { displayedAppointment = dApp; } } }
public void Appointments(DisplayedAppointment appointment, Appointment appointment2) { displayedAppointment = appointment; appointment1 = appointment2; }