public void CloseTable(Table table, CheckPaymentMethod payMethod) { table.Check.PaymentMethod = payMethod; table.Check.CheckDateAndTime = DateTime.Now; Report.ReportsFromTables.Add(table, this); this.CleanTable(table); }
public void CancelReservation(Table table) { if (table.TableStatus != TableStatus.Reserved) { Console.WriteLine("Table is not reserved."); } else { table.TableStatus = TableStatus.Free; table.Client.ClientType = ClientType.Regular; } }
public void ReserveTable(Table table, ClientType type) { if (table.TableStatus != TableStatus.Free) { Console.WriteLine("Table is not free."); } else { table.TableStatus = TableStatus.Reserved; table.Client.ClientType = type; } }
private void CleanTable(Table table) { // if the waiter doesnt have a Busser assigned to him, he will clean the table and set its status to free if (this.WaiterBusser == null) { table.TableStatus = TableStatus.Free; } else { this.WaiterBusser.CleanTable(table); } }
public void CalculateCheck(Table table) { foreach (var item in table.Order.OrderList) { table.Check.Amount += item.Price; } if (table.Client.ClientType == ClientType.Special) { table.Check.Discount = table.Check.Amount * Check.DiscountForSpecials; table.Check.Amount -= table.Check.Discount; } }
public void PrintCheck(Table table) { var sb = new StringBuilder(); sb.AppendLine(string.Format("CHECK table {0}:", ServingArea.Tables.IndexOf(table) + 1)); foreach (var item in table.Order.OrderList) { sb.AppendLine(string.Format("{0,-20} {1:C}", item.Name, item.Price)); } sb.AppendLine(string.Format("{0,-20} {1:C}", "Total Amount: ", table.Check.Amount)); if (table.Client.ClientType == ClientType.Special) { sb.AppendLine(string.Format("{0,-20} {1:C}", "Discount: ", table.Check.Discount)); } Console.WriteLine(sb.ToString()); }
public void CancelOrder(Table table) { table.Order.RemoveOrder(); }
public void RemoveItemFromOrder(Table table, MenuItem item) { table.Order.RemoveItem(item); }
public void AddMenuItemToOrder(Table table, MenuItem item) { table.Order.AddItem(item); StartRestaurant.DishesToCook.AddMenuItem(item); }
public void CleanTable(Table table) { table.TableStatus = TableStatus.Free; }