Пример #1
0
        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));
        }
Пример #2
0
 public IActionResult Index()
 {
     ViewBag.BloodGroup = new SelectList(bloodGroupService.GetBloodGroups().ToList(), "Id", "Name");
     ViewBag.City       = new SelectList(cityService.GetCitys().ToList(), "Id", "Name");
     return(View());
 }
Пример #3
0
        public IActionResult Create()
        {
            ViewBag.BloodGroup = new SelectList(bloodGroupService.GetBloodGroups().ToList(), "Id", "Name");

            return(View());
        }