private void btnSave_Click(object sender, EventArgs e) { OrderBLL orderBLL = new OrderBLL(); orderBLL.ChangeTable(this.order, this.Tables); this.DialogResult = DialogResult.OK; this.Close(); }
public void TestChangeTableForOrder(Order order) { List <Area> areas = areaBLL.ListArea(); List <Table> allTables = tableBLL.ListTablesByArea(areas[1]); List <Table> tables = new List <Table>(); tables.Add(allTables[0]); Order currentOrder = orderBLL.ChangeTable(order, tables); Order newOrder = orderBLL.GetCurrentOrderByTable(tables[0]); List <Table> tables1 = tableBLL.ListTablesByArea(areas[0]); List <Table> tables2 = tableBLL.ListTablesByArea(areas[1]); Assert.AreNotEqual(tables1[0].Status, tables2[0].Status); Assert.AreEqual(newOrder.MoneyReceive, currentOrder.MoneyReceive); TestPay(currentOrder); }