protected void Page_Load(object sender, EventArgs e) { //if the current position does not have a database association, redirect to an error page if (currentPosition == null) { Response.Redirect(RecruitmentConfiguration.ErrorPage(RecruitmentConfiguration.ErrorType.UNKNOWN)); } //Make sure the current's position isn't closed and that it is allowing applications if (currentPosition.Closed || !currentPosition.AllowApps) { Response.Redirect(RecruitmentConfiguration.ErrorPage(RecruitmentConfiguration.ErrorType.AUTH)); } //Now we have a valid Position, so fill in the corresponding fields Title = string.Format("Position Details: {0}", currentPosition.PositionTitle); lblPositionTitle.Text = currentPosition.PositionTitle; lblPositionNumber.Text = currentPosition.PositionNumber; //txtPositionDescription.Text = currentPosition.ShortDescription; litPositionDescription.Text = currentPosition.ShortDescription; //lblDatePosted.Text = currentPosition.DatePosted.ToShortDateString(); lblDeadline.Text = currentPosition.Deadline.ToShortDateString(); lblDepartments.Text = currentPosition.DepartmentList; lblNumReferences.Text = currentPosition.NumReferences.ToString(); lblNumPublications.Text = currentPosition.NumPublications.ToString(); //lblHRRep.Text = currentPosition.HRRep ?? "N/A"; //lblHRPhone.Text = currentPosition.HRPhone ?? "N/A"; //lblHREmail.Text = currentPosition.HREmail ?? "N/A"; //Setup the StyleSheet //First find the "primary department" if (currentPosition.PrimaryDepartment == null) { //If we don't have a primary department, get the default theme pnlDepartmentLogo.CssClass = defaultTheme.ThemeName; } else { Theme primaryDepartmentTheme = ThemeBLL.GetNullableByID(currentPosition.PrimaryDepartment.DepartmentFIS); if (primaryDepartmentTheme == null) { //If the primary department doesn't have a theme, get the default pnlDepartmentLogo.CssClass = defaultTheme.ThemeName; } else { //We have a primary dept and a theme pnlDepartmentLogo.CssClass = primaryDepartmentTheme.ThemeName; } } }