コード例 #1
0
        public ActionResult EditTaskEntry(int taskEntryId)
        {
            var taskEntryRepository = new TaskEntryRepository();
            var taskEntry           = taskEntryRepository.GetTaskEntryById(taskEntryId);

            return(View("AddTaskEntry", taskEntry));
        }
コード例 #2
0
        public ActionResult DeleteTaskEntry(int taskEntryId)
        {
            var taskEntryRepo    = new TaskEntryRepository();
            var currentTaskEntry = taskEntryRepo.GetTaskEntryById(taskEntryId);

            taskEntryRepo.DeleteTaskEntry(taskEntryId);
            return(RedirectToAction("Index", new { TaskId = currentTaskEntry.TaskId }));
        }