if (HttpRuntime.Cache.Get("LeftNavigation_" + loggedUser.UserId.ToString()) == null) { HttpRuntime.Cache.Insert("LeftNavigation_" + loggedUser.UserId.ToString(), Page.LoadControl("AdminLeftNav.ascx"), null, DateTime.Now.AddMinutes(1000), System.Web.Caching.Cache.NoSlidingExpiration); } var userControl = (UserControl)HttpRuntime.Cache.Get("LeftNavigation_" + loggedUser.UserId.ToString()); phLeftNav.Controls.Add(userControl);
protected void Page_Load(object sender, EventArgs e) { var loggedUser = CommonFunctions.GetLoggedUser(); if (!IsPostBack) { try { if (loggedUser != null) { companyId = (int)loggedUser.CompanyId; var company = _companyService.Single(x => x.CompanyId == companyId); if (company != null) imgCompanyLogo.ImageUrl = "../images/companylogo/" + company.CompanyLogoPath; var NewVacancies = _jobService.Find(x => x.JobStatusId == 1 || x.JobStatusId == 6).Count(); if (NewVacancies > 0) { phJobWaitingForApproval.Visible = true; phNoJobWaitingForApproval.Visible = false; } } } catch (Exception ex) { _log.Log(ex); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)