Ejemplo n.º 1
0
        public ActionResult XoaNhaXe(int id)
        {
            if (!_permissionService.Authorize(StandardPermissionProvider.QLNhaXe))
            {
                return(AccessDeniedView());
            }

            var nhaxe = _nhaxeService.GetNhaXeById(id);

            if (nhaxe == null || nhaxe.isDelete)
            {
                //No manufacturer found with the specified id
                return(RedirectToAction("ListNhaXe"));
            }

            _nhaxeService.DeleteNhaXe(nhaxe);

            return(RedirectToAction("ListNhaXe"));
        }