Beispiel #1
0
        /// <summary>
        /// Called when selection for
        /// CurrentItem has changed
        /// </summary>
        public void SelectionChanged(Transaction selectedTransaction)
        {
            //lists
            CurrentTransaction             = selectedTransaction;
            CurrentItemTransactions        = CurrentTransaction.ItemTransactions;
            CurrentItemTransactionDisplays = ItemTransactionDisplay.GetRange(CurrentItemTransactions);

            //scalar values
            CurrentTransactionID     = CurrentTransaction.TransactionID;
            CurrentTotalValue        = CurrentTransaction.TotalValue;
            CurrentTimeOfTransaction = CurrentTransaction.TimeOfTransaction;
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var itemTransactionDisplays = new List <ItemTransactionDisplay>();

            using (var tRepo = new TransactionRepo(new InventoryContext()))
            {
                Transaction transction = tRepo.AllTransactionsIncludeItemTransaction().ToList()[24];

                itemTransactionDisplays = ItemTransactionDisplay.GetRange(transction.ItemTransactions);
            }

            itemTransactionDisplays.ForEach(itd => Console.WriteLine(string.Format("Barcode: {0}, Description: {1}, RRP: {2}, Quantity: {3}"
                                                                                   , itd.Barcode
                                                                                   , itd.Description
                                                                                   , itd.RRP
                                                                                   , itd.Quantity)));

            NoF5Needed();
        }