Esempio n. 1
0
        public ActionResult Delete(int id)
        {
            if (CurrentUser == null || !CurrentUser.IsAdmin)
            {
                return(new RedirectResult("/"));
            }
            var result = false;
            var m      = modelService.GetMake(id);

            if (m != null)
            {
                result = modelService.DeleteMake(id);
            }

            return(Json(new { success = result }));
        }