public IActionResult Register(string returnUrl) { if (signInManager.IsSignedIn(User) && !User.IsInRole("Admin")) { return(RedirectToAction("Index", "Manage")); } if (signInManager.IsSignedIn(User) && !User.IsInRole("Donor")) { return(RedirectToAction("Index", "Home")); } var model = new RegisterViewModel { ReturnUrl = returnUrl }; ViewBag.BloodGroup = new SelectList(bloodGroupService.GetBloodGroups().ToList(), "Id", "Name"); ViewBag.City = new SelectList(cityService.GetCitys().ToList(), "Id", "Name"); return(View(model)); }
public IActionResult Index() { ViewBag.BloodGroup = new SelectList(bloodGroupService.GetBloodGroups().ToList(), "Id", "Name"); ViewBag.City = new SelectList(cityService.GetCitys().ToList(), "Id", "Name"); return(View()); }
public IActionResult Create() { ViewBag.BloodGroup = new SelectList(bloodGroupService.GetBloodGroups().ToList(), "Id", "Name"); return(View()); }