void ShowFilter(FilterItem filterItem, CustomFilterViewModel filterViewModel, Action onSave) { if (FilterDialogService.ShowDialog(MessageButton.OKCancel, "Create Custom Filter", "CustomFilterView", filterViewModel) != MessageResult.OK) { return; } filterItem.FilterCriteria = filterViewModel.FilterCriteria; filterItem.Name = filterViewModel.FilterName; ActiveFilterItem = filterItem; if (filterViewModel.Save) { onSave(); UpdateFilters(); } }
void ShowFilter(FilterItem filterItem, CustomFilterViewModel filterViewModel, Action onSave) { try { if (FilterDialogService.ShowDialog(MessageButton.OKCancel, "Crear Filtro Persnalizado", "CustomFilterView", filterViewModel) != MessageResult.OK) { return; } filterItem.FilterCriteria = filterViewModel.FilterCriteria; filterItem.Name = filterViewModel.FilterName; ActiveFilterItem = filterItem; if (filterViewModel.Save) { onSave(); UpdateFilters(); } } catch (Exception ex) { throw new Exception(ex.Message); } }