From 819573ad118c73c49118aaeb9f9d21438943e230 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期日, 17 十一月 2024 16:49:09 +0800 Subject: [PATCH] 1 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs | 42 ++++++++++++++++-------------------------- 1 files changed, 16 insertions(+), 26 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs index 1bb47c8..f176e0f 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs @@ -1,3 +1,4 @@ +using DevExpress.XtraGrid.Views.Grid.ViewInfo; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Gs.DevApp.UserControl; @@ -16,6 +17,7 @@ { public partial class Frm_MesQaItemsDetect01 : DevExpress.XtraEditors.XtraForm { + string _currentRowGuid = ""; string _webServiceName = "MesQaItemsDetect01Manager/"; List<FilterEntity> _filterList = new List<FilterEntity>(); public Frm_MesQaItemsDetect01() @@ -87,6 +89,7 @@ string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gvMx1, e, "guid"); if (string.IsNullOrEmpty(rowGuid)) return; + this._currentRowGuid = rowGuid; getList12(rowGuid); } @@ -113,29 +116,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 +175,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 { @@ -539,6 +525,10 @@ gcMx1.BindingContext = new BindingContext(); gcMx1.DataSource = dt; gcMx1.ForceInitialize(); + + if (!string.IsNullOrEmpty(_currentRowGuid)) + gvMx1.FocusedRowHandle = gvMx1.LocateByValue(0, gvMx1.Columns["gvMx1guid"], _currentRowGuid); + ucUpFile1.parentGuid = lbGuid.Text.Trim(); getList12(dt.Rows[0]["guid"].ToString()); } -- Gitblit v1.9.3