public CollectionExportOptions(bool isFilesCollection, int?selectedItemsCount) { var exportFormatTypes = new HashSet <string> { "JSON file", "Excel spreadsheet", "CSV file" }; if (isFilesCollection) { exportFormatTypes.Add("Stored files"); } ExportFormatOptions = exportFormatTypes; var recordsFilterOptions = new HashSet <string> { "All records" }; if (selectedItemsCount.HasValue) { recordsFilterOptions.Add($"Selected records ({selectedItemsCount})"); } RecordsFilterOptions = recordsFilterOptions; RecordsFilter = RecordsFilterOptions.FirstOrDefault(); }
public int GetSelectedRecordsFilter() { return(RecordsFilterOptions.IndexOf(RecordsFilter)); }