Exemplo n.º 1
0
        public ActionResult New_Member(string userEmail)
        {
            var user = (User)Session["UserInfo"];

            if (user == null)
            {
                return(RedirectToAction("Login", "Login"));
            }
            ViewBag.Link = "Project";
            var proj = (Project)Session["Project"];

            if (proj == null)
            {
                return(RedirectToAction("Create_Project", "Dashboard"));
            }

            if (!ModelState.IsValid)
            {
                return(PartialView("MemberList"));
            }

            ViewBag.AddMemberError = ProjectManager.AddMember(userEmail, proj.ProjectID);
            var project    = ProjectManager.GetProjectByID(proj.ProjectID, user.Email);
            var memberList = SharedManager.SplitString(project.DevTeam);

            memberList.Insert(0, proj.ScrumMaster);
            ViewBag.MemberList         = memberList;
            SharedManager.RepeatMethod = false;
            Session["Project"]         = project;
            return(PartialView("MemberList"));
        }