Esempio n. 1
0
 public ActionResult GetColor(DAL.Entities.Color color)
 {
     try
     {
         return(Json(ColorFunctions.Get(color)));
     }
     catch (Exception ex)
     {
         return(Json("Error occurred. Error details: " + ex.Message));
     }
 }
Esempio n. 2
0
        public ActionResult CreateUpdateColor(DAL.Entities.Color color)
        {
            try
            {
                if (color.ColorId != null)
                {
                    ColorFunctions.Update(color);
                }
                else
                {
                    ColorFunctions.Create(color);
                }

                return(Json("Success"));
            }
            catch (Exception ex)
            {
                return(Json("Error occurred. Error details: " + ex.Message));
            }
        }
Esempio n. 3
0
        public ActionResult DeleteColor(DAL.Entities.Color color)
        {
            ColorFunctions.Delete(color);

            return(RedirectToAction("Colors", "ProductOptions"));
        }