Пример #1
0
        public ActionResult AddOwnerAsync(int id, string email)
        {
            CurrentUserModel.ValidateProject(id);
            User u = CurrentServiceModel.GetUserByEmail(email);

            if (u != null)
            {
                CurrentUserModel.AddProjectOwner(id, u.Id);
                return(Content("OK"));
            }
            else
            {
                return(Content(""));
            }
        }
Пример #2
0
        public ActionResult SetDevStatus(int id, int stagId, int value)
        {
            CurrentUserModel.ValidateProject(id);

            SourceTag stag = CurrentUserModel.GetSourceTag(stagId);

            if (stag.ProjectId != id)
            {
                throw new InvalidOperationException("Invalid source tag");
            }

            stag.DevStatus = (DevStatus)value;
            CurrentUserModel.UpdateSourceTag(stag);
            return(Content("OK"));
        }
Пример #3
0
 public ActionResult Edit(int id)
 {
     CurrentUserModel.ValidateProject(id);
     ViewData["Creating"] = false;
     return(View("Create", CurrentUserModel.GetProject(id)));
 }
Пример #4
0
 public ActionResult RemoveOwner(int id, int userId)
 {
     CurrentUserModel.ValidateProject(id);
     CurrentUserModel.RemoveProjectOwner(id, userId);
     return(RedirectToAction("Index", new { id = id }));
 }