|  |  | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |  | 
 |  |  |                 if (user == "10000")//api同步方式 | 
 |  |  |                 { | 
 |  |  |                     oCN.RunProc("delete from Gy_Material where HERPItemID=" + HItemID); | 
 |  |  | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; ; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 //删除权限 | 
 |  |  |                 if (!DBUtility.ClsPub.Security_Log("Gy_Material_Delete", 1, false, user)) | 
 |  |  |                 { | 
 |  |  | 
 |  |  |                 ds = oCN.RunProcReturn("select * from Gy_Material where HItemID=" + HItemID, "Gy_Material"); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     oCN.RollBack();//回滚事务 | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有数据,无法删除!"; | 
 |  |  | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 oCN.RollBack();//回滚事务 | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "删除失败!" + e.ToString(); |