WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill_Rework.cs
@@ -8,6 +8,7 @@
using gregn6Lib;
using Pub_Class;
using System.Threading;
using System.Linq;
namespace WarM
{
@@ -105,6 +106,7 @@
        public string UpdatePrintQtyCtl = "";   //条码打印次数更新
        public string sReturn = "";
        public string HExpiryDate = "";
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
        #region å›ºå®šä»£ç 
@@ -595,15 +597,32 @@
                string HPinfan = "";            //品番
                DateTime HEndDate;              //计划完工日期
                for (int j = 0; j < grdMain.Rows.Count; j++)
                string Ret = "";
                if (oSystemParameter.ShowBill(ref Ret))
                {
                    if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0 && grdMain.Rows[j].Cells[HSubjoin2Col].Value.ToString() == "")
                    //生成物料条码时,机型码不允许为空,如若物料代码前缀不为G或L的,可跳过控制
                    if (oSystemParameter.omodel.Gy_BarCodeBill_Rework_Ctrl != "")
                    {
                        MessageBox.Show("第" + (j+1) + "行,机型码未维护,不允许生成条码");
                        bc.Enabled = true;
                        return;
                        string[] HMaterNumberPrefix = oSystemParameter.omodel.Gy_BarCodeBill_Rework_Ctrl.Split(',');
                        for (int j = 0; j < grdMain.Rows.Count; j++)
                        {
                            if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) == 0)
                            {
                                continue;
                            }
                            char HMaterfirstChar = grdMain.Rows[j].Cells[HMaterNumberCol].Value.ToString()[0];
                            if (ClsPub.isLong(grdMain.Rows[j].Cells[HMaterIDCol].Value) != 0 && grdMain.Rows[j].Cells[HSubjoin2Col].Value.ToString() == "" && HMaterNumberPrefix.Contains(HMaterfirstChar.ToString()))
                            {
                                MessageBox.Show("第" + (j + 1) + "行,机型码未维护,不允许生成条码");
                                bc.Enabled = true;
                                return;
                            }
                        }
                    }
                }
                }
                oCn.BeginTran();
                Application.DoEvents();