/// <summary>
        /// Swaps to a cash payment screen where cash payment is handled
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CashPayment_Click(object sender, RoutedEventArgs e)
        {
            var payment       = this.FindAncestor <MainWindow>();
            var paymentScreen = new CashPayment();

            payment.SwapScreen(paymentScreen);
        }
Esempio n. 2
0
        private void PayCash_Click(object sender, RoutedEventArgs e)
        {
            Order or   = (Order)this.DataContext;
            var   wind = this.FindAncestor <MainWindow>();
            var   temp = new CashPayment(total, wind);

            temp.DataContext = or;
            Container.Child  = temp;
        }
Esempio n. 3
0
 /// <summary>
 /// Event handler for if user selects cash payment
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void OnCashSelect(object sender, RoutedEventArgs e)
 {
     if (DataContext is Order order)
     {
         CashPayment    cashPay        = new CashPayment(order);
         OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); // Find the Order Component that is a parent of the current order summary
         orderComponent.Swap(cashPay);
     }
 }