yangle
2023-08-03 0fb2957ffd729c1f09b51a73aa2af1c3d39fdcad
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationOutBill.cs
@@ -87,6 +87,8 @@
                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)
@@ -428,6 +430,8 @@
            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();
@@ -561,6 +565,90 @@
                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;
                }
            }
@@ -820,6 +908,8 @@
            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++)