Example #1
0
        public ViewTransactionsPageVM()
        {
            //assigns default values to display
            using (var TRepo = new TransactionRepo(new InventoryContext()))
            {
                Transactions = TRepo.AllTransactionsIncludeItemTransaction();
                TRepo.Complete();
            }

            //Default values from first transaction from db
            SelectionChanged(Transactions[0]);
        }
Example #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();
        }