public frmCreateManyToManyRelationship(int associativeTableID) { InitializeComponent(); TableID = associativeTableID; BizRelationship bizRelationship = new BizRelationship(); dtgList.ItemsSource = bizRelationship.GetRelationshipsByTableID(TableID).Where(x => x.TypeEnum == Enum_RelationshipType.ManyToOne); BizTable bizTable = new BizTable(); var table = bizTable.GetTable(TableID); txtName.Text = table.Name; }
private void SetColumnValueGrid() { // BizColumnValue biz = new BizColumnValue(); ////dtgColumnValues.ItemsSource = biz.GetColumnValues(ColumnID); BizColumn bizColumn = new BizColumn(); var col = dtgColumnValue_Columns.Columns[0] as GridViewComboBoxColumn; col.ItemsSource = bizColumn.GetOtherColums(ColumnID); col.DisplayMemberPath = "Name"; col.SelectedValueMemberPath = "ID"; var rel = dtgColumnValue_Relationships.Columns[0] as GridViewComboBoxColumn; var column = bizColumn.GetColumn(ColumnID, true); BizRelationship bizRelationship = new BizRelationship(); rel.ItemsSource = bizRelationship.GetRelationshipsByTableID(column.TableID); rel.DisplayMemberPath = "Name"; rel.SelectedValueMemberPath = "ID"; }