iqc
lu
2024-11-04 0a74392a5eba77891c9310413f19c099a4580d82
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesSysLookups.cs
@@ -6,6 +6,7 @@
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Views.Base.ViewInfo;
using DevExpress.XtraGrid.Views.Grid;
using Gs.DevApp.DevFrm.QC.Models;
using Gs.DevApp.Entity;
@@ -27,6 +28,8 @@
            toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
            toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
            getPageList(1, UtilityHelper.GetPageSize());
            pageBar1.PagerEvent += PageBar1_PagerEvent;
@@ -69,7 +72,34 @@
        {
            getPageList(curPage, pageSize);
        }
        /// <summary>
        ///     反审核
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_lookupTypeCode, gridView1);
            toolBarMenu1.guidKey = rowGuid;
        }
        /// <summary>
        ///     审核事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_lookupTypeCode, gridView1);
            toolBarMenu1.guidKey = rowGuid;
        }
        /// <summary>
        ///     取消事件
        /// </summary>
@@ -106,7 +136,6 @@
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
        }
@@ -124,7 +153,6 @@
                txt_lookupTypeCode.Focus();
                return;
            }
            gvMx1.CloseEditor();
            gvMx1.UpdateCurrentRow();
            var lst = new List<MesSysLookups>();
@@ -159,8 +187,10 @@
                {
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnableByControl(panel1.Controls,
                        false);
                    var gridViews = new List<GridView>();
                    gridViews.Add(gvMx1);
                    UtilityHelper.ChangeEnableByControl(panel1.Controls, false,
                        gridViews);
                }
            }
            catch (Exception ex)
@@ -279,6 +309,11 @@
                var mxGuid = dr["guid"].ToString();
                if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?"))
                    return;
                if (string.IsNullOrEmpty(mxGuid))
                {
                    gvMx1.DeleteRow(rowhandle);
                    return;
                }
                var strJson = "";
                var lst = new List<string>();
                lst.Add(mxGuid);