public ActionResult TasksForm(int id) { var item = rpsItemsRepo.GetItemById(id); var model = new PtItemTasksVm(item); return(PartialView("_Tasks", model)); }
public ActionResult TaskDelete(int id, int taskId, PtItemTasksVm vm) { ViewBag.screen = DetailScreenEnum.Tasks; try { var result = rpsTasksRepo.DeleteTask(taskId, id); return(RedirectToAction("Tasks")); } catch { return(RedirectToAction("Tasks")); } }
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")); } }