コード例 #1
0
        public ActionResult Destroy()
        {
            var products = this.DeserializeObject <IEnumerable <DetailProductModel> >("models");

            if (products != null)
            {
                DetailProductRepository.Delete(products);
            }
            return(this.Jsonp(products));
        }
コード例 #2
0
        public JsonResult Submit()
        {
            var model = this.DeserializeObject <DetailProductSubmitViewModel>("models");

            if (model != null && model.Created != null)
            {
                DetailProductRepository.Insert(model.Created);
            }

            if (model != null && model.Updated != null)
            {
                DetailProductRepository.Update(model.Updated);
            }

            if (model != null && model.Destroyed != null)
            {
                DetailProductRepository.Delete(model.Destroyed);
            }

            return(this.Jsonp(model));
        }