예제 #1
0
        public TaskFormModel Execute(TaskFormModel model)
        {
            var task = new Core.Domain.TaskCategory();

                task = model.Task;

                return new TaskFormModel { Task = task };
        }
예제 #2
0
        public AjaxResponse Command(AddTaskModel inModel)
        {
            var task = new Core.Domain.TaskCategory();

            if(inModel.TaskId.IsNotEmpty())
            {
               task = _taskCategoryService.Get(inModel.TaskId);
            }

            task.Name = inModel.TaskName;

            var notification = _taskCategoryService.SaveTask(task);

            if (notification.IsValid())
                return new AjaxResponse()
                           {
                               Success = true,
                               Item = task
                           };

            return new AjaxResponse() {Success = false};
        }