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.ItemEC2 seli = (HIS.Library.ItemEC2)((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 LoadItemAttributeValues() { HIS.Library.Item item = HIS.Library.Item.Get(Guid.Parse(txtItemId.Text)); attributeValuesECBLBindingSource.DataSource = item.AttributeValues; }