public EditProfileModel() { ChangePasswordModel = new ChangePasswordModel(); EditMainInfoModel = new EditMainInfoModel(); EditAdvanceInfoModel = new EditAdvanceInfoModel(); EditBindInfoModel = new EditBindInfoModel(); }
public ActionResult EditMainInfo(EditMainInfoModel model) { if (ModelIsValid) { var data = new UserInfoData { UserId = model.UserId, UserName = model.UpdateUserName, UserEmail = model.UpdateUserEmail, FirstName = model.FirstName, LastName = model.LastName, SexId = model.SexId, ShowUserEmail = model.ShowEmail }; Execute(() => _accountService.UpdateMainInfo(data)); if (CurrentUser.IsMe(model.UserId)) Execute(() => CurrentUser = _accountService.GetUser(model.UserId)); } return View("_EditMainInfoPartial", model); }