internal Tk5ListTableData(Tk5TableScheme table, ITableOutput tableOutput) { HiddenList = (from item in table.List where item.InternalControl.SrcControl == ControlType.Hidden select item).ToList(); TableList = (from item in table.List where IsShowField(item) && (item.ListDetail == null || item.ListDetail.Search != FieldSearchMethod.Only) orderby item.InternalControl.Order select item).ToList(); TableName = table.TableName; TableDesc = table.TableDesc; QueryFields = (from item in table.List where IsShowField(item) && item.ListDetail != null && item.ListDetail.Search != FieldSearchMethod.False orderby item.InternalControl.Order select item).ToList(); JsonFieldList fieldList = new JsonFieldList(TableName, QueryFields) { SearchMethod = SearchControlMethod.Id, JsonType = JsonObjectType.Object }; JsonFields = fieldList.ToJsonString(); NameField = table.NameField; fTableOutput = tableOutput; }
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); }