|  |  | 
 |  |  |                 { | 
 |  |  |                     ds = oCN.RunProcReturn(string.Format(@"SELECT HMaterID,物料代码 HMaterCode,物料名称 HMaterName,规格型号 HMaterSpec, | 
 |  |  |                                             HUnitID, 计量单位代码 HUnitCode, 计量单位 HUnitName,HSourceID,生产资源代码 HSourceCode,生产资源 HSourceName, | 
 |  |  |                                             HWorkerid,操作员代码 HWorkerCode,操作员 HWorkerName,生产数量 HQty,表体备注 HRemark | 
 |  |  |                                             HWorkerid,操作员代码 HWorkerCode,操作员 HWorkerName,生产数量 HQty,表体备注 HRemark, | 
 |  |  |                                             HICMOInterID,HICMOEntryID,HICMOBillNo,HICMOInterID as HSourceInterID,HICMOEntryID as HSourceEntryID, | 
 |  |  |                                             HICMOBillNo as HSourceBillNo,3710 as HSourceBillType | 
 |  |  |                                             FROM h_v_IF_ICMOReportBillList_Edit"), "h_v_IF_ICMOReportBillList_Edit"); | 
 |  |  |  | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  | 
 |  |  |                     //string sql1 = "select HRepairCheckID,HRepairCheckContent,HManagerID,HRemark  from Sc_MouldRepairCheckBillSub where 1 = 1 "; | 
 |  |  |                     string sql1 = string.Format(@"SELECT HMaterID,物料代码 HMaterCode,物料名称 HMaterName,规格型号 HMaterSpec, | 
 |  |  |                                             HUnitID, 计量单位代码 HUnitCode, 计量单位 HUnitName,HSourceID,生产资源代码 HSourceCode,生产资源 HSourceName, | 
 |  |  |                                             HWorkerid,操作员代码 HWorkerCode,操作员 HWorkerName,生产数量 HQty,表体备注 HRemark | 
 |  |  |                                             HWorkerid,操作员代码 HWorkerCode,操作员 HWorkerName,生产数量 HQty,表体备注  | 
 |  |  |                                             HRemark,HICMOInterID,HICMOEntryID,HICMOBillNo, | 
 |  |  |                                             HICMOInterID as HSourceInterID,HICMOEntryID as HSourceEntryID, | 
 |  |  |                                             HICMOBillNo as HSourceBillNo,3710 as HSourceBillType | 
 |  |  |                                             FROM h_v_IF_ICMOReportBillList_Edit where 1 = 1 "); | 
 |  |  |                     string sql = sql1 + sqlWhere; | 
 |  |  |                     ds = oCN.RunProcReturn(sql, "h_v_IF_ICMOReportBillList_Edit"); | 
 |  |  | 
 |  |  |                     oItemSub.HEntryCloseDate = DBUtility.ClsPub.isDate(DateTime.Now); | 
 |  |  |                     oItemSub.HCloseType = false;   //关闭类型 | 
 |  |  |                     //oItemSub.HRemark = "";         //备注 | 
 |  |  |                     oItemSub.HSourceInterID = 0;     // 源单主内码 | 
 |  |  |                     oItemSub.HSourceEntryID = 0;   //源单子内码 | 
 |  |  |                     //oItemSub.HSourceInterID = 0;     // 源单主内码 | 
 |  |  |                     //oItemSub.HSourceEntryID = 0;   //源单子内码 | 
 |  |  |                     //oItemSub.HSourceBillNo = "";  //源单单号 | 
 |  |  |                     //oItemSub.HSourceBillType = ""; //源单类型 | 
 |  |  |                     //oItemSub.HRelationQty = 0;     //关联数量 | 
 |  |  | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; | 
 |  |  |                 } | 
 |  |  |                 ds = oCN.RunProcReturn("select * from Sc_ICMOReportBillMain where HInterID=" + lngBillKey, "Sc_ICMOReportBillMain"); | 
 |  |  |                 if (ds == null || ds.Tables[0].Rows.Count == 0) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; | 
 |  |  |                     objJsonResult.count = 0; | 
 |  |  |                     objJsonResult.Message = "没有数据,无法删除!"; | 
 |  |  |                     objJsonResult.data = null; | 
 |  |  |                     return objJsonResult; ; | 
 |  |  |                 } | 
 |  |  |  | 
 |  |  |                 oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + "" + "','" + "删除生产汇报单单据:" + ds.Tables[0].Rows[0]["HBillNo"].ToString() + "','LMES-生产汇报单模块','" + DBUtility.ClsPub.IPAddress + "','删除单据'", ref DBUtility.ClsPub.sExeReturnInfo); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                 bool IsDete = oBill.DeleteBill(oBill.omodel.HInterID, ref DBUtility.ClsPub.sExeReturnInfo); | 
 |  |  |  | 
 |  |  |  | 
 |  |  |                 if (IsDete) | 
 |  |  |                 { | 
 |  |  |                     objJsonResult.code = "0"; |