/// <summary> /// Get the list of the countrises. /// </summary> /// <returns></returns> private async Task <List <CountryViewData> > GetCountries() { CountryResultData countryResultData = await WebApiClient.GetAsync <CountryResultData>(Constant.WebApiControllerOffices, Constant.WebApiCountryList); List <CountryViewData> countriesList = new List <CountryViewData>(); if (countryResultData == null || !countryResultData.OperationSuccess || countryResultData.CountryDtoList == null) { return(countriesList); } foreach (var countryDto in countryResultData.CountryDtoList) { CountryViewData country = new CountryViewData { TranslationsList = new List <CountryTranslationItemData>(), Country = countryDto }; country.TranslationsList = await GetCountryTranslations(countryDto.CountryId); countriesList.Add(country); } return(countriesList); }
/// <summary> /// Get country IFCL /// </summary> /// <param name="countryCode">the country code to retrive</param> /// <returns></returns> public async Task <ActionResult> GetCountry(string countryCode) { CountryViewData countryViewData = await FindCountriesByCode(countryCode); return(View("Partial/_Country", countryViewData)); }