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; } }
public string GetToolTipText(int contextKey) { try { //根据职位编号获取职位对象 JobPosting job = JobPosting.GetPosting(contextKey); //返回职位描述 return(job.Description); } catch (Exception ex) { return(ex.Message); } }