Advertisement
Kenkaster001

HOA6form1

Sep 23rd, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 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 Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void Button1_Click(object sender, EventArgs e)
  21. {
  22.  
  23. if (checkBox1.Checked)
  24. {
  25. Class1.discount_rate = 10;
  26. }
  27. else
  28. {
  29. Class1.discount_rate = 0;
  30. }
  31. Hide();
  32. Form2 r = new Form2();
  33. r.Show();
  34. }
  35.  
  36. private void Form1_Load(object sender, EventArgs e)
  37. {
  38. string output = "";
  39. output += "Gen Ad \t\t x" + Class1.gen_ad + "\t Php " + (100*Class1.gen_ad)+ "\r\nLower Box \t x" + Class1.lower_box + "\t Php " + (200 * Class1.lower_box) + "\r\nPatron \t\t x" + Class1.patron + "\t Php " + (350*Class1.patron) + "\r\nTotal Bill: Php " + Class1.total_bill + "\r\nSchool Discount: " + Class1.discount_rate + "%\r\nFinal Bill: Php " + Class1.total_bill;
  40. textBox1.Text = output;
  41. }
  42. }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement