Exemplo n.º 1
0
        private void TransactionsDisplay_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            //update dataContext w/ new transaction

            //datagrid display transactionID = 1 in index = 0; therefor + 1
            int selectedTransactionID = TransactionsDisplay.SelectedIndex + 1;

            Transaction selectedTransaction;

            using (var TRepo = new TransactionRepo(new InventoryContext()))
            {
                selectedTransaction = TRepo.GetByID(selectedTransactionID, "ItemTransactions");
                TRepo.Complete();
            }

            dataContext.SelectionChanged(selectedTransaction);
            UpdateAll();
        }