37 lines
876 B
C#
37 lines
876 B
C#
using YLErp.Abstract;
|
|
|
|
namespace YLErp.Web.Areas.Admin.Models
|
|
{
|
|
public class ZTreeMenuItem : ITreeMenuItem
|
|
{
|
|
public string id { get; set; }
|
|
|
|
public string name { get; set; }
|
|
|
|
public bool open { get; set; }
|
|
|
|
public List<ZTreeMenuItem> children { get; set; }
|
|
|
|
public ITreeMenuItem AppendChild(string id, string name, string[] rights,
|
|
string url, string icon, string target)
|
|
{
|
|
var menu = new ZTreeMenuItem
|
|
{
|
|
id = id,
|
|
name = name,
|
|
open = false
|
|
};
|
|
if (children == null)
|
|
{
|
|
children = new List<ZTreeMenuItem>();
|
|
}
|
|
children.Add(menu);
|
|
return menu;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return name;
|
|
}
|
|
}
|
|
} |