/// <summary> /// Populate Region Counrty Sector Document /// </summary> /// <param name="languageID"></param> public void PopulateSearchFilter(Guid languageID) { //Countries var countries = CountryService.GetCountries(languageID); Countries = new List <KeyValue>(); foreach (var country in countries) { Countries.Add(new KeyValue { Key = country.ID.ToString(), Value = country.Name }); } //this.Countries.Insert(0, new KeyValue { Key = "", Value = "Country" }); //regions var regions = RegionService.GetRegions(languageID).OrderBy(r => r.Region.Type).ThenBy(r => r.Name); this.Regions = new List <GroupedSelectListItem>(); foreach (var region in regions) { this.Regions.Add(new GroupedSelectListItem { GroupKey = region.Region.Type == RegionType.Economical ? "2" : "1", GroupName = region.Region.Type == RegionType.Economical ? "Economical" : "Geographical", Text = region.Name, Value = region.ID.ToString() }); } //this.Regions.Insert(0, new GroupedSelectListItem { GroupKey = "", GroupName = "", Text = "Region", Value = "" }); //Authority Guid authorityID = new Guid(AppSettingsUtility.GetString(AppSettingsKeys.AuthorityVariableID)); var listauthority = SearchServices.GetAuthority(languageID, authorityID); this.Authorities = new List <KeyValue>(); Authorities.Add(new KeyValue { Key = "", Value = "--Select One --" }); foreach (var authorities in listauthority) { Authorities.Add(new KeyValue { Key = authorities.ToString(), Value = authorities.ToString() }); } //Documents Guid documentTypeVariableID = new Guid(AppSettingsUtility.GetString(AppSettingsKeys.DocumentTypeVariableID)); var choiceLanguages = VariableService.GetChoiceOptions(languageID, documentTypeVariableID); this.DocumentTypes = new List <KeyValue>(); foreach (var choiceLanguage in choiceLanguages) { this.DocumentTypes.Add(new KeyValue { Key = choiceLanguage.ID.ToString(), Value = choiceLanguage.Name }); } }