|
|
@@ -11,7 +11,6 @@ namespace MySystem
|
|
|
public class BaseClass
|
|
|
{
|
|
|
|
|
|
- public static Models.Bs.WebCMSEntities bsdb = new Models.Bs.WebCMSEntities();
|
|
|
|
|
|
#region 菜单权限json
|
|
|
/// <summary>
|
|
|
@@ -20,6 +19,7 @@ namespace MySystem
|
|
|
/// <returns></returns>
|
|
|
public static string GetRightJson()
|
|
|
{
|
|
|
+ WebCMSEntities bsdb = new WebCMSEntities();
|
|
|
string result = "[";
|
|
|
List<RightDic> list = bsdb.RightDic.ToList();
|
|
|
List<RightDic> Level1 = list.Where(m => m.RightLevel == 1).ToList();
|
|
|
@@ -89,6 +89,7 @@ namespace MySystem
|
|
|
//读取当前菜单有哪些权限
|
|
|
public static string ForOperateRight(string Id)
|
|
|
{
|
|
|
+ WebCMSEntities bsdb = new WebCMSEntities();
|
|
|
string result = "";
|
|
|
List<MenuRight> rights = bsdb.MenuRight.Where(m => m.MenuId.StartsWith(Id)).OrderBy(m => m.MenuId).ToList();
|
|
|
foreach (MenuRight right in rights)
|