| | |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0)//新增 |
| | | { |
| | | //主表 |
| | | oCN.RunProc(@"Insert Into Sc_QualityReportBillMain |
| | | (HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo) |
| | | if (HResult== "微瑕品") |
| | | { |
| | | //主表 |
| | | oCN.RunProc(@"Insert Into Sc_QualityReportBillMain |
| | | (HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo) |
| | | values('3717','3717-1',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') "); |
| | | //重新给HResult赋值 |
| | | HResult = ""; |
| | | } |
| | | else |
| | | { |
| | | //主表 |
| | | oCN.RunProc(@"Insert Into Sc_QualityReportBillMain |
| | | (HBillType,HBillSubType,HBillStatus,HInterID,HBillNo,HDate |
| | | ,HYear,HPeriod,HRemark,HMaker,HMakeDate |
| | | ,HEmpID,HGroupID,HDeptID,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo) |
| | | values('3717','3717',1," + HInterID + ",'" + HBillNo + "','" + HDate + "'" + |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') "); |
| | | "," + DateTime.Now.Year + "," + DateTime.Now.Month + ",'" + HRemark + "','" + HMaker + "',getdate()" + |
| | | ",'" + HEmpID + "'," + HGroupID + "," + HDeptID + "," + HMainSourceInterID + "," + HMainSourceEntryID + ",'" + HMainSourceBillNo + "') "); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | (HInterID,HENTRYID,HBillNo_bak,HEmpID,HBarCode,HBadReasonID,HAddr,HMaker,HMakeDate |
| | | ,HMaterID,HUnitID,HRemark,HSourceID,HICMOInterID,HICMOEntryID,HICMOBillNo,HReportType |
| | | ,HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HRelationQty,HRelationMoney |
| | | ,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo) |
| | | ,HQty,HResult,HProcExchInterID,HProcExchEntryID,HProcExchBillNo,HProcID) |
| | | values({HInterID},1,'{oSub.HBillNo_bak}',{oSub.HEmpID},'{oSub.HBarCode}',{oSub.HBadReasonID},'','{oSub.HMaker}','{oSub.HMakeDate}' |
| | | ,{oSub.HMaterID},{oSub.HUnitID},'{oSub.HRemark}',{oSub.HSourceID},{oSub.HICMOInterID},{oSub.HICMOEntryID},'{oSub.HICMOBillNo}',{oSub.HReportType} |
| | | ,0,0,'','',0,0 |
| | | ,1,'{HResult}',{oSub.HProcExchInterID},{oSub.HProcExchEntryID},'{oSub.HProcExchBillNo}')"); |
| | | ,1,'{HResult}',{oSub.HProcExchInterID},{oSub.HProcExchEntryID},'{oSub.HProcExchBillNo}',{oSub.HProcID})"); |
| | | |
| | | //修改条码表的状态 |
| | | oCN.RunProc("update Gy_BarCodeBill set HStatus='"+ HResult + "' where HBarCode='"+ oSub.HBarCode + "'"); |
| | |
| | | { |
| | | HShiftsID = int.Parse(set.Tables[0].Rows[0]["HInterID"].ToString()); |
| | | } |
| | | |
| | | |
| | | ds = oCN.RunProcReturn("select * from Sc_StationOutBillMain a WITH(NOLOCK) left join Sc_StationOutBillSub_SN sn WITH(NOLOCK) on a.HInterID=sn.HInterID where a.HInterID=" + HInterID + " and HBillNo='" + HBillNo + "' and CONVERT(varchar(10),HDate,20) ='" + DateTime.Now.ToString("yyyy-MM-dd") + "' ", "Sc_StationOutBillMain"); |
| | | |
| | | if (ds.Tables[0].Rows.Count == 0) |