|
|
using System;
|
using System.Collections.Generic;
|
|
namespace Model
|
{
|
[Serializable]
|
public class SysUserMenu
|
{
|
public string MenuID { get; private set; }
|
|
public string MenuData { get; private set; }
|
|
public string[] SubMenuArray
|
{
|
get
|
{
|
if (string.IsNullOrEmpty(this.MenuData))
|
return new string[0];
|
return this.MenuData.Split(",".ToCharArray());
|
}
|
}
|
|
public SysUserMenu(string menuID, string menuData)
|
{
|
this.MenuID = menuID;
|
this.MenuData = menuData;
|
}
|
|
public bool ContainsTargetID(string targetID)
|
{
|
if (string.IsNullOrEmpty(this.MenuData))
|
return true;
|
return new List<string>((IEnumerable<string>)this.SubMenuArray).Contains(targetID);
|
}
|
}
|
}
|