| | |
| | | public Int64 HProcessExchangeEntryID = 0; |
| | | public Int64 HSupID = 0; |
| | | public double HSourceQty = 0; |
| | | public double HMaterWeight = 0; //ç©æå
é |
| | | public string HCusMaterName = ""; //客æ·ç©æåç§° |
| | | public string HCusModel = ""; //客æ·è§æ ¼åå· |
| | | public string HMaker = DBUtility.ClsPub.CurUserName; |
| | |
| | | if (chkHDYFlag.Checked == true) |
| | | { |
| | | //æå°æ¡ç |
| | | Sub_SetReport("ç©ææ¡ç "); |
| | | Sub_SetReport("åæåæ¡ç "); |
| | | Report.Print(false); |
| | | Thread.Sleep(1000); |
| | | } |
| | |
| | | } |
| | | |
| | | txtHQty.Text = ""; |
| | | txtHWeightQyt.Text = ""; |
| | | txtHBarcodeNo.Text = ""; |
| | | txtHQty.Focus(); |
| | | } |
| | | |
| | |
| | | MessageBox.Show("请è¾å
¥æ£ç¡®ç±³æ°ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isDoule(txtHWeightQyt.Text) == 0) |
| | | { |
| | | MessageBox.Show("请è¾å
¥æ£ç¡®ééï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isInt(txtHBarcodeNo.Text) == 0) |
| | | { |
| | | MessageBox.Show("请è¾å
¥å
å·ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isDoule(txtHProcID.Tag) == 0) |
| | | { |
| | | 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 HBarCodeType = ""; |
| | | Int64 HMaterID2 = 0; |
| | | double HQty = 0; //ç±³æ° |
| | | double HMaterialJQty = 0; //éé |
| | | Int64 HGroupID = 0; |
| | | Int64 HDeptID = 0; |
| | | string HProcessExchangeBillNo = ""; |
| | | Int64 HBarcodeNo = 0; //å
æ° |
| | | string HMaterName = ""; |
| | | string HMaterModel = ""; |
| | | Int64 HProcID = 0; |
| | |
| | | HBarCodeType = DBUtility.ClsPub.isStrNull(cmbHBarCodeType.Text); |
| | | HMaterID2 = DBUtility.ClsPub.isLong(txtHMaterNumber.Tag); |
| | | HQty = DBUtility.ClsPub.isDoule(txtHQty.Text); |
| | | HMaterialJQty = DBUtility.ClsPub.isDoule(txtHWeightQyt.Text); |
| | | HGroupID = DBUtility.ClsPub.isLong(txtHGroupID.Tag); |
| | | HDeptID = DBUtility.ClsPub.isLong(txtHDeptName.Tag); |
| | | HProcessExchangeBillNo = DBUtility.ClsPub.isStrNull(txtHBillNo.Text); |
| | | HBarcodeNo = DBUtility.ClsPub.isLong(txtHBarcodeNo.Text); |
| | | HMaterName = DBUtility.ClsPub.isStrNull(txtHMaterName.Text); |
| | | HMaterModel = DBUtility.ClsPub.isStrNull(txtHMaterModel.Text); |
| | | HProcID = DBUtility.ClsPub.isLong(txtHProcID.Tag); |
| | |
| | | + " '" + HBarCode + "','" + HBarCodeType + "'," + HMaterID2.ToString() + "," + HUnitID.ToString() + "," + HQty.ToString() |
| | | + ",'" + HBatchNo + "'," + HSupID.ToString() + "," + HGroupID.ToString() + ",'" + HMaker + "',getdate(),0," + HQty.ToString() |
| | | + ", " + HSourceInterID.ToString() + "," + HSourceEntryID.ToString() + ",'" + HSourceBillNo + "','" + HSourceBillType + "',''" |
| | | + ", 1,1," + HDeptID.ToString() + ",0,0,''" |
| | | + ", 0,'',getdate(),'','" + sDate + "',0,0" |
| | | + ", 1," + HBarcodeNo.ToString() + "," + HDeptID.ToString() + ",0,0,''" |
| | | + ", 0,'',getdate(),'','" + sDate + "'," + HMaterialJQty.ToString() + ",0" |
| | | + ", " + HStockOrgID.ToString() + "," + HStockOrgID.ToString() + ",''," + HInterID.ToString() + ",0" |
| | | + ", " + HProcessExchangeInterID.ToString() + "," + HProcessExchangeEntryID.ToString() + ",'" + HProcessExchangeBillNo + "',0,'" + HCusMaterName + "','" + HCusModel + "'" |
| | | + ", " + HProcID.ToString() + "," + HCenterID.ToString() + "," + HSourceID.ToString() + "," + HProcNo.ToString() + "," + HSourceQty.ToString() |
| | |
| | | HSourceQty = DBUtility.ClsPub.isDoule(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("æ°é")].Value); |
| | | HProcessExchangeInterID = DBUtility.ClsPub.isLong(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HProcessExchangeInterID")].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); |
| | | HCusMaterName = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusMaterName")].Value); |
| | | HCusModel = DBUtility.ClsPub.isStrNull(grdSub.SelectedRows[0].Cells[Fun_GetSubCol("HCusModel")].Value); |
| | | } |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region //æµæ°´å·æ«æ |
| | | private void txtHProcNo_KeyDown(object sender, KeyEventArgs e) |
| | | { |
| | | if (e.KeyCode == Keys.Return) |
| | | { |
| | | if (txtHProcNo.Text == "") |
| | | { |
| | | MessageBox.Show("æµæ°´å·ä¸ºç©ºï¼è¯·è¾å
¥æµæ°´å·ï¼"); |
| | | return; |
| | | } |
| | | //æ ¹æ®è½¬å¡ä¸»IDãæµæ°´å·å¸¦åºæµè½¬å¡ä¸ç¸åºå·¥åºãçç»ãå·¥ä½ä¸å¿ãçäº§èµæº |
| | | DataSet Ds = oCn.RunProcReturn("exec h_p_KF_GetBCPWeighSource_HProcNo " + HProcessExchangeInterID.ToString() + "," + txtHProcNo.Text, "h_p_KF_GetBCPWeighSource_HProcNo"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | txtHProcNo.Text = ""; |
| | | txtHProcID.Tag = 0; |
| | | txtHProcID.Text = ""; |
| | | txtHCenterID.Tag = 0; |
| | | txtHCenterID.Text = ""; |
| | | txtHGroupID.Tag = 0; |
| | | txtHGroupID.Text = ""; |
| | | txtHSourceID.Tag = 0; |
| | | txtHSourceID.Text = ""; |
| | | MessageBox.Show("æè¾å
¥æµæ°´å·ä¸å¨å½åå·¥åºæµè½¬å¡ä¸ï¼è¯·éæ°è¾å
¥æµæ°´å·ï¼"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | HProcessExchangeEntryID = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceEntryID"]); |
| | | txtHProcNo.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcNo"]); |
| | | txtHProcID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HProcID"]); |
| | | txtHProcID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HProcName"]); |
| | | txtHCenterID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HCenterID"]); |
| | | txtHCenterID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HCenterName"]); |
| | | txtHGroupID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HGroupID"]); |
| | | txtHGroupID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HGroupName"]); |
| | | txtHSourceID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HSourceID"]); |
| | | txtHSourceID.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HSourceName"]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region //å·¥åºéæ© |
| | | |
| | | private void cmdHProcID_Click(object sender, EventArgs e) |
| | |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region //çäº§èµæºéæ© |
| | | |
| | | private void txtHSourceID_KeyPress(object sender, KeyPressEventArgs e) |
| | | { |
| | | if (e.KeyChar == (char)Keys.Return) |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(txtHSourceID.Text) != "") |
| | | { |
| | | DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); |
| | | if (oSource.GetInfoByID(DBUtility.ClsPub.isLong(txtHSourceID.Text.Replace("HCX", "")))) |
| | | { |
| | | txtHSourceID.Text = oSource.omodel.HName; |
| | | txtHSourceID.Tag = oSource.omodel.HItemID; |
| | | } |
| | | else |
| | | { |
| | | txtHSourceID.Text = ""; |
| | | txtHSourceID.Tag = 0; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | txtHSourceID.Text = ""; |
| | | txtHSourceID.Tag = 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void txtHSourceID_Click(object sender, EventArgs e) |
| | | { |
| | | txtHSourceID.SelectAll(); |
| | | } |
| | | |
| | | private void txtHSourceID_TextChanged(object sender, EventArgs e) |
| | | { |
| | | BLL.ClsPub_BLL.Sub_ClearText(txtHSourceID); |
| | | } |
| | | |
| | | private void cmdHSourceID_Click(object sender, EventArgs e) |
| | | { |
| | | DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View(); |
| | | if (oSource.RefreshView()) |
| | | { |
| | | txtHSourceID.Text = oSource.oModel.HName; |
| | | txtHSourceID.Tag = oSource.oModel.HItemID.ToString(); |
| | | } |
| | | else |
| | | { |
| | | txtHSourceID.Text = ""; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region //ç产çç»éæ© |
| | | |
| | | private void cmdHGroupID_Click(object sender, EventArgs e) |
| | | { |
| | | DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View(); |
| | | if (oGroup.RefreshView()) |
| | | { |
| | | txtHGroupID.Text = oGroup.oModel.HName; |
| | | txtHGroupID.Tag = oGroup.oModel.HItemID.ToString(); |
| | | } |
| | | else |
| | | { |
| | | txtHGroupID.Text = ""; |
| | | } |
| | | } |
| | | |
| | | private void txtHGroupID_TextChanged(object sender, EventArgs e) |
| | | { |
| | | BLL.ClsPub_BLL.Sub_ClearText(txtHGroupID); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region //å·¥ä½ä¸å¿éæ© |
| | | |
| | | private void cmdHCenterID_Click(object sender, EventArgs e) |
| | | { |
| | | DAL.ClsGy_WorkCenter_View oWorkCenter = new DAL.ClsGy_WorkCenter_View(); |
| | | if (oWorkCenter.RefreshView()) |
| | | { |
| | | txtHCenterID.Text = oWorkCenter.oModel.HName; |
| | | txtHCenterID.Tag = oWorkCenter.oModel.HItemID.ToString(); |
| | | } |
| | | else |
| | | { |
| | | txtHCenterID.Text = ""; |
| | | } |
| | | } |
| | | |
| | | private void txtHCenterID_TextChanged(object sender, EventArgs e) |
| | | { |
| | | BLL.ClsPub_BLL.Sub_ClearText(txtHCenterID); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | } |
| | | } |