コード例 #1
0
		void OnAdd()
		{
			var daySchedulePartDetailsViewModel = new DaySchedulePartDetailsViewModel();
			if (DialogService.ShowModalWindow(daySchedulePartDetailsViewModel))
			{
				DaySchedule.DayScheduleParts.Add(daySchedulePartDetailsViewModel.DaySchedulePart);
				if (GKScheduleHelper.SaveDaySchedule(DaySchedule, false))
				{
					var daySchedulePartViewModel = new DaySchedulePartViewModel(daySchedulePartDetailsViewModel.DaySchedulePart);
					Parts.Add(daySchedulePartViewModel);
					SelectedPart = daySchedulePartViewModel;
				}
			}
		}
コード例 #2
0
		void OnEdit()
		{
			var daySchedulePartDetailsViewModel = new DaySchedulePartDetailsViewModel(SelectedPart.DaySchedulePart);
			if (DialogService.ShowModalWindow(daySchedulePartDetailsViewModel) && GKScheduleHelper.SaveDaySchedule(DaySchedule, false))
			{
				SelectedPart.Update();
			}
		}