private void GetJobs() { BEJobAlerts beJob = new BEJobAlerts(); BA_JobAlerts baJob = new BA_JobAlerts(); beJob.jobSeekerID = Session["PSJUID"].ToString(); beJob.type = 1; DataSet ds = new DataSet(); ds = baJob.GetJobAlerts(beJob); dlJobAlerts.DataSource = ds.Tables[0]; dlJobAlerts.DataBind(); dlJobAlerts.Visible = true; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblResume.Visible = false; if (Session["PSJUID"].ToString() != "") { BEJobSeeker bemem = new BEJobSeeker(); BAJobSeeker bamem = new BAJobSeeker(); bemem.email = Session["PSJUID"].ToString(); ds = new DataSet(); ds = bamem.GetMemActivity(bemem); ViewState["filename"] = ds.Tables[0].Rows[0]["filename"].ToString(); string username = ds.Tables[0].Rows[0]["username"].ToString(); Session["username"] = ds.Tables[0].Rows[0]["username"].ToString(); ViewState["username"] = ds.Tables[0].Rows[0]["username"].ToString(); lblUsername.Text = ds.Tables[0].Rows[0]["firstname"].ToString(); lblname.Text = ds.Tables[0].Rows[0]["firstname"].ToString(); Session["LoginTime"] = ds.Tables[2].Rows[0]["LoginTime"].ToString(); lblLastLoginTime.Text = ds.Tables[2].Rows[0]["LoginTime"].ToString(); lblLogintime.Text = ds.Tables[1].Rows[0]["IntialLogin"].ToString(); lblact.Text = ds.Tables[0].Rows[0]["AccountDt"].ToString(); #region JobAlert beJobAlert.jobSeekerID = Session["PSJUID"].ToString(); beJobAlert.type = 0; dsjob = new DataSet(); dsjob = bajob.GetJobAlerts(beJobAlert); if (dsjob.Tables[0].Rows.Count == 0) { dlJobAlerts.DataSource = null; dlJobAlerts.DataBind(); hpkjobalert.Visible = false; } else { dlJobAlerts.DataSource = dsjob; dlJobAlerts.DataBind(); } #endregion } else { Response.Redirect("JobSeekerLogin.aspx", false); } } }
public void FillGrid() { int JobId = int.Parse(ViewState["desired"].ToString()); beJobAlert.id = JobId; beJobAlert.jobSeekerID = Session["PSJUID"].ToString(); beJobAlert.type = 2; ds1 = new DataSet(); ds1 = bajob.GetJobAlerts(beJobAlert); //string query = "select id,Keywords,Location,Category from tblJobAlerts where id="; //da1 = new SqlDataAdapter(query, conn); //da1.Fill(ds1); ds = new DataSet(); //beJobAlert = new BEJobAlerts(); beJobAlert.location = ds1.Tables[0].Rows[0]["Location"].ToString(); beJobAlert.category = ds1.Tables[0].Rows[0]["category"].ToString(); beJobAlert.keywords = ds1.Tables[0].Rows[0]["Keywords"].ToString(); ds = badesiredalerts.GetDesiredJobAlerts(beJobAlert); //string q1 = "select *,dbo.EncryptDecrypt(id) as encryptid from tblJobPosting where Location like '%" + ds1.Tables[0].Rows[0]["Location"] + "%' and Industry like '%" + ds1.Tables[0].Rows[0]["Category"] + "%' and JobTitle like '%" + ds1.Tables[0].Rows[0]["Keywords"] + "%'"; // da = new SqlDataAdapter(q1, conn); // da.Fill(ds); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { pnlMain.Visible = true; pnlSub.Visible = false; _PageDataSource.DataSource = ds.Tables[0].DefaultView; _PageDataSource.AllowPaging = true; _PageDataSource.PageSize = PageSize; _PageDataSource.CurrentPageIndex = CurrentPage; ViewState["TotalPages"] = _PageDataSource.PageCount; this.lblPageInfo.Text = "Page " + (CurrentPage + 1) + " of " + _PageDataSource.PageCount; this.lbtnPrevious.Enabled = !_PageDataSource.IsFirstPage; this.lbtnNext.Enabled = !_PageDataSource.IsLastPage; this.lbtnFirst.Enabled = !_PageDataSource.IsFirstPage; dlPostedJobs.DataSource = _PageDataSource; dlPostedJobs.DataBind(); this.doPaging(); } else { pnlMain.Visible = false; pnlSub.Visible = true; } } }