|
|
@@ -10,9 +10,6 @@ namespace MySystem
|
|
|
/// </summary>
|
|
|
public class BaseClass
|
|
|
{
|
|
|
-
|
|
|
- public static Models.Bs.WebCMSEntities bsdb = new Models.Bs.WebCMSEntities();
|
|
|
-
|
|
|
#region 菜单权限json
|
|
|
/// <summary>
|
|
|
/// 菜单权限json
|
|
|
@@ -20,6 +17,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 +87,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)
|