From ecac1f13b6d1ad22b69687197ee49836d3a84220 Mon Sep 17 00:00:00 2001 From: ningshuxia <ningshuxia0927@outlook.com> Date: 星期一, 17 三月 2025 09:28:01 +0800 Subject: [PATCH] 禁用程序集null引用 --- WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs | 36 +++++++++++++++++++++++++++--------- 1 files changed, 27 insertions(+), 9 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs index 958552c..5db28ad 100644 --- a/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs @@ -1,7 +1,4 @@ -锘縰sing System; -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; +锘縰sing System.ComponentModel; using Yw.Vmo; namespace HStation.WinFrmUI @@ -14,12 +11,12 @@ public MenuViewModel() { } - public MenuViewModel(Yw.Vmo.ProjectMenu rhs) + public MenuViewModel(Yw.Vmo.ProjectMenuVmo rhs) { this.ID = rhs.ID; this.ProjectID = rhs.ProjectID; this.ParentID = rhs.ParentID; - this.Type = rhs.Type; + this.Type = (eMenuType)rhs.Type; this.Name = rhs.Name; this.Path = rhs.Path; this.Permission = rhs.Permission; @@ -32,12 +29,12 @@ this.Description = rhs.Description; } - public void Reset(Yw.Vmo.ProjectMenu rhs) + public void Reset(Yw.Vmo.ProjectMenuVmo rhs) { this.ID = rhs.ID; this.ProjectID = rhs.ProjectID; this.ParentID = rhs.ParentID; - this.Type = rhs.Type; + this.Type = (eMenuType)rhs.Type; this.Name = rhs.Name; this.Path = rhs.Path; this.Permission = rhs.Permission; @@ -68,7 +65,7 @@ /// 绫诲瀷 /// </summary> [DisplayName("绫诲瀷")] - public int Type { get; set; } + public eMenuType Type { get; set; } /// <summary> /// 鍚嶇О @@ -129,5 +126,26 @@ /// </summary> [DisplayName("璇存槑")] public string Description { get; set; } + + public enum eMenuType + { + /// <summary> + /// 鐩綍 + /// </summary> + [Description("鐩綍")] + Catalog = 1, + + /// <summary> + /// 鑿滃崟 + /// </summary> + [Description("鑿滃崟")] + Munu = 2, + + /// <summary> + /// 鍔熻兘鐐� + /// </summary> + [Description("鍔熻兘鐐�")] + Function = 3 + } } } \ No newline at end of file -- Gitblit v1.9.3