protected void gvRecentJobs_SelectedIndexChanged(object sender, EventArgs e) { favJobs = service.GetListOfFavJobs(new DbJob(), Guid.Parse(Session["sessionid"].ToString())); GridViewRow row = gvFavJobs.SelectedRow; dt2 = ToDataTable <DbJob>(favJobs.ToList()); DataRow dRow = dt2.Rows[row.RowIndex]; Session["jobId"] = (int)dRow["JobId"]; pnlSelectJob.Visible = true; List <string> skills = new List <string>(); skills = service.GetJobSkills((int)dRow["JobId"]).ToList(); Session["Skills"] = skills; Session["AccMan"] = service.GetOneUser((int)dRow["UserId"]); int rowCount = gvFavJobs.SelectedIndex; lblStatus.Text = row.Cells[6].Text; lblStream.Text = row.Cells[5].Text; lblLocation.Text = row.Cells[4].Text; lblCompany.Text = row.Cells[3].Text; lblTitle.Text = row.Cells[2].Text; lblDescription.Text = dRow["Description"].ToString(); lblDateposted.Text = row.Cells[1].Text; lblDeadline.Text = row.Cells[7].Text; lblAccMan.Text = Session["AccMan"].ToString(); blSkills.DataSource = Session["Skills"]; blSkills.DataBind(); lblMsg.Visible = false; pnlSelectJob.Visible = true; lblMsg.Visible = false; jobId = int.Parse(Session["jobId"].ToString()); lbtnAddComment.Visible = true; BindCommentData(jobId); if (service.ViewComments(jobId).ToList().Count == 0) { lblSuccess.Text = "There are currently no comments for this post"; cmntTimer.Enabled = false; } cmntTimer.Enabled = true; }
protected void gvRecJobs_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = gvRecJobs.SelectedRow; dt2 = ToDataTable <DbRecommendation>(recPeople.ToList()); DataRow dRow = dt2.Rows[row.RowIndex]; jobId = (int)dRow["JobId"]; pnlSelectJob.Visible = true; DbJob job = service.GetOneJob(jobId); string accountManager = service.GetOneUser(job.UserId); //int rowCount = gvRecJobs.SelectedIndex; //lblStatus.Text = jobId.ToString(); lblStatus.Text = job.Status; lblStream.Text = job.Stream; lblLocation.Text = job.Location; lblCompany.Text = job.Company; lblTitle.Text = job.Title; lblDescription.Text = job.Description; lblDateposted.Text = job.DatePosted.ToString(); lblDeadline.Text = job.Deadline.ToString(); lblAccMan.Text = accountManager; blSkills.DataSource = job.Skills; blSkills.DataBind(); //lblMsg.Visible = false; pnlSelectJob.Visible = true; Session["jobId"] = jobId; lbtnAddComment.Visible = true; BindCommentData(jobId); if (service.ViewComments(jobId).ToList().Count == 0) { lblSuccess.Text = "There are currently no comments for this post"; cmntTimer.Enabled = false; } cmntTimer.Enabled = true; }