internal CremaDataColumnCollection(InternalDataTable table) { this.table = table; this.itemList = table.ColumnList; this.columns = table.Columns; this.columns.CollectionChanged += Columns_CollectionChanged; }
public void AddTable(InternalDataTable dataTable) { this.ValidateAddTable(dataTable); this.Tables.Add(dataTable); foreach (var item in dataTable.ChildItems) { this.Tables.Add(item); } }
internal CremaChildTableCollection(InternalDataTable table) { this.table = table; this.itemList = table.ChildItems; if (this.itemList is INotifyCollectionChanged childs) { childs.CollectionChanged += Childs_CollectionChanged; } }
public InternalDataTable AddTable(string name, string categoryPath) { var dataTable = new InternalDataTable(name, categoryPath); var signatureDate = this.Sign(); this.Tables.Add(dataTable); dataTable.InternalCreationInfo = signatureDate; dataTable.InternalModificationInfo = signatureDate; return(dataTable); }
internal CremaDataTable(InternalDataTable table) { this.InternalObject = table; this.builder = new CremaDataRowBuilder(this); this.Columns = new CremaDataColumnCollection(this.InternalObject); this.Attributes = new CremaAttributeCollection(this.InternalObject); this.Rows = new CremaDataRowCollection(this.InternalObject); this.Childs = new CremaChildTableCollection(this.InternalObject); this.AttachEventHandlers(); }
public bool CanRemoveTable(InternalDataTable dataTable) { if (dataTable == null) { return(false); } if (dataTable.DataSet != this) { return(false); } if (dataTable.ParentName != string.Empty && dataTable.TemplatedParentName != string.Empty) { return(false); } return(true); }
public void RemoveTable(InternalDataTable dataTable) { this.ValidateRemoveTable(dataTable); this.Sign(); if (dataTable.ParentName != string.Empty) { var derivedItems = dataTable.DerivedItems.ToArray(); foreach (var item in derivedItems) { this.Tables.Remove(item); } } foreach (var item in dataTable.ChildItems) { this.Tables.Remove(item); } this.Tables.Remove(dataTable); }
public InternalDataTable AddTable(TableInfo tableInfo) { this.ValidateAddTable(tableInfo); var dataTable = new InternalDataTable(tableInfo.TableName, tableInfo.CategoryPath) { InternalTableID = tableInfo.ID, InternalTags = tableInfo.Tags, InternalComment = tableInfo.Comment }; this.Tables.Add(dataTable); for (var i = 0; i < tableInfo.Columns.Length; i++) { dataTable.AddColumn(tableInfo.Columns[i]); } dataTable.InternalCreationInfo = tableInfo.CreationInfo; dataTable.InternalModificationInfo = tableInfo.ModificationInfo; dataTable.InternalContentsInfo = tableInfo.ContentsInfo; dataTable.AcceptChanges(); return(dataTable); }
/// <summary> /// 4개 단위로 인자를 설정해야 함 /// dataType, columnName, isKey, isUnique 순으로 /// </summary> public static string GenerateHashValue(params object[] args) { return(InternalDataTable.GenerateHashValue(args)); }
public static string GenerateHashValue(params ColumnInfo[] columns) { return(InternalDataTable.GenerateHashValue(columns)); }
internal CremaDataRowCollection(InternalDataTable table) { this.table = table; this.rows = table.Rows; this.itemList = table.RowList; }