Example #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            hirer hirer = db.hirers.Find(id);

            db.hirers.Remove(hirer);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 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));
 }
Example #3
0
        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));
        }
Example #4
0
        // 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));
        }
Example #5
0
 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));
 }