Beispiel #1
0
        /// <summary>
        /// Eduardo Colon
        /// Created: 2019/03/20
        ///
        /// constructor  to create shuttleReservation with  one parameter.
        /// </summary>
        public ShuttleReservationDetail(IShuttleReservationManager shuttleReservationManager = null, IEmployeeManager employeeManager = null, IGuestManager guestManager = null)
        {
            if (shuttleReservationManager == null)
            {
                shuttleReservationManager = new ShuttleReservationManager();
            }

            if (employeeManager == null)
            {
                employeeManager = new EmployeeManager();
            }
            if (guestManager == null)
            {
                guestManager = new GuestManager();
            }

            _shuttleReservationManager = shuttleReservationManager;
            _employeeManager           = employeeManager;
            _guestManager = guestManager;

            _isUpdate = false;


            InitializeComponent();
            btnDropoffSubmit.Visibility = Visibility.Collapsed;
        }
Beispiel #2
0
        /// <summary>
        /// Eduardo Colon
        /// Created: 2019/03/10
        ///
        /// constructor  to create shuttleReservation with  three parameters.
        /// </summary>
        public ShuttleReservationDetail(ShuttleReservation selectedShuttleReservation, IShuttleReservationManager shuttleReservationManager = null, IEmployeeManager employeeManager = null, IGuestManager guestManager = null)
        {
            _selectedShuttleReservation = selectedShuttleReservation;

            if (shuttleReservationManager == null)
            {
                shuttleReservationManager = new ShuttleReservationManager();
            }
            if (employeeManager == null)
            {
                employeeManager = new EmployeeManager();
            }
            if (guestManager == null)
            {
                guestManager = new GuestManager();
            }

            _shuttleReservationManager = shuttleReservationManager;
            _employeeManager           = employeeManager;
            _guestManager = guestManager;

            InitializeComponent();


            txtPickupLocation.Text     = _selectedShuttleReservation.PickupLocation;
            txtDropoffDestination.Text = _selectedShuttleReservation.DropoffDestination;


            this.Title                    = "Update Shuttle Reservatiion";
            cboGuestLast.IsEnabled        = false;
            cboGuestFirst.IsEnabled       = false;
            cboGuestPhoneNumber.IsEnabled = false;
            cboEmployeeLast.IsEnabled     = false;
            cboEmployeeFirst.IsEnabled    = false;
            if (_selectedShuttleReservation.DropoffDateTime != null)
            {
                btnDropoffSubmit.IsEnabled = false;
            }

            _isUpdate = true;
        }