コード例 #1
0
        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();
            }
        }
コード例 #2
0
        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);
                }
            }
        }