public ActionResult Settings(EventCustomerEditModel customer) { if (manager.ChangeUserInfo(new EventCustomer{ Id = customer.Id, Password = customer.Password, Name = customer.Name, LastName = customer.LastName, Birthday = Convert.ToDateTime(customer.Birthday), Mobile = customer.Mobile, Email = customer.Email, Country = customer.Country, Address = customer.Address, ShowContacts = customer.ShowContacts })) { return RedirectToAction("Index"); } return View(customer); }
public ActionResult Settings() { current = store.GetAllUsers().FirstOrDefault(c => c.Login == User.Identity.Name); EventCustomerEditModel cust = new EventCustomerEditModel { Id = current.Id, Name = current.Name, LastName = current.LastName, Mobile = current.Mobile, Birthday = current.Birthday.ToShortDateString(), Email = current.Email, Country = current.Country, Address = current.Address, ShowContacts = current.ShowContacts }; return View(cust); }