private void Edit() { if (SelectedTask == null) { return; } dynamic viewBag = new ViewBag(); viewBag.Task = SelectedTask; _router.GoTo(ControlType.TaskDetailsControl, viewBag); }
private void ExecuteInspection() { dynamic viewBag = new ViewBag(); viewBag.Inspection = SelectedInspection; _router.GoTo(ControlType.ExecuteInspectionControl, viewBag); }
private void LinkInspector() { if (SelectedInspection == null) { return; } dynamic viewBag = new ViewBag(); viewBag.Inspection = SelectedInspection; _router.GoTo(ControlType.LinkInspectorControl, viewBag); }
private void EditCustomer() { if (SelectedCustomer == null) { return; } _isEditing = true; dynamic viewBag = new ViewBag(); viewBag.Customer = SelectedCustomer; _router.GoTo(ControlType.ClientInfoControl, viewBag); }
public MainViewModel(RouterService router) { _router = router; _router.PropertyChanged += RouterViewChanged; new LoginWindow().ShowDialog(); if (!Settings.IsLoggedIn) { Environment.Exit(0); } CurrentUserName = Settings.CurrentUser.Email; _router.GoTo(ControlType.AccountControl); UploadDataCommand = new RelayCommand(UploadData, () => DbSync.CanUpload); ChangeViewCommand = new RelayCommand <ControlType>(ChangeView); ExitCommand = new RelayCommand(() => Environment.Exit(0)); BackCommand = new RelayCommand(GoBack); }
private void SaveUser() { var error = CanSave(); if (error != string.Empty) { MessageBox.Show(error); return; } SelectedEmployee.JobTitle = SelectedJobTitle; if (_userRepository.Update(SelectedEmployee)) { MessageBox.Show("Wijzigingen zijn opgeslagen."); _router.GoTo(ControlType.AccountControl, null, true); return; } MessageBox.Show("Wijzigingen zijn niet opgeslagen."); }
private void ChangePassword() { _router.GoTo(ControlType.ChangePasswordControl); }
public void Router_ChangesView() { Assert.IsNull(_router.CurrentView); _router.GoTo(ControlType.UserManagementControl); Assert.IsInstanceOfType(_router.CurrentView, ControlType.UserManagementControl.Control); }
private void NewTemplate() { _router.GoTo(ControlType.EditTemplateControl); }
private void NewCustomer() { _router.GoTo(ControlType.ClientInfoControl); }
private void ChangeView(ControlType view) { _router.GoTo(view, null, true); }
private void AddUser() { _router.GoTo(ControlType.RegisterInspectorControl); }