private void ViewSchedule_OnClicked(object sender, RoutedEventArgs e) { PlantViewModel viewModel = (PlantViewModel)DataContext; Pages requestpage = (Pages)Enum.Parse(typeof(Pages), "FullScheduleView"); NavigationEvents.RequestPage(requestpage, viewModel.Plant.Id); }
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { var pageName = ((sender as ListView).SelectedItem).ToString(); Pages requestPage = (Pages)Enum.Parse(typeof(Pages), pageName); NavigationEvents.RequestPage(requestPage); }
private void Save(object obj) { if (Plant.Save()) { NavigationEvents.RequestPage(Pages.Back); } }
private void OnPlantSelected(object sender, SelectionChangedEventArgs e) { if ((sender as ListView).SelectedIndex == (sender as ListView).Items.Count - 1) { return; } Plant selectedPlant = (Plant)(sender as ListView).SelectedItem; NavigationEvents.RequestPage(Pages.Plant, selectedPlant.Id); }
private void SaveReport(object obj) { Progress progress = new Progress() { PlantId = Plant.Id, Notes = Notes, Image = ImagePath, WeekNum = Plant.Week, ScheduleID = Plant.ScheduleId, Date = DateTime.Now }; if (progress.Save()) { NavigationEvents.RequestPage(Pages.Back); } }
private void ClosePage(object obj) { Guards.ArgumentGuard(obj); NavigationEvents.RequestPage(Pages.Back); }
private void Cancel(object obj) { NavigationEvents.RequestPage(Pages.Back); }
private void AddPlant(object obj) { EditPlantViewModel viewModel = new EditPlantViewModel(); NavigationEvents.RequestPage(Pages.EditablePlant, viewModel); }
private void CreateProgressReport(object obj) { AddProgressReportViewModel viewModel = new AddProgressReportViewModel(Plant); NavigationEvents.RequestPage(Pages.CreateProgressReport, viewModel); }
private void ViewProgress(object obj) { NavigationEvents.RequestPage(Pages.ProgressReportCollection, Plant.Id); }
private void ViewSchedule(object obj) { NavigationEvents.RequestPage(Pages.FullScheduleView, Plant.ScheduleId); }
private void OnPlantSelected(object sender, SelectionChangedEventArgs e) { Plant selectedPlant = (Plant)(sender as ListView).SelectedItem; NavigationEvents.RequestPage(Pages.Plant, selectedPlant.Id); }