public CMSAdminModuleMenu GetCurrentPlug() { CMSAdminModuleMenu plug = null; CMSAdminModule mod = this.Modules.Where(x => x.AreaKey.ToLower() == this.SelectedArea.ToLower()).FirstOrDefault(); if (mod != null) { plug = mod.PluginMenus.Where(x => x.Action.ToLower() == this.CurrentActionFull.ToLower() && x.Controller.ToLower() == this.CurrentController.ToLower()).FirstOrDefault(); if (plug == null) { plug = mod.PluginMenus.Where(x => x.Action.ToLower() == this.CurrentAction.ToLower() && x.Controller.ToLower() == this.CurrentController.ToLower()).FirstOrDefault(); } } if (plug != null) { this.SelectedPluginActionName = plug.Caption; } return(plug); }
public bool EvalModule(CMSAdminModule mod) { if (mod.AreaKey.ToLower() == this.SelectedArea.ToLower()) { this.SelectedTab = this.OpenTab; this.SelectedAreaName = mod.AreaKey; this.SelectedPluginAreaName = mod.PluginName; return(true); } return(false); }