//Used if the edit start date is successful private void Add_Edit_Class_Activated(object sender, EventArgs e) { if (Input_1.ReadOnly == false) { Class_Database.PopulatePatient_ClassDGV(Dropdown_1, PatientsClassDGV, PatientsClassWaitingDGV); } }
//Deletes patient from waiting list and adds patient to class private void Move_Click(object sender, EventArgs e) { bool moveSuccess = Class_Database.MoveWaitingPatient(PatientsClassWaitingDGV, Dropdown_1, Date_1); if (moveSuccess == true) { Class_Database.PopulatePatient_ClassDGV(Dropdown_1, PatientsClassDGV, PatientsClassWaitingDGV); } }
//Deletes patient from waiting list private void Remove_Waiting_Click(object sender, EventArgs e) { bool deleteSuccess = Class_Database.DeletePatient_ClassWaitingList(Dropdown_1, PatientsClassWaitingDGV); if (deleteSuccess == true) { Class_Database.PopulatePatient_ClassDGV(Dropdown_1, PatientsClassDGV, PatientsClassWaitingDGV); } }
//Enables controls to add patients to class and populates existing class patients private void Dropdown_1_SelectionChangeCommitted(object sender, EventArgs e) { Global.editingExistingClass = true; Input_1.ReadOnly = false; Save.Enabled = true; Delete_Class.Enabled = true; Dropdown_2.Enabled = true; Input_1.Text = Dropdown_1.SelectedValue.ToString(); Class_Database.PopulatePatient_ClassDGV(Dropdown_1, PatientsClassDGV, PatientsClassWaitingDGV); }
//Adds patient to the waiting list of the selected class private void Add_Patient_Waiting_Click(object sender, EventArgs e) { bool saveSuccess = Class_Database.SavePatient_ClassWaitingList(Dropdown_1, Dropdown_2); if (saveSuccess == true) { Class_Database.PopulatePatient_ClassDGV(Dropdown_1, PatientsClassDGV, PatientsClassWaitingDGV); Dropdown_2.DataSource = null; Date_1.Enabled = false; Add_Patient.Enabled = false; Add_Patient_Waiting.Enabled = false; Dropdown_2.Focus(); } }
//Populates datagridviews with patient details and times this class is on private void Dropdown_1_SelectionChangeCommitted(object sender, EventArgs e) { Class_Database.PopulatePatient_ClassDGV(Dropdown_1, PatientsClassDGV); Class_Database.PopulateClassTimeDetailsDGV(Dropdown_1, ClassDetailsDGV); }