private void SaveTask() { PtNewTask taskNew = new PtNewTask { ItemId = TasksFormVm.ItemId, Title = TasksFormVm.NewTaskTitle }; rpsTasksRepo.AddNewTask(taskNew); }
public ActionResult Tasks(int id, PtItemTasksVm vm) { ViewBag.screen = DetailScreenEnum.Tasks; try { PtNewTask taskNew = new PtNewTask { ItemId = id, Title = vm.NewTaskTitle }; rpsTasksRepo.AddNewTask(taskNew); return(RedirectToAction("Tasks")); } catch { return(RedirectToAction("Tasks")); } }