private void SaveTask()
        {
            PtNewTask taskNew = new PtNewTask
            {
                ItemId = TasksFormVm.ItemId,
                Title  = TasksFormVm.NewTaskTitle
            };

            rpsTasksRepo.AddNewTask(taskNew);
        }
示例#2
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"));
            }
        }