示例#1
0
        private void viewPayment_Click(object sender, RoutedEventArgs e)
        {
            PaymentControl viewPayment = new PaymentControl();

            viewPayment.Owner  = mainWindow;
            mainWindow.Opacity = 0.4;
            viewPayment.controlType.Content = "View";

            viewPayment.savePayment.Visibility       = Visibility.Hidden;
            viewPayment.cancelSavePayment.Visibility = Visibility.Hidden;
            viewPayment.close.Visibility             = Visibility.Visible;

            viewPayment.title.Text       = selectedPayment.title;
            viewPayment.title.IsReadOnly = true;

            viewPayment.card_number.Text       = selectedPayment.card_number;
            viewPayment.card_number.IsReadOnly = true;

            viewPayment.expiry_date.Text       = selectedPayment.expiry_date;
            viewPayment.expiry_date.IsReadOnly = true;

            viewPayment.cvc.Text       = selectedPayment.cvc;
            viewPayment.cvc.IsReadOnly = true;

            viewPayment.pin.Text       = selectedPayment.pin;
            viewPayment.pin.IsReadOnly = true;

            viewPayment.ShowDialog();
        }
示例#2
0
        private void newPayment_Click(object sender, RoutedEventArgs e)
        {
            PaymentControl    addPayment        = new PaymentControl();
            PaymentController paymentController = new PaymentController();

            addPayment.Owner               = mainWindow;
            mainWindow.Opacity             = 0.4;
            addPayment.controlType.Content = "New Payment";
            addPayment.ShowDialog();

            listPayment();
        }
示例#3
0
        private void editPayment_Click(object sender, RoutedEventArgs e)
        {
            PaymentControl updatePayment = new PaymentControl();

            updatePayment.title.Text       = selectedPayment.title;
            updatePayment.card_number.Text = selectedPayment.card_number;
            updatePayment.expiry_date.Text = selectedPayment.expiry_date;
            updatePayment.cvc.Text         = selectedPayment.cvc;
            updatePayment.pin.Text         = selectedPayment.pin;

            updatePayment.Owner = mainWindow;
            mainWindow.Opacity  = 0.4;
            updatePayment.controlType.Content = "Edit Payment";
            updatePayment.itemID = selectedPayment.id;

            updatePayment.ShowDialog();

            listPayment();
        }