コード例 #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 }));
 }