Inheritance: DomainEntity
Beispiel #1
0
 public EditPurchaseFamily(PurchaseFamily family)
 {
     PurchaseFamily = family;
 }
 public void ExchangeData(PurchaseFamily purchaseFamily)
 {
     _purchaseFamily = purchaseFamily;
 }
 public SinglePurchaseFamilyViewModel(PurchaseFamily purchaseFamily)
 {
     _purchaseFamily = purchaseFamily;
     base.DisplayName = purchaseFamily.Name;
 }
 void OnPurchaseFamilyChanged(PurchaseFamily purchaseFamily)
 {
     var viewmodel = (from vm in AllPurchaseFamilies where vm.Id == purchaseFamily.Id select vm).FirstOrDefault();
     if (viewmodel == null)
     {
         viewmodel = new SinglePurchaseFamilyViewModel(purchaseFamily);
         AllPurchaseFamilies.Add(viewmodel);
     }
     else
     {
         viewmodel.ExchangeData(purchaseFamily);
     }
     OnPropertyChanged("ItemSelected");
     OnPropertyChanged("ItemsSelected");
 }