public void TimeIn(Action timeIn) { var newState = new Occupied(); newState.SetTableModel(_tableModel); this.SetTableState(newState); timeIn(); }
public static ITableState getTableStateByCode(int tableState) { ITableState ret; switch (tableState) { case 0: ret = new Vacant(); break; case 1: ret = new Occupied(); break; case 2: ret = new CheckedOut(); break; default: ret = new Vacant(); break; } return(ret); }