From b084bd77d01a94c8f0a2d20c86a1f45ba7c8a23c Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期六, 19 四月 2025 14:08:05 +0800 Subject: [PATCH] 页面跳转 --- DevApp/Gs.DevApp/UserControl/SelectHz.cs | 41 ++++++++++++++++++----------------------- 1 files changed, 18 insertions(+), 23 deletions(-) diff --git a/DevApp/Gs.DevApp/UserControl/SelectHz.cs b/DevApp/Gs.DevApp/UserControl/SelectHz.cs index 0e0c7ea..366d481 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectHz.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectHz.cs @@ -1,15 +1,9 @@ -锘縰sing DevExpress.XtraEditors; -using Gs.DevApp.Entity; +锘縰sing Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Newtonsoft.Json; using System; using System.Collections.Generic; -using System.ComponentModel; using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace Gs.DevApp.UserControl @@ -24,28 +18,25 @@ _strOrgGuid = strOrgGuid; _strHzType = strHzType; InitializeComponent(); - 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); switch (_strHzType) { - case "1": + case "0": gv_Name.FieldName = "name"; gv_no.FieldName = "fNumber"; getPageList(1); break; - case "2": + case "1": gv_Name.FieldName = "suppName"; gv_no.FieldName = "suppNo"; getPageListGys(1); break; - case "3": + case "2": gv_Name.FieldName = "custName"; gv_no.FieldName = "custNo"; getPageListCus(1); break; } - Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1); + Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false); } /// <summary> @@ -70,7 +61,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); - gridView1.BestFitColumns(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -94,7 +85,8 @@ if (e.Button.Index == 0) { var dr = gridView1.GetDataRow(rowhandle); - var mxGuid = dr["guid"].ToString(); + string mxGuid = dr["guid"].ToString(); + string mxFid = ""; if (string.IsNullOrEmpty(mxGuid)) { return; @@ -102,20 +94,23 @@ var mxName = ""; switch (_strHzType) { - case "1": + case "0": mxName = dr["name"].ToString(); + mxFid = dr["fid"].ToString(); + break; + case "1": + mxName = dr["suppName"].ToString(); + mxFid = dr["id"].ToString(); break; case "2": - mxName = dr["suppName"].ToString(); - break; - case "3": mxName = dr["custName"].ToString(); + mxFid = dr["id"].ToString(); break; } var list = new List<dynamic>(); list.Add(new { - guid = mxGuid, + guid = mxFid, name = mxName, }); UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list }); @@ -153,7 +148,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); - gridView1.BestFitColumns(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); @@ -193,7 +188,7 @@ { gcMain.DataSource = dt; gcMain.ForceInitialize(); - gridView1.BestFitColumns(); + gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); } else UtilityHelper.SetDefaultTable(gcMain, gridView1); -- Gitblit v1.9.3