wbc
2025-12-03 6940ba1b4fe555c94353de9d7ab6a53a6c8884bc
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -501,6 +501,14 @@
                            txt.IsReadly = isEdt;
                            continue;
                        }
                        //自定义库位
                        if (colType is UcLookKw)
                        {
                            var txt = colType as UcLookKw;
                            txt.SetIdOrCode(strVal);
                            txt.IsReadly = isEdt;
                            continue;
                        }
                        //自定义供应商
                        if (colType is UcLookSupplier)
                        {
@@ -806,6 +814,14 @@
                    txt.IsReadly = isEdt;
                    continue;
                }
                //自定义库位
                if (ctrl is UcLookKw)
                {
                    var txt = ctrl as UcLookKw;
                    txt.SetIdOrCode("-1");
                    txt.IsReadly = isEdt;
                    continue;
                }
                //自定义供应商
                if (ctrl is UcLookSupplier)
                {
@@ -1062,6 +1078,13 @@
                if (ctrl is UcLookCk)
                {
                    var txt = ctrl as UcLookCk;
                    txt.IsReadly = isEdt;
                    continue;
                }
                //自定义库位
                if (ctrl is UcLookKw)
                {
                    var txt = ctrl as UcLookKw;
                    txt.IsReadly = isEdt;
                    continue;
                }
@@ -1710,6 +1733,7 @@
        }
        public delegate void DelegateGetModel(string guid);
        public delegate void DelegateGetList(int currentPage);
        public delegate void DelegateGetUserControlList();
        /// <summary>
        /// 
@@ -1979,10 +2003,24 @@
        /// <param name="pageBar1"></param>
        /// <param name="action"></param>
        /// <param name="page"></param>
        public static void SetTabParameter(GridView gridView1, DevExpress.XtraTab.XtraTabControl xtraTabControl1, UcPageBar pageBar1, DelegateGetModel action = null, DelegateGetList page = null, Label lbGuid = null)
        public static void SetTabParameter(GridView gridView1, DevExpress.XtraTab.XtraTabControl xtraTabControl1, UcPageBar pageBar1, DelegateGetModel action = null, DelegateGetList page = null, Label lbGuid = null, UcToolBarMenu barMenu = null, DelegateGetUserControlList ucLst = null)
        {
            xtraTabControl1.SelectedPageChanged += (s, e) =>
            {
                if (pageBar1 != null && xtraTabControl1.SelectedTabPageIndex == 0)
                {
                    if (barMenu != null)
                        barMenu.SetAllButton(0);
                    page(pageBar1.CurrentPage);
                    int rowHandle = 0;
                    rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], lbGuid.Text);
                    if (rowHandle < 0)
                        rowHandle = 0;
                    gridView1.FocusedRowHandle = rowHandle;
                    return;
                }
                if (xtraTabControl1.SelectedTabPageIndex == 1)
                {
                    int _handle = gridView1.FocusedRowHandle;
@@ -2010,15 +2048,14 @@
                        return;
                    }
                    action(_guid);
                    return;
                }
                if (pageBar1 != null && xtraTabControl1.SelectedTabPageIndex == 0)
                if (barMenu != null && xtraTabControl1.SelectedTabPageIndex == 2)
                {
                    page(pageBar1.CurrentPage);
                    int rowHandle = 0;
                    rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], lbGuid.Text);
                    if (rowHandle < 0)
                        rowHandle = 0;
                    gridView1.FocusedRowHandle = rowHandle;
                    barMenu.SetAllButton(2);
                    ucLst();
                    return;
                }
            };
        }