Beispiel #1
0
 public static IList <PageInfo> GetPageInfos(string langCode, EntitiesAlias entity, bool forceUpdate = false)
 {
     if (!PageInfos.ContainsKey(langCode))
     {
         PageInfos.GetOrAdd(langCode, new ConcurrentDictionary <EntitiesAlias, IList <PageInfo> >());
     }
     if (!PageInfos[langCode].ContainsKey(entity))
     {
         PageInfos[langCode].GetOrAdd(entity, _commands.GetPageInfos(langCode, entity));
     }
     else if (!PageInfos[langCode][entity].Any() || forceUpdate)
     {
         PageInfos[langCode].AddOrUpdate(entity, _commands.GetPageInfos(langCode, entity));
     }
     return(PageInfos[langCode][entity]);
 }
Beispiel #2
0
 internal static object GetMasterTableObject(string langCode, EntitiesAlias entity, bool forceUpdate = false)
 {
     if (!MasterTables.ContainsKey(langCode))
     {
         MasterTables.GetOrAdd(langCode, new ConcurrentDictionary <EntitiesAlias, object>());
     }
     if (!MasterTables[langCode].ContainsKey(entity))
     {
         MasterTables[langCode].GetOrAdd(entity, _commands.GetMasterTableObject(langCode, entity));
     }
     else if (MasterTables[langCode][entity] == null || forceUpdate)
     {
         MasterTables[langCode].AddOrUpdate(entity, _commands.GetMasterTableObject(langCode, entity));
     }
     return(MasterTables[langCode][entity]);
 }
Beispiel #3
0
 public static object GetMasterTableObject(EntitiesAlias entity, bool forceUpdate = false)
 {
     return(CoreCache.GetMasterTableObject(ActiveUser.LangCode, entity, forceUpdate));
 }
Beispiel #4
0
        /// <summary>
        /// Gets column validtions based on the table name
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>

        public static IList <ValidationRegEx> GetValidationRegExpsByEntityAlias(EntitiesAlias entity, bool forceUpdate = false)
        {
            return(CoreCache.GetValidationRegExpsByEntityAlias(ActiveUser.LangCode, entity, forceUpdate));
        }
Beispiel #5
0
        /// <summary>
        /// Gets list of grid coulmn settings based on the entity name
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>

        public static IList <ColumnSetting> GetGridColumnSettingsByEntityAlias(EntitiesAlias entity, bool forceUpdate, bool isGridSetting)
        {
            return(CoreCache.GetGridColumnSettingsByEntityAlias(ActiveUser.LangCode, entity, forceUpdate, isGridSetting));
        }
Beispiel #6
0
        /// <summary>
        /// Gets list of page information
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>

        public static IList <PageInfo> GetPageInfos(EntitiesAlias entity, bool forceUpdate = false)
        {
            return(CoreCache.GetPageInfos(ActiveUser.LangCode, entity, forceUpdate));
        }
Beispiel #7
0
 internal static IList <ValidationRegEx> GetValidationRegExpsByEntityAlias(string langCode, EntitiesAlias entity, bool forceUpdate = false)
 {
     if (!ValidationRegExpressions.ContainsKey(langCode))
     {
         ValidationRegExpressions.GetOrAdd(langCode, new ConcurrentDictionary <EntitiesAlias, IList <ValidationRegEx> >());
     }
     if (!ValidationRegExpressions[langCode].ContainsKey(entity))
     {
         ValidationRegExpressions[langCode].GetOrAdd(entity, _commands.GetValidationRegExpsByEntityAlias(langCode, entity));
     }
     else if (!ValidationRegExpressions[langCode][entity].Any() || forceUpdate)
     {
         ValidationRegExpressions[langCode].AddOrUpdate(entity, _commands.GetValidationRegExpsByEntityAlias(langCode, entity));
     }
     return(ValidationRegExpressions[langCode][entity]);
 }
Beispiel #8
0
 public IQueryable <ColumnSetting> GridColumnSettings(EntitiesAlias entity, bool forceUpdate = false, bool isGridSetting = false)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.GetGridColumnSettingsByEntityAlias(entity, forceUpdate, isGridSetting).AsQueryable());
 }
Beispiel #9
0
 public static bool CheckRecordUsed(string allRecordIds, EntitiesAlias entity)
 {
     return(_commands.CheckRecordUsed(allRecordIds, entity));
 }
Beispiel #10
0
 public bool CheckRecordUsed(string allRecordIds, EntitiesAlias entity)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.CheckRecordUsed(allRecordIds, entity));
 }
Beispiel #11
0
 public IQueryable <LookupReference> GetRefLookup(EntitiesAlias entitiesAlias)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.GetRefLookup(entitiesAlias).AsQueryable());
 }
Beispiel #12
0
 public UserColumnSettings UserColumnSettings(EntitiesAlias entity)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.GetUserColumnSettings(entity));
 }
Beispiel #13
0
 public object GetMasterTableObject(EntitiesAlias entity, bool forceUpdate = false)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.GetMasterTableObject(entity, forceUpdate));
 }
Beispiel #14
0
 public IQueryable <ValidationRegEx> GetValidationRegExpsByEntityAlias(EntitiesAlias entity, bool forceUpdate = false)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.GetValidationRegExpsByEntityAlias(entity, forceUpdate).AsQueryable());
 }
Beispiel #15
0
        /// <summary>
        /// Gets user coulmn settings based on the entity name
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>

        #endregion Cached Results

        public static UserColumnSettings GetUserColumnSettings(EntitiesAlias entity)
        {
            return(_commands.GetUserColumnSettings(ActiveUser.UserId, entity));
        }
Beispiel #16
0
 public static IList <LookupReference> GetRefLookup(EntitiesAlias entitiesAlias)
 {
     return(_commands.GetRefLookup(ActiveUser, entitiesAlias));
 }
Beispiel #17
0
 internal static IList <ColumnSetting> GetGridColumnSettingsByEntityAlias(string langCode, EntitiesAlias entity, bool forceUpdate = false, bool isGridSetting = false)
 {
     if (!GridColumnSettings.ContainsKey(langCode))
     {
         GridColumnSettings.GetOrAdd(langCode, new ConcurrentDictionary <EntitiesAlias, IList <ColumnSetting> >());
     }
     if (!GridColumnSettings[langCode].ContainsKey(entity))
     {
         GridColumnSettings[langCode].GetOrAdd(entity, _commands.GetGridColumnSettingsByEntityAlias(langCode, entity, isGridSetting));
     }
     else if (!GridColumnSettings[langCode][entity].Any() || forceUpdate)
     {
         GridColumnSettings[langCode].AddOrUpdate(entity, _commands.GetGridColumnSettingsByEntityAlias(langCode, entity, isGridSetting));
     }
     return(GridColumnSettings[langCode][entity]);
 }
Beispiel #18
0
 public static UserSecurity GetUserPageOptnLevelAndPermission(long userId, long orgId, long roleId, EntitiesAlias entity)
 {
     return(_commands.GetUserPageOptnLevelAndPermission(userId, orgId, roleId, entity, ActiveUser));
 }
Beispiel #19
0
 public IQueryable <PageInfo> GetPageInfos(EntitiesAlias entity, bool forceUpdate = false)
 {
     _command.ActiveUser = ActiveUser;
     return(_command.GetPageInfos(entity, forceUpdate).AsQueryable());
 }