public ActionResult DeleteConfirmed(int id) { EmployerSelectsSeeker employerSelectsSeeker = db.EmployerSelectsSeekers.Find(id); db.EmployerSelectsSeekers.Remove(employerSelectsSeeker); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult ShortList() { EmployerSelectsSeeker es = new EmployerSelectsSeeker(); es.JobSeekerId = Convert.ToInt32(Session["SeekerId"]); es.EmployerId = Convert.ToInt32(Session["EmployerId"]); db.EmployerSelectsSeekers.Add(es); db.SaveChanges(); return(RedirectToAction("Index", "EmployerSelectsSeekers")); }
public ActionResult Edit([Bind(Include = "EmployerSelectsSeekerID,EmployerId,JobSeekerId")] EmployerSelectsSeeker employerSelectsSeeker) { if (ModelState.IsValid) { db.Entry(employerSelectsSeeker).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.EmployerId = new SelectList(db.Employers, "EmployerId", "EmployerUsername", employerSelectsSeeker.EmployerId); ViewBag.JobSeekerId = new SelectList(db.JobSeekers, "JobSeekerId", "JobSeekerUsername", employerSelectsSeeker.JobSeekerId); return(View(employerSelectsSeeker)); }
// GET: EmployerSelectsSeekers/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmployerSelectsSeeker employerSelectsSeeker = db.EmployerSelectsSeekers.Find(id); if (employerSelectsSeeker == null) { return(HttpNotFound()); } return(View(employerSelectsSeeker)); }
// GET: EmployerSelectsSeekers/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } EmployerSelectsSeeker employerSelectsSeeker = db.EmployerSelectsSeekers.Find(id); if (employerSelectsSeeker == null) { return(HttpNotFound()); } ViewBag.EmployerId = new SelectList(db.Employers, "EmployerId", "EmployerUsername", employerSelectsSeeker.EmployerId); ViewBag.JobSeekerId = new SelectList(db.JobSeekers, "JobSeekerId", "JobSeekerUsername", employerSelectsSeeker.JobSeekerId); return(View(employerSelectsSeeker)); }