Beispiel #1
0
        public ActionResult Remove(EventAddress eventAddress, string exhibitorSlug)
        {
            var userAuthenticated = userService.GetUser(User.Identity.Name);

            if (userAuthenticated == null || !userAuthenticated.IsInRole("Admin"))
            {
                return(null);
            }

            if (eventAddress == null)
            {
                return(null);
            }

            var exhibitor = exhibitorService.GetExhibitor(eventAddress, exhibitorSlug.CleanSlug());

            if (exhibitor == null)
            {
                return(null);
            }

            exhibitorService.RemoveExhibitor(eventAddress, exhibitor);

            return(new RedirectResult(Url.ManageExhibitors()));
        }