예제 #1
0
        public ActionResult FinishTask(int taskId)
        {
            var manager = new TaskManager();

            int userId = int.Parse(User.Identity.GetProjectUserId());
            var projectId = manager.GetProjectForTask(taskId).Id;
            var isLeader = new ProjectUserManager().IsLeader(userId, projectId);
            var reason = Request.Form["finishReason"];

            manager.FinishTask(taskId, userId, reason, isLeader);

            TempData["DetailsPage"] = "1";
            TempData["overlayId"] = "TaskDetails";
            TempData["TaskDetailsId"] = "" + taskId;
            return Redirect("/Projects/Details/" + projectId);
        }