新框架PC前端标准版(祈禧6月初版本)
lg
2025-11-20 fbe33a615f1c4e798a0f8e58163e68c3ce789614
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs
@@ -1,9 +1,12 @@
using Gs.DevApp.Entity;
using DevExpress.Utils.MVVM.Services;
using DevExpress.XtraLayout.Customization;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Data;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm.QC
@@ -25,6 +28,9 @@
            this.dt01Guid = _dt01Guid;
            this.isEdit = _blEdit;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
            gvMx1.OptionsFilter.AllowFilterEditor = false;
            gvMx1.OptionsCustomization.AllowFilter = false;
            gvMx1.OptionsView.ShowAutoFilterRow = false;
            //编辑事件
            gvMx1.CellValueChanged += GvMx1_CellValueChanged;
            //取消不符合条件的编辑
@@ -32,7 +38,14 @@
            //禁用样本数之外的单元格且改变颜色
            gvMx1.CustomDrawCell += GvMx1_CustomDrawCell;
            getModel();
            this.FormClosing +=  (s, e) =>
            {
                textEdit1.Focus();
            };
        }
        /// <summary>
        /// 判断单元格的编辑性
@@ -87,7 +100,8 @@
                {
                    e.Appearance.BackColor = Color.Red;
                    e.Appearance.ForeColor = Color.White;
                };
                }
                ;
            }
        }
@@ -164,7 +178,8 @@
        private void getModel()
        {
            gcMx1.DataSource = null;
            //2025-09-20找不到错误,所以先把这一行注释试试
            //gcMx1.DataSource = null;
            gvMx1.Columns.Clear();
            var _obj = new
            {