private void btnUpdateArcGroup_Click(object sender, RoutedEventArgs e) { BizArcRelationship biz = new BizArcRelationship(); foreach (var item in dtgArcGroup.ItemsSource as List <ArcRelationshipGroupDTO> ) { item.TableDrivedEntityID = TableDrivedEntityID; } biz.SaveArcRelationshipGroup(dtgArcGroup.ItemsSource as List <ArcRelationshipGroupDTO>); SetArcGroupGrid(); }
private void SetArcGroupGrid() { BizArcRelationship biz = new BizArcRelationship(); dtgArcGroup.ItemsSource = biz.GetArcRelationshipGroups(TableDrivedEntityID); //روابط هر دو طرف تکرار میشوند BizRelationship bizRelationship = new BizRelationship(); BizTableDrivedEntity bizTableDrivedEntity = new BizTableDrivedEntity(); var entity = bizTableDrivedEntity.GetTableDrivedEntity(TableDrivedEntityID, EntityColumnInfoType.WithSimpleColumns, EntityRelationshipInfoType.WithRelationships); var listRelationships = entity.Relationships; var rel = dtgArcRelationships.Columns[0] as GridViewComboBoxColumn; rel.ItemsSource = listRelationships; rel.DisplayMemberPath = "Name"; rel.SelectedValueMemberPath = "ID"; }