| | |
| | | + ", " + 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; |
| | |
| | | //æ¡ç çæå夿 |
| | | private bool Sub_AllowSave() |
| | | { |
| | | //夿å½ååæ®IDæ¯å¦å·²ä¸ä¼ çæåæ® |
| | | DataSet Ds = oCn.RunProcReturn("select top 1 1 from KF_WeighSource_Temp with(nolock) where HInterID=" + HInterID.ToString() + " and HRelationInterID=1 ", "KF_WeighSource_Temp", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("å½åæ¡ç è®°å½å·²æ¢çä¸ä¼ çæåæ®ï¼è¯·éåºåéæ°è¿å
¥è¯¥æ¨¡åè¿è¡æ¡ç çææä½ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | |
| | | if (HInterID==0 || HBillNo=="") |
| | | { |
| | | MessageBox.Show("è·åæ¡ç 对åºåæ®IDæåæ®å·å¤±è´¥ï¼è¯·éæ°å·æ°çé¢ï¼", "æç¤º"); |
| | |
| | | else if (DBUtility.ClsPub.isDoule( txtHWeightQyt.Text) == 0) |
| | | { |
| | | 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("ç©æé»è®¤ä»åºå¯ç¨äºä»ä½ï¼ä½æªè®¾ç½®ä»ä½ï¼è·åä»ä½ä¿¡æ¯å¤±è´¥ï¼è¯·å
è®¾ç½®ç©æé»è®¤ä»ä½ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | //å®é
å
éè¶
åºç¾åä¹äºåæè
ä¸è¶³åæ¬çç¾åä¹å
«åï¼è¯·æ£æ¥è¾å
¥çæ°æ®æ¯å¦çç¡® |
| | | else if (DBUtility.ClsPub.isDoule(txtHWeightQyt.Text)> HMaterWeight*1.2 || DBUtility.ClsPub.isDoule(txtHWeightQyt.Text) < HMaterWeight * 0.8) |
| | | |
| | | //å®é
å
é=éé/ç±³æ°*1000ï¼å®é
å
éè¶
åºç©æç»´æ¤å
éçç¾åä¹äºåæä¸è¶³ç©æç»´æ¤å
éçç¾åä¹å
«åï¼é¢è¦æç¤º |
| | | double sQty = 0; //å®é
å
é |
| | | sQty = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text) / DBUtility.ClsPub.isDoule(txtHQty.Text) * 1000; |
| | | |
| | | if (sQty > HMaterWeight * 1.2 || sQty < HMaterWeight * 0.8) |
| | | { |
| | | if (MessageBox.Show("ç©æç»´æ¤å
é为ï¼"+HMaterWeight.ToString()+ "ï¼å®é
è¾å
¥å
é为ï¼" + DBUtility.ClsPub.isStrNull(txtHWeightQyt.Text) + "ï¼æè¾å
¥å®é
å
éè¶
åºç©æç»´æ¤å
éçç¾åä¹äºåæä¸è¶³ç©æç»´æ¤å
éçç¾åä¹å
«åï¼è¯·æ£æ¥è¾å
¥çæ°æ®æ¯å¦æ£ç¡®ï¼", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | if (MessageBox.Show("ç©æç»´æ¤å
é为ï¼"+HMaterWeight.ToString()+ "ï¼å®é
å
é为ï¼" + sQty.ToString() + "ï¼æè¾å
¥å®é
å
éè¶
åºç©æç»´æ¤å
éçç¾åä¹äºåæä¸è¶³ç©æç»´æ¤å
éçç¾åä¹å
«åï¼è¯·æ£æ¥è¾å
¥çæ°æ®æ¯å¦æ£ç¡®ï¼", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | { |
| | | return true; |
| | | } |
| | |
| | | |
| | | 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 " + |