diff --git a/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj b/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj index 4d760050..d490e2a3 100644 --- a/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj +++ b/Bootstrap.Client.DataAccess/Bootstrap.Client.DataAccess.csproj @@ -11,7 +11,7 @@ - + diff --git a/Bootstrap.Client.DataAccess/MenuHelper.cs b/Bootstrap.Client.DataAccess/MenuHelper.cs index ee8ab6f5..98155e52 100644 --- a/Bootstrap.Client.DataAccess/MenuHelper.cs +++ b/Bootstrap.Client.DataAccess/MenuHelper.cs @@ -23,9 +23,7 @@ namespace Bootstrap.Client.DataAccess public static IEnumerable RetrieveAppMenus(string userName, string activeUrl) { var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0 && m.Application == ConfigurationManager.AppSettings["AppId"]).Where(m => m.ParentId == "0").OrderBy(m => m.Application).ThenBy(m => m.Order); - var root = DbHelper.CascadeMenus(menus); - DbHelper.ActiveMenu(root, activeUrl); - return root; + return DbHelper.CascadeMenus(menus, activeUrl); } /// diff --git a/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj b/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj index 0b72b4e2..c411be15 100644 --- a/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj +++ b/Bootstrap.DataAccess/Bootstrap.DataAccess.csproj @@ -11,7 +11,7 @@ - + diff --git a/Bootstrap.DataAccess/Helper/MenuHelper.cs b/Bootstrap.DataAccess/Helper/MenuHelper.cs index 2758f5ff..930c2fd2 100644 --- a/Bootstrap.DataAccess/Helper/MenuHelper.cs +++ b/Bootstrap.DataAccess/Helper/MenuHelper.cs @@ -83,9 +83,7 @@ namespace Bootstrap.DataAccess { var menus = RetrieveAllMenus(userName).Where(m => m.Category == "1" && m.IsResource == 0); if (appId != "0") menus = menus.Where(m => m.Application == appId); - var root = DbHelper.CascadeMenus(menus); - DbHelper.ActiveMenu(root, activeUrl); - return root; + return DbHelper.CascadeMenus(menus, activeUrl); } /// @@ -99,9 +97,7 @@ namespace Bootstrap.DataAccess public static IEnumerable RetrieveSystemMenus(string userName, string activeUrl = null) { var menus = RetrieveAllMenus(userName).Where(m => m.Category == "0" && m.IsResource == 0); - var root = DbHelper.CascadeMenus(menus); - DbHelper.ActiveMenu(root, activeUrl); - return root; + return DbHelper.CascadeMenus(menus, activeUrl); } ///