public ActionResult ForgetPass(LoginModel m) { LoginDal logindal = new LoginDal(); if (!logindal.EmailExist(m.Email)) { ViewBag.femail = "Email Id not Registered"; return(View()); } Passenger p = new Passenger(); p.Email = m.Email; p.Pwd = m.Pwd; logindal.ChangePassword(p); ViewBag.msg = "Password Changed Successfully!!"; return(View()); }
public ActionResult Register(LoginModel ld) { LoginDal logindal = new LoginDal(); if (logindal.EmailExist(ld.Email)) { ViewBag.erroremail = "Email Already Registered"; return(View()); } Passenger p = new Passenger(); p.Email = ld.Email; p.FName = ld.FName; p.LName = ld.LName; p.Age = ld.Age; p.PhoneNo = Convert.ToInt64(ld.PhoneNo); p.Pwd = ld.Pwd; logindal.InsetData(p); return(View()); }