//login public ActionResult login(loginivewmodel lg) { tbl_login t = db.tbl_login.Where(x => x.R_email == lg.R_email && x.R_password == lg.R_password).SingleOrDefault(); if (t == null) { return(RedirectToAction("login")); } else { return(RedirectToAction("Index", "Home")); } return(View()); }
public ActionResult forgetpassword(loginivewmodel obj) { tbl_login t = db.tbl_login.Where(x => x.R_email == obj.R_email).SingleOrDefault(); if (t == null) { TempData["Data"] = "Please Enter a Email First"; return(RedirectToAction("forgetpassword")); } else { Session["User_id"] = t.R_id; return(RedirectToAction("Edit")); } return(View()); }