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); }
public void RemoveTable(InternalDataTable dataTable) { this.ValidateRemoveTable(dataTable); this.Sign(); foreach (var item in dataTable.ChildItems) { this.Tables.Remove(item); } this.Tables.Remove(dataTable); }
internal CremaDataTable(InternalDataTable table) { this.table = table; this.builder = new CremaDataRowBuilder(this); this.columns = new CremaDataColumnCollection(this.table); this.attributes = new CremaAttributeCollection(this.table); this.rows = new CremaDataRowCollection(this.table); this.childs = new CremaChildTableCollection(this.table); this.AttachEventHandlers(); }
public CremaDataTable(string name, string categoryPath) { this.builder = new CremaDataRowBuilder(this); this.table = new InternalDataTable(this, name, categoryPath); this.columns = new CremaDataColumnCollection(this.table); this.attributes = new CremaAttributeCollection(this.table); this.rows = new CremaDataRowCollection(this.table); this.childs = new CremaChildTableCollection(this.table); this.AttachEventHandlers(); }
private void ValidateRemoveTable(InternalDataTable dataTable) { if (dataTable.DataSet != this) { throw new CremaDataException("DataSet에 속해 있지 않은 테이블은 제거할 수 없습니다."); } if (dataTable.Parent != null) { throw new CremaDataException(Resources.Exception_CannotRemoveChildTable); } }
private void ValidateAddTable(InternalDataTable dataTable) { if (dataTable.DataSet != null) { throw new CremaDataException("이미 DataSet에 속해 있는 테이블은 추가할 수 없습니다."); } if (dataTable.Parent != null) { throw new CremaDataException(Resources.Exception_CannotAddChildTable); } }
public bool CanRemoveTable(InternalDataTable dataTable) { if (dataTable == null) { return(false); } if (dataTable.DataSet != this) { return(false); } if (dataTable.Parent != null) { return(false); } return(this.Tables.CanRemove(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); }
internal CremaDataRowCollection(InternalDataTable table) { this.table = table; this.rows = table.Rows; this.itemList = table.RowList; }
/// <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)); }