Beispiel #1
0
        public List <Country> GetSearchCountryInfo(string countryName)
        {
            var result  = CountryGateway.IsCountryExist(countryName);
            var country = countryGateway.GetSearchCountryInfo(countryName);

            if (result.CountryAbout != null && country.Count == 0)
            {
                return(new List <Country>()
                {
                    new Country {
                        CountryName = countryName, NoOfCityDwellers = 0, NoOfCity = 0, CountryAbout = result.CountryAbout
                    }
                });
            }
            else if (result.CountryAbout == null && country.Count == 0)
            {
                return(null);
            }
            else
            {
                return(country);
            }
        }
 public List <CountryView> GetAllCountry()
 {
     return(CountryGateway.GetAllCountry());
 }
Beispiel #3
0
        public int Save(Country country)
        {
            CountryGateway countryGateway = new CountryGateway();

            return(countryGateway.Save(country));
        }
Beispiel #4
0
        public List <ViewCountryByName> GetCountriesOnLoad()
        {
            CountryGateway countryGateway = new CountryGateway();

            return(countryGateway.GetCountriesOnLoad());
        }
Beispiel #5
0
        public List <ViewCountryByName> GetCountryByName(string countryName)
        {
            CountryGateway countryGateway = new CountryGateway();

            return(countryGateway.GetCountryByName(countryName));
        }
Beispiel #6
0
        public List <Country> GetAllCountry()
        {
            CountryGateway countryGateway = new CountryGateway();

            return(countryGateway.GetAllCountry());
        }