protected void Page_Load(object sender, EventArgs e) { if (!Roles.IsUserInRole(ConfigurationManager.AppSettings["jobseekerrolename"])) { Response.Redirect("~/customerrorpages/NotAuthorized.aspx"); } if (!Page.IsPostBack) { int postingid; postingid = int.Parse(Request.QueryString["id"]); JobPosting p = JobPosting.GetPosting(postingid); lblCity.Text = p.City; lblCompany.Text = Company.GetCompanyName(p.CompanyID); btnViewProfile.CommandArgument = p.CompanyID.ToString(); lblContactPerson.Text = p.ContactPerson; lblCountry.Text = Country.GetCountryName(p.CountryID); lblDept.Text = p.Department; lblDesc.Text = p.Description; lblEduLevel.Text = EducationLevel.GetEducationLevelName(p.EducationLevelID); lblJobCode.Text = p.JobCode; lblJobType.Text = JobType.GetJobTypeName(p.JobTypeID); lblMaxSal.Text = p.MaxSalary.ToString("C"); lblMinSal.Text = p.MinSalary.ToString("C"); lblPostDt.Text = p.PostingDate.ToShortDateString(); lblState.Text = State.GetStateName(p.StateID); lblTitle.Text = p.Title; } }
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { ImageButton b = (ImageButton)e.Row.Cells[4].Controls[0]; b.CommandName = "viewdetails"; b.CommandArgument = GridView1.DataKeys[e.Row.RowIndex].Value.ToString(); e.Row.Cells[1].Text = EducationLevel.GetEducationLevelName(int.Parse(e.Row.Cells[1].Text)); e.Row.Cells[2].Text = ExperienceLevel.GetExperienceLevelName(int.Parse(e.Row.Cells[2].Text)); } }
protected void Page_Load(object sender, EventArgs e) { if (!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"])) { Response.Redirect("~/customerrorpages/NotAuthorized.aspx"); } Resume r = Resume.GetResume(int.Parse(Request.QueryString["id"])); ProfileCommon p = Profile.GetProfile(r.UserName); lblName.Text = "Full Name : " + p.FirstName + " " + p.LastName; lblEducation.Text = "Education Level : " + EducationLevel.GetEducationLevelName(r.EducationLevelID); lblExperience.Text = "Experience Level : " + ExperienceLevel.GetExperienceLevelName(r.ExperienceLevelID); lblCoveringLetter.Text = r.CoveringLetterText.Replace("\n", "<br>"); lblResume.Text = r.ResumeText.Replace("\n", "<br>"); }