Example #1
0
 private void FinalTransaction()
 {
     sum = ListFunctions.GetSumOfShoppingList(Program.shoppingList);
     if (double.TryParse(textBox1.Text, out cash) && cash > sum)
     {
         change = cash - sum; //add new form and finish this method
         MessageBox.Show("Thank you for your payment.");
         System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc2));
         t.Start();
         this.Close();
     }
     else
     {
         textBox1.Clear();
         MessageBox.Show("Invalid entry! Please try again.");
     }
 }
Example #2
0
 public Cash()
 {
     InitializeComponent();
     textBox2.Text = $"Enter cash amount > ${ListFunctions.GetSumOfShoppingList(Program.shoppingList):0.00}";
 }