From b7b06604c4057163332b4017e02fe38bb40f51e4 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 03 十二月 2024 21:46:00 +0800
Subject: [PATCH] 修改了初始化

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index f176e0f..3f6032d 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -1,4 +1,6 @@
+using DevExpress.Utils.About;
 using DevExpress.XtraGrid.Views.Grid.ViewInfo;
+using DevExpress.XtraRichEdit.Model;
 using Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Gs.DevApp.UserControl;
@@ -17,7 +19,7 @@
 {
     public partial class Frm_MesQaItemsDetect01 : DevExpress.XtraEditors.XtraForm
     {
-        string _currentRowGuid = "";
+        int _currentHandle5 =0;
         string _webServiceName = "MesQaItemsDetect01Manager/";
         List<FilterEntity> _filterList = new List<FilterEntity>();
         public Frm_MesQaItemsDetect01()
@@ -70,8 +72,6 @@
             gvMx2.OptionsView.ShowGroupPanel = false;
             gvMx3.OptionsFind.ShowSearchNavButtons = false;
             gvMx3.OptionsView.ShowGroupPanel = false;
-            txt_itemId.KeyFile = "id";
-            txt_suppId.KeyFile = "id";
             txt_itemId.EditChanged += (s, e) =>
             {
                 txt_itemModel.Text = this.txt_itemId.GetModel();
@@ -89,7 +89,8 @@
             string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gvMx1, e, "guid");
             if (string.IsNullOrEmpty(rowGuid))
                 return;
-            this._currentRowGuid = rowGuid;
+            var info = gvMx1.CalcHitInfo(e.Location);
+            this._currentHandle5 = info.RowHandle;
             getList12(rowGuid);
         }
 
@@ -475,7 +476,6 @@
                     pageBar1.TotalPages = dddd;
                     pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟
                     pageBar1.CurrentPage = curPage;//褰撳墠椤�
-                    pageBar1.RowsCount = pageSize;//姣忛〉鏄剧ず
                     pageBar1.setTxt();
                 }
                 else
@@ -525,12 +525,14 @@
                         gcMx1.BindingContext = new BindingContext();
                         gcMx1.DataSource = dt;
                         gcMx1.ForceInitialize();
-                       
-                        if (!string.IsNullOrEmpty(_currentRowGuid))
-                            gvMx1.FocusedRowHandle = gvMx1.LocateByValue(0, gvMx1.Columns["gvMx1guid"], _currentRowGuid);
-
+                        gvMx1.FocusedRowHandle = _currentHandle5;
                         ucUpFile1.parentGuid = lbGuid.Text.Trim();
-                        getList12(dt.Rows[0]["guid"].ToString());
+                        var row = gvMx1.GetDataRow(_currentHandle5);
+                        if (row != null)
+                        {
+                            var rowGuid = row["guid"].ToString();
+                            getList12(rowGuid);
+                        }
                     }
                     else
                     {

--
Gitblit v1.9.3