public JsonNetResult Login(LoginViewModel model) { var service = new IdentityService(); var response = service.SignIn(model.LoginName, model.Password); if (response.Status) { var selectedCountry = GlobalUtilities.GetSelectedCountryCode(); if (response.Country != selectedCountry) { Exigo.PropertyBags.Delete(PropertyBag); Exigo.PropertyBags.Delete(ShoppingCart); var country = (response.Country.IsEmpty()) ? "US" : response.Country; GlobalUtilities.SetSelectedCountryCode(country); GlobalUtilities.SetCurrentCulture(); } } return new JsonNetResult(response); }
public ActionResult Login() { var model = new LoginViewModel(); return View(model); }