public DbDetailStatListSource(IBaseDbConfig config, IConfigCreator <TableResolver> mainResolver, ChildTableInfoConfig childInfoConfig) : base(childInfoConfig.Stat) { TkDebug.AssertArgumentNull(config, "config", null); TkDebug.AssertArgumentNull(mainResolver, "mainResolver", null); TkDebug.AssertArgumentNull(childInfoConfig, "childInfoConfig", null); SetConfig(config); fChildInfo = new ChildTableInfo(this, childInfoConfig); // 子列表不该占有主配置的数据权限 //if (config.DataRight != null) //{ // SupportData = config.SupportData; // DataRight = config.DataRight.CreateObject(fChildInfo.Resolver); //} // 子列表不该占有功能权限 FunctionType = FunctionRightType.None; OrderBy = fChildInfo.Relation.OrderBy; FilterSql = fChildInfo.Relation.FilterSql; MainResolver = fChildInfo.Resolver; fMasterResolver = mainResolver.CreateObject(this); if (childInfoConfig.Operators != null) { Operators = childInfoConfig.Operators.CreateObject(); } }
public MultipleDbInsertSource(IBaseDbConfig config) : this() { TkDebug.AssertArgumentNull(config, "config", null); SetConfig(config); IMultipleResolverConfig multiple = config as IMultipleResolverConfig; if (multiple != null) { SetMainResolver(multiple.MainResolver.CreateObject(this)); if (multiple.ChildResolvers != null) { foreach (var item in multiple.ChildResolvers) { AddDetailTableResolver(item.Resolver.CreateObject(this), item.IsNewEmptyRow); } } } if (config.DataRight != null) { SupportData = config.SupportData; DataRight = config.DataRight.CreateObject(MainResolver); } IEditDbConfig totalConfig = config as IEditDbConfig; if (totalConfig != null) { UseMetaData = totalConfig.UseMetaData; } }
protected void SetConfig(IBaseDbConfig config) { TkDebug.AssertArgumentNull(config, "config", this); if (!string.IsNullOrEmpty(config.Context)) { Context = DbContextUtil.CreateDbContext(config.Context); } }
protected BaseMultipleDbSource(IBaseDbConfig config) : base(config) { IMultipleResolverConfig multiple = config.Convert <IMultipleResolverConfig>(); if (multiple.ChildResolvers != null) { foreach (var item in multiple.ChildResolvers) { ChildTableInfo info = new ChildTableInfo(this, item); AddChildTable(info); } } }
protected BaseSingleDbSource(IBaseDbConfig config) { TkDebug.AssertArgumentNull(config, "config", null); SetConfig(config); MainResolver = DbConfigUtil.CreateSingleTableResolver(config, this); if (config.DataRight != null) { SupportData = config.SupportData; DataRight = config.DataRight.CreateObject(MainResolver); } if (config.FunctionRight != null) { FunctionKey = config.FunctionRight.FunctionKey; FunctionType = config.FunctionRight.FunctionType; } }
internal SingleDbDelInsSource(IBaseDbConfig config) : base(config) { }