public void SetTransaction(Action timeOut) { var newState = new CheckedOut(); newState.SetTableModel(_tableModel); SetTableState(newState); timeOut(); }
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); }