//private void DtgColumns_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e) //{ // if (e.DataElement is EntityDataMenuColumnsDTO) // { // var data = (e.DataElement as EntityDataMenuColumnsDTO); // if (data.vwValueColumns == null || data.vwValueColumns.Count == 0) // SetColumns(data); // } //} //private void DtgConditions_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e) //{ // if (e.Cell.Column == colRelationshipTail) // { // if (e.Cell.DataContext is EntityDataMenuColumnsDTO) // { // var condition = (e.Cell.DataContext as EntityDataMenuColumnsDTO); // SetColumns(condition); // } // } //} //private void SetColumns(EntityDataMenuColumnsDTO condition) //{ // colColumns.DisplayMemberPath = "Name"; // colColumns.SelectedValueMemberPath = "ID"; // BizTableDrivedEntity biz = new BizTableDrivedEntity(); // if (condition.RelationshipTailID == 0) // { // var entity = biz.GetTableDrivedEntity(MyProjectManager.GetMyProjectManager.GetRequester(), EntityID, EntityColumnInfoType.WithSimpleColumns, EntityRelationshipInfoType.WithoutRelationships); // condition.vwValueColumns = entity.Columns; ; // } // else // { // var relationshipTail = bizEntityRelationshipTail.GetEntityRelationshipTail(MyProjectManager.GetMyProjectManager.GetRequester(), condition.RelationshipTailID); // var entity = biz.GetTableDrivedEntity(MyProjectManager.GetMyProjectManager.GetRequester(), relationshipTail.TargetEntityID, EntityColumnInfoType.WithSimpleColumns, EntityRelationshipInfoType.WithoutRelationships); // condition.vwValueColumns = entity.Columns; // } //} private void SetItems() { List <EntityRelationshipTailDataMenuItemsDTO> items = new List <EntityRelationshipTailDataMenuItemsDTO>(); items.Add(new EntityRelationshipTailDataMenuItemsDTO() { Path = EntityRelationshipTail.RelationshipIDPath, EntityName = EntityRelationshipTail.InitialiEntityAlias, TableDrivedEntityID = EntityRelationshipTail.InitialEntityID }); if (EntityRelationshipTail.ChildTail != null) { SetItems(items, EntityRelationshipTail.ChildTail); } foreach (var item in items) { if (item.TableDrivedEntityID != 0) { item.tmpDataMenus = bizEntityDataMenu.GetDataMenuSettings(MyProjectManager.GetMyProjectManager.GetRequester(), item.TableDrivedEntityID); } } dtgColumns.ItemsSource = items; }
private void LokSecondSideEntity_SelectionChanged(object sender, SelectionChangedArg e) { if (e.SelectedItem != null) { var entity = e.SelectedItem as TableDrivedEntityDTO; var listSecond = bizEntityDataMenu.GetDataMenuSettings(MyProjectManager.GetMyProjectManager.GetRequester(), entity.ID); lokSecondDataMenu.ItemsSource = listSecond; lokSecondDataMenu.SelectedValueMember = "ID"; lokSecondDataMenu.DisplayMember = "Name"; if (Message.ID != 0) { lokSecondDataMenu.SelectedValue = Message.SecondSideDataMenuID; } } else { lokSecondDataMenu.ItemsSource = null; } }
private void SetRelationshipDataMenus(DR_Requester dR_Requester, int entityID2) { var list = bizDataMenuSetting.GetDataMenuSettings(MyProjectManager.GetMyProjectManager.GetRequester(), entityID2); lokDataMenuSetting.DisplayMember = "Name"; lokDataMenuSetting.SelectedValueMember = "ID"; lokDataMenuSetting.ItemsSource = list; //if(Message.ID!=0) //{ // lokDataMenuSetting.SelectedValue = Message.TargetDataMenuSettingID; //} }
private void SetDataMenuSetting() { if (lokDataMenuSetting.ItemsSource == null) { lokDataMenuSetting.EditItemClicked += lokDataMenuSetting_EditItemClicked; } BizDataMenuSetting biz = new BizDataMenuSetting(); lokDataMenuSetting.DisplayMember = "Name"; lokDataMenuSetting.SelectedValueMember = "ID"; lokDataMenuSetting.ItemsSource = biz.GetDataMenuSettings(MyProjectManager.GetMyProjectManager.GetRequester(), EntityID); }
private void GetDataMenuSettings() { var listEntityListViews = bizDataMenuSetting.GetDataMenuSettings(MyProjectManager.GetMyProjectManager.GetRequester(), EntityID); dtgItems.ItemsSource = listEntityListViews; }