public void SSMyJobs() { //Login loginobj2 = new Login test = extent.StartTest("Test cases under Service Supplier Dashboard"); MyJobs myjobsobj = new MyJobs(); myjobsobj.myQuotesGraphStatus(); myjobsobj.myJobsGraphStatus(); myjobsobj.editJobSteps(); myjobsobj.detailsSteps(); }
public ActionResult MyJobs() { var userId = User.Identity.GetUserId(); var context = new VITVSecondContext(); var onProgressJobs = context.Jobs.Where(j => j.Employees.Any(e => e.Id == userId) && j.Done == false).ToList(); var doneJobs = context.Jobs.Where(j => j.Employees.Any(e => e.Id == userId) && j.Done == true).ToList(); var model = new MyJobs() { OnProgress = onProgressJobs, Done = doneJobs }; return(View(model)); }
// GET: MyJobs public async Task <ActionResult> Index() { int userid = 0; HttpCookie reqCookies = Request.Cookies["userInfo"]; userid = Convert.ToInt32(reqCookies["Id"].ToString()); List <MyJobs> mj = new List <MyJobs>(); var list = db.Jobs.Join(db.AppliesFors, job => job.Id, applies => applies.JobId, (job, applies) => new { Company = job.Company, Position = job.Position, FullPart = job.FullPart, Description = job.Description, Qualifications = job.Qualifications, Location = job.Location, Salary = job.Salary, Approved = applies.Approved, ProfileId = applies.Profileid }); foreach (var l in list) { if (l.ProfileId == userid) { MyJobs m = new MyJobs(); m.Company = l.Company; m.Position = l.Position; m.FullPart = l.FullPart; m.Description = l.Description; m.Qualifications = l.Qualifications; m.Location = l.Location; m.Salary = l.Salary; m.Approved = l.Approved; m.ProfileId = l.ProfileId; mj.Add(m); } } return(View(mj)); }