예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //set default inputs
            TextBox2.Focus();
            //Page.Form.DefaultButton = ImageButton2.UniqueID;

            CLMainpagepopulator cmpag = new CLMainpagepopulator();

            if (!IsPostBack)
            {
                //constructor
                CLMainpagepopulator mp = new CLMainpagepopulator();

                //get count of all jobs
                Label13.Text = mp.getcountjobs() + " Jobs Advertized from " + mp.getcountrecswadvert() + " Recruiters";

                //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();

                //main job binding
                CLMainpagepopulator mpgp = new CLMainpagepopulator();
                GridView1.DataSource = mpgp.getJobssingle();
                GridView1.DataBind();


                //featured Recruiters
                ClFeaturedrecruiters frec = new ClFeaturedrecruiters();
                GridView2.DataSource = frec.GetFRecs();
                GridView2.DataBind();
            }
        }
예제 #2
0
        protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            System.Threading.Thread.Sleep(2000);

            if (Label13.Text.Contains("your search returned") == true)
            {
                //only text box
                CLSearchfilters sflt2 = new CLSearchfilters();

                GridView1.DataSource = sflt2.applytitlefilter(TextBox2.Text, shortbuildfunc().ToString());
                GridView1.PageIndex  = e.NewPageIndex;
                GridView1.DataBind();
            }

            else
            {
                CLMainpagepopulator mpgp = new CLMainpagepopulator();
                GridView1.DataSource = mpgp.getJobssingle();
                GridView1.PageIndex  = e.NewPageIndex;
                GridView1.DataBind();
            }
        }