protected void Page_Init(object sender, EventArgs e) { var _mp = new DlMainpagepopulator(); //get salaries CheckBoxList6.DataSource = _mp.GetSalary(); CheckBoxList6.DataTextField = "sTerm"; CheckBoxList6.DataValueField = "Termid"; CheckBoxList6.DataBind(); //get locations CheckBoxList2.DataSource = _mp.GetLocations(); CheckBoxList2.DataTextField = "sTerm"; CheckBoxList2.DataValueField = "Termid"; CheckBoxList2.DataBind(); //get industry CheckBoxList1.DataSource = _mp.GetIndustries(); CheckBoxList1.DataTextField = "sTerm"; CheckBoxList1.DataValueField = "Termid"; CheckBoxList1.DataBind(); if (Request.QueryString["q"] != null & Request.QueryString["q"] != "all") { TextBox2.Text = Request.QueryString["q"]; } }
public void Page_Init(object sender, EventArgs e) { //constructor var mp = new DlMainpagepopulator(); //populate left //get salaries CheckBoxList6.DataSource = mp.GetSalary(); CheckBoxList6.DataTextField = "sTerm"; CheckBoxList6.DataValueField = "Termid"; CheckBoxList6.DataBind(); //get locations CheckBoxList2.DataSource = mp.GetLocations(); CheckBoxList2.DataTextField = "sTerm"; CheckBoxList2.DataValueField = "Termid"; CheckBoxList2.DataBind(); //get industry CheckBoxList1.DataSource = mp.GetIndustries(); CheckBoxList1.DataTextField = "sTerm"; CheckBoxList1.DataValueField = "Termid"; CheckBoxList1.DataBind(); }
private void SetSearch() { if (Request.QueryString["q"] != null) { if (Request.QueryString["q"] == "all") { var _mp = new DlMainpagepopulator(); GridView1.DataSource = _mp.GetJobssingle(); GridView1.DataBind(); //get count of all jobs Label13.Text = _mp.Getcountjobs() + " Jobs Advertized from " + _mp.Getcountrecswadvert() + " Recruiters"; } else if (Request.QueryString["filter"] != null) { //textbox+criteria var _criteria = Session["criteria"].ToString().ToLowerInvariant(); var _title = Request.QueryString["q"]; var _sr = new Clsearchhelper(); GridView1.DataSource = _sr.Applytitlefilter(_title, _criteria); GridView1.DataBind(); //set checkboxes SetCheckBox(_criteria); //show filters ClearFilters.Visible = true; } else { //textbox only var _sr2 = new Clsearchhelper(); var __title = Request.QueryString["q"]; GridView1.DataSource = _sr2.Applytitlefilter(__title); GridView1.DataBind(); //show filters ClearFilters.Visible = true; } } else { if (Request.QueryString["filter"] == null) { var _mp1 = new DlMainpagepopulator(); GridView1.DataSource = _mp1.GetJobssingle(); GridView1.DataBind(); //get count of all jobs Label13.Text = _mp1.Getcountjobs() + " Jobs Advertized from " + _mp1.Getcountrecswadvert() + " Recruiters"; } else { //criteria only var _criteria = Session["criteria"].ToString().ToLowerInvariant(); var _sr = new Clsearchhelper(); GridView1.DataSource = _sr.Applycriteriafilter(_criteria); GridView1.DataBind(); //setcheckbox SetCheckBox(_criteria); //show filter button ClearFilters.Visible = true; } } //display filter sign }
private void GetPage(GridViewPageEventArgs e) { if (Request.QueryString["q"] != null) { if (Request.QueryString["q"] == "all") { var _mp = new DlMainpagepopulator(); GridView1.DataSource = _mp.GetJobssingle(); GridView1.PageIndex = e.NewPageIndex; GridView1.DataBind(); //get count of all jobs Label13.Text = _mp.Getcountjobs() + " Jobs Advertized from " + _mp.Getcountrecswadvert() + " Recruiters"; } else if (Request.QueryString["filter"] != null) { //textbox+criteria var _criteria = Session["criteria"].ToString().ToLowerInvariant(); var _title = Request.QueryString["q"]; var _sr = new Clsearchhelper(); GridView1.DataSource = _sr.Applytitlefilter(_title, _criteria); GridView1.PageIndex = e.NewPageIndex; GridView1.DataBind(); } else { //textbox only var _sr2 = new Clsearchhelper(); var __title = Request.QueryString["q"]; GridView1.DataSource = _sr2.Applytitlefilter(__title); GridView1.PageIndex = e.NewPageIndex; GridView1.DataBind(); } } else { if (Request.QueryString["filter"] == null) { var _mp1 = new DlMainpagepopulator(); GridView1.DataSource = _mp1.GetJobssingle(); GridView1.PageIndex = e.NewPageIndex; GridView1.DataBind(); //get count of all jobs Label13.Text = _mp1.Getcountjobs() + " Jobs Advertized from " + _mp1.Getcountrecswadvert() + " Recruiters"; } else { //criteria only var _criteria = Session["criteria"].ToString().ToLowerInvariant(); var _sr = new Clsearchhelper(); GridView1.DataSource = _sr.Applycriteriafilter(_criteria); GridView1.PageIndex = e.NewPageIndex; GridView1.DataBind(); } } }
protected void Page_Load(object sender, EventArgs e) { var mpage = new DlMainpagepopulator(); if (Request.QueryString["JobID"] != null) { int tempjobid = Convert.ToInt16(Request.QueryString["JobID"]); string[] Plc = mpage.Getdetailspage(tempjobid); Label11.Text = "Job Description"; Label32.Text = Plc[0]; Label26.Text = Plc[1]; Label18.Text = Plc[2]; Label30.Text = Plc[5]; Label31.Text = Plc[6]; Label21.Text = Plc[4]; var culinf = new CultureInfo("pt-BR"); Label23.Text = Convert.ToDateTime(Plc[3]).ToString("d", culinf); //get locations Label19.Text = mpage.Getdetailspagecats(tempjobid, 1000); //get salary Label20.Text = mpage.Getdetailspagecats(tempjobid, 1005, 0); //get contract type Label22.Text = mpage.Getdetailspagecats(tempjobid, 1002); //hours Labelhrs.Text = mpage.Getdetailspagecats(tempjobid, 1003); //industry Labelindustry.Text = mpage.Getdetailspagecats(tempjobid, 1001); //employer Labeletype.Text = mpage.Getdetailspagecats(tempjobid, 1004); //get rec logo string recid = Plc[7]; Image7.ImageUrl = mpage.Getcurrrec(recid); //get contact person name if any var contactpname = string.Empty; var rcl2 = new DlRecruiter(); if (Request.QueryString["JobID"] != null) { contactpname = rcl2.Contactperson(Request.QueryString["JobID"]); if (contactpname != "") { Label27.Text = contactpname; } } //update job views for recruiter graph var cljb = new DlJobviewdata(); cljb.Addview(Convert.ToInt16(recid), DateTime.Now.ToString("yyyy:MM:dd hh:mm:ss")); } }