iqc
lu
2025-04-01 92c2fea9ee96b545e4760de721c08a3d90115a06
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01Input.cs
@@ -61,31 +61,32 @@
        private void GvMx1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            // 获取行句柄
            int rowHandle = e.RowHandle;
            // 获取列
            //  GridColumn col = gvMx1.Columns[e.Column.Name];
            // 获取新值
            object newValue = e.Value;
            // 获取旧值
            //   object oldValue = gvMx1.GetRowCellValue(rowHandle, col);
            //   MessageBox.Show(newValue.ToString());
            //  getModel();
            // 在这里执行你的逻辑,例如:
            //  MessageBox.Show($"行 {rowHandle},列 {col.FieldName} 的值已从 {oldValue} 改为 {newValue}");
            string dt05Guid = gvMx1.GetRowCellValue(e.RowHandle, "guid").ToString();
            string dtCol = e.Column.FieldName;
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
            var _obj = new
            {
                dt05Guid = dt05Guid,
                fSeq = dtCol,
                fVal = newValue,
            };
            try
            {
                // 获取行句柄
                int rowHandle = e.RowHandle;
                // 获取列
                //  GridColumn col = gvMx1.Columns[e.Column.Name];
                // 获取新值
                object newValue = e.Value;
                if (newValue == null || string.IsNullOrEmpty(newValue.ToString())) { return; }
                // 获取旧值
                //   object oldValue = gvMx1.GetRowCellValue(rowHandle, col);
                //   MessageBox.Show(newValue.ToString());
                //  getModel();
                // 在这里执行你的逻辑,例如:
                //  MessageBox.Show($"行 {rowHandle},列 {col.FieldName} 的值已从 {oldValue} 改为 {newValue}");
                string dt05Guid = gvMx1.GetRowCellValue(e.RowHandle, "guid").ToString();
                string dtCol = e.Column.FieldName;
                gvMx1.CloseEditor();
                gvMx1.PostEditor();
                gvMx1.UpdateCurrentRow();
                var _obj = new
                {
                    dt05Guid = dt05Guid,
                    fSeq = dtCol,
                    fVal = newValue,
                };
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditYangLi", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
@@ -95,7 +96,8 @@
                    string _outSum = _rtn.rtnData.outSum;
                    if (string.IsNullOrEmpty(_outSum)) _outSum = "-1";
                    if (int.Parse(_outSum) < 0) {
                        MessageBox.Show(_outMsg);
                        Gs.DevApp.ToolBox.MsgHelper.ShowError(_outMsg);
                        gvMx1.SetRowCellValue(rowHandle, dtCol,"");
                    }
                    if (_strYbNo == "样本数")
                        getModel();