コード例 #1
0
 private void CashoutButton_Click(object sender, RoutedEventArgs e)
 {
     if (cartList.Count != 0)
     {
         CashOut cash = new CashOut(SubTotal, TaxTotal, Total, Permission, cartList, Inventory);
         cash.Show();
         App.Current.MainWindow = cash;
         this.Close();
     }
     else
     {
         MessageBox.Show("Cannot cash out when cart is empty", "Error");
     }
 }
コード例 #2
0
        public void CashOutTest()
        {
            Item test = new Item();

            test.Category = "Wine";
            List <Item> cart = new List <Item>();
            List <Item> inv  = new List <Item>();

            cart.Add(test);
            pointofsale_application.CashOut cash = new pointofsale_application.CashOut(100.00, 8.10, 108.10, "admin", cart, inv);
            cash.PrintChange();
            cash.Permission = "admin";
            cash.SubTotal   = 100;
            cash.TaxTotal   = 8.10;
            cash.Total      = 108.10;
            cash.TxID       = 1000;
            cash.SubmitTx();
        }