ningshuxia
2025-03-17 ecac1f13b6d1ad22b69687197ee49836d3a84220
WinFrmUI/HStation.WinFrmUI.Auth.Core/01-menu/MenuViewModel.cs
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using 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
        }
    }
}