Ejemplo n.º 1
0
 public void ShowAsAdd()
 {
     _contract  = new BookingPassengerWithExtraContract();
     _isNew     = true;
     this.Text += " - Not Savable (Booking Missing)";
     Show();
 }
Ejemplo n.º 2
0
        public void ShowAsAddByBookingAndUser(System.Guid bookingId, System.Guid userId)
        {
            _contract                   = new BookingPassengerWithExtraContract();
            _isNew                      = true;
            _contract.BookingId         = bookingId;
            _contract.PassengerTypeRcd  = SolutionNorSolutionPort.BusinessLogicLayer.PassengerTypeRef.Adult;
            passengerTypeRefCombo.Text  = _contract.PassengerTypeRcd;
            dateTimePickerDateTime.Text = _contract.DateTime.ToString();
            defaultStateRefCombo.Text   = DefaultStateRef.Created;
            _contract.UserId            = userId;
            _contract.DateTime          = DateTime.UtcNow;
            userPicker.SelectedValue    = userId;

            Show();
        }
Ejemplo n.º 3
0
        public void ShowAsEdit(System.Guid bookingPassengerId)
        {
            var service = new BookingSearchService();

            _isNew = false;
            try {
                _contract = service.BookingPassengerWithExtra(bookingPassengerId);
                passengerTypeRefCombo.Text  = _contract.PassengerTypeRcd != null ? _contract.PassengerTypeRcd : String.Empty;
                textBoxPassengerName.Text   = _contract.PassengerName;
                defaultStateRefCombo.Text   = _contract.DefaultStateRcd;
                userPicker.SelectedValue    = _contract.UserId;
                dateTimePickerDateTime.Text = _contract.DateTime.ToString();

                Show();
            } catch (Exception ex) {
                MessageBox.Show(ex.Message);
            } finally {
                service.Close();
            }
        }