public void EditWorkTask(WorkingTimeRecordForReport record) { var targetData = _WorkTaskModel.SelectWorkTask(record.WorkTaskId); var editDialogVm = new WorkTaskEditDialogViewModel(targetData); editDialogVm.ShowDeleteButton.Value = false; var result = TransitionHelper.Current.TransitionModal <TaskEditDialog>(editDialogVm); if (result == ModalTransitionResponse.Yes) { if (editDialogVm.NeedDelete) { _WorkTaskModel.DeleteWorkTask(record.WorkTaskId); } else { var inputValue = editDialogVm.TaskCardViewModel.DomainModel; _WorkTaskModel.EditWorkTask(inputValue); } _Model.Load(); } }
public void EditWorkTask() { var targetData = _Model.SelectWorkTask(Dto.TaskId); var editDialogVm = new WorkTaskEditDialogViewModel(targetData); var result = TransitionHelper.Current.TransitionModal <TaskEditDialog>(editDialogVm); if (result == ModalTransitionResponse.Yes) { if (editDialogVm.NeedDelete) { _Model.DeleteWorkTask(Dto.TaskId); } else { var inputValue = editDialogVm.TaskCardViewModel.DomainModel; _Model.EditWorkTask(inputValue); } } }