public void RefreshAddress() { // fetch booking data var bookingService = new BookingServiceClient(); _bookingContract = bookingService.GetBooking( _bookingContract.Booking.BookingId, _userId ); try { addressTypeRefCombo.Text = _bookingContract.BookingAddress.AddressTypeRcd != null ? _bookingContract.BookingAddress.AddressTypeRcd : String.Empty; textBoxAddressOne.Text = _bookingContract.BookingAddress.AddressOne; textBoxAddressTwo.Text = _bookingContract.BookingAddress.AddressTwo; textBoxAddressThree.Text = _bookingContract.BookingAddress.AddressThree; textBoxState.Text = _bookingContract.BookingAddress.State; textBoxDistrict.Text = _bookingContract.BookingAddress.District; textBoxProvince.Text = _bookingContract.BookingAddress.Province; textBoxZipCode.Text = _bookingContract.BookingAddress.ZipCode; textBoxPoBox.Text = _bookingContract.BookingAddress.PoBox; textBoxComment.Text = _bookingContract.BookingAddress.Comment; userPicker.SelectedValue = _bookingContract.BookingAddress.UserId; dateTimePickerDateTime.Text = _bookingContract.BookingAddress.DateTime.ToString(); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { bookingService.Close(); } }
public void SimulateBookings() { FlightServiceClient flightService = new FlightServiceClient(); BookingServiceClient bookingService = new BookingServiceClient(); try { bookingService.SimulateBookings( DateTime.UtcNow.Date, DateTime.UtcNow.Date.AddDays(1), DefaultUserId ); } catch (Exception ex) { Assert.Fail(message: $"Failed to Simulate Bookings, message: {ex.Message}"); } finally { bookingService.Close(); } }