Пример #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            OrderBLL orderBLL = new OrderBLL();

            if (this.checkBox1.Checked)
            {
                orderBLL.AddVAT(this.Order, null);
            }
            else
            {
                orderBLL.AddVAT(this.Order, this.numericUpDown1.Value);
            }
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Пример #2
0
        public void TestAddVAT(Order order)
        {
            decimal vat = 20;

            orderBLL.AddVAT(order, vat);

            List <Area>  areas        = areaBLL.ListArea();
            List <Table> allTables    = tableBLL.ListTablesByArea(areas[0]);
            Order        currentOrder = orderBLL.GetCurrentOrderByTable(allTables[0]);

            Assert.AreEqual(currentOrder.ID, order.ID);
            Assert.AreEqual(currentOrder.VAT, vat);

            TestAddExtra(currentOrder);
        }