From f23d33d0cf77a73d449cd7c38effda9e50c8fda4 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期四, 06 三月 2025 08:13:37 +0800 Subject: [PATCH] 版面 --- DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs | 45 +++++++++++++++++++++++++++------------------ 1 files changed, 27 insertions(+), 18 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs index f9e5a64..0ed27f4 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs @@ -24,10 +24,15 @@ toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; + List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); + gvList.Add(gridView1); + Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "statusChk", "", (value) => - { - Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); - }); + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => { getModel(value); @@ -160,7 +165,6 @@ ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); if (dd.rtnCode > 0) { - DataTable dt = dd.rtnData.list; gcMain.BindingContext = new BindingContext(); gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; @@ -168,6 +172,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); + gridView1.BestFitColumns(); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -222,13 +227,14 @@ DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); if (dt.Rows.Count > 0) { - gcMx2.BindingContext = new BindingContext(); - gcMx2.DataSource = dt; - gcMx2.ForceInitialize(); + gcMx1.BindingContext = new BindingContext(); + gcMx1.DataSource = dt; + gcMx1.ForceInitialize(); + gvMx1.BestFitColumns(); } else { - Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); } //杩欐槸鎵爜琛� JArray array1 = new JArray(); @@ -239,13 +245,14 @@ DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(array1.ToString()); if (dt1.Rows.Count > 0) { - gcMx1.BindingContext = new BindingContext(); - gcMx1.DataSource = dt1; - gcMx1.ForceInitialize(); + gcMx2.BindingContext = new BindingContext(); + gcMx2.DataSource = dt1; + gcMx2.ForceInitialize(); + gvMx2.BestFitColumns(); } else { - Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); } } else @@ -256,7 +263,7 @@ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); } } - + /// <summary> /// 宸ュ叿鏉′簨浠� /// </summary> @@ -283,7 +290,6 @@ } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) return; - var _obj = new { guid = rowGuid, @@ -296,12 +302,15 @@ JsonConvert.SerializeObject(_obj)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); - if (_rtn.rtnCode > 0) + if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) + { getModel(lbGuid.Text.Trim()); - else - getPageList(this.pageBar1.CurrentPage); + } + int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); + gridView1.FocusedRowHandle = rowHandle; + UtilityHelper.SetCheckIco(gridView1, "statusChk", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); } } catch (Exception ex) @@ -310,6 +319,6 @@ } } - + } } \ No newline at end of file -- Gitblit v1.9.3