Ejemplo n.º 1
0
        public PMSRoomStatusResponse Inquiry(PMSRoomStatus Status)
        {
            _data.Import(Status);
            PMSRoomStatusResponse Response = new PMSRoomStatusResponse();

            try
            {
                PMSMessage messageToTransmit = BuildInquiry();
                Trasmit(messageToTransmit);
                ReceiveInquiry();
                // Provide a Cach of this room number and foilos
                // for quick look up when rooms are charged.
                Response = _data.ExportPMSRoomStatusResponse(_cache);
            }
            catch (System.TimeoutException ex)
            {
                logger.Error("MicrosServer : No Reply :" + ex.Message);
                Response.ErrorResponse = ex.Message;
            }
            catch (System.Exception ex)
            {
                logger.Error("\rMicrosServer : " + ex.Message);
                Response.ErrorResponse = ex.Message;
            }
            return(Response);
        }
Ejemplo n.º 2
0
        internal PMSRoomStatus ExportPMSRoomStatus()
        {
            PMSRoomStatus ExRoomStatus = new PMSRoomStatus();

            ExRoomStatus.RegisterNumber = RegisterNumber;
            ExRoomStatus.RoomNumber     = RoomNumber;
            return(ExRoomStatus);
        }
Ejemplo n.º 3
0
 private void UpdateCache(String roomNumber, String RegisterNumber)
 {
     if (!_cache.ContainsKey(roomNumber) && roomNumber != "0")
     {
         // We need to get the Foilio Name from the Micros system based on index.
         PMSRoomStatus ExRoomStatus = new PMSRoomStatus();
         ExRoomStatus.RegisterNumber = RegisterNumber;
         ExRoomStatus.RoomNumber     = roomNumber;
         PMSRoomStatusResponse ExRoomStatusResponse = Inquiry(ExRoomStatus);
     }
 }
Ejemplo n.º 4
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;
            }
        }
Ejemplo n.º 5
0
 internal void Import(PMSRoomStatus Status)
 {
     RoomNumber     = Status.RoomNumber;
     RegisterNumber = Status.RegisterNumber;
 }
Ejemplo n.º 6
0
 abstract public PMSRoomStatusResponse RoomInquiry(PMSRoomStatus Status);