public IActionResult CreateGiveawayDrop()
 {
     if (_userService.GetOrCreateUser(User.Identity.Name).AuthLevel == Models.User.AuthType.Admin)
     {
         CreateEditGiveawayDropViewModel viewModel = new CreateEditGiveawayDropViewModel();
         return(View(viewModel));
     }
     else
     {
         return(RedirectToAction("Index", "Admin", new { changeAction = "unauth" }));
     }
 }
 public IActionResult EditGiveawayDrop(int id)
 {
     if (_userService.GetOrCreateUser(User.Identity.Name).AuthLevel == Models.User.AuthType.Admin)
     {
         GiveawayDrop drop = this._giveawayDropRepository.Get(id);
         CreateEditGiveawayDropViewModel viewModel = new CreateEditGiveawayDropViewModel(drop);
         return(View(viewModel));
     }
     else
     {
         return(RedirectToAction("Index", "Admin", new { changeAction = "unauth" }));
     }
 }
        public IActionResult EditGiveawayDrop(CreateEditGiveawayDropViewModel viewModel)
        {
            if (_userService.GetOrCreateUser(User.Identity.Name).AuthLevel == Models.User.AuthType.Admin)
            {
                if (ModelState.IsValid)
                {
                    GiveawayDrop drop = new GiveawayDrop();
                    drop.Name        = viewModel.Name;
                    drop.LowerBound  = viewModel.LowerBound;
                    drop.HigherBound = viewModel.HigherBound;
                    drop.Type        = viewModel.Type;

                    this._giveawayDropRepository.Add(drop);

                    return(RedirectToAction("ManageGiveawayDrops", new { changeAction = "updated" }));
                }
                return(View(viewModel));
            }
            else
            {
                return(RedirectToAction("Index", "Admin", new { changeAction = "unauth" }));
            }
        }