/// <summary>
        /// Pay with cash click event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void PayCash_Click(object sender, RoutedEventArgs e)
        {
            var cashControlScreen = new CashPaymentControl();
            var orderControl      = this.FindAncestor <OrderControl>();

            orderControl?.SwapScreen(cashControlScreen);
        }
Exemple #2
0
        /// <summary>
        /// Handles Cash payments when button is clicked
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CashPayment_Click(object sender, RoutedEventArgs e)
        {
            currentOrder.payment = PaymentType.Cash;
            Window = this.FindAncestor <MainWindow>();
            FrameworkElement screen = new CashPaymentControl(currentOrder.Total, control);

            Window.SwapScreen(screen);
        }