예제 #1
0
        public ActionResult SaveBrand(BrandModel brand)
        {
            try
            {
                var resp = brand.Save();
                if (resp.WasSuccessful)
                {
                    TempData["Messages"] = "Brand Saved!";
                }
                else
                {
                    TempData["Errors"] = resp.Message;
                }
            }
            catch (Exception ex)
            {
                TempData["Errors"] = ex.Message;
            }

            return(RedirectToAction("Brands"));
        }