public Guest VerifyGuest(string roomID, string PIN) { // check if the guest entered a proper room number and PIN Guest guest = null; try { if (1 == RoomAccessor.VerifyRoomAndPIN(roomID, UserManager.HashSHA256(PIN))) { // the login was successfull PIN = null; guest = GuestAccessor.RetrieveGuestByRoomID(roomID); if (null == guest) { throw new ApplicationException("Could not find guest associated with that room!"); } } else { throw new ApplicationException("Incorrect Login, please try again."); } } catch (Exception) { throw; } return(guest); }
public Guest GetGuestByRoomID(string roomID) { // Get a specific guest by the room Guest guest = null; try { guest = GuestAccessor.RetrieveGuestByRoomID(roomID); } catch (Exception) { throw; } return(guest); }