private TableColumn(TableTemplateBase template, DataTable table) : base(template.Domain, table) { this.template = template; }
public static async Task <TableColumn> CreateAsync(Authentication authentication, TableTemplateBase template, DataTable table) { var domain = template.Domain; var tuple = await domain.DataDispatcher.InvokeAsync(() => { var column = new TableColumn(template, table); var query = from DataRow item in table.Rows where (item.RowState == DataRowState.Deleted || item.RowState == DataRowState.Detached) == false select item.Field <string>(CremaSchema.ColumnName); var newName = NameUtility.GenerateNewName("Column", query); return(column, newName); }); await tuple.column.SetFieldAsync(authentication, CremaSchema.ColumnName, tuple.newName); return(tuple.column); }
public TableColumn(TableTemplateBase template, DataRow row) : base(template.Domain, row) { this.template = template; }