Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EmployerSelectsSeeker employerSelectsSeeker = db.EmployerSelectsSeekers.Find(id);

            db.EmployerSelectsSeekers.Remove(employerSelectsSeeker);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
        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"));
        }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
        // 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));
        }
Esempio n. 5
0
        // 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));
        }