Beispiel #1
0
        public purchaseViewModel LoadPurchaseSubFormPurchaseItems(long id)
        {
            purchaseViewModel purchaseViewModel = new purchaseViewModel();

            //Get the specific Purchase info...
            purchaseViewModel.purchase = FindById(id);
            purchaseViewModel.purchase.ListPurchaseTypes = repositoryPurchaseType.GetAllPurchaseTypes();
            purchaseViewModel.SelectedPurchaseTypeID     = purchaseViewModel.purchase.PurchaseTypeID;

            //and get then all PurchaseItems.
            purchaseViewModel.purchaseItems = repositoryPurchaseItem.GetAllPurchaseItemsPerPurchase(id);


            return(purchaseViewModel);
        }