public StdCodeTableDetailSource(StdCodeTableSourceConfig config, string tableName) { if (!string.IsNullOrEmpty(config.Context)) { Context = DbContextUtil.CreateDbContext(config.Context); } MainResolver = config.CreateTableRsolver(this, tableName); UseMetaData = false; }
public StdCodeTableDeleteSource(StdCodeTableSourceConfig config, string tableName) { if (!string.IsNullOrEmpty(config.Context)) { Context = DbContextUtil.CreateDbContext(config.Context); } MainResolver = config.CreateTableRsolver(this, tableName); fTableName = tableName; }
public StdCodeTableListSource(StdCodeTableSourceConfig config, string tableName) { if (!string.IsNullOrEmpty(config.Context)) { Context = DbContextUtil.CreateDbContext(config.Context); } MainResolver = config.CreateTableRsolver(this, tableName); UseMetaData = false; PageSize = int.MaxValue; SortQuery = true; OrderBy = "ORDER BY " + DecoderConst.DEFAULT_ORDER; if (config.UseQueryString) { var operators = new StandardOperatorsConfig { Right = new SimpleListOperateRightConfig { Operators = UpdateKind.All }, Operators = new List <IConfigCreator <OperatorConfig> >() }; var url = new MarcoConfigItem(true, true, string.Format("~/c/{{ModuleCreator}}/insert/{{CcSource}}?{0}={{#{0}}}", config.TableName)); operators.Operators.Add(new OperatorConfig(RightConst.INSERT, "新建", OperatorPosition.Global, "Dialog", null, "icon-plus", url)); url = new MarcoConfigItem(true, true, string.Format("~/c/{{ModuleCreator}}/update/{{CcSource}}?{0}={{#{0}}}", config.TableName)); operators.Operators.Add(new OperatorConfig(RightConst.UPDATE, "修改", OperatorPosition.Row, "Dialog", null, "icon-edit", url) { UseKey = true }); operators.Operators.Add(OperatorConfig.DeleteOperator); Operators = operators; } else { var pinyinOper = config.AutoPinyin ? DataString.AutoPinyinOperator : string.Empty; string oper = string.Format(ObjectUtil.SysCulture, DataString.StdCodeOperators, pinyinOper); var operators = oper.ReadXmlFromFactory <IConfigCreator <IOperatorsConfig> >(OperatorsConfigFactory.REG_NAME); Operators = operators.CreateObject(); } }
private static string GetModuleCreator(StdCodeTableSourceConfig config) { return(string.IsNullOrEmpty(config.ModuleCreator) ? string.Empty : "/" + config.ModuleCreator); }
public ChangeDelSource(StdCodeTableSourceConfig config, string tableName, string status) : base((source) => config.CreateTableRsolver(source, tableName), "Del", status) { fTableName = tableName; }
public PinyinSource(StdCodeTableSourceConfig config, string tableName) { fResolver = config.CreateTableRsolver(this, tableName); }