Exemplo n.º 1
0
        public static List <string> GetCountry(string ConnectionString)
        {
            UserSessionFacade    fac        = new UserSessionFacade(ConnectionString);
            List <CountryEntity> lstCountry = fac.GetCountries();
            var Country = (from a in lstCountry select a.CountryWithISOCode).Distinct().ToList();

            return(Country);
        }
Exemplo n.º 2
0
        public static SelectList GetAllCountry(string ConnectionString)
        {
            UserSessionFacade     fac           = new UserSessionFacade(ConnectionString);
            List <CountryEntity>  lstCountry    = fac.GetCountries();
            List <SelectListItem> lstAllCountry = new List <SelectListItem>();

            foreach (var item in lstCountry)
            {
                lstAllCountry.Add(new SelectListItem {
                    Value = item.ISOAlpha2Code, Text = item.CountryWithISOCode
                });
            }
            return(new SelectList(lstAllCountry, "Value", "Text"));
        }