| | |
| | | txtHEmpID.Tag = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["HItemID"]); |
| | | txtHEmpName.Text = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HName"]); |
| | | } |
| | | txtHPersonNums.Text = "1"; |
| | | txtHMachineNums.Text = "1"; |
| | | } |
| | | //åºç«æé® |
| | | private void cmdOK_Click(object sender, EventArgs e) |
| | |
| | | this.txtHWorkTimes.Text = BillOld.omodel.HWorkTimes.ToString(); |
| | | this.txtHMouldNum.Text = BillOld.omodel.HMouldNum.ToString(); |
| | | this.txtHSourceNameList.Text = BillOld.omodel.HSourceNameList.ToString(); |
| | | this.txtHPersonNums.Text = BillOld.omodel.HPersonNums.ToString(); |
| | | this.txtHMachineNums.Text = BillOld.omodel.HMachineNums.ToString(); |
| | | //å è½½è¡¨ä½ |
| | | initGrid(); |
| | | initGrid_Sub(); |
| | |
| | | |
| | | //忮宿´æ§å¤æ æªå®æ |
| | | private bool Sub_AllowSave() |
| | | { |
| | | { |
| | | //å¤æè¯¥ç¨æ·åæ¯å¦æè¯¥å·¥ç«æé |
| | | //if (BillNew.CheckCenterIDByUser(DBUtility.ClsPub.isLong(txtHCenterID.Tag)) == false) |
| | | //{ |
| | |
| | | // return false; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | //æ¨¡ç©´å·æ§å¶ |
| | | //if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "13000001197") |
| | | //{ |
| | | // string HMXH = ""; |
| | | // string HZM = ""; |
| | | // HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); |
| | | // HZM = HMXH.Substring(0, 1); |
| | | // if (HZM != "G") |
| | | // { |
| | | // MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥G"); |
| | | // return false; |
| | | // } |
| | | //} |
| | | |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0207" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "æåæ£éª") |
| | | { |
| | | string HMXH = ""; |
| | | string HZM = ""; |
| | | HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); |
| | | HZM = HMXH.Substring(0, 1); |
| | | if (HZM != "G") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥G"); |
| | | return false; |
| | | } |
| | | } |
| | | if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0268" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "æåæ£éª") |
| | | { |
| | | string HMXH = ""; |
| | | string HZM = ""; |
| | | HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); |
| | | HZM = HMXH.Substring(0, 1); |
| | | if (HZM != "X") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥X"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0211" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "æåæ£éª") |
| | | { |
| | | string HMXH = ""; |
| | | string HZM = ""; |
| | | string HZM2 = ""; |
| | | string HZM3 = ""; |
| | | HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); |
| | | HZM = HMXH.Substring(0, 1); |
| | | HZM2 = HMXH.Substring(2, 1); |
| | | HZM3 = HMXH.Substring(3, 1); |
| | | if (HZM != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | if (HZM2 != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | if (HZM3 != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第åä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0266" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "æåæ£éª") |
| | | { |
| | | string HMXH = ""; |
| | | string HZM = ""; |
| | | string HZM2 = ""; |
| | | string HZM3 = ""; |
| | | HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); |
| | | HZM = HMXH.Substring(0, 1); |
| | | HZM2 = HMXH.Substring(2, 1); |
| | | HZM3 = HMXH.Substring(3, 1); |
| | | if (HZM != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | if (HZM2 != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | if (HZM3 != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第åä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | if (DBUtility.ClsPub.isStrNull(txtHMaterID.Text) == "3.01.0267" && DBUtility.ClsPub.isStrNull(txtHProcID.Text) == "æåæ£éª") |
| | | { |
| | | string HMXH = ""; |
| | | string HZM = ""; |
| | | string HZM2 = ""; |
| | | string HZM3 = ""; |
| | | HMXH = DBUtility.ClsPub.isStrNull(txtHMouldNum.Text); |
| | | HZM = HMXH.Substring(0, 1); |
| | | HZM2 = HMXH.Substring(2, 1); |
| | | HZM3 = HMXH.Substring(3, 1); |
| | | if (HZM != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | if (HZM2 != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第ä¸ä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | if (HZM3 != "0") |
| | | { |
| | | MessageBox.Show("模穴å·é误第åä½è¯·éæ°è¾å
¥0"); |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | |
| | | //å¿
è¾é¡¹ç®æ¯å¦ä¸ºç©º |
| | | |
| | | if (DBUtility.ClsPub.isLong(lngBillKey) <= 0) |
| | |
| | | MessageBox.Show("æä½å没æéæ©ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | if (DBUtility.ClsPub.isLong(txtHQCCheckID.Tag) == 0) |
| | | { |
| | | MessageBox.Show("æ£éªå没æéæ©ï¼", "æç¤º"); |
| | | return false; |
| | | } |
| | | //if (DBUtility.ClsPub.isLong(txtHQCCheckID.Tag) == 0) |
| | | //{ |
| | | // MessageBox.Show("æ£éªå没æéæ©ï¼", "æç¤º"); |
| | | // return false; |
| | | //} |
| | | if (DBUtility.ClsPub.isLong(txtHSourceID.Tag) == 0) |
| | | { |
| | | MessageBox.Show("çäº§èµæºæ²¡æéæ©ï¼", "æç¤º"); |
| | |
| | | BillNew.omodel.HWorkTimes = DBUtility.ClsPub.isSingle(this.txtHWorkTimes.Text); |
| | | BillNew.omodel.HQCCheckID = DBUtility.ClsPub.isLong(this.txtHQCCheckID.Tag); |
| | | BillNew.omodel.HSourceNameList = DBUtility.ClsPub.isStrNull(this.txtHSourceNameList.Text); |
| | | BillNew.omodel.HPersonNums = DBUtility.ClsPub.isLong(this.txtHPersonNums.Text); |
| | | BillNew.omodel.HMachineNums = DBUtility.ClsPub.isLong(this.txtHMachineNums.Text); |
| | | //æç»ç±»èµå¼ |
| | | BillNew.DetailColl = new List<Model.ClsSc_StationOutBillSub>(); |
| | | for (int i = 0; i <= grdSub.RowCount - 1; i++) |
| | |
| | | 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) |
| | |
| | | { |
| | | 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(); |
| | | } |
| | | } |
| | | } |
| | | } |