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); }
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); }
public Table(int id, Table.State state) { this.Id = id; this.StateProperty = state; }