From 236874a930147c27e46c673d8c1a607f1260e8aa Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期一, 31 三月 2025 12:43:43 +0800 Subject: [PATCH] 追溯码 --- DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs | 54 +++++++++++++++++++++++++++++++++++------------------- 1 files changed, 35 insertions(+), 19 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs index cde1d5f..635e23a 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/UcBlcl.cs @@ -26,7 +26,6 @@ txt_bl017.Text = _strType; txt_bl017.Tag = "moren." + _strType; } - protected override void OnCreateControl() { base.OnCreateControl(); @@ -41,12 +40,13 @@ toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); + this.toolBarMenu1.getXmlConfig(); Form parentForm = this.FindForm(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, parentForm, "bl018", "", (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); @@ -61,7 +61,7 @@ { string orgdId = txt_orgId.GetId(); if (string.IsNullOrEmpty(orgdId)) return; - txt_bl010.getSuppler(orgdId,_ucCk); + txt_bl010.getSuppler(orgdId, _ucCk); txt_aboutGuid.getSuppler(orgdId, _ucGd); }; //璁剧疆浠撳簱閫夋嫨 @@ -77,9 +77,10 @@ txt_bl002.Text = txt_aboutGuid.GetPrdNo(); txt_bl014.Text = txt_aboutGuid.GetPrdName(); txt_bl015.Text = txt_aboutGuid.GetPrdModel(); - txt_bl011.Text = txt_aboutGuid.GetWorkName(); + txt_dptName.Text = txt_aboutGuid.GetWorkName(); txt_bl012.Text = txt_aboutGuid.GetWorkXb(); txt_bl013.Text = txt_aboutGuid.GetRwd(); + txt_tldh.Text = txt_aboutGuid.GetTldh(); var _obj = new { currentPage = 1, @@ -96,6 +97,7 @@ var rtn = UtilityHelper.ReturnToTablePage(strReturn); var dt = rtn.rtnData.list; this.repositoryItemSearchLookUpEdit1.DataSource = dt; + this.repositoryItemSearchLookUpEdit1.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; } catch (Exception ex) { @@ -105,10 +107,16 @@ } private void GridView1_ColumnFilterChanged(object sender, EventArgs e) { - Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); + _filterList= Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); Task.Delay(100); getPageList(1); } + /// <summary> + /// 甯冨眬浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + /// <summary> /// 鏃ュ織 /// </summary> @@ -138,10 +146,16 @@ /// <param name="e"></param> private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) { + Form parentForm; + if (this.Parent is Form) + parentForm = this.Parent as Form; + else + parentForm = this.Parent.Parent as Form; + gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; gridView1.ActiveFilter.Clear(); gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; - var frm = new ShowFilter(gridView1.Columns, _filterList); + var frm = new ShowFilter(gridView1.Columns, _filterList, parentForm.GetType().FullName); frm.UpdateParent += Frm_UpdateParent; frm.ShowDialog(); } @@ -256,7 +270,7 @@ { List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gvList.Add(gvMx1); - UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList); + UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); } } /// <summary> @@ -270,7 +284,7 @@ Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gridViews.Add(gvMx1); - UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews); + UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); } @@ -320,6 +334,7 @@ list = new List<dynamic>(), }; gvMx1.CloseEditor(); + gvMx1.PostEditor(); gvMx1.UpdateCurrentRow(); if (gvMx1.DataRowCount <= 0) { @@ -360,7 +375,7 @@ toolBarMenu1.isSetBtn = true; List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gvList.Add(gvMx1); - UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); + UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); toolBarMenu1.currentAction = ""; } } @@ -378,7 +393,7 @@ private void getPageList(int curPage) { var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); - _sbSqlWhere += " and a.bl008='"+ strType + "'"; + _sbSqlWhere += " and a.bl008='" + strType + "'"; PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); string json = JsonConvert.SerializeObject(pgq); try @@ -388,16 +403,16 @@ if (dd.rtnCode > 0) { DataTable dt = dd.rtnData.list; - gcMain.BindingContext = new BindingContext(); + gcMain1.BindingContext = new BindingContext(); gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; if (dt.Rows.Count > 0) { - gcMain.DataSource = dt; - gcMain.ForceInitialize(); - gridView1.BestFitColumns(); + gcMain1.DataSource = dt; + gcMain1.ForceInitialize(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else - UtilityHelper.SetDefaultTable(gcMain, gridView1); + UtilityHelper.SetDefaultTable(gcMain1, gridView1); gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉 pageBar1.CurrentPage = curPage;//褰撳墠椤� @@ -440,7 +455,7 @@ lbGuid.Text = strGuid; List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); gvList.Add(gvMx1); - UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList); + UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); _ucCk = ""; _ucGd = ""; JObject _job = JObject.Parse(strJson); @@ -456,6 +471,7 @@ gcMx1.DataSource = dt; gcMx1.ForceInitialize(); gvMx1.BestFitColumns(); + Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); } else { -- Gitblit v1.9.3