Пример #1
0
 public ActionResult Add(string models)
 {
     sd_category model = new sd_category();
     JsonResult result = new JsonResult();
     if (models != null)
     {
         var list = JsonConvert.DeserializeObject<List<sd_category>>(models);
         result.Data = new Category().Add(list);
     }
     else
     {
         result.Data = false;
     }
     return result;
 }
Пример #2
0
 public ActionResult Update(string models)
 {
     sd_category model = new sd_category();
     //List<sd_category> list = new List<sd_category>();
     if (models != null)
     {
         model = JsonConvert.DeserializeObject<sd_category>(models);
         var t = new Category().Update(model);
         return Json(t);
     }
     return null;
 }