예제 #1
0
        public List <Region> GetAllRegions()
        {
            List <Region>      regions = new List <Region>();
            RegionTableAdapter adapter = new RegionTableAdapter();

            MultiLingualData.RegionDataTable table = adapter.GetAllRegions();
            foreach (MultiLingualData.RegionRow row in table)
            {
                regions.Add(MultiLingualHelper.ToRegionDTO(row));
            }
            return(regions);
        }
예제 #2
0
        public Region GetRegion(string regionCode)
        {
            if (string.IsNullOrEmpty(regionCode))
            {
                return(new Region());
            }
            RegionTableAdapter adapter = new RegionTableAdapter();

            MultiLingualData.RegionDataTable table = adapter.GetRegion(regionCode);
            if (table.Count == 0)
            {
                return(new Region());
            }
            return(MultiLingualHelper.ToRegionDTO(table[0]));
        }