示例#1
0
        public PhoenixPacketBase EvaluateCommand(String Data)
        {
            /* MenuMate basicly sends two commands.
             *
             * 1) Type 3, Room charge command to post money charges to rooms and check codes.
             *      Return ACK for any room charge commands on the default transaction account.
             *      This are used to test the phoenix codes and pass thoses amounts though to phoenix.
             *      You could enhance this by created a list of codes to ignore and thus filter what
             *      is sent though to Roommaster.
             *      This could further be filtered out by Total, ie when MenuMate is checking codes
             *      Its posts to those codes with a total of $0.00 if the total is $0.00 just _protocolUtility.ACK it.
             *
             * 2) Type 7,Rooms Status commands. This is used to collect a list of the room folios.
             */

            switch (Data[1])
            {
            case '3':
                PhoenixPacketChargeToRoom ChargeToRoom = new PhoenixPacketChargeToRoom();
                ChargeToRoom.Parse(Data);
                return(PMSInterface.Charge(ChargeToRoom));

                break;

            case '7':
                PMSRoomStatus ExRoomStatus = new PMSRoomStatus();
                ExRoomStatus.Parse(Data);
                PMSRoomStatusResponse ExRoomStatusResponse = PMSInterface.Inquiry(ExRoomStatus);
                return(ExRoomStatusResponse);

                break;

            default:
                throw new Exception("Invalid Message");
                break;
            }
        }