public ActionResult GetColor(DAL.Entities.Color color) { try { return(Json(ColorFunctions.Get(color))); } catch (Exception ex) { return(Json("Error occurred. Error details: " + ex.Message)); } }
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)); } }
public ActionResult DeleteColor(DAL.Entities.Color color) { ColorFunctions.Delete(color); return(RedirectToAction("Colors", "ProductOptions")); }