/// <summary> /// Default controller for main window /// </summary> public MainWindow() { InitializeComponent(); //ClientList.AddRange(client.FindByLastName("j")); MyDataGridFind.ItemsSource = ClientList; DateTime today = DateTime.Today; AppointmentList.AddRange(appointment.FindAppointments(today.ToString("yyyy-MM-dd"))); MyDataGridApp.ItemsSource = AppointmentList; //client = ClientList[0]; //PatientWindow patientWindow = new PatientWindow(client, this); //patientWindow.Show(); }
/// <summary> /// Default constructor for a new patient window /// </summary> /// <param name="c">ClientModel object</param> /// <param name="p">MainWindow object</param> public PatientWindow(ClientModel c, MainWindow p) { InitializeComponent(); client = c; mainWindow = p; DataContext = client; Title += " - " + client.FirstName + " " + client.LastName; readOnlyPatientForm(true); ExaminationModel examination = new ExaminationModel(); ExaminationList.AddRange(examination.GetHistory(client.ID)); MyDataGridHistory.ItemsSource = ExaminationList; DateTime today = DateTime.Today; AppointmentList.AddRange(appointment.FindAppointments(today.ToString("yyyy-MM-dd"))); MyDataGridPlan.ItemsSource = AppointmentList; }