예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
 private void Save(object obj)
 {
     if (Plant.Save())
     {
         NavigationEvents.RequestPage(Pages.Back);
     }
 }
예제 #4
0
        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);
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
        private void ClosePage(object obj)
        {
            Guards.ArgumentGuard(obj);

            NavigationEvents.RequestPage(Pages.Back);
        }
예제 #7
0
 private void Cancel(object obj)
 {
     NavigationEvents.RequestPage(Pages.Back);
 }
예제 #8
0
        private void AddPlant(object obj)
        {
            EditPlantViewModel viewModel = new EditPlantViewModel();

            NavigationEvents.RequestPage(Pages.EditablePlant, viewModel);
        }
예제 #9
0
        private void CreateProgressReport(object obj)
        {
            AddProgressReportViewModel viewModel = new AddProgressReportViewModel(Plant);

            NavigationEvents.RequestPage(Pages.CreateProgressReport, viewModel);
        }
예제 #10
0
 private void ViewProgress(object obj)
 {
     NavigationEvents.RequestPage(Pages.ProgressReportCollection, Plant.Id);
 }
예제 #11
0
 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);
 }