Beispiel #1
0
    public void changeTableStatus(int tableId, Table.State newStatus)
    {
        Table table = tables.Find(t => t.Id.Equals(tableId));

        table.StateProperty = newStatus;
        NotifyClients(Operation.Changed_Table_State, null, tableId);
    }
Beispiel #2
0
    public List <Table> getTables(Table.State state)
    {
        Console.WriteLine("getTables() called.");
        List <Table> res = new List <Table>();

        foreach (Table table in tables)
        {
            if (table.StateProperty.Equals(state))
            {
                res.Add(table);
            }
        }
        return(res);
    }
Beispiel #3
0
 public Table(int id, Table.State state)
 {
     this.Id            = id;
     this.StateProperty = state;
 }