public ActionResult ViewAccommodationBooking(int id) { TripBookingAccommodation accommodation = null; var blError = TripManager.GetTripBookingAccommodation(id, out accommodation); if (blError.ErrorCode > 0) { throw new ApplicationException(blError.ErrorMessage); } var model = new AccommodationBookingViewModel() { AccommodationType = accommodation.AccommodationType, CheckinDate = accommodation.CheckinDate.HasValue ? accommodation.CheckinDate.Value : DateTime.MinValue, CheckoutDate = accommodation.CheckoutDate.HasValue ? accommodation.CheckoutDate.Value : DateTime.MinValue, TravellerNotes = accommodation.TravellerNotes, SpecialRequests = accommodation.SpecialRequests, BookingStatus = accommodation.Status, AdminNotes = accommodation.AdminNotes, TripId = accommodation.TripId, TownOrCity = accommodation.TownOrCity, Adults = accommodation.Adults.HasValue ? accommodation.Adults.Value : 0, Kids = accommodation.Kids.HasValue ? accommodation.Kids.Value : 0, PropertyName = accommodation.PropertyName, PropertyAddress = accommodation.PropertyAddress, }; return(View(model)); }