/// <summary> /// Метод для обновления данных в модели из данных базовой модели. /// /// </summary> /// <param name="model"> /// Данные которой хотим обновить /// </param> protected virtual void JoinWithBaseModel(SharedLayoutViewModel model) { model.CurrentController = baseModel.CurrentController; model.UserNickName = baseModel.UserNickName; model.UserSpaceId = baseModel.UserSpaceId; model.CurrentPageSpaceId = baseModel.CurrentPageSpaceId; }
public ActionResult ForgotPasswordConfirmation() { var model = new SharedLayoutViewModel(); JoinWithBaseModel(model); return(View(model)); }
public async Task <ActionResult> ConfirmEmail(string userId, string code) { var model = new SharedLayoutViewModel(); JoinWithBaseModel(model); // Зарегистрировать пользователя автоматически var user = await UserManager.Users.FirstOrDefaultAsync(u => u.Id == userId); if (userId == null || code == null || user == null) { return(View("Error", model)); } // Проверить ссылку и пользователя на корректность var cofirmationResult = await UserManager.ConfirmEmailAsync(userId, code); if (cofirmationResult.Succeeded) { // Залогиниваем пользователя var login = await LoginUserAndRedirect(user); return(login); } return(View("Error", model)); }
public ActionResult UploadTooLarge() { var model = new SharedLayoutViewModel(); JoinWithBaseModel(model); Response.StatusCode = (int)HttpStatusCode.NotFound; return(View(model)); }
public ActionResult Index() { var model = new SharedLayoutViewModel(); return(View(model)); }
public ActionResult Index() { var model = new SharedLayoutViewModel(); return View(model); }