|  |  | 
 |  |  |                 } | 
 |  |  |                 else | 
 |  |  |                 { | 
 |  |  |                     bResult = BillNew.ModifyByID(DBUtility.ClsPub.isLong(mainList[0].HItemID)); | 
 |  |  |                     bResult = BillNew.ModifyByID(DBUtility.ClsPub.isLong(subList[0].HItemID)); | 
 |  |  |                 } | 
 |  |  |                 //提示 | 
 |  |  |                 if (bResult == true) | 
 |  |  | 
 |  |  |                 //    " left join Gy_Material c on a.HMaterID = c.HItemID " + | 
 |  |  |                 //    " left join Gy_Unit d on a.HUnitID = d.HItemID where a.HItemID = " + HItemID, "Gy_MateMouldInfo"); | 
 |  |  |                 ds = oCN.RunProcReturn("select " + | 
 |  |  |                     "a.HItemID,a.模具产品对应表代码,a.HUnitID,b.HName 模具名称" + | 
 |  |  |                     ",b.HNumber 模具代码,a.HMaterID HMaterIDCol,c.HNumber 物料代码,c.HName 物料名称,c.HModel 规格型号" + | 
 |  |  |                     "a.HItemID,a.模具产品对应表代码,a.HUnitID,b.hitemid HMouldIDCol,b.HNumber 模具代码" + | 
 |  |  |                     ",b.HName 模具名称,a.HMaterID HMaterIDCol,c.HNumber 物料代码,c.HName 物料名称,c.HModel 规格型号" + | 
 |  |  |                     ",a.HRelationID HRelationIDCol,d.HNumber 单位代码,d.HName 单位名称" + | 
 |  |  |                     ",a.HUnitID HUnitIDCol" + | 
 |  |  |                     ",a.开始日期,a.结束日期" + | 
 |  |  | 
 |  |  |         } | 
 |  |  |         #endregion | 
 |  |  |  | 
 |  |  |         /// <summary> | 
 |  |  |         /// 产品器具列表删除功能 | 
 |  |  |         /// </summary> | 
 |  |  |         /// <returns></returns> | 
 |  |  |         [Route("DeltetGy_MateMould")] | 
 |  |  |         [HttpGet] | 
 |  |  |         public object DeltetGy_MateMould(string HItemID) | 
 |  |  |         { | 
 |  |  |             DataSet ds; | 
 |  |  |             try | 
 |  |  |             { | 
 |  |  |                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); | 
 |  |  |                 if (string.IsNullOrWhiteSpace(HItemID)) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "HItemID为空!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 oCN.BeginTran();//开始事务 | 
 |  |  |                 ds = oCN.RunProcReturn("select * from Gy_MateMouldInfo where HItemID=" + HItemID, "Gy_MateMouldInfo"); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有数据,无法删除!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; ; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 oCN.RunProc("delete from Gy_MateMouldInfo where HItemID=" + HItemID); | 
 |  |  |                 oCN.Commit();//提交事务 | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 1; | 
 |  |  |                 objJsonResult.Message = "* 数据删除成功!"; | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; ; | 
 |  |  |  | 
 |  |  |             } | 
 |  |  |             catch (Exception e) | 
 |  |  |             { | 
 |  |  |                 objJsonResult.code = "0"; | 
 |  |  |                 objJsonResult.count = 0; | 
 |  |  |                 objJsonResult.Message = "删除失败!" + e.ToString(); | 
 |  |  |                 objJsonResult.data = null; | 
 |  |  |                 return objJsonResult; | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |     } | 
 |  |  | } |