Esempio n. 1
0
        public ActionResult DeleteBrand(BrandModel brand)
        {
            try
            {
                var resp = brand.Delete();
                if (resp.WasSuccessful)
                {
                    TempData["Messages"] = "Brand Deleted!";
                }
                else
                {
                    TempData["Errors"] = resp.Message;
                }
            }
            catch (Exception ex)
            {
                TempData["Errors"] = ex.Message;
            }

            return(RedirectToAction("Brands"));
        }