From 5aba1bf12cd27faa797e7f3d15e0f960bdc2a4b2 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 05 七月 2024 16:57:09 +0800 Subject: [PATCH] 优化界面 --- WinFrmUI/HStation.WinFrmUI.Xhs.Project/03-PumpManage/PumpSeriesTreeListCtrl.cs | 1 WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.cs | 16 WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.Designer.cs | 50 +++ WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/00-viewModel/TypeViewModel.cs | 28 ++ WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.Designer.cs | 24 +- WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditMoudleDlg.Designer.cs | 24 +- WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/TypeTreeListCtrl.cs | 38 ++- WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/CatlogViewModel.cs | 8 WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.resx | 18 + WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.Project.csproj | 4 WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/ModuleTreeListCtrl.cs | 1 WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.Designer.cs | 32 +- HStation.Service.Xhs.Core/00-core/DbFirstHelper.cs | 1 WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.cs | 20 + WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.cs | 11 WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddTypeDlg.Designer.cs | 35 +- WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.Designer.cs | 67 +---- WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditTypeDlg.Designer.cs | 33 +- WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddMoudleDlg.Designer.cs | 24 +- WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/TypeTreeListViewModel.cs | 57 +++++ WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.cs | 141 +++++++----- 21 files changed, 404 insertions(+), 229 deletions(-) diff --git a/HStation.Service.Xhs.Core/00-core/DbFirstHelper.cs b/HStation.Service.Xhs.Core/00-core/DbFirstHelper.cs index 7878865..25c8bf0 100644 --- a/HStation.Service.Xhs.Core/00-core/DbFirstHelper.cs +++ b/HStation.Service.Xhs.Core/00-core/DbFirstHelper.cs @@ -53,6 +53,7 @@ basicTypeList.Add(typeof(Yw.Entity.SysCatalog)); basicTypeList.Add(typeof(Yw.Entity.SysPropGroup)); basicTypeList.Add(typeof(Yw.Entity.SysProp)); + basicTypeList.Add(typeof(Yw.Entity.SysPropMapping)); // basicTypeList.Add(typeof(Yw.Entity.SysCatalogOrg)); //绯荤粺灞炴�� diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/03-PumpManage/PumpSeriesTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/03-PumpManage/PumpSeriesTreeListCtrl.cs index 8c22cad..7336e91 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/03-PumpManage/PumpSeriesTreeListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/03-PumpManage/PumpSeriesTreeListCtrl.cs @@ -14,6 +14,7 @@ public PumpSeriesTreeListCtrl() { InitializeComponent(); + this.treeList1.InitialDefaultSettings(); this.treeList1.SelectImageList = ImageLib.Lib; } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/00-viewModel/TypeViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/00-viewModel/TypeViewModel.cs index d647213..f48ba76 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/00-viewModel/TypeViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/00-viewModel/TypeViewModel.cs @@ -9,7 +9,18 @@ this.ID = rhs.ID; this.Description = rhs.Description; this.Name = rhs.Name; - this.ExtendType = rhs.ExtendType; + if (ExtendType == Yw.Basic.eExtendType.None) + { + this.ExtendTypeDisPlayName = "鏃�"; + } + else if (ExtendType == Yw.Basic.eExtendType.Config) + { + this.ExtendTypeDisPlayName = "閰嶇疆"; + } + else + { + this.ExtendTypeDisPlayName = "鍒嗙被"; + } this.ModuleID = rhs.ModuleID; this.Code = rhs.Code; this.SortCode = rhs.SortCode; @@ -20,8 +31,21 @@ this.ID = rhs.ID; this.Description = rhs.Description; this.Name = rhs.Name; - this.ExtendType = rhs.ExtendType; + if (ExtendType == Yw.Basic.eExtendType.None) + { + this.ExtendTypeDisPlayName = "鏃�"; + } + else if (ExtendType == Yw.Basic.eExtendType.Config) + { + this.ExtendTypeDisPlayName = "閰嶇疆"; + } + else + { + this.ExtendTypeDisPlayName = "鍒嗙被"; + } this.Code = rhs.Code; } + + public string ExtendTypeDisPlayName { get; set; } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddMoudleDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddMoudleDlg.Designer.cs index 295be61..e2e53cf 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddMoudleDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddMoudleDlg.Designer.cs @@ -99,25 +99,25 @@ // // TextEditCode // - TextEditCode.Location = new Point(48, 32); + TextEditCode.Location = new Point(55, 32); TextEditCode.Name = "TextEditCode"; - TextEditCode.Size = new Size(455, 20); + TextEditCode.Size = new Size(448, 20); TextEditCode.StyleController = layoutControl1; TextEditCode.TabIndex = 3; // // TextEditName // - TextEditName.Location = new Point(48, 8); + TextEditName.Location = new Point(55, 8); TextEditName.Name = "TextEditName"; - TextEditName.Size = new Size(455, 20); + TextEditName.Size = new Size(448, 20); TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // TextEditDescription // - TextEditDescription.Location = new Point(48, 56); + TextEditDescription.Location = new Point(55, 56); TextEditDescription.Name = "TextEditDescription"; - TextEditDescription.Size = new Size(455, 185); + TextEditDescription.Size = new Size(448, 185); TextEditDescription.StyleController = layoutControl1; TextEditDescription.TabIndex = 4; // @@ -135,12 +135,13 @@ // // layoutControlItem3 // + layoutControlItem3.AllowHtmlStringInCaption = true; layoutControlItem3.Control = TextEditCode; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(499, 24); - layoutControlItem3.Text = "缂栫爜:"; - layoutControlItem3.TextSize = new Size(28, 14); + layoutControlItem3.Text = "<color=red>*</color>缂栫爜:"; + layoutControlItem3.TextSize = new Size(35, 14); // // layoutControlItem5 // @@ -149,16 +150,17 @@ layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(499, 189); layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextSize = new Size(28, 14); + layoutControlItem5.TextSize = new Size(35, 14); // // layoutControlItem1 // + layoutControlItem1.AllowHtmlStringInCaption = true; layoutControlItem1.Control = TextEditName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(499, 24); - layoutControlItem1.Text = "鍚嶇О:"; - layoutControlItem1.TextSize = new Size(28, 14); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(35, 14); // // layoutControlItem6 // diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddTypeDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddTypeDlg.Designer.cs index 5d51d04..dfb8551 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddTypeDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/AddTypeDlg.Designer.cs @@ -104,35 +104,35 @@ // // TextEditCode // - TextEditCode.Location = new Point(72, 32); + TextEditCode.Location = new Point(79, 32); TextEditCode.Name = "TextEditCode"; - TextEditCode.Size = new Size(431, 20); + TextEditCode.Size = new Size(424, 20); TextEditCode.StyleController = layoutControl1; TextEditCode.TabIndex = 3; // // TextEditName // - TextEditName.Location = new Point(72, 8); + TextEditName.Location = new Point(79, 8); TextEditName.Name = "TextEditName"; - TextEditName.Size = new Size(431, 20); + TextEditName.Size = new Size(424, 20); TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // TextEditDescription // - TextEditDescription.Location = new Point(72, 80); + TextEditDescription.Location = new Point(79, 80); TextEditDescription.Name = "TextEditDescription"; - TextEditDescription.Size = new Size(431, 161); + TextEditDescription.Size = new Size(424, 161); TextEditDescription.StyleController = layoutControl1; TextEditDescription.TabIndex = 4; // // TextEditExtendType // - TextEditExtendType.Location = new Point(72, 56); + TextEditExtendType.Location = new Point(79, 56); TextEditExtendType.Name = "TextEditExtendType"; TextEditExtendType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); - TextEditExtendType.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鏃�", null, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鎷撳睍", null, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("缁ф壙", null, -1) }); - TextEditExtendType.Size = new Size(431, 20); + TextEditExtendType.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("缁ф壙", null, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鎷撳睍", null, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鏃�", null, -1) }); + TextEditExtendType.Size = new Size(424, 20); TextEditExtendType.StyleController = layoutControl1; TextEditExtendType.TabIndex = 3; // @@ -150,12 +150,13 @@ // // layoutControlItem3 // + layoutControlItem3.AllowHtmlStringInCaption = true; layoutControlItem3.Control = TextEditCode; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(499, 24); - layoutControlItem3.Text = "缂栫爜:"; - layoutControlItem3.TextSize = new Size(52, 14); + layoutControlItem3.Text = "<color=red>*</color>缂栫爜:"; + layoutControlItem3.TextSize = new Size(59, 14); // // layoutControlItem5 // @@ -164,16 +165,17 @@ layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(499, 165); layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextSize = new Size(52, 14); + layoutControlItem5.TextSize = new Size(59, 14); // // layoutControlItem1 // + layoutControlItem1.AllowHtmlStringInCaption = true; layoutControlItem1.Control = TextEditName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(499, 24); - layoutControlItem1.Text = "鍚嶇О:"; - layoutControlItem1.TextSize = new Size(52, 14); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(59, 14); // // layoutControlItem6 // @@ -203,12 +205,13 @@ // // layoutControlItem2 // + layoutControlItem2.AllowHtmlStringInCaption = true; layoutControlItem2.Control = TextEditExtendType; layoutControlItem2.Location = new Point(0, 48); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(499, 24); - layoutControlItem2.Text = "鎷撳睍绫诲瀷:"; - layoutControlItem2.TextSize = new Size(52, 14); + layoutControlItem2.Text = "<color=red>*</color>鎷撳睍绫诲瀷:"; + layoutControlItem2.TextSize = new Size(59, 14); // // dxErrorProvider1 // diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditMoudleDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditMoudleDlg.Designer.cs index d3be1d3..c1940ac 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditMoudleDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditMoudleDlg.Designer.cs @@ -99,25 +99,25 @@ // // TextEditCode // - TextEditCode.Location = new Point(48, 32); + TextEditCode.Location = new Point(55, 32); TextEditCode.Name = "TextEditCode"; - TextEditCode.Size = new Size(455, 20); + TextEditCode.Size = new Size(448, 20); TextEditCode.StyleController = layoutControl1; TextEditCode.TabIndex = 3; // // TextEditName // - TextEditName.Location = new Point(48, 8); + TextEditName.Location = new Point(55, 8); TextEditName.Name = "TextEditName"; - TextEditName.Size = new Size(455, 20); + TextEditName.Size = new Size(448, 20); TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // TextEditDescription // - TextEditDescription.Location = new Point(48, 56); + TextEditDescription.Location = new Point(55, 56); TextEditDescription.Name = "TextEditDescription"; - TextEditDescription.Size = new Size(455, 185); + TextEditDescription.Size = new Size(448, 185); TextEditDescription.StyleController = layoutControl1; TextEditDescription.TabIndex = 4; // @@ -135,12 +135,13 @@ // // layoutControlItem3 // + layoutControlItem3.AllowHtmlStringInCaption = true; layoutControlItem3.Control = TextEditCode; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(499, 24); - layoutControlItem3.Text = "缂栫爜:"; - layoutControlItem3.TextSize = new Size(28, 14); + layoutControlItem3.Text = "<color=red>*</color>缂栫爜:"; + layoutControlItem3.TextSize = new Size(35, 14); // // layoutControlItem5 // @@ -149,16 +150,17 @@ layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(499, 189); layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextSize = new Size(28, 14); + layoutControlItem5.TextSize = new Size(35, 14); // // layoutControlItem1 // + layoutControlItem1.AllowHtmlStringInCaption = true; layoutControlItem1.Control = TextEditName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(499, 24); - layoutControlItem1.Text = "鍚嶇О:"; - layoutControlItem1.TextSize = new Size(28, 14); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(35, 14); // // layoutControlItem6 // diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditTypeDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditTypeDlg.Designer.cs index 230fdad..3962c20 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditTypeDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/EditTypeDlg.Designer.cs @@ -104,35 +104,35 @@ // // TextEditCode // - TextEditCode.Location = new Point(72, 32); + TextEditCode.Location = new Point(79, 32); TextEditCode.Name = "TextEditCode"; - TextEditCode.Size = new Size(431, 20); + TextEditCode.Size = new Size(424, 20); TextEditCode.StyleController = layoutControl1; TextEditCode.TabIndex = 3; // // TextEditName // - TextEditName.Location = new Point(72, 8); + TextEditName.Location = new Point(79, 8); TextEditName.Name = "TextEditName"; - TextEditName.Size = new Size(431, 20); + TextEditName.Size = new Size(424, 20); TextEditName.StyleController = layoutControl1; TextEditName.TabIndex = 0; // // TextEditDescription // - TextEditDescription.Location = new Point(72, 80); + TextEditDescription.Location = new Point(79, 80); TextEditDescription.Name = "TextEditDescription"; - TextEditDescription.Size = new Size(431, 161); + TextEditDescription.Size = new Size(424, 161); TextEditDescription.StyleController = layoutControl1; TextEditDescription.TabIndex = 4; // // TextEditExType // - TextEditExType.Location = new Point(72, 56); + TextEditExType.Location = new Point(79, 56); TextEditExType.Name = "TextEditExType"; TextEditExType.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo) }); TextEditExType.Properties.Items.AddRange(new DevExpress.XtraEditors.Controls.ImageComboBoxItem[] { new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鏃�", null, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("鎷撳睍", null, -1), new DevExpress.XtraEditors.Controls.ImageComboBoxItem("缁ф壙", null, -1) }); - TextEditExType.Size = new Size(431, 20); + TextEditExType.Size = new Size(424, 20); TextEditExType.StyleController = layoutControl1; TextEditExType.TabIndex = 3; // @@ -150,12 +150,13 @@ // // layoutControlItem3 // + layoutControlItem3.AllowHtmlStringInCaption = true; layoutControlItem3.Control = TextEditCode; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(499, 24); - layoutControlItem3.Text = "缂栫爜:"; - layoutControlItem3.TextSize = new Size(52, 14); + layoutControlItem3.Text = "<color=red>*</color>缂栫爜:"; + layoutControlItem3.TextSize = new Size(59, 14); // // layoutControlItem5 // @@ -164,16 +165,17 @@ layoutControlItem5.Name = "layoutControlItem5"; layoutControlItem5.Size = new Size(499, 165); layoutControlItem5.Text = "璇存槑:"; - layoutControlItem5.TextSize = new Size(52, 14); + layoutControlItem5.TextSize = new Size(59, 14); // // layoutControlItem1 // + layoutControlItem1.AllowHtmlStringInCaption = true; layoutControlItem1.Control = TextEditName; layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(499, 24); - layoutControlItem1.Text = "鍚嶇О:"; - layoutControlItem1.TextSize = new Size(52, 14); + layoutControlItem1.Text = "<color=red>*</color>鍚嶇О:"; + layoutControlItem1.TextSize = new Size(59, 14); // // layoutControlItem6 // @@ -203,12 +205,13 @@ // // layoutControlItem2 // + layoutControlItem2.AllowHtmlStringInCaption = true; layoutControlItem2.Control = TextEditExType; layoutControlItem2.Location = new Point(0, 48); layoutControlItem2.Name = "layoutControlItem2"; layoutControlItem2.Size = new Size(499, 24); - layoutControlItem2.Text = "鎷撳睍绫诲瀷:"; - layoutControlItem2.TextSize = new Size(52, 14); + layoutControlItem2.Text = "<color=red>*</color>鎷撳睍绫诲瀷:"; + layoutControlItem2.TextSize = new Size(59, 14); // // dxErrorProvider1 // diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/ModuleTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/ModuleTreeListCtrl.cs index fe30bf1..ccd1977 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/ModuleTreeListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/ModuleTreeListCtrl.cs @@ -12,6 +12,7 @@ public ModuleTreeListCtrl() { InitializeComponent(); + this.treeList1.InitialDefaultSettings(); } /// <summary> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.Designer.cs index d016235..1daa7a5 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.Designer.cs @@ -45,13 +45,13 @@ gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); colName = new DevExpress.XtraGrid.Columns.GridColumn(); colCode = new DevExpress.XtraGrid.Columns.GridColumn(); - colExtendType = new DevExpress.XtraGrid.Columns.GridColumn(); colSortCode = new DevExpress.XtraGrid.Columns.GridColumn(); colDescription = new DevExpress.XtraGrid.Columns.GridColumn(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem(); barButtonItem1 = new DevExpress.XtraBars.BarButtonItem(); + colExtendTypeDisPlayName = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)dockManager1).BeginInit(); dockPanel1.SuspendLayout(); @@ -174,13 +174,15 @@ // gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true; gridView1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; - gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colCode, colExtendType, colSortCode, colDescription }); + gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colName, colCode, colExtendTypeDisPlayName, colSortCode, colDescription }); gridView1.GridControl = gridControl1; gridView1.Name = "gridView1"; gridView1.OptionsView.ShowGroupPanel = false; // // colName // + colName.AppearanceCell.Options.UseTextOptions = true; + colName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colName.Caption = "鍚嶇О"; colName.FieldName = "Name"; colName.Name = "colName"; @@ -189,22 +191,18 @@ // // colCode // + colCode.AppearanceCell.Options.UseTextOptions = true; + colCode.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colCode.Caption = "缂栫爜"; colCode.FieldName = "Code"; colCode.Name = "colCode"; colCode.Visible = true; colCode.VisibleIndex = 1; // - // colExtendType - // - colExtendType.Caption = "鎷撳睍绫诲瀷"; - colExtendType.FieldName = "ExtendType"; - colExtendType.Name = "colExtendType"; - colExtendType.Visible = true; - colExtendType.VisibleIndex = 2; - // // colSortCode // + colSortCode.AppearanceCell.Options.UseTextOptions = true; + colSortCode.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colSortCode.Caption = "鎺掑簭鐮�"; colSortCode.FieldName = "SortCode"; colSortCode.Name = "colSortCode"; @@ -213,6 +211,8 @@ // // colDescription // + colDescription.AppearanceCell.Options.UseTextOptions = true; + colDescription.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colDescription.Caption = "璇存槑"; colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; @@ -254,6 +254,16 @@ barButtonItem1.Caption = "barButtonItem1"; barButtonItem1.Id = 14; barButtonItem1.Name = "barButtonItem1"; + // + // colExtendTypeDisPlayName + // + colExtendTypeDisPlayName.AppearanceCell.Options.UseTextOptions = true; + colExtendTypeDisPlayName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; + colExtendTypeDisPlayName.Caption = "鎷撳睍绫诲瀷"; + colExtendTypeDisPlayName.FieldName = "ExtendTypeDisPlayName"; + colExtendTypeDisPlayName.Name = "colExtendTypeDisPlayName"; + colExtendTypeDisPlayName.Visible = true; + colExtendTypeDisPlayName.VisibleIndex = 2; // // TypeManageCtrl // @@ -299,9 +309,9 @@ private BindingSource typeViewModelBindingSource; private DevExpress.XtraGrid.Columns.GridColumn colName; private DevExpress.XtraGrid.Columns.GridColumn colCode; - private DevExpress.XtraGrid.Columns.GridColumn colExtendType; private DevExpress.XtraGrid.Columns.GridColumn colSortCode; private DevExpress.XtraGrid.Columns.GridColumn colDescription; private ModuleTreeListCtrl moduleTreeListCtrl1; + private DevExpress.XtraGrid.Columns.GridColumn colExtendTypeDisPlayName; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.cs index 73ee75c..6473261 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/04-TypeManage/TypeManageCtrl.cs @@ -25,18 +25,19 @@ //鑱氱劍鍒囨崲 private async void ModuleTreeListCtrl1_FocusedChangedEvent(long moduleid) { + var alllist = await _bll.GetByModuleID(moduleid); _allBindingList.Clear(); + foreach (var item in alllist) + { + _allBindingList.Add(new TypeViewModel(item)); + } + this.typeViewModelBindingSource.ResetBindings(false); } private async void SetBindingData() { this.moduleTreeListCtrl1.SetBindingData(); _bll = new Yw.BLL.SysType(); - var alllist = await _bll.GetAll(); - foreach (var item in alllist) - { - _allBindingList.Add(new TypeViewModel(item)); - } this.typeViewModelBindingSource.DataSource = _allBindingList; this.typeViewModelBindingSource.ResetBindings(false); } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/CatlogViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/CatlogViewModel.cs index cad14a7..28b97a0 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/CatlogViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/CatlogViewModel.cs @@ -12,5 +12,13 @@ this.SortCode = rhs.SortCode; this.Code = rhs.Code; } + + public void Reset(Yw.Dto.UpdateSysCatalogInput rhs) + { + this.ID = rhs.ID; + this.Description = rhs.Description; + this.Name = rhs.Name; + this.Code = rhs.Code; + } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/TypeTreeListViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/TypeTreeListViewModel.cs new file mode 100644 index 0000000..f58ab97 --- /dev/null +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/00-ViewModel/TypeTreeListViewModel.cs @@ -0,0 +1,57 @@ +锘縰sing DevExpress.XtraCharts.Native; +using Yw; +using Yw.Dto; + +namespace HStation.WinFrmUI.Xhs +{ + public class TypeTreeListViewModel + { + public TypeTreeListViewModel(SysTypeLogicalTreeDto rhs) + { + var Module = rhs.LogicalModel as SysModuleStdDto; + this.ID = Module.ID; + this.Name = Module.Name; + this.SortCode = Module.SortCode; + this.Description = Module.Description; + } + + public TypeTreeListViewModel(LogicalTreeExDto rhs) + { + var systype = rhs.LogicalModel as SysTypeStdDto; + this.ParentID = systype.ModuleID; + this.ID = systype.ID; + this.Name = systype.Name; + this.SortCode = systype.SortCode; + this.Description = systype.Description; + } + + public void Reset(SysTypeLogicalTreeDto rhs) + { + } + + /// <summary> + /// ID + /// </summary> + public long ID { get; set; } + + /// <summary> + /// 鐖剁骇ID + /// </summary> + public long ParentID { get; set; } + + /// <summary> + /// 鍚嶇О + /// </summary> + public string Name { get; set; } + + /// <summary> + /// 鎺掑簭鐮� + /// </summary> + public int SortCode { get; set; } + + /// <summary> + /// 璇存槑 + /// </summary> + public string Description { get; set; } + } +} \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.Designer.cs index 7721132..5a847cc 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.Designer.cs @@ -32,7 +32,7 @@ layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); btnCancel = new DevExpress.XtraEditors.SimpleButton(); - TextEditTagName = new DevExpress.XtraEditors.TextEdit(); + TextEditCode = new DevExpress.XtraEditors.TextEdit(); TextEditName = new DevExpress.XtraEditors.TextEdit(); TextEditDescription = new DevExpress.XtraEditors.MemoEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); @@ -43,11 +43,9 @@ emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem(); layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); - TextEditParentName = new DevExpress.XtraEditors.TextEdit(); - layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)TextEditTagName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCode.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); @@ -58,16 +56,13 @@ ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).BeginInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).BeginInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).BeginInit(); - ((System.ComponentModel.ISupportInitialize)TextEditParentName.Properties).BeginInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).BeginInit(); SuspendLayout(); // // layoutControl1 // layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(btnCancel); - layoutControl1.Controls.Add(TextEditTagName); - layoutControl1.Controls.Add(TextEditParentName); + layoutControl1.Controls.Add(TextEditCode); layoutControl1.Controls.Add(TextEditName); layoutControl1.Controls.Add(TextEditDescription); layoutControl1.Dock = DockStyle.Fill; @@ -102,17 +97,17 @@ btnCancel.TabIndex = 6; btnCancel.Text = "鍙栨秷"; // - // TextEditTagName + // TextEditCode // - TextEditTagName.Location = new Point(48, 56); - TextEditTagName.Name = "TextEditTagName"; - TextEditTagName.Size = new Size(455, 20); - TextEditTagName.StyleController = layoutControl1; - TextEditTagName.TabIndex = 3; + TextEditCode.Location = new Point(48, 32); + TextEditCode.Name = "TextEditCode"; + TextEditCode.Size = new Size(455, 20); + TextEditCode.StyleController = layoutControl1; + TextEditCode.TabIndex = 3; // // TextEditName // - TextEditName.Location = new Point(48, 32); + TextEditName.Location = new Point(48, 8); TextEditName.Name = "TextEditName"; TextEditName.Size = new Size(455, 20); TextEditName.StyleController = layoutControl1; @@ -120,9 +115,9 @@ // // TextEditDescription // - TextEditDescription.Location = new Point(48, 80); + TextEditDescription.Location = new Point(48, 56); TextEditDescription.Name = "TextEditDescription"; - TextEditDescription.Size = new Size(455, 161); + TextEditDescription.Size = new Size(455, 185); TextEditDescription.StyleController = layoutControl1; TextEditDescription.TabIndex = 4; // @@ -132,7 +127,7 @@ Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far; Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; Root.GroupBordersVisible = false; - Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4, layoutControlItem2 }); + Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem3, layoutControlItem5, layoutControlItem1, layoutControlItem6, emptySpaceItem1, layoutControlItem4 }); Root.Name = "Root"; Root.Padding = new DevExpress.XtraLayout.Utils.Padding(6, 6, 6, 6); Root.Size = new Size(511, 275); @@ -140,8 +135,8 @@ // // layoutControlItem3 // - layoutControlItem3.Control = TextEditTagName; - layoutControlItem3.Location = new Point(0, 48); + layoutControlItem3.Control = TextEditCode; + layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(499, 24); layoutControlItem3.Text = "缂栫爜:"; @@ -150,16 +145,16 @@ // layoutControlItem5 // layoutControlItem5.Control = TextEditDescription; - layoutControlItem5.Location = new Point(0, 72); + layoutControlItem5.Location = new Point(0, 48); layoutControlItem5.Name = "layoutControlItem5"; - layoutControlItem5.Size = new Size(499, 165); + layoutControlItem5.Size = new Size(499, 189); layoutControlItem5.Text = "璇存槑:"; layoutControlItem5.TextSize = new Size(28, 14); // // layoutControlItem1 // layoutControlItem1.Control = TextEditName; - layoutControlItem1.Location = new Point(0, 24); + layoutControlItem1.Location = new Point(0, 0); layoutControlItem1.Name = "layoutControlItem1"; layoutControlItem1.Size = new Size(499, 24); layoutControlItem1.Text = "鍚嶇О:"; @@ -195,24 +190,6 @@ // dxErrorProvider1.ContainerControl = this; // - // TextEditParentName - // - TextEditParentName.Location = new Point(48, 8); - TextEditParentName.Name = "TextEditParentName"; - TextEditParentName.Size = new Size(455, 20); - TextEditParentName.StyleController = layoutControl1; - TextEditParentName.TabIndex = 0; - // - // layoutControlItem2 - // - layoutControlItem2.Control = TextEditParentName; - layoutControlItem2.Location = new Point(0, 0); - layoutControlItem2.Name = "layoutControlItem2"; - layoutControlItem2.Size = new Size(499, 24); - layoutControlItem2.Text = "鐖剁骇:"; - layoutControlItem2.TextSize = new Size(28, 14); - layoutControlItem2.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; - // // AddCatlogDlg // AutoScaleDimensions = new SizeF(7F, 14F); @@ -224,7 +201,7 @@ Text = "娣诲姞绫诲瀷"; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)TextEditTagName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCode.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); @@ -235,8 +212,6 @@ ((System.ComponentModel.ISupportInitialize)emptySpaceItem1).EndInit(); ((System.ComponentModel.ISupportInitialize)layoutControlItem4).EndInit(); ((System.ComponentModel.ISupportInitialize)dxErrorProvider1).EndInit(); - ((System.ComponentModel.ISupportInitialize)TextEditParentName.Properties).EndInit(); - ((System.ComponentModel.ISupportInitialize)layoutControlItem2).EndInit(); ResumeLayout(false); } @@ -246,7 +221,7 @@ private DevExpress.XtraEditors.TextEdit TextEditName; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraEditors.TextEdit TextEditTagName; + private DevExpress.XtraEditors.TextEdit TextEditCode; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraEditors.MemoEdit TextEditDescription; @@ -256,7 +231,5 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6; private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4; - private DevExpress.XtraEditors.TextEdit TextEditParentName; - private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2; } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.cs index dba17d9..c1755ce 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/AddCatlogDlg.cs @@ -15,16 +15,17 @@ private AddSysCatalogInput _AddCatlogDto { get; set; } - public void SetBindingData(long TypeID, long ParentID) + public async void SetBindingData(long TypeID) { _AddCatlogDto = new AddSysCatalogInput(); _AddCatlogDto.TypeID = TypeID; - if (ParentID > 0) - { - _AddCatlogDto.ParentID = ParentID; - this.TextEditParentName.Text = "璇烽�夋嫨涓婄骇鐩綍"; - this.TextEditParentName.Visible = true; - } + } + + public async void SetBindingData(long TypeID, long CatLogID) + { + _AddCatlogDto = new AddSysCatalogInput(); + _AddCatlogDto.TypeID = TypeID; + _AddCatlogDto.ParentID = CatLogID; } //鏁版嵁楠岃瘉 @@ -44,6 +45,7 @@ { _AddCatlogDto.Name = TextEditName.Text.Trim(); _AddCatlogDto.Description = TextEditDescription.Text.Trim(); + _AddCatlogDto.Code = TextEditCode.Text.Trim(); if (await this.ReloadDataEvent.Invoke(_AddCatlogDto)) { MessageBoxHelper.ShowSuccess("娣诲姞鎴愬姛!"); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.Designer.cs index 45fa4bf..1427b4a 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.Designer.cs @@ -34,11 +34,13 @@ barBtnEditPumpCurve = new DevExpress.XtraBars.BarButtonItem(); BtnAdd = new DevExpress.XtraBars.BarButtonItem(); BtnDelete = new DevExpress.XtraBars.BarButtonItem(); + BtnAddChild = new DevExpress.XtraBars.BarButtonItem(); ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage(); ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup(); dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components); dockPanel1 = new DevExpress.XtraBars.Docking.DockPanel(); dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer(); + typeTreeListCtrl2 = new TypeTreeListCtrl(); layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); treeList1 = new DevExpress.XtraTreeList.TreeList(); colName = new DevExpress.XtraTreeList.Columns.TreeListColumn(); @@ -52,6 +54,7 @@ ((System.ComponentModel.ISupportInitialize)ribbonControl1).BeginInit(); ((System.ComponentModel.ISupportInitialize)dockManager1).BeginInit(); dockPanel1.SuspendLayout(); + dockPanel1_Container.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)treeList1).BeginInit(); @@ -65,9 +68,9 @@ ribbonControl1.DrawGroupsBorderMode = DevExpress.Utils.DefaultBoolean.False; ribbonControl1.ExpandCollapseItem.Id = 0; ribbonControl1.ItemPanelStyle = DevExpress.XtraBars.Ribbon.RibbonItemPanelStyle.Classic; - ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnEditPumpCurve, BtnAdd, BtnDelete }); + ribbonControl1.Items.AddRange(new DevExpress.XtraBars.BarItem[] { ribbonControl1.ExpandCollapseItem, barBtnEditPumpCurve, BtnAdd, BtnDelete, BtnAddChild }); ribbonControl1.Location = new Point(0, 0); - ribbonControl1.MaxItemId = 17; + ribbonControl1.MaxItemId = 18; ribbonControl1.Name = "ribbonControl1"; ribbonControl1.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] { ribbonPage1 }); ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False; @@ -79,7 +82,7 @@ // // barBtnEditPumpCurve // - barBtnEditPumpCurve.Caption = "缂栬緫灞炴��"; + barBtnEditPumpCurve.Caption = "缂栬緫鍒嗙被"; barBtnEditPumpCurve.Id = 13; barBtnEditPumpCurve.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnEditPumpCurve.ImageOptions.SvgImage"); barBtnEditPumpCurve.Name = "barBtnEditPumpCurve"; @@ -87,7 +90,7 @@ // // BtnAdd // - BtnAdd.Caption = "澧炲姞灞炴��"; + BtnAdd.Caption = "澧炲姞鐖剁骇鍒嗙被"; BtnAdd.Id = 15; BtnAdd.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnAdd.ImageOptions.SvgImage"); BtnAdd.Name = "BtnAdd"; @@ -95,11 +98,19 @@ // // BtnDelete // - BtnDelete.Caption = "鍒犻櫎灞炴��"; + BtnDelete.Caption = "鍒犻櫎鍒嗙被"; BtnDelete.Id = 16; BtnDelete.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnDelete.ImageOptions.SvgImage"); BtnDelete.Name = "BtnDelete"; BtnDelete.ItemClick += BtnDelete_ItemClick; + // + // BtnAddChild + // + BtnAddChild.Caption = "澧炲姞瀛愮骇鍒嗙被"; + BtnAddChild.Id = 17; + BtnAddChild.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("BtnAddChild.ImageOptions.SvgImage"); + BtnAddChild.Name = "BtnAddChild"; + BtnAddChild.ItemClick += BtnAddChild_ItemClick; // // ribbonPage1 // @@ -110,6 +121,7 @@ // ribbonPageGroup1 // ribbonPageGroup1.ItemLinks.Add(BtnAdd); + ribbonPageGroup1.ItemLinks.Add(BtnAddChild); ribbonPageGroup1.ItemLinks.Add(barBtnEditPumpCurve); ribbonPageGroup1.ItemLinks.Add(BtnDelete); ribbonPageGroup1.Name = "ribbonPageGroup1"; @@ -134,10 +146,21 @@ // // dockPanel1_Container // + dockPanel1_Container.Controls.Add(typeTreeListCtrl2); dockPanel1_Container.Location = new Point(3, 26); dockPanel1_Container.Name = "dockPanel1_Container"; dockPanel1_Container.Size = new Size(193, 441); dockPanel1_Container.TabIndex = 0; + // + // typeTreeListCtrl2 + // + typeTreeListCtrl2.Appearance.BackColor = SystemColors.Control; + typeTreeListCtrl2.Appearance.Options.UseBackColor = true; + typeTreeListCtrl2.Dock = DockStyle.Fill; + typeTreeListCtrl2.Location = new Point(0, 0); + typeTreeListCtrl2.Name = "typeTreeListCtrl2"; + typeTreeListCtrl2.Size = new Size(193, 441); + typeTreeListCtrl2.TabIndex = 0; // // layoutControl1 // @@ -153,16 +176,21 @@ // // treeList1 // + treeList1.Appearance.HeaderPanel.Options.UseTextOptions = true; + treeList1.Appearance.HeaderPanel.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; treeList1.Columns.AddRange(new DevExpress.XtraTreeList.Columns.TreeListColumn[] { colName, colCode, colSortCode, colDescription }); treeList1.DataSource = catlogViewModelBindingSource; treeList1.Location = new Point(2, 2); treeList1.MenuManager = ribbonControl1; treeList1.Name = "treeList1"; + treeList1.OptionsBehavior.Editable = false; treeList1.Size = new Size(929, 466); treeList1.TabIndex = 4; // // colName // + colName.AppearanceCell.Options.UseTextOptions = true; + colName.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colName.Caption = "鍚嶇О"; colName.FieldName = "Name"; colName.Name = "colName"; @@ -171,6 +199,8 @@ // // colCode // + colCode.AppearanceCell.Options.UseTextOptions = true; + colCode.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colCode.Caption = "缂栫爜"; colCode.FieldName = "Code"; colCode.Name = "colCode"; @@ -179,6 +209,8 @@ // // colSortCode // + colSortCode.AppearanceCell.Options.UseTextOptions = true; + colSortCode.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colSortCode.Caption = "鎺掑簭鐮�"; colSortCode.FieldName = "SortCode"; colSortCode.Name = "colSortCode"; @@ -187,6 +219,8 @@ // // colDescription // + colDescription.AppearanceCell.Options.UseTextOptions = true; + colDescription.AppearanceCell.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center; colDescription.Caption = "璇存槑"; colDescription.FieldName = "Description"; colDescription.Name = "colDescription"; @@ -234,6 +268,7 @@ ((System.ComponentModel.ISupportInitialize)ribbonControl1).EndInit(); ((System.ComponentModel.ISupportInitialize)dockManager1).EndInit(); dockPanel1.ResumeLayout(false); + dockPanel1_Container.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)treeList1).EndInit(); @@ -258,13 +293,14 @@ private DevExpress.XtraBars.BarButtonItem BtnAdd; private DevExpress.XtraBars.BarButtonItem BtnDelete; private DevExpress.XtraBars.BarButtonItem barButtonItem1; - private TypeTreeListCtrl typeTreeListCtrl1; - private DevExpress.XtraTreeList.TreeList treeList1; + private DevExpress.XtraTreeList.TreeList treeList1; private DevExpress.XtraTreeList.Columns.TreeListColumn colName; private DevExpress.XtraTreeList.Columns.TreeListColumn colCode; private DevExpress.XtraTreeList.Columns.TreeListColumn colSortCode; private DevExpress.XtraTreeList.Columns.TreeListColumn colDescription; private BindingSource catlogViewModelBindingSource; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; + private TypeTreeListCtrl typeTreeListCtrl2; + private DevExpress.XtraBars.BarButtonItem BtnAddChild; } } diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.cs index fdf296d..96e6779 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.cs @@ -1,4 +1,5 @@ 锘縰sing HStation.WinFrmUI.Xhs.Project; +using ISupply.WinFrmUI; using Yw.DAL.Basic; namespace HStation.WinFrmUI.Xhs @@ -8,27 +9,25 @@ public CatalogManageCtrl() { InitializeComponent(); + this.typeTreeListCtrl2.FocusedChangedEvent += TypeTreeListCtrl2_FocusedChangedEvent; } - private List<CatlogViewModel> _allBindingList = new List<CatlogViewModel>(); + private List<CatlogViewModel> _allBindingList = null; private Yw.BLL.SysCatalog _bll = null; public override void InitialDataSource() { - SetBindingData(); + this.typeTreeListCtrl2.SetBindingData(); } //鑱氱劍鍒囨崲 - private async void ModuleTreeListCtrl1_FocusedChangedEvent(long moduleid) + private async void TypeTreeListCtrl2_FocusedChangedEvent(long typeID) { - _allBindingList.Clear(); - } - - private async void SetBindingData() - { + _allBindingList = new List<CatlogViewModel>(); _bll = new Yw.BLL.SysCatalog(); - var alllist = await _bll.GetAll(); + var alllist = await _bll.GetByTypeID(typeID); + _allBindingList.Clear(); foreach (var item in alllist) { _allBindingList.Add(new CatlogViewModel(item)); @@ -40,73 +39,89 @@ //娣诲姞 private void BtnAdd_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - /* var dlg = new AddCatlogDlg(); - var vm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (vm == null) - { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛�"); - return; - } - dlg.SetBindingData(0, vm.ID); - dlg.ReloadDataEvent += async (rhs) => + var dlg = new AddCatlogDlg(); + var typeID = this.typeTreeListCtrl2.GetCurrentID(); + dlg.SetBindingData(typeID); + dlg.ReloadDataEvent += async (rhs) => + { + var id = await _bll.Insert(rhs); + if (id > 0) { - var id = await _bll.Insert(rhs); - if (id > 0) - { - var model = await _bll.GetByID(id); - _allBindingList.Add(new CatlogViewModel(model)); - return true; - } - return false; - }; - dlg.ShowDialog();*/ + var model = await _bll.GetByID(id); + _allBindingList.Add(new CatlogViewModel(model)); + return true; + } + return false; + }; + dlg.ShowDialog(); + } + + //娣诲姞瀛愰」 + private void BtnAddChild_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + var dlg = new AddCatlogDlg(); + var vm = this.treeList1.GetCurrentViewModel(_allBindingList); + var typeID = this.typeTreeListCtrl2.GetCurrentID(); + dlg.SetBindingData(typeID, vm.ID); + dlg.ReloadDataEvent += async (rhs) => + { + var id = await _bll.Insert(rhs); + if (id > 0) + { + var model = await _bll.GetByID(id); + _allBindingList.Add(new CatlogViewModel(model)); + return true; + } + return false; + }; + dlg.ShowDialog(); } //缂栬緫 private void barBtnEditPumpCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - /* var dlg = new EditTypeDlg(); - var vm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (vm == null) + var dlg = new EditCatlogDlg(); + var vm = this.treeList1.GetCurrentViewModel(_allBindingList); + if (vm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + dlg.SetBindingData(vm.ID); + dlg.ReloadDataEvent += async (rhs) => + { + if (await _bll.Update(rhs)) { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); - return; + vm.Reset(rhs); + return true; } - dlg.SetBindingData(vm.ID); - dlg.ReloadDataEvent += async (rhs) => - { - if (await _bll.Update(rhs)) - { - vm.Reset(rhs); - return true; - } - return false; - }; - dlg.ShowDialog();*/ + return false; + }; + dlg.ShowDialog(); } //鍒犻櫎 private async void BtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - /* var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList); - if (currentVm == null) - { - MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); - return; - } - if (MessageBoxHelper.IsClickOk($"纭鍒犻櫎鏁版嵁琛�?", "鎻愮ず")) - return; - var result = await _bll.DeleteByID(currentVm.ID); - if (result) - { - _allBindingList.Remove(currentVm); - MessageBoxHelper.ShowSuccess($"鍒犻櫎鎴愬姛!"); - } - else - { - MessageBoxHelper.ShowError($"鍒犻櫎澶辫触!"); - return; - }*/ + var currentVm = this.treeList1.GetCurrentViewModel(_allBindingList); + if (currentVm == null) + { + MessageBoxHelper.ShowWarning("璇烽�夋嫨鏁版嵁琛岋紒"); + return; + } + if (MessageBoxHelper.IsClickOk($"纭鍒犻櫎鏁版嵁琛�?", "鎻愮ず")) + return; + var result = await _bll.DeleteByID(currentVm.ID); + if (result) + { + _allBindingList.Remove(currentVm); + MessageBoxHelper.ShowSuccess($"鍒犻櫎鎴愬姛!"); + } + else + { + MessageBoxHelper.ShowError($"鍒犻櫎澶辫触!"); + return; + } } } } \ No newline at end of file diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.resx b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.resx index e8e716a..d44c946 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.resx +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/CatlogManageCtrl.resx @@ -187,6 +187,24 @@ LDE2eiIgY2xhc3M9IlJlZCIgLz4NCiAgICA8L2c+DQogIDwvZz4NCjwvc3ZnPgs= </value> </data> + <data name="BtnAddChild.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi40 + LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl + dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAGICAAAC77u/ + PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi + IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv + MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh + Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg + MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5Z + ZWxsb3d7ZmlsbDojRkZCMTE1O30KCS5CbGFja3tmaWxsOiM3MjcyNzI7fQoJLkdyZWVue2ZpbGw6IzAz + OUMyMzt9CgkuUmVke2ZpbGw6I0QxMUMxQzt9Cgkuc3Qwe29wYWNpdHk6MC43NTt9Cgkuc3Qxe29wYWNp + dHk6MC41O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkFkZENpcmNsZWQiPg0KICAgIDxwYXRoIGQ9Ik0xNiw0 + QzkuNCw0LDQsOS40LDQsMTZzNS40LDEyLDEyLDEyczEyLTUuNCwxMi0xMlMyMi42LDQsMTYsNHogTTI0 + LDE4aC02djZoLTR2LTZIOHYtNGg2VjhoNHY2aDZWMTh6IiBjbGFzcz0iR3JlZW4iIC8+DQogIDwvZz4N + Cjwvc3ZnPgs= +</value> + </data> <metadata name="dockManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.Designer.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.Designer.cs index ddab6c8..c900f2c 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.Designer.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.Designer.cs @@ -32,7 +32,7 @@ layoutControl1 = new DevExpress.XtraLayout.LayoutControl(); BtnOk = new DevExpress.XtraEditors.SimpleButton(); btnCancel = new DevExpress.XtraEditors.SimpleButton(); - TextEditTagName = new DevExpress.XtraEditors.TextEdit(); + TextEditCode = new DevExpress.XtraEditors.TextEdit(); TextEditName = new DevExpress.XtraEditors.TextEdit(); TextEditDescription = new DevExpress.XtraEditors.MemoEdit(); Root = new DevExpress.XtraLayout.LayoutControlGroup(); @@ -45,7 +45,7 @@ dxErrorProvider1 = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(components); ((System.ComponentModel.ISupportInitialize)layoutControl1).BeginInit(); layoutControl1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)TextEditTagName.Properties).BeginInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCode.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).BeginInit(); ((System.ComponentModel.ISupportInitialize)Root).BeginInit(); @@ -62,7 +62,7 @@ // layoutControl1.Controls.Add(BtnOk); layoutControl1.Controls.Add(btnCancel); - layoutControl1.Controls.Add(TextEditTagName); + layoutControl1.Controls.Add(TextEditCode); layoutControl1.Controls.Add(TextEditName); layoutControl1.Controls.Add(TextEditDescription); layoutControl1.Dock = DockStyle.Fill; @@ -97,13 +97,13 @@ btnCancel.TabIndex = 6; btnCancel.Text = "鍙栨秷"; // - // TextEditTagName + // TextEditCode // - TextEditTagName.Location = new Point(48, 32); - TextEditTagName.Name = "TextEditTagName"; - TextEditTagName.Size = new Size(455, 20); - TextEditTagName.StyleController = layoutControl1; - TextEditTagName.TabIndex = 3; + TextEditCode.Location = new Point(48, 32); + TextEditCode.Name = "TextEditCode"; + TextEditCode.Size = new Size(455, 20); + TextEditCode.StyleController = layoutControl1; + TextEditCode.TabIndex = 3; // // TextEditName // @@ -135,7 +135,7 @@ // // layoutControlItem3 // - layoutControlItem3.Control = TextEditTagName; + layoutControlItem3.Control = TextEditCode; layoutControlItem3.Location = new Point(0, 24); layoutControlItem3.Name = "layoutControlItem3"; layoutControlItem3.Size = new Size(499, 24); @@ -201,7 +201,7 @@ Text = "缂栬緫鍒嗙被"; ((System.ComponentModel.ISupportInitialize)layoutControl1).EndInit(); layoutControl1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)TextEditTagName.Properties).EndInit(); + ((System.ComponentModel.ISupportInitialize)TextEditCode.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditName.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)TextEditDescription.Properties).EndInit(); ((System.ComponentModel.ISupportInitialize)Root).EndInit(); @@ -221,7 +221,7 @@ private DevExpress.XtraEditors.TextEdit TextEditName; private DevExpress.XtraLayout.LayoutControlGroup Root; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1; - private DevExpress.XtraEditors.TextEdit TextEditTagName; + private DevExpress.XtraEditors.TextEdit TextEditCode; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5; private DevExpress.XtraEditors.MemoEdit TextEditDescription; diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.cs index aa14d5f..50e32ad 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/EditCatlogDlg.cs @@ -1,4 +1,7 @@ -锘縰sing Mapster; +锘縰sing DevExpress.Export; +using HStation.Dto; +using Mapster; +using Microsoft.VisualBasic; using Yw.Basic; using Yw.Dto; @@ -15,13 +18,12 @@ private UpdateSysCatalogInput _UpdateCatlogDto { get; set; } - public async Task SetBindingDataAsync(long ID) + public async void SetBindingData(long ID) { - _UpdateCatlogDto = new UpdateSysCatalogInput(); - var bll = new Yw.BLL.SysCatalog(); - var model = await bll.GetByID(ID); - _UpdateCatlogDto = model.Adapt<Yw.Dto.SysCatalogDto, Yw.Dto.UpdateSysCatalogInput>(); + var dto = await new Yw.BLL.SysCatalog().GetByID(ID); + _UpdateCatlogDto = dto.Adapt<Yw.Dto.SysCatalogDto, Yw.Dto.UpdateSysCatalogInput>(); this.TextEditName.Text = _UpdateCatlogDto.Name; + this.TextEditCode.Text = _UpdateCatlogDto.Code; this.TextEditDescription.Text = _UpdateCatlogDto.Description; } @@ -40,16 +42,16 @@ //瀹屾垚 private async void BtnOk_ClickAsync(object sender, EventArgs e) { - _UpdateCatlogDto = new UpdateSysCatalogInput(); _UpdateCatlogDto.Name = TextEditName.Text.Trim(); _UpdateCatlogDto.Description = TextEditDescription.Text.Trim(); + _UpdateCatlogDto.Code = TextEditCode.Text.Trim(); if (await this.ReloadDataEvent.Invoke(_UpdateCatlogDto)) { - MessageBoxHelper.ShowSuccess("娣诲姞鎴愬姛!"); + MessageBoxHelper.ShowSuccess("淇敼鎴愬姛!"); } else { - MessageBoxHelper.ShowError("娣诲姞澶辫触!"); + MessageBoxHelper.ShowError("淇敼澶辫触!"); } this.DialogResult = DialogResult.OK; this.Close(); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/TypeTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/TypeTreeListCtrl.cs index 3ea6958..05a266d 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/TypeTreeListCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/05-CatlogManage/TypeTreeListCtrl.cs @@ -1,6 +1,8 @@ -锘縰sing DevExpress.XtraEditors; +锘縰sing DevExpress.XtraBars.Docking2010.DragEngine; +using DevExpress.XtraEditors; using HStation.WinFrmUI.Xhs.Project; using ISupply.WinFrmUI; +using Yw.Basic; namespace HStation.WinFrmUI.Xhs { @@ -12,6 +14,7 @@ public TypeTreeListCtrl() { InitializeComponent(); + this.treeList1.InitialDefaultSettings(); } /// <summary> @@ -19,9 +22,11 @@ /// </summary> public event Action<long> FocusedChangedEvent; - private List<TypeViewModel> _allBindingList = null; + private List<TypeTreeListViewModel> _allBindingList = null; - private Yw.BLL.SysModule _bll = null; + private Yw.BLL.SysTypeStd _bll = null; + + private Yw.BLL.SysModule _Modulebll = null; /// <summary> /// 缁戝畾鏁版嵁 @@ -36,8 +41,19 @@ /// </summary> public async void SetBindingData() { - _allBindingList = new List<TypeViewModel>(); - + _allBindingList = new List<TypeTreeListViewModel>(); + _bll = new Yw.BLL.SysTypeStd(); + var alllist = await _bll.GetLogicalTreeListByExtendType(eExtendType.Catalog); + foreach (var item in alllist) + { + var module = new TypeTreeListViewModel(item); + _allBindingList.Add(module); + foreach (var child in item.Children) + { + var children = new TypeTreeListViewModel(child); + _allBindingList.Add(children); + } + } this.moduleViewModelBindingSource.DataSource = _allBindingList; this.moduleViewModelBindingSource.ResetBindings(false); } @@ -85,11 +101,11 @@ var dlg = new AddMoudleDlg(); dlg.ReloadDataEvent += async (rhs) => { - var id = await _bll.Insert(rhs); + var id = await _Modulebll.Insert(rhs); if (id > 0) { - var model = await _bll.GetByID(id); - // _allBindingList.Add(new ModuleViewModel(model)); + var model = await _Modulebll.GetByID(id); + // _allBindingList.Add(new ModuleViewModel(model)); this.moduleViewModelBindingSource.ResetBindings(false); return true; } @@ -118,7 +134,7 @@ dlg.SetBindingData(vm.ID); dlg.ReloadDataEvent += async (rhs) => { - if (await _bll.Update(rhs)) + if (await _Modulebll.Update(rhs)) { //vm.Reset(rhs); this.moduleViewModelBindingSource.ResetBindings(false); @@ -140,12 +156,12 @@ } if (MessageBoxHelper.IsClickOk("纭鍒犻櫎鏁版嵁琛�?", "鎻愮ず")) return; - if (await _bll.IsExistByModuleID(currentVm.ID)) + if (await _Modulebll.IsExistByModuleID(currentVm.ID)) { MessageBoxHelper.ShowWarning("瀛樺湪绯荤粺绫诲瀷,涓嶅彲鍒犻櫎!"); return; } - var result = await _bll.DeleteByID(currentVm.ID); + var result = await _Modulebll.DeleteByID(currentVm.ID); if (result) { _allBindingList.Remove(currentVm); diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.Project.csproj b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.Project.csproj index a292402..d4ce7b6 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.Project.csproj +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Project/HStation.WinFrmUI.Xhs.Project.csproj @@ -26,7 +26,7 @@ <ItemGroup> <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" /> <PackageReference Include="Microsoft.Web.WebView2" Version="1.0.2535.41" /> - <PackageReference Include="Yw.BLL.Basic.Core" Version="3.1.3" /> + <PackageReference Include="Yw.BLL.Basic.Core" Version="3.1.4" /> </ItemGroup> <ItemGroup> @@ -85,7 +85,7 @@ </ItemGroup> <ItemGroup> - <Folder Include="06-PropGroupManage\" /> + <Folder Include="06-PropManage\" /> </ItemGroup> </Project> -- Gitblit v1.9.3