您目前尚未登陆,请选择【登陆】或【注册
首页->其他源码->人才网初学者工具包源码>>employer/resumesearch.aspx.cs>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:人才网初学者工具包源码


当前文件路径:JobSiteStarterKit/employer/resumesearch.aspx.cs 文件类型
普通视图
		            
1using System; 2using System.Data; 3using System.Configuration; 4using System.Web; 5using System.Web.Security; 6using System.Web.UI; 7using System.Web.UI.WebControls; 8using System.Web.UI.WebControls.WebParts; 9using System.Web.UI.HtmlControls; 10using JobSiteStarterKit.BOL; 11 12public partial class resumesearch_aspx : Page 13{ 14 protected void btnSearch_Click(object sender, EventArgs e) 15 { 16 BindGrid(); 17 } 18 19 private void BindGrid() 20 { 21 int countryid = -1, stateid = -1; 22 if (ddlCountry.SelectedItem != null) 23 countryid = int.Parse(ddlCountry.SelectedValue); 24 if (ddlState.SelectedItem != null) 25 stateid = int.Parse(ddlState.SelectedValue); 26 27 DataSet ds = Resume.SearchResumes(txtSkills.Text, countryid, stateid); 28 GridView1.DataSource = ds; 29 GridView1.DataBind(); 30 31 if (GridView1.Rows.Count <= 0) 32 { 33 lblMsg.Text = "没有搜索到简历!"; 34 } 35 else 36 { 37 lblMsg.Text = ""; 38 } 39 } 40 41 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) 42 { 43 if (e.Row.RowType == DataControlRowType.DataRow) 44 { 45 LinkButton b = (LinkButton)e.Row.Cells[4].Controls[0]; 46 b.CommandName = "viewdetails"; 47 b.CommandArgument = GridView1.DataKeys[e.Row.RowIndex].Value.ToString(); 48 } 49 } 50 protected void Page_Load(object sender, EventArgs e) 51 { 52 if (!Roles.IsUserInRole(ConfigurationManager.AppSettings["employerrolename"])) 53 { 54 Response.Redirect("~/customerrorpages/NotAuthorized.aspx"); 55 } 56 57 if (!Page.IsPostBack) 58 { 59 FillCountries(); 60 FillStates(); 61 lblResumeCount.Text = "(当前共有 " + Resume.GetResumeCount() + " 份简历!)"; 62 } 63 } 64 65 private void FillCountries() 66 { 67 ddlCountry.DataSource = Country.GetCountries(); 68 ddlCountry.DataTextField = "CountryName"; 69 ddlCountry.DataValueField = "CountryID"; 70 ddlCountry.DataBind(); 71 } 72 73 private void FillStates() 74 { 75 ddlState.DataSource = State.GetStates(int.Parse(ddlCountry.SelectedValue)); 76 ddlState.DataTextField = "StateName"; 77 ddlState.DataValueField = "StateID"; 78 ddlState.DataBind(); 79 } 80 protected void ddlCountry_SelectedIndexChanged(object sender, EventArgs e) 81 { 82 FillStates(); 83 } 84 85 protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) 86 { 87 if (e.CommandName == "viewdetails") 88 { 89 Response.Redirect("~/" + ConfigurationManager.AppSettings["employerfolder"] + "/viewresume.aspx?id=" + e.CommandArgument); 90 } 91 } 92 93 protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) 94 { 95 GridView1.PageIndex = e.NewPageIndex; 96 BindGrid(); 97 } 98 99} 100
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:人才网初学者工具包源码

- 邓西网站帮助系统NET+SQL开源..

- Asp.net学生信息管理系统源码

- B2C商城综合系统项目源码

- 基于NBear的简易AJAX留言板案..

- 基于Ajax的邮件系统源码

- 星光慧点图书租借管理系统源码

- X2BlogV5.0正式版源码(Asp.n..

- Mibo生产控制管理系统.NETV1.2

51Aspx.com 版权所有 CopyRight © 2000-2008. 京ICP备06046876号