Files
T-DAS/Epost.DAL/MenuInfoDAL.cs
2023-01-13 15:30:20 +08:00

39 lines
1007 B
C#

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Epost.DAL
{
public class MenuInfoDAL
{
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
public DataTable GetMenuList(string state,string roleid)
{
string sql = string.Format("select * from menuinfo where ParentID='{0}'and id in({1})",
state,
roleid);
return db.GetsqlForDT(sql);
}
public DataTable GetSubMenuList(string roleid)
{
string sql = string.Format("select * from menuinfo where ParentID<>0 and parentid in({0})",
roleid);
return db.GetsqlForDT(sql);
}
public DataTable GetMenuId(string roleid)
{
string sql = string.Format("select * from roleinfo where id='{0}'",
roleid);
return db.GetsqlForDT(sql);
}
}
}