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));
            }
        }
Esempio n. 2
0
 public void Delete(Shop_Product_Value item)
 {
     FDIDB.Shop_Product_Value.Remove(item);
 }
Esempio n. 3
0
 public void Add(Shop_Product_Value item)
 {
     FDIDB.Shop_Product_Value.Add(item);
 }