Example #1
0
 public resorts AddResorts(resorts _item, bool _insertToStore = false)
 {
     if(territory_resorts.IndexOf(_item) != -1) return _item;
     territory_resorts.Add(_item);
     _item.territory_id = id;
     if(_insertToStore && !Meridian.Default.resortsStore.Exists(_item.id))
     {
         Meridian.Default.resortsStore.Insert(_item);
         _item.LoadAggregations(Meridian.Default);
     }
     return _item;
 }
Example #2
0
 public resorts RemoveResorts(resorts _item, bool _complete = false)
 {
     territory_resorts.Remove(_item);
     if(_complete) Meridian.Default.resortsStore.Delete(_item);
     return _item;
 }
Example #3
0
 public void LoadAggregations(Meridian _meridian)
 {
     if((resort_id > 0) && (_meridian.resortsStore.Exists(resort_id)))
     {
         this.resort_hotels_resorts = _meridian.resortsStore.Get(resort_id);;
         this.resort_hotels_resorts.AddHotels(this);
     }
     if((class_id > 0) && (_meridian.hotel_classesStore.Exists(class_id)))
     {
         this.class_hotels_hotel_classes = _meridian.hotel_classesStore.Get(class_id);;
         this.class_hotels_hotel_classes.AddHotels(this);
     }
 }