public IActionResult OnPostUpdate(int taskId, string title, bool?completed)
        {
            PtUpdateTask uTask = new PtUpdateTask
            {
                Id        = taskId,
                ItemId    = DetailsFormVm.Id,
                Title     = title,
                Completed = completed.HasValue ? completed.Value : false
            };

            rpsTasksRepo.UpdateTask(uTask);

            return(RedirectToPage("Details", new { id = DetailsFormVm.Id, Screen }));
        }
Пример #2
0
        public ActionResult TaskUpdate(int id, int taskId, string title, bool?completed)
        {
            ViewBag.screen = DetailScreenEnum.Tasks;

            try
            {
                PtUpdateTask uTask = new PtUpdateTask
                {
                    Id        = taskId,
                    ItemId    = id,
                    Title     = title,
                    Completed = completed.HasValue ? completed.Value : false
                };
                rpsTasksRepo.UpdateTask(uTask);
                return(RedirectToAction("Tasks"));
            }
            catch
            {
                return(RedirectToAction("Tasks"));
            }
        }