lu
2024-12-19 1210460a95ba58f219d38e545dcaf9e21383d18f
DevApp/Gs.DevApp/DevFrm/BasicData/Frm_MesWorkshop.cs
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
@@ -30,11 +28,21 @@
            toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "");
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
@@ -44,18 +52,6 @@
            getPageList(1);
        }
        /// <summary>
        ///     双击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            var rowGuid =
                UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
        ///     分页事件
@@ -101,7 +97,7 @@
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
                getModel(lbGuid.Text.Trim());
            else
            {
                _filterList.Clear();
@@ -158,15 +154,16 @@
            }
        }
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        private void getModel(string strGuid)
        {
            bool isEdit = false;
            if (toolBarMenu1.currentAction == "add") return;
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid //主建
@@ -257,7 +254,10 @@
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
            gvList.Add(gvMx1);
            UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList);
        }
        /// <summary>
@@ -347,7 +347,7 @@
                        _webServiceName + "DeleteModelMx",
                        JsonConvert.SerializeObject(lst));
                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1);
                    if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
                    MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                }
                catch (Exception ex)
@@ -400,9 +400,9 @@
                if (_rtn.rtnCode > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                        getModel(lbGuid.Text.Trim(), false, 999);
                        getModel(lbGuid.Text.Trim());
                    else
                        getPageList(1);
                        getPageList(this.pageBar1.CurrentPage);
                }
            }
            catch (Exception ex)