示例#1
0
        static void khalil()
        {
            TransactionHandler th = new TransactionHandler();
            //th.AddTransaction(new Transaction(0.0M, Product.GetAllProducts()[0]));
            //th.AddTransaction(new Transaction(0.0M, Product.GetAllProducts()[1]));

            Transaction t = new Transaction(2.00M, Product.GetAllProducts()[0]);
            Transaction r = TransactionHandler.GetReversedTransaction(t);

            Console.WriteLine(t.calcCostWithExclusiveDisc());
            t.purchasedQuantity = 5;
            t.UpdateTransaction();
            //th.ApplyGlobalDiscount(15);
            Console.WriteLine(r.calcCostWithExclusiveDisc());
        }
示例#2
0
 private void clearTrnsBtn_Click(object sender, EventArgs e)
 {
     tHandler = new TransactionHandler();
     transactionList.Items.Clear();
     this.Close();
 }