public ActionResult Create(int?loginId) { EditMemberViewModel viewModel = new EditMemberViewModel(); viewModel.ClubRoles = _dataService.GetAllRoles(); viewModel.Status = MemberStatus.Pending.ToString(); viewModel.MemberRoles = new List <int>(); if (loginId != null) { Login login = _dataService.GetLoginById((int)loginId); viewModel.LoginId = login.Id; viewModel.Username = login.Username; } return(View(ViewNames.CreateMember, viewModel)); }
//[HandleError] public ActionResult ChangeEmail() { ProfileCommon profile = HttpContext.Profile as ProfileCommon; if (profile == null) { RedirectToAction("LogOn", "Account"); } Login login = _dataService.GetLoginById(profile.LoginId); UpdateEmailsModel model = new UpdateEmailsModel(); model.Id = login.Id; model.PrimaryEmail = login.Email; model.SecondaryEmail = login.Email2; return(View("UpdateEmail", model)); }