Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace HOA6
- {
- public partial class Form2 : Form
- {
- public Form2()
- {
- InitializeComponent();
- }
- private void Button1_Click(object sender, EventArgs e)
- {
- if (radioButton1.Checked)
- {
- Class1.gen_ad += 1;
- if (Class1.discount_rate != 0)
- {
- Class1.total_bill += 90;
- }
- else
- {
- Class1.total_bill += 100;
- }
- }
- if (radioButton2.Checked)
- {
- Class1.lower_box += 1;
- if (Class1.discount_rate != 0)
- {
- Class1.total_bill += .9*200;
- }
- else
- {
- Class1.total_bill += 200;
- }
- }
- if (radioButton3.Checked)
- {
- Class1.patron += 1;
- if (Class1.discount_rate != 0)
- {
- Class1.total_bill += .9*350;
- }
- else
- {
- Class1.total_bill += 350;
- }
- }
- Hide();
- Form1 s = new Form1();
- s.Show();
- }
- }
- }
Add Comment
Please, Sign In to add comment