Пример #1
0
        public ActionResult AddDeveloper(int taskId)
        {
            var manager = new TaskManager();

            int userId = int.Parse(User.Identity.GetProjectUserId());
            var projectId = manager.GetProjectForTask(taskId).Id;

            if (Request.Form["addUserId"] != null)
            {
                int developerId = int.Parse(Request.Form["addUserId"]);
                manager.AddDeveloperToTask(developerId, taskId, accepted: true);
            }

            TempData["DetailsPage"] = "1";
            TempData["overlayId"] = "TaskDetails";
            TempData["TaskDetailsId"] = "" + taskId;
            return Redirect("/Projects/Details/" + projectId);
        }
Пример #2
0
        public ActionResult ApplyDeveloper(int taskId)
        {
            var manager = new TaskManager();

            int userId = int.Parse(User.Identity.GetProjectUserId());
            var projectId = manager.GetProjectForTask(taskId).Id;

            manager.AddDeveloperToTask(userId, taskId, accepted: false);

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