Beispiel #1
0
        public async void EditWorkingTime(WorkingTimeRange workingTimeRange)
        {
            var editDialogVm = new WorkingTimeRangeEditDialogViewModel(workingTimeRange);

            var view = new WorkingTimeRangeEditDialog
            {
                DataContext = editDialogVm
            };

            //show the dialog
            var result = (bool?)await DialogHost.Show(view);

            if (result.HasValue && result.Value)
            {
                var editObj = editDialogVm.WorkingTimeViewModel.DomainModel;
                _Model.EditWorkingTime(editObj);
            }
        }
        public async void EditWorkTaskTime(WorkingTimeRecordForReport record)
        {
            var editDialogVm = new WorkingTimeRangeEditDialogViewModel(record.ConvertToWorkingTimeRange());

            var view = new WorkingTimeRangeEditDialog
            {
                DataContext = editDialogVm
            };

            //show the dialog
            var result = (bool?)await DialogHost.Show(view);

            if (result.HasValue && result.Value)
            {
                var editObj = editDialogVm.WorkingTimeViewModel.DomainModel;
                _WorkTaskModel.EditWorkingTime(editObj);

                _Model.Load();
            }
        }