Пример #1
0
 public StandardDbCodeTable(string tableName)
     : base(new StandardCodeTableScheme(tableName))
 {
     fAttribute = new CodeTableAttribute();
     fAttribute.SetDefaultValue(tableName);
     OrderBy = DEFAULT_ORDER;
 }
Пример #2
0
 public CodeDataCodeTable(CodeDataConfigItem config)
 {
     fAttribute = new CodeTableAttribute(config);
     if (config.RowList != null)
     {
         foreach (var item in config.RowList)
         {
             Add(item.Convert());
         }
     }
 }
Пример #3
0
 internal SqlCodeTable(SqlCodeTableConfig config)
     : this(config.Sql)
 {
     fAttribute  = new CodeTableAttribute(config);
     ContextName = config.Context;
     if (config.CacheDependency != null)
     {
         fDependency = config.CacheDependency.CreateObject();
     }
     else
     {
         fDependency = NoDependency.Dependency;
     }
 }
Пример #4
0
        internal StandardDbCodeTable(StandardCodeTableConfig config)
            : base(new StandardCodeTableScheme(config.TableName))
        {
            fAttribute = new CodeTableAttribute(config);

            if (string.IsNullOrEmpty(config.OrderBy))
            {
                OrderBy = DEFAULT_ORDER;
            }
            else
            {
                OrderBy = config.OrderBy;
            }
            ContextName = config.Context;
            FilterSql   = config.FilterSql;
            if (!string.IsNullOrEmpty(config.NameExpression))
            {
                NameExpression = config.NameExpression;
            }
        }
Пример #5
0
 internal Tk5DbCodeTable(Tk5CodeTableConfig config)
     : base(Tk5DataXml.Create(config.DataXml))
 {
     fDataXml    = (Tk5DataXml)Scheme;
     fAttribute  = new CodeTableAttribute(config);
     ContextName = config.Context;
     OrderBy     = config.OrderBy;
     FilterSql   = config.FilterSql;
     if (!string.IsNullOrEmpty(config.NameExpression))
     {
         NameExpression = config.NameExpression;
     }
     if (config.CacheDependency != null)
     {
         fDependency = config.CacheDependency.CreateObject();
     }
     else
     {
         fDependency = NoDependency.Dependency;
     }
 }