Example #1
0
        protected override void OnChanged(string propertyName, object oldValue, object newValue)
        {
            base.OnChanged(propertyName, oldValue, newValue);
            switch (propertyName)
            {
            case "Hersteller":


                if (newValue != null)
                {
                    boHersteller selectedHersteller = (boHersteller)newValue;
                    this.Hersteller = this.Session.GetObjectByKey <boHersteller>(selectedHersteller.Oid);
                    this.Betreff    = selectedHersteller.Bezeichnung;
                }
                else
                {
                    this.Hersteller = null;
                    this.Betreff    = null;
                }
                break;
            }
        }
Example #2
0
 protected override void OnChanged(string propertyName, object oldValue, object newValue)
 {
     base.OnChanged(propertyName, oldValue, newValue);
     switch (propertyName)
     {
     case "HerstellerProdukt":
         if (newValue != null)
         {
             fiHerstellerProdukt curProduct    = (fiHerstellerProdukt)newValue;
             boHersteller        curHersteller = this.Session.GetObjectByKey <boHersteller>(curProduct.Hersteller.Oid);
             this.Betreff           = curProduct.Bezeichnung;
             this.HerstellerProdukt = this.Session.GetObjectByKey <fiHerstellerProdukt>(curProduct.Oid);
             this.Hersteller        = curHersteller;
         }
         else
         {
             this.Betreff           = null;
             this.Hersteller        = null;
             this.HerstellerProdukt = null;
         }
         break;
     }
 }