ch
2022-05-24 22971886a0e1897aabf62b228215bbee3f2d5a6c
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationOutBill.cs
@@ -1276,6 +1276,7 @@
                    txtHEmpID.Tag = 0;
                    txtHEmpName.Text = "";
                }
                txtHQty.Focus();
            }
        }
@@ -1305,6 +1306,7 @@
                    txtHSourceID.Tag = 0;
                    txtHSourceName.Text = "";
                }
                txtHMouldNum.Focus();
            }
        }
@@ -1313,50 +1315,72 @@
            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();
            }
        }
@@ -1522,7 +1546,7 @@
            {
                //txtHWasterQty.Select();
                //cmdOK.Focus();
                txtHDSQty.Focus();
                txtHQCCheckID.Focus();
            }
        }
        private void txtHPieceQty_KeyDown(object sender, KeyEventArgs e)
@@ -1714,7 +1738,7 @@
                {
                    Sub_WriteInForm_SM2(Ds.Tables[0], i);
                }
                txtHPayProcID.Focus();
                txtHSourceID.Focus();
                //如果是唯一 æ ¸ç®—工序则 é»˜è®¤å¸¦å‡º å¹¶è·³è‡³ èŒå‘˜
                //if (oProc.GetSubProcInfoByID(DBUtility.ClsPub.isLong(txtHProcID.Tag)))
                //{
@@ -2474,6 +2498,7 @@
                    txtHQCCheckID.Tag = 0;
                    txtHQCCheckName.Text = "";
                }
                txtHBadCount.Focus();
            }
        }
@@ -2592,5 +2617,29 @@
        {
        }
        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();
            }
        }
    }
}