Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        public void ShowAsEdit(
            Guid bookingId,
            Guid userId
            )
        {
            _userId = userId;

            // get booking with new booking contract
            var bookingService = new BookingServiceClient();

            _bookingContract =
                bookingService.GetBooking(
                    bookingId,
                    _userId
                    );

            RefreshBooking();

            Show();
        }