public List<V_MenuSetRole> GetEDMSysMenuByType(string systemType) { using (SysEntityMenuBLL bll = new SysEntityMenuBLL()) { List<V_MenuSetRole> menuList; string keyString = "GetEDMSysMenuByType" + systemType; if (WCFCache.Current[keyString] == null) { IQueryable<V_MenuSetRole> IQList = bll.GetSysMenuNameByTypeInfoNew(systemType); menuList = IQList == null ? null : IQList.ToList(); WCFCache.Current.Insert(keyString, menuList, DateTime.Now.AddMinutes(15)); } else { menuList = (List<V_MenuSetRole>)WCFCache.Current[keyString]; } return menuList.Count() > 0 ? menuList : null; } }
public List<V_MenuSetRole> GetFBSysMenuByType(string systemType,string employeeid) { using (SysEntityMenuBLL bll = new SysEntityMenuBLL()) { #region List<V_MenuSetRole> menuList; string keyString = ""; T_SYS_FBADMIN UserFb=null; if (!string.IsNullOrEmpty(employeeid)) { T_SYS_USER Userinfo = this.GetUserByEmployeeID(employeeid); if (Userinfo != null) { UserFb = this.getFbAdmin(Userinfo.SYSUSERID); } if (UserFb == null) { keyString = "GetFBSysMenuByType" + systemType; } else { keyString = "GetFBSysMenuByType" + systemType + employeeid; } } else { keyString = "GetFBSysMenuByType" + systemType; } if (WCFCache.Current[keyString] == null) { IQueryable<V_MenuSetRole> IQList = UserFb != null ? bll.GetSysMenuNameByTypeInfoNew(systemType) : bll.GetSysMenuNameByTypeInfoNewToFbAdmins(systemType); menuList = IQList == null ? null : IQList.ToList(); WCFCache.Current.Insert(keyString, menuList, DateTime.Now.AddMinutes(15)); } else { menuList = (List<V_MenuSetRole>)WCFCache.Current[keyString]; } #endregion return menuList.Count() > 0 ? menuList : null; } }