// TODO: WEBSITE FILTER bool ModelBatchPropertyFilter(BatchMeasureModel batchMeasure) { if (batchMeasure == null) { return(false); } if (Model.BatchSelectedProperty == ModelPropertyFilterValues.NONE) { return(true); } if (Model.BatchSelectedProperty == ModelPropertyFilterValues.MEASURE_CODE) { return(batchMeasure.ProxyWebsiteMeasure.ReportMeasure.MeasureCode.ToLower().Contains(Model.BatchPropertyFilterText.ToLower())); //return batchMeasure.ProxyMeasureModel.Measure.MeasureCode.ToLower().Contains(Model.BatchPropertyFilterText.ToLower()); } if (Model.BatchSelectedProperty == ModelPropertyFilterValues.MEASURE_NAME) { return(batchMeasure.ProxyWebsiteMeasure.ReportMeasure.MeasureTitle.Clinical.ToLower().Contains(Model.BatchPropertyFilterText.ToLower())); //return batchMeasure.ProxyMeasureModel.Measure.MeasureTitle.Clinical.ToLower().Contains(Model.BatchPropertyFilterText.ToLower()); } // if (Model.SelectedProperty == ModelPropertyFilterValues.TOPIC_NAME) // { // return batchMeasure.ProxyWebsiteMeasure.ReportMeasure.Topics.Any(t => t.Name.ToLower().Contains(Model.BatchPropertyFilterText.ToLower()) || t.Owner.ToString().ToLower().Contains(Model.BatchPropertyFilterText.ToLower())); // return batchMeasure.ProxyMeasureModel.Measure.Topics.Any(t => t.Name.ToLower().Contains(Model.BatchPropertyFilterText.ToLower()) || t.Owner.ToString().ToLower().Contains(Model.BatchPropertyFilterText.ToLower())); // } // if (Model.SelectedProperty == ModelPropertyFilterValues.WEBSITE_NAME) // { // var WebsiteDataService = ServiceLocator.Current.GetInstance<IWebsiteDataService>(); // var websiteNames = WebsiteDataService.GetWebsiteNamesForMeasure(batchMeasure.ProxyWebsiteMeasure.OriginalMeasure.Id); // var websiteNames = WebsiteDataService.GetWebsiteNamesForMeasure(batchMeasure.ProxyMeasureModel.OriginalMeasure.Id); // return string.Join(", ", websiteNames).ToLower().Contains(Model.BatchPropertyFilterText.ToLower()); // // } return(true); }
bool ModelBatchDatasetFilter(BatchMeasureModel batchMeasure) { return(batchMeasure != null && batchMeasure.ProxyWebsiteMeasure.ReportMeasure.Owner.Name == Model.BatchSelectedDataSet); //return batchMeasure != null && batchMeasure.ProxyMeasureModel.Measure.Owner.Name == Model.BatchSelectedDataSet; }