void Search() { var searchCriteria = Criteria.BuildCriteria(); if (searchCriteria != null) { try { if (CachedData == null) { RefreshData(); } if (CachedData != null) { var result = CachedData.Where(searchCriteria.Compile()).OrderBy(x => x.PropertyNo).ThenBy(x => x.DateDue); SearchResult = new ObservableCollection <PeriodSchedule>(result); } } catch (Exception ex) { string msg = Helper.ProcessExceptionMessages(ex); Helper.ShowMessage(msg); } } }