public Tk5ListMetaData(ITableSchemeEx dataXml, IInputData input, ISingleMetaData config, ITableOutput tableOutput = null) { fTableScheme = config.CreateTableScheme(dataXml, input); SetFileDependency(fTableScheme); Table = new Tk5ListTableData(fTableScheme, tableOutput); }
public Tk5TableScheme(ITableSchemeEx scheme, IInputData input, ISingleMetaData config, Func <ITableSchemeEx, IFieldInfoEx, IInputData, ISingleMetaData, Tk5FieldInfoEx> createFunc) : this() { TkDebug.AssertArgumentNull(scheme, "scheme", null); TkDebug.AssertArgumentNull(input, "input", null); TkDebug.AssertArgumentNull(config, "config", null); TkDebug.AssertArgumentNull(createFunc, "createFunc", null); SetFileDependency(scheme); TableName = scheme.TableName; TableDesc = scheme.TableDesc; NameField = scheme.NameField; PageStyle pageStyle = input.Style.Style; var list = from item in scheme.Fields where (item.Control.DefaultShow & pageStyle) == pageStyle select item; foreach (var item in list) { Tk5FieldInfoEx fieldInfo = createFunc(scheme, item, input, config); fList.Add(fieldInfo); } ProcessRefField(); }
public Tk5NormalTableData(Tk5TableScheme table, ISingleMetaData config, SearchControlMethod method, IPageStyle style) { TkDebug.AssertArgumentNull(table, "table", null); TkDebug.AssertArgumentNull(config, "config", null); TkDebug.AssertArgumentNull(style, "style", null); TableName = table.TableName; TableDesc = table.TableDesc; NameField = table.NameField; ColumnCount = config.ColumnCount; HiddenList = (from item in table.List where item.InternalControl.SrcControl == ControlType.Hidden select item).ToList(); TableList = (from item in table.List where IsShowField(item) orderby item.InternalControl.Order select item).ToList(); HasEditKey = (from item in TableList where item.IsKey select item).Any(); Arrange(TableList); var editFields = from item in table.List where item.InternalControl.SrcControl != ControlType.None && (config.CommitDetail || item.InternalControl.SrcControl != ControlType.Label) select item; JsonFieldList fieldList = new JsonFieldList(TableName, editFields, HasEditKey) { SearchMethod = method, JsonType = config.JsonDataType }; JsonFields = fieldList.ToJsonString(); Style = PageStyleClass.FromStyle(style); }
public static IMetaData CreateVueMetaData(IInputData input, BaseMDSingleMetaDataConfig master, IEnumerable <DetailSingleMetaDataConfig> details) { InputDataProxy proxy; switch (input.Style.Operation) { case "ListVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.List); ISingleMetaData masterMeta = master.CreateSingleMetaData(); var scheme = masterMeta.CreateSourceScheme(input); return(new Tk5ListMetaData(scheme, proxy, masterMeta)); case "InsertVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Insert); return(CreateMultipleMetaData(proxy, master, details)); case "UpdateVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Update); return(CreateMultipleMetaData(proxy, master, details)); case "DetailVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Detail); return(CreateMultipleMetaData(proxy, master, details)); } return(null); }
private static Tk5MultipleMetaData CreateMultipleMetaData(IInputData input, BaseMDSingleMetaDataConfig master, IEnumerable <DetailSingleMetaDataConfig> details) { ISingleMetaData masterMeta = master.CreateSingleMetaData(); return(new Tk5MultipleMetaData(input, EnumUtil.Convert(masterMeta), details)); }
private Tk5TableScheme CreateTableScheme(IInputData input, ISingleMetaData item) { ITableSchemeEx sourceScheme = item.CreateSourceScheme(input); Tk5TableScheme scheme = item.CreateTableScheme(sourceScheme, input); fSchemes.Add(scheme); return(scheme); }
public Tk5SingleNormalMetaData(ITableSchemeEx dataXml, IInputData input, ISingleMetaData config) { TkDebug.AssertArgumentNull(dataXml, "dataXml", null); TkDebug.AssertArgumentNull(input, "input", null); TkDebug.AssertArgumentNull(config, "config", null); ColumnCount = config.ColumnCount; fTableScheme = config.CreateTableScheme(dataXml, input); Files = FileUtil.GetFileDependecy(fTableScheme); Table = new Tk5NormalTableData(fTableScheme, config, SearchControlMethod.Id, input.Style); }
public static IMetaData CreateVueMetaData(IInputData input, ITableSchemeEx scheme, ISingleMetaData singleMeta) { InputDataProxy proxy; switch (input.Style.Operation) { case "ListVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.List); return(new Tk5ListMetaData(scheme, proxy, singleMeta)); case "InsertVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Insert); return(new Tk5SingleNormalMetaData(scheme, proxy, singleMeta)); case "UpdateVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Update); return(new Tk5SingleNormalMetaData(scheme, proxy, singleMeta)); case "DetailVue": proxy = new InputDataProxy(input, (PageStyleClass)PageStyle.Detail); return(new Tk5SingleNormalMetaData(scheme, proxy, singleMeta)); } return(null); }