// GET public IActionResult Index(Journey journey) { var email = Request.Query["email"]; if (email.Count != 0) { journey = _wrapper.GetJourney(email[0]); TempDataHelper.Set(Statics.EmailTempData, email); } else { string emailObj = TempDataHelper.Get(Statics.EmailTempData); if (emailObj != null) { journey = _wrapper.GetJourney(emailObj); } else { journey = new Journey(); } } journey.CurrentPage = "Welcome"; return(View(journey)); }
public IActionResult Index(Journey journey) { if (!_wrapper.LoginUser(new User() { PrimaryEmail = journey.Email, CurrentPassword = journey.Password })) { return(RedirectToAction("Index", "NavigateLogin")); } journey = _wrapper.GetJourney(journey.Email); TempDataHelper.Set(Statics.EmailTempData, journey.Email); if (string.IsNullOrEmpty(journey.FirstName)) { return(RedirectToAction("Index", "NavigateAboutYou")); } return(View(journey)); }