添加项目文件。
This commit is contained in:
38
Epost.DAL/MenuInfoDAL.cs
Normal file
38
Epost.DAL/MenuInfoDAL.cs
Normal file
@ -0,0 +1,38 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user