public ActionResult ChangePassword(Loginbal user) { Loginbal userdetails = new Loginbal(); userdetails.UserID = user.UserID; userdetails.Password = user.Password; Logindal dal = new Logindal(); bool status = dal.ChangePassword(userdetails); if (status) { string msg = "Password changed successfully!!!"; TempData["message"] = msg; return(RedirectToAction("Contact", "Home")); } return(View()); }
public ActionResult LoginUser(clsLogin user) { bool status = false; Loginbal userdetails = new Loginbal(); userdetails.UserID = user.UserID; userdetails.Password = user.Password; Logindal login = new Logindal(); status = login.CheckCredentials(userdetails); if (status) { Session["UserID"] = userdetails.UserID; return(RedirectToAction("Index")); } return(View()); }