public ProjectSelectProjectTDS.LastUsedProjectsDataTable GetProjects() { lastUsedProjects = (ProjectSelectProjectTDS.LastUsedProjectsDataTable)Session["lastUsedProjectsDummy"]; if (lastUsedProjects == null) { lastUsedProjects = ((ProjectSelectProjectTDS.LastUsedProjectsDataTable)Session["projectLastUsedProjects"]); } return lastUsedProjects; }
protected void AddLastLoggedInProjectsNewEmptyFix(GridView grdProject) { if (grdProject.Rows.Count == 0) { ProjectSelectProjectTDS.LastUsedProjectsDataTable dt = new ProjectSelectProjectTDS.LastUsedProjectsDataTable(); dt.AddLastUsedProjectsRow(-1, -1, DateTime.Now, -1, false, "", false, "", ""); Session["lastUsedProjectsDummy"] = dt; grdProject.DataBind(); } // Normally executes at all postbacks if (grdProject.Rows.Count == 1) { ProjectSelectProjectTDS.LastUsedProjectsDataTable dt = (ProjectSelectProjectTDS.LastUsedProjectsDataTable)Session["lastUsedProjectsDummy"]; if (dt != null) { grdProject.Rows[0].Visible = false; grdProject.Rows[0].Controls.Clear(); } } }