| | |
| | | + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ") "); |
| | | //æ´æ°å
³èæ°é |
| | | oCn.RunProc("exec h_p_Sc_UpDateRelation_ICMOToProductIn_Add " + HInterID.ToString()); |
| | | //åå¡«å·²çåç¶æ |
| | | oCn.RunProc("Update KF_WeighSource_Temp set HRelationInterID=1 where HInterID= " + HInterID.ToString()); |
| | | MessageBox.Show("çæç产å
¥åºåï¼" + HBillNo + " æåï¼", "æç¤º"); |
| | | oCn.Commit(); |
| | | return true; |
| | |
| | | MessageBox.Show("请è¾å
¥æ£ç¡®ééï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isDoule(txtHQty.Text)- DBUtility.ClsPub.isDoule(txtHKDQty.Text) <= 0) |
| | | { |
| | | MessageBox.Show("è¾å
¥çæ£ç¹æ°ä¸è½å¤§äºç±³æ°ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isInt(txtHBarcodeNo.Text) == 0) |
| | | { |
| | | MessageBox.Show("请è¾å
¥å
å·ï¼", "æç¤º"); |
| | |
| | | |
| | | string HBarCode = ""; |
| | | string HBarCodeType = ""; |
| | | double HQty = 0; //ç±³æ° |
| | | double HNowQty = 0; //ç±³æ° |
| | | double HMaterialJQty = 0; //éé |
| | | double HMaterialMQty = 0; //æ£ç¹æ° |
| | | double HQty = 0; //æ°é |
| | | Int64 HDeptID = 0; |
| | | string HRemark = ""; |
| | | string HMaterName = ""; |
| | |
| | | |
| | | HBarCode = TM; |
| | | HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text); |
| | | HQty = DBUtility.ClsPub.isDoule(txtHQty.Text); |
| | | HNowQty = DBUtility.ClsPub.isDoule(txtHQty.Text); |
| | | HMaterialJQty = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text); |
| | | HMaterialMQty = DBUtility.ClsPub.isDoule(txtHKDQty.Text); |
| | | HQty = HNowQty- HMaterialMQty; |
| | | HDeptID = DBUtility.ClsPub.isLong(txtHDeptName.Tag); |
| | | HRemark = DBUtility.ClsPub.isStrNull(txtHRemark.Text); |
| | | HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text); |
| | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //åå
¥æ¡ç æ¡£æ¡ (客æ·ç©æåç§°HCusMaterNameåå
¥HMaterialModelåæ®µï¼å®¢æ·è§æ ¼åå·HCusModelåå
¥HCusModelåæ®µ |
| | | //åå
¥æ¡ç æ¡£æ¡ (客æ·ç©æåç§°HCusMaterNameåå
¥HMaterialModelåæ®µï¼å®¢æ·è§æ ¼åå·HCusModelåå
¥HCusModelåæ®µï¼ä¸è¯åå IDåå
¥HCustomQty1åæ®µï¼ |
| | | oCn.RunProc("Insert into Gy_BarCodeBill " + |
| | | "(HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | | ",HSourceInterID,HSourceEntryID,HSourceBillNo,HSourceBillType,HEndQty " + |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty,HNowQty " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " + |
| | | ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo,HLogo " + |
| | | ") Values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString() |
| | | + ",'" + HBatchNo + "'," + HSupID.ToString() + ",0,'" + HMaker + "',getdate(),0," + HQty.ToString() |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''" |
| | | + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" |
| | | + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() |
| | | + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() + "," + HNowQty.ToString() |
| | | + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0" |
| | | + ", " + ProcessExchangeInterID.ToString() + ",0,'" + ProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'" |
| | | + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','')"); |
| | | + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','','1')"); |
| | | |
| | | //åå¡«æå¤§æµæ°´å· |
| | | oCn.RunProc("exec h_p_WMS_SetMaxNo_QTY '" + sTMNumber + "',1 "); |
| | | |
| | | //åå¡«æºå临æ¶è¡¨HInterID |
| | | oCn.RunProc("update a set a.HInterID=" + HInterID.ToString() + ",a.HBillNo='" + HBillNo + "' from KF_WeighSource_Temp a where a.HInterID<>" + HInterID.ToString() + " and a.HMaker='" + HMaker + "' and convert(varchar(10),a.HMakeDate,120)=convert(varchar(10),getdate(),120)"); |
| | | oCn.RunProc("update a set a.HInterID=" + HInterID.ToString() + ",a.HBillNo='" + HBillNo +"',a.HRelationInterID= 0 from KF_WeighSource_Temp a where a.HInterID<>" + HInterID.ToString() + " and a.HMaker='" + HMaker + "' and a.HSourceBillNo='" + ProcessExchangeBillNo + "'"); |
| | | |
| | | //åå
¥æ¡ç åºå
¥åºä¸´æ¶è¡¨ |
| | | oCn.RunProc("Insert into KF_PonderationBillMain_Temp " + |