Exemplo n.º 1
0
        /*
         populates 
         */

        public void PopulateGridView_Job()
        {
            /*
           get list of all active jobs. 
           */



            List<Job> ListOfAllActiveJobs = new List<Job>();

            BLL.BLLRecruiterWebsiteManager GetListOfAllActiveJobs = new BLLRecruiterWebsiteManager();

            ListOfAllActiveJobs = GetListOfAllActiveJobs.GetListOfAllActiveJobs();

            GridView1.DataSource = from t in ListOfAllActiveJobs
                                   orderby t.DateCreated ascending
                                   select new
                                   {
                                       t.JobID,
                                       t.EmpID,
                                       t.Category,
                                       t.Company,
                                       t.Title,
                                       t.Location,
                                       t.Requirements,
                                       t.Type,
                                       t.Terms,
                                       t.Salary,
                                       t.DateCreated,

                                   };

            GridView1.DataBind();
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // I had to update this part with an 'if' statement to check whether the EmployerID is not null
            // this has to do with the login and logout functions
            // logging out sets the value to null meaning user can't see all active jobs
            if (Session["EmployerID"] != null)
            {

                DataSet dataSet = new DataSet();
                /*
               // dataSet.ReadXml(@"C:\Users\10274298\Desktop\THIS IS THE WEBSITE//\WebAppAssignment//\RecruiterWebsite\RecruiterWebsite\XML\Jobs.xml");
                */
                List<Job> ListOfAllJobIndex = new List<Job>();

                BLL.BLLRecruiterWebsiteManager GetListOfAllJobs = new BLL.BLLRecruiterWebsiteManager();

                ListOfAllJobIndex = GetListOfAllJobs.GetListOfAllActiveJobs();

                GridView1.DataSource = from x in ListOfAllJobIndex
                                       select new
                                       {
                                           x.JobID,
                                           x.EmpID,
                                           x.Category,
                                           x.Title,
                                           x.Location,
                                           x.Description,
                                           x.Type,
                                           x.Terms,
                                           x.Salary,
                                           x.DateCreated

                                       };
                GridView1.DataBind();
            }
        }