Esempio n. 1
0
        public static Province GetProvinceByID(string provinceID)
        {
            DictItem dictItemByID = DictItemService.GetDictItemByID(provinceID);

            if (dictItemByID != null)
            {
                return(new Province
                {
                    ProvinceID = dictItemByID.ItemID,
                    ProvinceName = dictItemByID.Title,
                    Sequence = dictItemByID.Sequence
                });
            }
            return(null);
        }
Esempio n. 2
0
        public static City GetCityByID(string cityID)
        {
            DictItem dictItemByID = DictItemService.GetDictItemByID(cityID);

            if (dictItemByID != null)
            {
                return(new City
                {
                    CityID = dictItemByID.ItemID,
                    CityName = dictItemByID.Title,
                    ProvinceID = dictItemByID.ParentItemID,
                    Sequence = dictItemByID.Sequence
                });
            }
            return(null);
        }
Esempio n. 3
0
        public static string GetAddress(IList <string> ids)
        {
            if (ids == null || ids.Count < 1)
            {
                return("");
            }
            string text = string.Empty;

            foreach (string current in ids)
            {
                if (!StringHelper.isNullOrEmpty(current))
                {
                    DictItem dictItemByID = DictItemService.GetDictItemByID(current);
                    if (dictItemByID != null)
                    {
                        text = text + dictItemByID.Title + " ";
                    }
                }
            }
            return(text);
        }