private City GetCity()
        {
            RegionType regionType = ScopeService.Init().RegionCollection.Find(m => m.RegionId == this.RegionId);

            this.CityId     = regionType.CityId;
            this.RegionName = regionType.RegionName;
            return(new City(regionType.CityId));
        }
 public static ScopeService Init()
 {
     if (_Instance == null)
     {
         _Instance = new ScopeService();
     }
     return(_Instance);
 }
Example #3
0
        private Region GetRegion()
        {
            ScopeType scopeType = ScopeService.Init().ScopeCollection.Find(m => m.ScopeId == this.ScopeId);

            this.RegionId  = scopeType.RegionId;
            this.ScopeName = scopeType.ScopeName;
            return(new Region(scopeType.RegionId));
        }
 private IList <RegionType> GetRegion()
 {
     try
     {
         if (string.IsNullOrEmpty(this.CityName))
         {
             throw new Exception();
         }
         return(ScopeService.Init().RegionCollection.FindAll(m => m.CityId == this.CityId));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public City(string cityId)
 {
     this.CityId   = cityId;
     this.CityName = ScopeService.Init().CityCollection.Find(m => m.CityId == this.CityId).CityName;
 }