Esempio n. 1
0
 public void LoadAggregations(Meridian _meridian)
 {
     if((parent_id > 0) && (_meridian.treatment_optionsStore.Exists(parent_id)))
     {
         this.sub_treatments_treatment_options = _meridian.treatment_optionsStore.Get(parent_id);;
         this.sub_treatments_treatment_options.AddSubTreatmentOptions(this);
     }
 }
Esempio n. 2
0
 public treatment_options RemoveSubTreatmentOptions(treatment_options _item, bool _complete = false)
 {
     sub_treatments.Remove(_item);
     if(_complete) Meridian.Default.treatment_optionsStore.Delete(_item);
     return _item;
 }
Esempio n. 3
0
 public treatment_options AddSubTreatmentOptions(treatment_options _item, bool _insertToStore = false)
 {
     if(sub_treatments.IndexOf(_item) != -1) return _item;
     sub_treatments.Add(_item);
     _item.parent_id = id;
     if(_insertToStore && !Meridian.Default.treatment_optionsStore.Exists(_item.id))
     {
         Meridian.Default.treatment_optionsStore.Insert(_item);
         _item.LoadAggregations(Meridian.Default);
     }
     return _item;
 }