From 770c671fb4ad9bf3691b1250bc10f9c4087edf97 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 06 十二月 2024 08:25:13 +0800
Subject: [PATCH] 修改进度条

---
 DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs |   54 ++++++++++++++++++++++++++++--------------------------
 1 files changed, 28 insertions(+), 26 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index f176e0f..1311a03 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);
         }
 
@@ -272,7 +273,7 @@
         /// <param name="sender"></param>
         /// <param name="e"></param>
         /// <exception cref="NotImplementedException"></exception>
-        private async void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e)
+        private   void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e)
         {
             toolBarMenu1.guidKey = "";
             string rowGuid, rowName;
@@ -286,14 +287,14 @@
             }
             if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎻愪氦妫�楠屽悧锛�"))
                 return;
-            UcLoading _loading = new UcLoading();
+            
             var _obj = new
             {
                 guid = rowGuid,
             };
             try
             {
-                var strJson = await UtilityHelper.HttpPostAsync("",
+                var strJson = UtilityHelper.HttpPost("",
                     _webServiceName + "EditModelSubmit",
                     JsonConvert.SerializeObject(_obj));
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
@@ -310,7 +311,7 @@
             {
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-            _loading.Stop();
+            
         }
 
         /// <summary>
@@ -451,9 +452,9 @@
         /// </summary>
         /// <param name="curPage">绗嚑椤�</param>
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
-        private async void getPageList(int curPage, int pageSize)
+        private   void getPageList(int curPage, int pageSize)
         {
-            UcLoading _loading = new UcLoading();
+            
             System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
             foreach (FilterEntity itm in _filterList)
             {
@@ -463,7 +464,7 @@
             string json = JsonConvert.SerializeObject(pgq);
             try
             {
-                string strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json);
+                string strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json);
                 ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn);
                 if (dd.rtnCode > 0)
                 {
@@ -475,7 +476,6 @@
                     pageBar1.TotalPages = dddd;
                     pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟
                     pageBar1.CurrentPage = curPage;//褰撳墠椤�
-                    pageBar1.RowsCount = pageSize;//姣忛〉鏄剧ず
                     pageBar1.setTxt();
                 }
                 else
@@ -487,9 +487,9 @@
             {
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-            _loading.Stop();
+            
         }
-        private async void getModel(string strGuid, bool isEdit, int tabIdx)
+        private   void getModel(string strGuid, bool isEdit, int tabIdx)
         {
             if (string.IsNullOrEmpty(strGuid))
             {
@@ -497,14 +497,14 @@
                 return;
             }
             UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
-            UcLoading _loading = new UcLoading();
+            
             var _obj = new
             {
                 guid = strGuid,//涓诲缓
             };
             try
             {
-                string strJson = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
+                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
                 ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                 if (_rtn.rtnCode > 0)
                 {
@@ -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
                     {
@@ -544,7 +546,7 @@
             {
                 ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-            _loading.Stop();
+            
         }
 
 
@@ -600,9 +602,9 @@
         /// 鏍规嵁妫�楠岄」鐩鍙栨娊鏍风粨鏋� 
         /// </summary>
         /// <param name="guid5"></param>
-        private async void getList12(string guid5)
+        private   void getList12(string guid5)
         {
-            UcLoading _loading = new UcLoading();
+            
             var _obj = new
             {
                 parentGuid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
@@ -610,7 +612,7 @@
             };
             try
             {
-                var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetModel12", JsonConvert.SerializeObject(_obj));
+                var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetModel12", JsonConvert.SerializeObject(_obj));
                 var dd = UtilityHelper.ReturnToList(strReturn);
                 var dt = dd.rtnData;
                 gcMx2.BindingContext = new BindingContext();
@@ -621,7 +623,7 @@
             {
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-            _loading.Stop();
+            
         }
 
         private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)

--
Gitblit v1.9.3