コード例 #1
0
        public static IList <Province> GetAllProvince()
        {
            IList <Province> list = new List <Province>();

            foreach (DictItem current in DictItemService.GetDictItemsBy("DISTINCT_0", "Sequence", false))
            {
                list.Add(new Province
                {
                    ProvinceID   = current.ItemID,
                    ProvinceName = current.Title,
                    Sequence     = current.Sequence
                });
            }
            return(list);
        }
コード例 #2
0
        public static IList <City> GetCitiesByProvince(string provinceID)
        {
            IList <City> list = new List <City>();

            foreach (DictItem current in DictItemService.GetDictItemsBy(provinceID, "Sequence", false))
            {
                list.Add(new City
                {
                    CityID     = current.ItemID,
                    CityName   = current.Title,
                    Sequence   = current.Sequence,
                    ProvinceID = provinceID
                });
            }
            return(list);
        }