From dd7c9629d16d81bde03e42b3e9e984088f3e4d2c Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期二, 21 一月 2025 17:28:47 +0800 Subject: [PATCH] 细节 --- DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs | 81 +++++++++++++++++++++++----------------- 1 files changed, 46 insertions(+), 35 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs index e348589..3b940b5 100644 --- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs +++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_IQCLookups.cs @@ -29,30 +29,27 @@ toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; - gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; - Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1, picCheckBox, this, "checkStatus", ""); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) => + { + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); + }); + Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => + { + getModel(value); + }, (value) => + { + getPageList(this.pageBar1.CurrentPage); + }); getPageList(1); pageBar1.PagerEvent += PageBar1_PagerEvent; - Gs.DevApp.ToolBox.UtilityHelper.SetGridSearMx(gvMx1); + } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); + Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); - } - /// <summary> - /// 鍙屽嚮浜嬩欢 - /// </summary> - /// <param name="sender"></param> - /// <param name="e"></param> - private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e) - { - var rowGuid = - UtilityHelper.GetCurrentDoubleRow(gridView1, - e, "guid"); - if (!string.IsNullOrEmpty(rowGuid)) - getModel(rowGuid, false, 999); } /// <summary> @@ -92,7 +89,7 @@ /// <param name="e"></param> private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) { - UtilityHelper.JumpToTab(xtraTabControl1, 0); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); } /// <summary> @@ -103,17 +100,18 @@ private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else { - _filterList.Clear(); - if (gridView1.ActiveFilter.Count > 0) - { - gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; - gridView1.ActiveFilter.Clear(); - gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; - } - getPageList(1); + //_filterList.Clear(); + //if (gridView1.ActiveFilter.Count > 0) + //{ + // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; + // gridView1.ActiveFilter.Clear(); + // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; + //} + //getPageList(1); + getPageList(this.pageBar1.CurrentPage); } } @@ -132,7 +130,17 @@ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - getModel(rowGuid, true, 1); + Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); + if (xtraTabControl1.SelectedTabPageIndex == 1) + { + getModel(rowGuid); + } + else + { + var gvList = new List<GridView>(); + gvList.Add(gvMx1); + UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList); + } } /// <summary> @@ -185,7 +193,9 @@ { lbGuid.Text = _rtn.rtnData; toolBarMenu1.isSetBtn = true; - getModel(lbGuid.Text, false, 1); + var gridViews = new List<GridView>(); + gridViews.Add(gvMx1); + UtilityHelper.ChangeEnableByControl(panel1.Controls, false,gridViews); } } catch (Exception ex) @@ -236,15 +246,16 @@ } } - private void getModel(string strGuid, bool isEdit, int tabIdx) + private void getModel(string strGuid) { + bool isEdit = false; + if (toolBarMenu1.currentAction == "add") return; + if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } - - UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); var _obj = new { guid = strGuid //涓诲缓 @@ -322,7 +333,7 @@ JsonConvert.SerializeObject(lst)); var _rtn = UtilityHelper.ReturnToDynamic(strJson); - if (_rtn.rtnCode > 0) getModel(lbGuid.Text, true, 1); + if (_rtn.rtnCode > 0) getModel(lbGuid.Text); MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); } @@ -376,9 +387,9 @@ if (_rtn.rtnCode > 0) { if (xtraTabControl1.SelectedTabPageIndex == 1) - getModel(lbGuid.Text.Trim(), false, 999); + getModel(lbGuid.Text.Trim()); else - getPageList(1); + getPageList(this.pageBar1.CurrentPage); } } catch (Exception ex) -- Gitblit v1.9.3