// GET: Project /// <summary> /// Gets a Project interface page /// </summary> /// <param name="ID">THe Projects ID</param> /// <returns>the Page if the Project if you have Privs</returns> public ActionResult Index(int ID) { ProjectPrivages PP = GetProjectPriv(ID); if (PP.CanView) { ViewBag.Priv = this.GetJsonAsString(PP); SelectProjectByID_Result Project = null; using (ObjectResult <SelectProjectByID_Result> Result = DB.SelectProjectByID(ID)) Project = Result.First(); return(View(Project)); } return(RedirectToAction("Index", "Dashboard")); }
public ProjectHubSessions(int ProjectID, dynamic Session, string ConnectionID) { this.ProjectID = ProjectID; using (MVCTaskMasterAppDataEntities2 DB = new MVCTaskMasterAppDataEntities2()) { using (ObjectResult <SelectProjectByID_Result> oj = DB.SelectProjectByID(ProjectID)) { ProjectOverView = oj.First(); } ProjectTasks = new Project_Tasks_And_Links(DB, ProjectID); AddSession(Session, ConnectionID); UsersConnected[ConnectionID]["Permission"] = DB.ValidateWithProjectViewPriv((int)UsersConnected[ConnectionID]["SessionUserID"], (string)UsersConnected[ConnectionID]["SessionCode"], ProjectID); } }