private void itemsECLDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { long startTicks = PLLog.Trace("Item.Get(avId) Start", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1); double beginTicks; double bindingTicks; double fetchTicks; double firstTicks = startTicks; double frequency = Stopwatch.Frequency; HIS.Library.ItemEC seli = (HIS.Library.ItemEC)((DataGrid)sender).SelectedItem; Guid avId = seli.Id; HIS.Library.Item detailItem = HIS.Library.Item.Get(avId); //IEnumerable<HIS.Library.AttributeValueEC> matches = from av in itemsAll.AttributeValues // where av.ItemId == avId // select av; //attributeValuesECLDataGrid.ItemsSource = matches.ToList(); attributeValuesECLDataGrid.ItemsSource = detailItem.AttributeValues; fetchTicks = PLLog.Trace("Item.Get(avId) End", PLLOG_APPNAME, CLASS_BASE_ERRORNUMBER + 1, startTicks); lblAttributeValueLoadTimeTotal.Content = string.Format("Item.Get(avId) Load Time ({0:f4}) seconds", (fetchTicks - startTicks) / frequency); }
private void itemsECLDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) { HIS.Library.ItemEC seli = (HIS.Library.ItemEC)((DataGrid)sender).SelectedItem; //Guid cvId = Guid.Parse("{EA69AB8E-E1B2-4994-9C80-B56D11E7D8A3}"); Guid avId = seli.Id; IEnumerable <HIS.Library.AttributeValueEC> matches = from av in itemsAll.AttributeValues where av.ItemId == avId select av; attributeValuesECLDataGrid.ItemsSource = matches.ToList(); }