private void Btn_SaveProcedure_Click(object sender, RoutedEventArgs e) { if (isEdit) { AppMgr.HospitalManagement.UpdateProcedure(EditProcedure, SourceProcedure); } else { ProcedureType newProcedure = (ProcedureType)EditProcedure.Clone(); AppMgr.HospitalManagement.AddNewProcedure(newProcedure); AllProcedures.Add(newProcedure); } EditProcedure = new ProcedureType("", "", new List <Role>()); TxtBox_ProcId.IsEnabled = false; TxtBox_ProcName.IsEnabled = false; Chk_Admin.IsEnabled = false; Chk_DataRecorder.IsEnabled = false; Chk_Doctor.IsEnabled = false; Chk_Laboratorian.IsEnabled = false; Chk_Nurse.IsEnabled = false; Btn_SaveProcedure.IsEnabled = false; isEdit = false; ListBox_AllProcedures.Items.Refresh(); ListBox_ChosenProcedures.Items.Refresh(); }
private void Btn_RemoveProcedure_Click(object sender, RoutedEventArgs e) { AllProcedures.Add(ChosenProceduresSelected); Ward.Procedures.Remove(ChosenProceduresSelected); ChosenProcedures.Remove(ChosenProceduresSelected); AppMgr.HospitalManagement.UpdateDatabase(); }