コード例 #1
0
 protected override void ChangeViewMethod(object parameter)
 {
     if (parameter.ToString() == "ViewReports")
     {
         //GOTO to Maintenance View Report
         SelectedViewModel = new ViewMaintenanceReportViewModel(CurrentEmployee);
     }
     else if (parameter.ToString() == "ViewSchedules")
     {
         //GOTO to Schedule Maintenance View
         SelectedViewModel = new ViewScheduleMaintenanceViewModel(CurrentEmployee);
     }
     else if (parameter.ToString() == "AddSchedules")
     {
         //GOTO to Add Maintenance Schedules
         SelectedViewModel = new AddMaintenanceScheduleViewModel(CurrentEmployee);
     }
     else if (parameter.ToString() == "UpdateSchedules")
     {
         //GOTO to Update Maintenance Schedules
         SelectedViewModel = new UpdateMaintenanceScheduleViewModel();
     }
 }
コード例 #2
0
 public MaintenanceViewModel(Employee _employee)
 {
     Name              = "Maintenance Team";
     CurrentEmployee   = _employee;
     SelectedViewModel = new ViewMaintenanceReportViewModel(CurrentEmployee);
 }