114 lines
3.1 KiB
C#
114 lines
3.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
using System.Windows.Forms;
|
|
namespace AIMS.PublicUI.BLL
|
|
{
|
|
public class Menu
|
|
{
|
|
public static void Add(Model.Menu MenuObj)
|
|
{
|
|
try
|
|
{
|
|
new DAL.MenuDB().Add(MenuObj);
|
|
MessageBox.Show("增加成功!");
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show("增加失败!"+ex.Message);
|
|
}
|
|
|
|
}
|
|
public static void Update(Model.Menu MenuObj)
|
|
{
|
|
try
|
|
{
|
|
new DAL.MenuDB().Update(MenuObj);
|
|
MessageBox.Show("修改成功!");
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show("修改失败!"+ex.Message);
|
|
}
|
|
}
|
|
public static void Delete(int Id)
|
|
{
|
|
try
|
|
{
|
|
new DAL.MenuDB().Delete(Id);
|
|
MessageBox.Show("删除成功!");
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MessageBox.Show("删除失败!"+ex.Message);
|
|
}
|
|
}
|
|
public static Model.Menu GetModel(int Id)
|
|
{
|
|
return new DAL.MenuDB().GetModel(Id);
|
|
}
|
|
public static DataTable GetDateTable(string strWhere)
|
|
{
|
|
return new DAL.MenuDB().GetDateTable(strWhere);
|
|
}
|
|
|
|
public static List<Model.Menu> GetModelList()
|
|
{
|
|
return new DAL.MenuDB().GetModelList();
|
|
}
|
|
public static List<Model.Menu> GetModelList_FSB(int RoleId)
|
|
{
|
|
return new DAL.MenuDB().GetModelList_FSB(RoleId);
|
|
}
|
|
|
|
public static List<Model.Menu> GetMenuRootList(int ParentId)
|
|
{
|
|
|
|
return new DAL.MenuDB().GetMenuRootList(ParentId);
|
|
}
|
|
public static List<Model.Menu> GetMenuRootList(int RoleId, int ParentId)
|
|
{
|
|
return new DAL.MenuDB().GetMenuRootList(RoleId,ParentId);
|
|
}
|
|
public static List<Model.Menu> GetMenuRootListManage(int RoleId, string ParentId)
|
|
{
|
|
return new DAL.MenuDB().GetMenuRootListManage(RoleId,ParentId);
|
|
}
|
|
public static List<Model.Menu> GetMenuRootListManage(int RoleId)
|
|
{
|
|
return new DAL.MenuDB().GetMenuRootListManage(RoleId);
|
|
}
|
|
public static Model.Menu GetMenuById(int Id, int RoleId, int IsAll)
|
|
{
|
|
|
|
return new DAL.MenuDB().GetMenuById(Id, RoleId,IsAll);
|
|
}
|
|
public static Model.Menu GetMenuByName(string name)
|
|
{
|
|
|
|
return new DAL.MenuDB().GetMenuByName(name);
|
|
}
|
|
|
|
public List<Model.Menu> GetChildren(Model.Menu Menu, int RoleId,int IsAll)
|
|
{
|
|
|
|
return new DAL.MenuDB().GetChildren(Menu, RoleId, IsAll);
|
|
}
|
|
|
|
public static Model.Menu GetPathByName(string Name)
|
|
{
|
|
return new DAL.MenuDB().GetPathByName(Name);
|
|
}
|
|
|
|
public static DataTable GetMenuDataTable(int ParentId, int RoleId)
|
|
{
|
|
return new DAL.MenuDB().GetMenuDataTable(ParentId, RoleId);
|
|
}
|
|
}
|
|
}
|