private void LogIn_method() { string role = Db_manager.check_login(User_name, Password, ref _log_status); User_name = null; Password = null; GUI_broker.Show_login_status(role, _log_status); }
public StudentViewModel() { students = new ObservableCollection <Student>(); student = new Student(); GetStudentsCommand = new RelayCommand(() => Get_student_collection()); Logout = new RelayCommand(() => LogOut_method()); StudentDetailsCommand = new OpenStudentViewDetails(); StudentDetailsCommand.AfterExecuted += stud => { if (!(Booker.Tester.test_student(stud))) { GUI_broker.show_creating_student_status(true); return; } else if (!students.Contains(stud)) { students.Add(stud); } Db_manager.add_student(stud); GUI_broker.show_creating_student_status(false); }; }
public WorkerViewModel() { worker = new Worker(); workers = new ObservableCollection <Worker>(); GetWorkerCommand = new RelayCommand(() => Get_worker_collection()); Logout = new RelayCommand(() => LogOut_method()); WorkerDetailsCommand = new OpenWorkerViewDetails(); WorkerDetailsCommand.AfterExecuted += work => { if (!(Booker.Tester.test_worker(work))) { GUI_broker.show_creating_worker_status(true); return; } else if (!workers.Contains(work)) { workers.Add(work); } Db_manager.add_worker(work); GUI_broker.show_creating_worker_status(false); }; }
private void WorkerDesigner_Method() { GUI_broker.openWorkerDesigner(); }
private void StudentDesigner_Method() { GUI_broker.openStudentDesigner(); }
private void SemesterDesigner_Method() { GUI_broker.openSemesterDesigner(); }