| | |
| | | MessageBox.Show("å·¥ä½ä¸å¿æ²¡æéæ©ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isDoule(txtHQty.Text) + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) <= 0) |
| | | if (DBUtility.ClsPub.isDoule(txtHQty.Text) |
| | | + DBUtility.ClsPub.isDoule(txtHWasterQty.Text) |
| | | + DBUtility.ClsPub.isDoule(txtHBadCount.Text) <= 0) |
| | | { |
| | | MessageBox.Show("æ°éä¸è½ä¸º0ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isDoule(txtHQty.Text.Trim()) < 0) |
| | | { |
| | | MessageBox.Show("åæ ¼ä¸ªæ°ä¸è½å°äº0ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isDoule(txtHWasterQty.Text.Trim()) < 0) |
| | | { |
| | | MessageBox.Show("ä¸åæ ¼æ°ä¸è½å°äº0ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isDoule(txtHBadCount.Text.Trim()) < 0) |
| | | { |
| | | MessageBox.Show("ä¸è¯åæ°ä¸è½å°äº0ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isDoule(txtHWorkTimes.Text) <= 0) |
| | |
| | | MessageBox.Show("åæ®å·éå¤ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | |
| | | //æ ¹æ®ä¸å客æ·ï¼å¯¹å½å
¥æ»å·¥æ¶ä¸æ 忻工æ¶è¿è¡å¯¹æ¯å¤æ |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | long sMaterID = DBUtility.ClsPub.isLong(this.txtHMaterID.Tag); |
| | | long sProcID = DBUtility.ClsPub.isLong(this.txtHProcID.Tag); |
| | | double sQty = DBUtility.ClsPub.isDoule(this.txtHQty.Text); |
| | | double sBadCount = DBUtility.ClsPub.isDoule(this.txtHBadCount.Text); |
| | | double sWasterQty = DBUtility.ClsPub.isDoule(this.txtHWasterQty.Text); |
| | | double sWorkTimes = DBUtility.ClsPub.isSingle(this.txtHWorkTimes.Text); |
| | | DataSet Ds; |
| | | Ds = oCn.RunProcReturn("exec h_p_MES_StationOutBill_WorkTimesCtrl " + sMaterID.ToString() + "," + sProcID.ToString() + "," + sQty.ToString() + "," + sBadCount.ToString() + "," + sWasterQty.ToString() + "," + sWorkTimes.ToString(), "h_p_MES_StationOutBill_WorkTimesCtrl"); |
| | | if (Ds == null || Ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | MessageBox.Show("å½å
¥æ»å·¥æ¶ä¸æ 忻工æ¶å¯¹æ¯å¤æå¤±è´¥ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 1) |
| | | { |
| | | MessageBox.Show(DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"])); |
| | | return false; |
| | | } |
| | | else if (DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0][0]) == 2) |
| | | { |
| | | MessageBox.Show(DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HRemark"])); |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | //ä¿ååæ® |
| | |
| | | if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify) |
| | | BillNew.omodel.HInterID = BillOld.omodel.HInterID; |
| | | //主类èµå¼ |
| | | BillNew.omodel.HYear = 2011; |
| | | BillNew.omodel.HPeriod = 1; |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string s = ""; |
| | | int sYear = 0; |
| | | int sPeriod = 0; |
| | | if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DBUtility.ClsPub.isDate(this.txtHStationOutTime.Text), ref sYear, ref sPeriod, ref s) == false) |
| | | { |
| | | MessageBox.Show(s, "æç¤º"); |
| | | return false; |
| | | } |
| | | // |
| | | BillNew.omodel.HYear = sYear; |
| | | BillNew.omodel.HPeriod = sPeriod; |
| | | BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim(); |
| | | BillNew.omodel.HICMOBillNo = this.txtHICMOBillNo.Text.Trim(); |
| | | BillNew.omodel.HICMOInterID = DBUtility.ClsPub.isLong(this.txtHICMOBillNo.Tag); |
| | |
| | | txtHEmpID.Tag = 0; |
| | | txtHEmpName.Text = ""; |
| | | } |
| | | txtHQty.Focus(); |
| | | } |
| | | } |
| | | |
| | |
| | | txtHSourceID.Tag = 0; |
| | | txtHSourceName.Text = ""; |
| | | } |
| | | txtHMouldNum.Focus(); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (e.KeyCode == Keys.Enter) |
| | | { |
| | | // DAL.ClsGy_Employee_View oEmp = new DAL.ClsGy_Employee_View(); |
| | | // DAL.ClsGy_Employee_View oEmp = new DAL.ClsGy_Employee_View(); |
| | | |
| | | // Int64 HCenterID = Pub_Class.ClsPub.isLong(txtHCenterID.Tag); |
| | | // //è·åæ§ä»¶ä½ç½® |
| | | // int x = 0; int y = 0; |
| | | // BLL.ClsPub_BLL.SetXY(this, panel4, gbUp, txtHGroupID, ref x, ref y); |
| | | // //éæ©åºç¡ |
| | | // BLL.ClsBaseDownSelect.SetTextByGroup(txtHGroupID, HCenterID, x, y); |
| | | // Int64 HGroupID = Pub_Class.ClsPub.isLong(txtHGroupID.Tag.ToString()); |
| | | // BillOld.ShowEmpByGroup(HGroupID, ref DBUtility.ClsPub.sExeReturnInfo, false); |
| | | |
| | | // int i = 0; |
| | | // foreach (Model.ClsSc_StationOutBillSub oSub in BillOld.DetailColl) |
| | | // { |
| | | // if (i >= grdSub.RowCount - 1) |
| | | // grdSub.Rows.Add(); |
| | | |
| | | // Int64 HCenterID = Pub_Class.ClsPub.isLong(txtHCenterID.Tag); |
| | | // //è·åæ§ä»¶ä½ç½® |
| | | // int x = 0; int y = 0; |
| | | // BLL.ClsPub_BLL.SetXY(this, panel4, gbUp, txtHGroupID, ref x, ref y); |
| | | // //éæ©åºç¡ |
| | | // BLL.ClsBaseDownSelect.SetTextByGroup(txtHGroupID, HCenterID, x, y); |
| | | // Int64 HGroupID = Pub_Class.ClsPub.isLong(txtHGroupID.Tag.ToString()); |
| | | // BillOld.ShowEmpByGroup(HGroupID, ref DBUtility.ClsPub.sExeReturnInfo, false); |
| | | |
| | | // grdSub.Rows[i].Cells[HEmpIDCol].Value = oSub.HEmpID.ToString(); |
| | | // if (oEmp.GetInfoByID(oSub.HEmpID)) |
| | | // { |
| | | // int i = 0; |
| | | // foreach (Model.ClsSc_StationOutBillSub oSub in BillOld.DetailColl) |
| | | // { |
| | | // if (i >= grdSub.RowCount - 1) |
| | | // grdSub.Rows.Add(); |
| | | |
| | | // grdSub.Rows[i].Cells[HEmpNoCol].Value = oEmp.omodel.HNumber; |
| | | // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; |
| | | // grdSub.Rows[i].Cells[HEmpNumberCol].Value = oEmp.omodel.HNumber; |
| | | // grdSub.Rows[i].Cells[HEmpNameCol].Value = oEmp.omodel.HName; |
| | | // } |
| | | // else |
| | | // { |
| | | // grdSub.Rows[i].Cells[HEmpNoCol].Value = ""; |
| | | // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; |
| | | // grdSub.Rows[i].Cells[HEmpNumberCol].Value = ""; |
| | | // grdSub.Rows[i].Cells[HEmpNameCol].Value = ""; |
| | | // } |
| | | |
| | | |
| | | // i = i + 1; |
| | | // } |
| | | // //GRIDå
è®¸å·æ° |
| | | //// DBUtility.Xt_BaseBillFun.SetSumGrid(oSumGrid); |
| | | // // |
| | | // //Sub_OperStatus(); |
| | | |
| | | txtHQty.Select(); |
| | | // grdSub.Rows[i].Cells[HEmpIDCol].Value = oSub.HEmpID.ToString(); |
| | | // if (oEmp.GetInfoByID(oSub.HEmpID)) |
| | | // { |
| | | |
| | | // grdSub.Rows[i].Cells[HEmpNoCol].Value = oEmp.omodel.HNumber; |
| | | // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; |
| | | // grdSub.Rows[i].Cells[HEmpNumberCol].Value = oEmp.omodel.HNumber; |
| | | // grdSub.Rows[i].Cells[HEmpNameCol].Value = oEmp.omodel.HName; |
| | | // } |
| | | // else |
| | | // { |
| | | // grdSub.Rows[i].Cells[HEmpNoCol].Value = ""; |
| | | // // grdSub.Rows[i].Cells[HEmpIDCol].Value = oEmp.oModel.HItemID; |
| | | // grdSub.Rows[i].Cells[HEmpNumberCol].Value = ""; |
| | | // grdSub.Rows[i].Cells[HEmpNameCol].Value = ""; |
| | | // } |
| | | |
| | | |
| | | // i = i + 1; |
| | | // } |
| | | // //GRIDå
è®¸å·æ° |
| | | //// DBUtility.Xt_BaseBillFun.SetSumGrid(oSumGrid); |
| | | // // |
| | | // //Sub_OperStatus(); |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(txtHGroupID.Text) != "") |
| | | { |
| | | DAL.ClsGy_Group_View oGroup = new DAL.ClsGy_Group_View(); |
| | | if (oGroup.GetInfoByNumber(DBUtility.ClsPub.isStrNull(txtHGroupID.Text))) |
| | | { |
| | | txtHGroupID.Text = oGroup.omodel.HNumber; |
| | | txtHGroupID.Tag = oGroup.omodel.HItemID; |
| | | txtHGroupName.Text = oGroup.omodel.HName; |
| | | } |
| | | else |
| | | { |
| | | txtHGroupID.Text = ""; |
| | | txtHGroupID.Tag = 0; |
| | | txtHGroupName.Text = ""; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | txtHGroupID.Text = ""; |
| | | txtHGroupID.Tag = 0; |
| | | txtHGroupName.Text = ""; |
| | | } |
| | | txtHEmpID.Focus(); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | //txtHWasterQty.Select(); |
| | | //cmdOK.Focus(); |
| | | txtHDSQty.Focus(); |
| | | txtHQCCheckID.Focus(); |
| | | } |
| | | } |
| | | private void txtHPieceQty_KeyDown(object sender, KeyEventArgs e) |
| | |
| | | oBF.txtHICMOInterID.Text = Pub_Class.ClsPub.isStrNull(txtHICMOBillNo.Tag); |
| | | oBF.txtHICMOBillNo.Text = txtHICMOBillNo.Text; |
| | | oBF.txtHProcExchQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHPlanQty.Text)); |
| | | oBF.txtHPlanQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadCount.Text)); |
| | | oBF.txtHPlanQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHWasterQty.Text)); |
| | | oBF.txtHPlanPNL.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadPNL.Text)); |
| | | oBF.txtHBadPNL.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHBadPNL.Text)); |
| | | oBF.txtHBadQty.Text = ClsPub.isStrNull(ClsPub.isDoule(txtHWasterQty.Text)); |
| | |
| | | { |
| | | Sub_WriteInForm_SM2(Ds.Tables[0], i); |
| | | } |
| | | txtHPayProcID.Focus(); |
| | | txtHSourceID.Focus(); |
| | | //妿æ¯å¯ä¸ æ ¸ç®å·¥åºå é»è®¤å¸¦åº å¹¶è·³è³ èå |
| | | //if (oProc.GetSubProcInfoByID(DBUtility.ClsPub.isLong(txtHProcID.Tag))) |
| | | //{ |
| | |
| | | txtHQCCheckID.Tag = 0; |
| | | txtHQCCheckName.Text = ""; |
| | | } |
| | | txtHBadCount.Focus(); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | private void txtHMouldNum_KeyDown(object sender, KeyEventArgs e) |
| | | { |
| | | if (e.KeyCode == Keys.Enter) |
| | | { |
| | | txtHGroupID.Focus(); |
| | | } |
| | | } |
| | | |
| | | private void txtHBadCount_KeyDown(object sender, KeyEventArgs e) |
| | | { |
| | | if (e.KeyCode == Keys.Enter) |
| | | { |
| | | txtHWorkTimes.Focus(); |
| | | } |
| | | } |
| | | |
| | | private void txtHWorkTimes_KeyDown(object sender, KeyEventArgs e) |
| | | { |
| | | if (e.KeyCode == Keys.Enter) |
| | | { |
| | | txtHWasterQty.Focus(); |
| | | } |
| | | } |
| | | } |
| | | } |