private void BuildProject() { if (Session[Entities.Constants.Key_Sessions.ProjectKey] != null) { Entities.Models.Project p = Session[Entities.Constants.Key_Sessions.ProjectKey] as Entities.Models.Project; if (p.SPRINTS != null) { List <Entities.Models.Sprint> sprintlist = p.SPRINTS; foreach (Entities.Models.Sprint s in sprintlist) { if (s.ESTADO == Sprint.EstadoPausado) { CountPaused++; } if (s.ESTADO == Sprint.EstadoAnalisis) { CountAnalyze++; } if (s.ESTADO == Sprint.EstadoDesarrollo) { CountDevelopment++; } if (s.ESTADO == Sprint.EstadoFinalizado) { CountFinalize++; } if (s.ESTADO == Sprint.EstadoFeature) { CountFeature++; } ctrl_SprintItem2 spritem = LoadControl("TrackControls/ctrl_SprintItem2.ascx") as ctrl_SprintItem2; spritem.setSprint(s, ref CountComment, ref CountBug, ref CountTask, ref CountDone); SprintsLists.Controls.Add(spritem); } } } }
private void checkforurlcommand() { if (Request["openproject"] != null) { int idproject = int.Parse(Request["openproject"].ToString()); Entities.Models.Project p = Entities.Models.Project.GetProjectById(idproject); Entities.Models.User u = Session[Entities.Constants.Key_Sessions.UserKey] as Entities.Models.User; if (p != null) { if (u != null) { if (p.CheckUserAuth(u) == true) { removeProjectFromSession(); Session.Add(Entities.Constants.Key_Sessions.ProjectKey, p); RedirectTome(); } else { Estado.InnerText = "No esta autorizado para este proyecto"; removeProjectFromSession(); } } else { Estado.InnerText = "Usted no esta autenticado en el sistema"; removeProjectFromSession(); } } else { Estado.InnerText = "el proyecto no existe"; removeProjectFromSession(); } } }