From a952e19c231c432c365e649d3b354ec331c5f642 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期三, 04 十二月 2024 08:09:11 +0800
Subject: [PATCH] 1
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs | 52 ++++++++++++++++++++++------------------------------
1 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index 1bb47c8..3f6032d 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -1,3 +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;
@@ -16,6 +19,7 @@
{
public partial class Frm_MesQaItemsDetect01 : DevExpress.XtraEditors.XtraForm
{
+ int _currentHandle5 =0;
string _webServiceName = "MesQaItemsDetect01Manager/";
List<FilterEntity> _filterList = new List<FilterEntity>();
public Frm_MesQaItemsDetect01()
@@ -68,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();
@@ -87,6 +89,8 @@
string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gvMx1, e, "guid");
if (string.IsNullOrEmpty(rowGuid))
return;
+ var info = gvMx1.CalcHitInfo(e.Location);
+ this._currentHandle5 = info.RowHandle;
getList12(rowGuid);
}
@@ -113,29 +117,9 @@
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "ReloadModel5", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtn.rtnMsg);
if (_rtn.rtnCode > 0)
{
- dynamic dy = _rtn.rtnData;
- lbGuid.Text = strGuid;
- JObject _job = JObject.Parse(strJson);
- JArray array = new JArray();
- foreach (var a in _job["rtnData"]["list5"])
- {
- array.Add(a);
- }
- DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
- if (dt.Rows.Count > 0)
- {
- gcMx1.BindingContext = new BindingContext();
- gcMx1.DataSource = dt;
- gcMx1.ForceInitialize();
- getList12(dt.Rows[0]["guid"].ToString());
- }
- else
- {
- Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
- }
+ getModel(lbGuid.Text.Trim(), false, 999);
}
}
catch (Exception ex)
@@ -192,13 +176,16 @@
return;
}
}
- if (int.TryParse(_strCmd, out n))
- {
- }
else
{
- Gs.DevApp.ToolBox.MsgHelper.ShowError("鍛戒护杈撳叆閿欒锛氳姝g‘浣跨敤OK 鎴� NG 鍛戒护!");
- return;
+ if (int.TryParse(_strCmd, out n))
+ {
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("鍛戒护杈撳叆閿欒锛氳姝g‘浣跨敤OK 鎴� NG 鍛戒护!");
+ return;
+ }
}
var _obj = new
{
@@ -489,7 +476,6 @@
pageBar1.TotalPages = dddd;
pageBar1.RecordCount = dd.rtnData.total;//璁板綍鎬绘暟
pageBar1.CurrentPage = curPage;//褰撳墠椤�
- pageBar1.RowsCount = pageSize;//姣忛〉鏄剧ず
pageBar1.setTxt();
}
else
@@ -539,8 +525,14 @@
gcMx1.BindingContext = new BindingContext();
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
+ 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