Advertisement
Kenkaster001

REVISED FORM 2

Sep 24th, 2019
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace HOA6
  12. {
  13. public partial class Form2 : Form
  14. {
  15. public Form2()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void Button1_Click(object sender, EventArgs e)
  21. {
  22. if (radioButton1.Checked)
  23. {
  24. Class1.gen_ad += 1;
  25. Class1.total_bill += 100;
  26. }
  27. if (radioButton2.Checked)
  28. {
  29. Class1.lower_box += 1;
  30. Class1.total_bill += 200;
  31. }
  32. if (radioButton3.Checked)
  33. {
  34. Class1.patron += 1;
  35. Class1.total_bill += 350;
  36. }
  37.  
  38. if (Class1.discount_rate == 10)
  39. {
  40. Class1.final_bill = Class1.total_bill*.9;
  41. }
  42. else
  43. {
  44. Class1.final_bill = Class1.total_bill;
  45. }
  46.  
  47. Hide();
  48. Form1 s = new Form1();
  49. s.Show();
  50. }
  51. }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement