Exemple #1
0
        public static string GetPersianTitle(Type entityType)
        {
            string str = entityType.Name;

            EntityConfigManager.EntityConfig data = CacheManager.GetData(string.Format("__{0}_EntityConfig__", (object)entityType.FullName)) as EntityConfigManager.EntityConfig;
            if (data != null)
            {
                str = data.EntityPersianTitle;
            }
            return(str);
        }
Exemple #2
0
        public static void SetPropertyPersianTitle(Type entityType, string propertyName, string title)
        {
            string key = string.Format("__{0}_EntityConfig__", (object)entityType.FullName);

            EntityConfigManager.EntityConfig entityConfig = CacheManager.GetData(key) as EntityConfigManager.EntityConfig;
            if (entityConfig == null)
            {
                entityConfig = new EntityConfigManager.EntityConfig();
                CacheManager.Add(key, (object)entityConfig);
            }
            entityConfig.SetPropertyTitle(propertyName, title);
        }
Exemple #3
0
        public static string GetPropertyPersianTitle(Type entityType, string propertyName)
        {
            string str = "";

            EntityConfigManager.EntityConfig data = CacheManager.GetData(string.Format("__{0}_EntityConfig__", (object)entityType.FullName)) as EntityConfigManager.EntityConfig;
            if (data != null)
            {
                str = data.GetPropertyTitle(propertyName);
            }
            if (string.IsNullOrWhiteSpace(str))
            {
                str = propertyName;
            }
            return(str);
        }