public ActionResult Add(string key, string json) { var model = new Shop_Product_Value(); try { if (key != Keyapi) { return(Json(0, JsonRequestBehavior.AllowGet)); } UpdateModel(model); model.Name = HttpUtility.UrlDecode(model.Name); model.NameAscii = FomatString.Slug(model.Name); model.IsDeleted = false; model.Quantity = 0; model.QuantityOut = 0; _da.Add(model); _da.Save(); return(Json(model.ID, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(0, JsonRequestBehavior.AllowGet)); } }
public void Delete(Shop_Product_Value item) { FDIDB.Shop_Product_Value.Remove(item); }
public void Add(Shop_Product_Value item) { FDIDB.Shop_Product_Value.Add(item); }