扫描物料调用方法增加写入生产日期、有效期至字段到条码出入库临时表
| | |
| | | oMain.HSourceEntryID = DBUtility.ClsPub.isLong(dsSource.Tables[0].Rows[i]["HSourceEntryID"]); |
| | | oMain.HSourceBillNo = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillNo"]); |
| | | oMain.HSourceBillType = DBUtility.ClsPub.isStrNull(dsSource.Tables[0].Rows[i]["HSourceBillType"]); |
| | | if (omodel_View.HProduceDate<Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | oMain.HBeginDate = ""; |
| | | } |
| | | else |
| | | { |
| | | oMain.HBeginDate = omodel_View.HProduceDate.ToShortDateString(); |
| | | } |
| | | if (omodel_View.HExpiryDate<Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | oMain.HEndDate = ""; |
| | | } |
| | | else |
| | | { |
| | | oMain.HEndDate = omodel_View.HExpiryDate.ToShortDateString(); |
| | | } |
| | | oMain.HSTOCKORGID = HStockOrgID; |
| | | oMain.HOWNERID = HStockOrgID; |
| | | oMain.HCusBarCode = HCustom1; |
| | |
| | | ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" + |
| | | ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" + |
| | | ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " + |
| | | " Values(" + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + "," + oMain.HAuxPropID.ToString() + "," + oMain.HProcID.ToString() + |
| | | "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" + |
| | | "," + oMain.HQtyMust.ToString() + "," + oMain.HQty.ToString() + "," + oMain.HPieceQty.ToString() + ",'" + oMain.HBatchNo + "','" + oMain.HBarCode + "',''" + |
| | | ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + |
| | | "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + |
| | | "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','','" + oMain.HSubBillType + "'" + |
| | | ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() +")"); |
| | | ",0,0,'" + oMain.HCusBarCode + "'," + oMain.HMulSourceBill.ToString() + "," + (oMain.HBeginDate == "" ? "NULL": "'"+ oMain.HBeginDate + "'" ) + |
| | | "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")"); |
| | | |
| | | if (sRemQty <= 0) |
| | | { |
| | |
| | | oMain.HSourceEntryID = omodel_View.HSourceEntryID; |
| | | oMain.HSourceBillNo = omodel_View.HSourceBillNo; |
| | | oMain.HSourceBillType = HSourceBillType; |
| | | if (omodel_View.HProduceDate < Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | oMain.HBeginDate = ""; |
| | | } |
| | | else |
| | | { |
| | | oMain.HBeginDate = omodel_View.HProduceDate.ToShortDateString(); |
| | | } |
| | | if (omodel_View.HExpiryDate < Convert.ToDateTime("1950-01-01")) |
| | | { |
| | | oMain.HEndDate = ""; |
| | | } |
| | | else |
| | | { |
| | | oMain.HEndDate = omodel_View.HExpiryDate.ToShortDateString(); |
| | | } |
| | | oMain.HRedBlueFlag = false; |
| | | oMain.HPieceQty = 1; |
| | | oMain.HSTOCKORGID = HStockOutOrgID; |
| | |
| | | ",HMaker,HMakeDate,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo" + |
| | | ",HRelationInterID,HRelationEntryID,HRelationBillNo,HRedBlueFlag,HMTONo,HPlanMode" + |
| | | ",HSTOCKORGID,HOtherOrgID,HOWNERID,HOWNERTYPEID,HExpressNumber,HSubBillType" + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill) " + |
| | | ",HCusID,HDeptID,HCusBarCode,HMulSourceBill,HBeginDate,HEndDate) " + |
| | | " Values(" + oMain.HInterID.ToString() + ",'" + oMain.HBillNo + "','" + oMain.HBillType + "'," + oMain.HMaterID.ToString() + "," + oMain.HAuxPropID.ToString() + "," + oMain.HProcID.ToString() + |
| | | "," + oMain.HWhID.ToString() + "," + oMain.HSCWHID.ToString() + "," + oMain.HStockPlaceID.ToString() + "," + oMain.HOutStockPlaceID.ToString() + "," + oMain.HGroupID.ToString() + ",'" + oMain.HAddr + "'" + |
| | | "," + oMain.HQtyMust.ToString() + "," + oMain.HQty.ToString() + "," + oMain.HPieceQty.ToString() + ",'" + oMain.HBatchNo + "','" + oMain.HBarCode + "',''" + |
| | | ",'" + oMain.HMaker + "',getdate()," + oMain.HSourceInterID.ToString() + "," + oMain.HSourceEntryID.ToString() + ",'" + oMain.HSourceBillType + "','" + oMain.HSourceBillNo + "'" + |
| | | "," + oMain.HRelationInterID.ToString() + "," + oMain.HRelationEntryID.ToString() + ",'" + oMain.HRelationBillNo + "'," + Convert.ToString(oMain.HRedBlueFlag ? 1 : 0) + ",'" + oMain.HMTONo + "',0" + |
| | | "," + oMain.HSTOCKORGID.ToString() + "," + oMain.HOWNERID.ToString() + "," + oMain.HSTOCKORGID.ToString() + ",'','',0" + |
| | | ",0,0,'" + oMain.HCusBarCode + "',0)"); |
| | | ",0,0,'" + oMain.HCusBarCode + "',0," + (oMain.HBeginDate == "" ? "NULL": "'"+ oMain.HBeginDate + "'" ) + |
| | | "," + (oMain.HEndDate == "" ? "NULL" : "'" + oMain.HEndDate + "'") + ")"); |
| | | return true; |
| | | } |
| | | |