Exemple #1
0
 //same code for the other card providers
 public Visa(ccForm obj)
     : base(obj)
 {
 }
Exemple #2
0
 public MasterCard(ccForm obj)
     : base(obj)
 {
 }
Exemple #3
0
 public DiscoverCard(ccForm obj)
     : base(obj)
 {
 }
Exemple #4
0
 public AmericanExpress(ccForm obj)
     : base(obj)
 {
 }
Exemple #5
0
 public CreditCard(ccForm obj)
 {
     inst = obj;
 }
Exemple #6
0
 //the purchase button
 private void purchase_Click(object sender, EventArgs e)
 {
     //Once pressed, a messagebox will prompt for a confirmation, options yes or no
     DialogResult confirm = MessageBox.Show("Are you sure you want to purchase this property?", "CONFIRM YOUR PURCHASE", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
     if (confirm == DialogResult.Yes && status.Text == "Active") //if yes has been selected
     {
         ccForm childForm4 = new ccForm(this.address.Text, this); //passes the address so the form can utilize it
         childForm4.Show();//Opens up the credit card prompt form
     }
     else if (confirm == DialogResult.Yes && status.Text == "Sold")
         MessageBox.Show("This property is unavailable for purchase!", "WARNING!");
     if (confirm == DialogResult.No)
         MessageBox.Show("Purchase canceled", "Cancel");
 }