pitit refact
This commit is contained in:
parent
e24208e77b
commit
20713eef64
235 changed files with 5374 additions and 373 deletions
|
|
@ -709,10 +709,10 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
|
|||
}
|
||||
else
|
||||
{
|
||||
ViewData["jsonres"] = JsonConvert.SerializeObject(result);
|
||||
ViewBag.jsonres = JsonConvert.SerializeObject(result);
|
||||
// If the user does not have an account, then ask the user to create an account.
|
||||
ViewData["ReturnUrl"] = returnUrl;
|
||||
ViewData["LoginProvider"] = info.LoginProvider;
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
ViewBag.LoginProvider = info.LoginProvider;
|
||||
var email = info.AuthenticationProperties.GetParameter<string>(ClaimTypes.Email);
|
||||
var name = info.AuthenticationProperties.GetParameter<string>(ClaimTypes.Name);
|
||||
var avatar = info.AuthenticationProperties.GetParameter<string>("urn:google:profile");
|
||||
|
|
@ -780,7 +780,7 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
|
|||
AddErrors(result);
|
||||
}
|
||||
|
||||
ViewData["ReturnUrl"] = returnUrl;
|
||||
ViewBag.ReturnUrl = returnUrl;
|
||||
return View(model);
|
||||
}
|
||||
|
||||
|
|
@ -1077,7 +1077,7 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
|
|||
var result = await _signInManager.TwoFactorSignInAsync(model.Provider, model.Code, model.RememberMe, model.RememberMe);
|
||||
if (result.Succeeded)
|
||||
{
|
||||
ViewData["StatusMessage"] = "Your code was verified";
|
||||
ViewBag.StatusMessage = "Your code was verified";
|
||||
_logger.LogInformation($"Signed in. returning to {model.ReturnUrl}");
|
||||
if (model.ReturnUrl != null)
|
||||
return Redirect(model.ReturnUrl);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace Yavsc.Controllers
|
|||
[HttpGet]
|
||||
public async Task<IActionResult> Index(ManageMessageId? message = null)
|
||||
{
|
||||
ViewData["StatusMessage"] =
|
||||
ViewBag.StatusMessage =
|
||||
message == ManageMessageId.ChangePasswordSuccess ? _SR["Your password has been changed."]
|
||||
: message == ManageMessageId.SetPasswordSuccess ? _SR["Your password has been set."]
|
||||
: message == ManageMessageId.SetTwoFactorSuccess ? _SR["Your two-factor authentication provider has been set."]
|
||||
|
|
@ -484,7 +484,7 @@ namespace Yavsc.Controllers
|
|||
[HttpGet]
|
||||
public async Task<IActionResult> ManageLogins(ManageMessageId? message = null)
|
||||
{
|
||||
ViewData["StatusMessage"] =
|
||||
ViewBag.StatusMessage =
|
||||
message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed."
|
||||
: message == ManageMessageId.AddLoginSuccess ? "The external login was added."
|
||||
: message == ManageMessageId.Error ? "An error has occurred."
|
||||
|
|
@ -496,7 +496,7 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
var userLogins = await _userManager.GetLoginsAsync(user);
|
||||
|
||||
ViewData["ShowRemoveButton"] = user.PasswordHash != null || userLogins.Count > 1;
|
||||
ViewBag.ShowRemoveButton = user.PasswordHash != null || userLogins.Count > 1;
|
||||
|
||||
return View(new ManageLoginsViewModel
|
||||
{
|
||||
|
|
@ -748,15 +748,15 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
public async Task<IActionResult> PaymentInfo (string id)
|
||||
{
|
||||
ViewData["id"] = id;
|
||||
ViewBag.id = id;
|
||||
var info = await PayPalHelpers.GetCheckoutInfo(_dbContext,id);
|
||||
return View(info);
|
||||
}
|
||||
|
||||
public IActionResult PaymentError (string id, string error)
|
||||
{
|
||||
ViewData["error"] = error;
|
||||
ViewData["id"] = id;
|
||||
ViewBag.error = error;
|
||||
ViewBag.id = id;
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace Yavsc.Controllers
|
|||
// GET: Users/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress");
|
||||
ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress");
|
||||
return View();
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ namespace Yavsc.Controllers
|
|||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
return NotFound();
|
||||
}
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ namespace Yavsc.Controllers
|
|||
await _context.SaveChangesAsync();
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
|
||||
return View(applicationUser);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue