public ActionResult DeleteConfirmed(string id) { hirer hirer = db.hirers.Find(id); db.hirers.Remove(hirer); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "hfname,hlname,hphone,hmailid,hpwd")] hirer hirer) { if (ModelState.IsValid) { db.Entry(hirer).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hirer)); }
public ActionResult Create([Bind(Include = "hfname,hlname,hphone,hmailid,hpwd")] hirer hirer) { if (ModelState.IsValid) { db.hirers.Add(hirer); db.SaveChanges(); Session["hmessage"] = hirer.hfname + " " + hirer.hlname + " " + "Succesfully Registered "; return(RedirectToAction("Create")); } return(View(hirer)); }
// GET: hirers/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } hirer hirer = db.hirers.Find(id); if (hirer == null) { return(HttpNotFound()); } return(View(hirer)); }
public ActionResult Hirelogin(hirer h) { if (ModelState.IsValid) // this is check validity { using (modelEntities1 dc = new modelEntities1()) { var v = dc.hirers.Where(a => a.hmailid.Equals(h.hmailid) && a.hpwd.Equals(h.hpwd)).FirstOrDefault(); if (v != null) { Session["LogedUserID"] = v.hfname.ToString(); Session["LogedUserFullname"] = v.hlname.ToString(); return(RedirectToAction("HirerPage")); } } } return(View(h)); }