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")); }