Пример #1
0
        public ActionResult ProjectAssign(int Id, List <string> PA)
        {
            if (PA == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            var projectHelper = new ProjectHelper();

            foreach (var user in db.Users)
            {
                projectHelper.RemoveUserToProject(user.Id, Id);
            }
            foreach (var userId in PA)
            {
                projectHelper.AddUserToProject(userId, Id);
            }
            return(RedirectToAction("Index", "Projects"));
        }