Пример #1
0
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="modelClassify"></param>
        /// <returns></returns>
        public ActionResult InsertClassify(Models.S_StatisticAttribute modelClassify)
        {
            MyModels.Entry(modelClassify).State = System.Data.Entity.EntityState.Added;
            MyModels.SaveChanges();
            int goodsclassifyid = modelClassify.StatisticAttributeID;

            return(Json(goodsclassifyid, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
 /// <summary>
 /// 修改保存
 /// </summary>
 /// <param name="modelClassify"></param>
 /// <returns></returns>
 public ActionResult UpdateDrug(Models.S_StatisticAttribute modelClassify)
 {
     MyModels.Entry(modelClassify).State = System.Data.Entity.EntityState.Modified;
     MyModels.SaveChanges();
     return(Content("OK"));
 }