public async Task <ActionResult> Login(ContactUsUserViewModel model, string returnUrl) { if (!ModelState.IsValid) { return(View(model)); } // This doesn't count login failures towards account lockout // To enable password failures to trigger account lockout, change to shouldLockout: true var result = await SignInManager.PasswordSignInAsync(model.LoginViewModel.Email, model.LoginViewModel.Password, model.LoginViewModel.RememberMe, shouldLockout : false); switch (result) { case SignInStatus.Success: return(RedirectToLocal(returnUrl)); case SignInStatus.LockedOut: return(View("Lockout")); case SignInStatus.RequiresVerification: return(RedirectToAction("SendCode", new { ReturnUrl = returnUrl, RememberMe = model.LoginViewModel.RememberMe })); case SignInStatus.Failure: default: ModelState.AddModelError("", "Email or Password Wrong!"); return(View(model)); } }
public ActionResult Index(ContactUsUserViewModel searchKey) { List <ViewAllDataInfo> campaign = aUserManager.SearchKey(searchKey.Campaign.Tittle); ViewBag.Campaign = campaign; return(View()); }
public ActionResult About(ContactUsUserViewModel aSubscriber) { ViewBag.Message = "Your application description page."; if (ModelState.IsValid) { int result = aUserManager.aSubscriber(aSubscriber.Subscriber.Email); //return RedirectToAction("Index", "Home"); ModelState.Clear(); //Clear model such as ContactUs return(View("ThanksSubscriberMe")); } return(View()); }
public ActionResult Contact(ContactUsUserViewModel aContactUs) { ViewBag.Message = "Your contact page."; if (ModelState.IsValid) { var dateAndTime = DateTime.Now.Date; aContactUs.ContactUs.Date = dateAndTime; int result = aUserManager.ContactInfoCustomer(aContactUs.ContactUs); ModelState.Clear(); //Clear model such as ContactUs //return RedirectToAction("Index", "Home"); return(View("ThanksContactUs")); } return(View()); }