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

            return(RedirectToAction("Colors"));
        }