public void SetTransaction(Action timeOut)
        {
            var newState = new CheckedOut();

            newState.SetTableModel(_tableModel);
            SetTableState(newState);
            timeOut();
        }
Exemplo n.º 2
0
        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);
        }