public TaskFormModel Execute(TaskFormModel model) { var task = new Core.Domain.TaskCategory(); task = model.Task; return new TaskFormModel { Task = task }; }
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}; }