public JsonResult Create(ProductIsInfractionType obj)
 {
     try
     {
         NSession.SaveOrUpdate(obj);
         NSession.Flush();
     }
     catch (Exception ee)
     {
         return Json(new { errorMsg = "出错了" });
     }
     return Json(new { IsSuccess = "true" });
 }
 public ActionResult Platform()
 {
     List<ProductIsInfractionType> list = new List<ProductIsInfractionType>();
     foreach (string item in Enum.GetNames(typeof(PlatformEnum)))
     {
         ProductIsInfractionType obj = new ProductIsInfractionType();
         obj.Platform = item; obj.Isinfraction = 0;
         list.Add(obj);
     }
     return Json(list);
 }
 public JsonResult PlList(String Id)
 {
     IList<ProductIsInfractionType> objList = NSession.CreateQuery("from ProductIsInfractionType where SKU='" + Id + "'").List<ProductIsInfractionType>();
     if (objList.Count != 0)
         return Json(new { total = objList.Count, rows = objList });
     else
     {
         List<ProductIsInfractionType> list = new List<ProductIsInfractionType>();
         foreach (string item in Enum.GetNames(typeof(PlatformEnum)))
         {
             ProductIsInfractionType obj = new ProductIsInfractionType();
             obj.Platform = item; obj.Isinfraction = 0;
             list.Add(obj);
         }
         return Json(list);
     }
 }