| | |
| | | public Int64 ProcessExchangeInterID = 0; |
| | | public Int64 HSupID = 0; |
| | | public double HSourceQty = 0; |
| | | public double HMaterWeight = 0; //ç©æå
é |
| | | public string HMaker = DBUtility.ClsPub.CurUserName; |
| | | public Int64 HStockOrgID = DBUtility.ClsPub.HOrgID; |
| | | public DateTime HDate = DateTime.Today; |
| | |
| | | bool b = false; |
| | | for (int i = 0; i < grdMain.RowCount; i++) |
| | | { |
| | | b = true; |
| | | break; |
| | | b = true; |
| | | break; |
| | | } |
| | | if (b == false) |
| | | { |
| | |
| | | oCn.BeginTran(); |
| | | //çæåºå
¥åºåæ® |
| | | //æå
¥å表 |
| | | oCn.RunProc("EXEC h_p_Kf_ProductInBillSub_Insert_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HSourceBillType + "'"); |
| | | DataSet ds = oCn.RunProcReturn("EXEC h_p_Kf_ProductInBillSub_Insert_New " + HInterID.ToString() + ",'" + HBillNo + "','" + HSourceBillType + "'", "h_p_Kf_ProductInBillSub_Insert_New"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | } |
| | | else if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0][0]) != "OK") |
| | | { |
| | | oCn.RollBack(); |
| | | MessageBox.Show("çæå
¥åºå失败ï¼å½åç§°éè®°å½åè¡¨æ æ°æ®ï¼ä¸å
许æ¢ççæåæ®ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | //æå
¥ä¸»è¡¨ |
| | | oCn.RunProc("Insert Into Kf_ICStockBillMain " + |
| | | "(HBillType,HBillSubType,HInterID,HBillNo,HDate,HMainSourceBillType" + |
| | |
| | | MessageBox.Show("ç©æé»è®¤ä»åºå¯ç¨äºä»ä½ï¼ä½æªè®¾ç½®ä»ä½ï¼è·åä»ä½ä¿¡æ¯å¤±è´¥ï¼è¯·å
è®¾ç½®ç©æé»è®¤ä»ä½ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | |
| | | //å®é
å
é=éé/ç±³æ°*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()+ "ï¼å®é
å
é为ï¼" + sQty.ToString() + "ï¼æè¾å
¥å®é
å
éè¶
åºç©æç»´æ¤å
éçç¾åä¹äºåæä¸è¶³ç©æç»´æ¤å
éçç¾åä¹å
«åï¼è¯·æ£æ¥è¾å
¥çæ°æ®æ¯å¦æ£ç¡®ï¼", "æç¤º", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) |
| | | { |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | return false; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | |
| | | string ProcessExchangeBillNo = ""; |
| | | Int64 HBarcodeNo = 0; //å
æ° |
| | | Int64 HBadReasonID = 0; //ä¸è¯åå ID |
| | | string HCusMaterName = ""; //客æ·ç©æåç§° |
| | | string HCusModel = ""; //客æ·è§æ ¼åå· |
| | | |
| | | HBarCode = TM; |
| | | HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text); |
| | |
| | | ProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text); |
| | | HBarcodeNo = DBUtility.ClsPub.isLong(txtHBarcodeNo.Text); |
| | | HBadReasonID = DBUtility.ClsPub.isLong(txtHRemark.Tag); |
| | | HCusMaterName = DBUtility.ClsPub.isStrNull(txtHCusMaterName.Text); |
| | | HCusModel = DBUtility.ClsPub.isStrNull(txtHCusModel.Text); |
| | | |
| | | try |
| | | { |
| | | oCn.BeginTran(); |
| | | //åå
¥æ¡ç æ¡£æ¡ |
| | | //åå
¥æ¡ç æ¡£æ¡ (客æ·ç©æåç§°HCusMaterNameåå
¥HMaterialModelåæ®µï¼å®¢æ·è§æ ¼åå·HCusModelåå
¥HCusModelåæ®µ |
| | | oCn.RunProc("Insert into Gy_BarCodeBill " + |
| | | "(HBarCode,HBarCodeType,HMaterID,HUnitID,HQty" + |
| | | ",HBatchNo,HSupID,HGroupID,HMaker,HMakeDate,HPrintQty,HinitQty" + |
| | |
| | | ",HBarcodeQtys,HBarcodeNo,HDeptID,HWhID,HSPID,HRemark " + |
| | | ",HCusID,HCusType,HEndDate,HWorkLineName,HBarCodeDate,HMaterialJQty,HMaterialMQty " + |
| | | ",HSTOCKORGID,HOWNERID,HSeOrderBillNo,HInterID,HGiveAwayFlag " + |
| | | ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1 " + |
| | | ",HOrderInterID,HOrderEntryID,HOrderBillNo,HCustomQty1,HMaterialModel,HCusModel " + |
| | | ",HMaterName,HMaterModel,HPinfan,HAuxPropID,HMTONo,HInnerBillNo " + |
| | | ") Values (" |
| | | + "'" + HBarCode + "','" + HBarCodeType + "'," + HMaterID.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString() |
| | |
| | | + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + "," + HWhID.ToString() + "," + HSPID.ToString() + ",'" + HRemark + "'" |
| | | + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + "," + HMaterialMQty.ToString() |
| | | + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0" |
| | | + ", " + ProcessExchangeInterID.ToString() + ",0,'" + ProcessExchangeBillNo + "'," + HBadReasonID.ToString() |
| | | + ", " + ProcessExchangeInterID.ToString() + ",0,'" + ProcessExchangeBillNo + "'," + HBadReasonID.ToString() + ",'" + HCusMaterName + "','" + HCusModel + "'" |
| | | + ",'" + HMaterName + "','" + HMaterModel + "',''," + HAuxPropID.ToString() + ",'','')"); |
| | | |
| | | //åå¡«æå¤§æµæ°´å· |
| | |
| | | txtHMaterName.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("ç©æåç§°")].Value); |
| | | txtHMaterModel.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("è§æ ¼åå·")].Value); |
| | | txtHBatchNo.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("æ¹å·")].Value); |
| | | txtHCusMaterName.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusMaterName")].Value); |
| | | txtHCusModel.Text = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusModel")].Value); |
| | | HAuxPropID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HAuxPropID")].Value); |
| | | HUnitID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HUnitID")].Value); |
| | | HWhID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HWhID")].Value); |
| | |
| | | HSourceQty = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("æ°é")].Value); |
| | | ProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("ProcessExchangeInterID")].Value); |
| | | HSupID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HSupID")].Value); |
| | | HMaterWeight = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HMaterWeight")].Value); |
| | | } |
| | | |
| | | //è¿åæºååè¡¨ä¿¡æ¯ |