private async void DoSearchTans(object obj) { try { if (obj != null) { var conrol = (Telerik.Windows.Controls.RadGridView)obj; foreach (Telerik.Windows.Controls.GridViewColumn column in conrol.Columns) { column.ClearFilters(); } } WorkInProgress = true; BatchTans = new ObservableCollection <BatchTanVM>(); if (SelectedBatches.Any()) { var result = await RestHub.TansFromBatches(SelectedBatches.Select(b => b.Name).ToList(), 100); if (result.UserObject != null) { var tans = (List <BatchTanDto>)result.UserObject; foreach (var tan in tans) { BatchTans.Add(new BatchTanVM { Id = tan.Id, BatchNum = tan.BatchNumber, TanNumber = tan.TanNumber, TanCategory = new TanCategoryVM { Value = (int)tan.TanCategory, Description = tan.TanCategory.DescriptionAttribute() }, TanType = tan.TanType, Nums = tan.Nums, Rxns = tan.Rxns, Curator = tan.Curator, Reviewer = tan.Reviewer, QC = tan.QC, TanState = tan.TanState, CurrentRole = tan.CurrentRole, Version = tan.Version, Stages = tan.Stages, NearToTargetDate = tan.NearToTargetDate, IsDoubtRaised = tan.IsDoubtRaised.ToString(), TargetedDate = tan.TargetDate, ProcessingNote = tan.ProcessingNote }); } BatchTans.UpdateDisplayOrder(); BatchTansView = new ListCollectionView(BatchTans); } else { AppInfoBox.ShowInfoMessage("Can't Load TANs . ."); } } else { AppInfoBox.ShowInfoMessage("From Batch, To Batch, Category Are Required . ."); } UpdateSummary(BatchTans); } catch (Exception ex) { Log.This(ex); } WorkInProgress = false; }