Advertisement
jemmm

Form 1

Sep 24th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 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. string output = "";
  23.  
  24. Form2 f2 = new Form2();
  25.  
  26. Hide();
  27.  
  28. f2.ShowDialog();
  29.  
  30. Show();
  31.  
  32. if (checkBox1.Checked)
  33. {
  34. Class1.finalbill = Class1.totalbill * .9;
  35.  
  36. output += "Gen Ad\t\t" + "x" + Class1.genad + "\t Php " + Class1.genadtotal + "\r\nLower Box\t" + "x" + Class1.lowerbox + "\t Php " + Class1.lowerboxtotal + "\r\nPatron\t\t" + "x" + Class1.patron + "\t Php " + Class1.patrontotal + "\r\nTotal Bill: Php" + Class1.totalbill + "\r\nSchool Discount: 10% \r\n" + "Final Bill: Php " + Class1.finalbill ;
  37. }
  38. else
  39. {
  40. Class1.finalbill = Class1.totalbill;
  41.  
  42. output += "Gen Ad\t\t" + "x" + Class1.genad + "\t Php " + Class1.genadtotal + "\r\nLower Box\t" + "x" + Class1.lowerbox + "\t Php " + Class1.lowerboxtotal + "\r\nPatron\t\t" + "x" + Class1.patron + "\t Php " + Class1.patrontotal + "\r\nTotal Bill: Php" + Class1.totalbill + "\r\nNo Discount Selected\r\n" + "Final Bill: Php " + Class1.finalbill;
  43.  
  44.  
  45. }
  46.  
  47.  
  48.  
  49. textBox1.Text = output;
  50.  
  51.  
  52. }
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement