public ActionResult TasksForm(int id)
        {
            var item  = rpsItemsRepo.GetItemById(id);
            var model = new PtItemTasksVm(item);

            return(PartialView("_Tasks", model));
        }
示例#2
0
        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"));
            }
        }
示例#3
0
        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"));
            }
        }