Пример #1
0
 private void btnInsert_Click(object sender, EventArgs e)
 {
     if (tCardNumber.Text.Length != 16 && tCVV.Text.Length != 3)
     {
         MessageBox.Show("Cardnumber cannot be shorter or longer than 16 digits");
     }
     else
     {
         PaymentsHelper.CreatePayment(int.Parse(tCustomerID.Text), tFirstName.Text, tLastName.Text, tCreditCard.Text,
                                      tCardNumber.Text, tCVV.Text, tExpirationDate.Text);
     }
     dataGridView1.DataSource = PaymentsHelper.LoadPaymentsData();
 }
Пример #2
0
 private void LoadAllButton_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = PaymentsHelper.LoadPaymentsData();
 }