/**
         * @name    HotelInterest
         * @brief   Default Class Constructor
         *          Its only work is to call the constructor of every needed private member
         * @param   _cityName       : The city name
         * @param   _hotelName      : The hotel name
         */
        public HotelInterest(String _cityName,
                             String _hotelName)
        {
            InitializeComponent();

            cityName  = _cityName;
            hotelName = _hotelName;

            // Firstly, configure the web service object
            webService = new localhost.TravelAgencyServiceImplService();

            // Interest is not registered yet
            registerCompleted = false;

            // Checks if the interest is by hotel name
            if (cityName.Equals(""))
            {
                cityFixLabel.Visible = false;
                cityLabel.Visible    = false;
                hotelNameLabel.Text  = hotelName;
            }
            else
            {
                hotelNameLabel.Visible = false;
                hotelFixLabel.Visible  = false;
                cityLabel.Text         = hotelName;
            }
            cityLabel.Text      = cityName;
            hotelNameLabel.Text = hotelName;
        }
Esempio n. 2
0
        /**
         * @name    Form1
         * @brief   Default Class Constructor
         *          Initializes the components, web service and states and cities combobox
         */
        public Form1()
        {
            InitializeComponent();

            // Firstly, configure the web service object
            webService = new localhost.TravelAgencyServiceImplService();

            // Fill the state combobox
            configStatesAndCities();
        }
        /**
         * @name    PackageDetails
         * @brief   Default Class Constructor
         *          Its only work is to call the constructor of every needed private member
         * @param  _citySource         :  City of origin (source) of where the flight will be taken
         * @param  _cityDest           :  City of destination of where the flight will be landed
         * @param  _hotelName          :  Hotel name
         * @param  _goingDay           :  Day where the flight will be taken
         * @param  _goingMonth         :  Month where the flight will be taken
         * @param  _goingYear          :  Year where the flight will be taken
         * @param   _isReturn          :  Flag that indicates if the package includes a return ticket
         * @param   _returnDay         :  Day where the return flight will be taken
         * @param  _returnMonth        :  Month where the return flight will be taken
         * @param  _returnYear         :  Year where the return flight will be taken
         * @param  _guests             :  Number of guests per room
         * @param  _goingTicketPrice   :  Price of the going ticket
         * @param  _returnTicketPrice  :  Price of the return ticket
         * @param  _hotelPrice         :  Price of the hotel
         * @param  _price              :  Total price of the package
         */
        public PackageDetails(String _citySource,
                              String _cityDest,
                              String _hotelName,
                              int _goingDay,
                              int _goingMonth,
                              int _goingYear,
                              bool _isReturn,
                              int _returnDay,
                              int _returnMonth,
                              int _returnYear,
                              int _guests,
                              float _goingTicketPrice,
                              float _returnTicketPrice,
                              float _hotelPrice,
                              float _price)
        {
            InitializeComponent();

            citySource        = _citySource;
            cityDest          = _cityDest;
            hotelName         = _hotelName;
            goingDay          = _goingDay;
            goingMonth        = _goingMonth;
            goingYear         = _goingYear;
            isReturn          = _isReturn;
            returnDay         = _returnDay;
            returnMonth       = _returnMonth;
            returnYear        = _returnYear;
            numberOfGuests    = _guests;
            totalPrice        = _price;
            goingTicketPrice  = _goingTicketPrice;
            returnTicketPrice = _returnTicketPrice;
            hotelPrice        = _hotelPrice;

            // Firstly, configure the web service object
            webService = new localhost.TravelAgencyServiceImplService();

            sourceLabel.Text    = citySource;
            destLabel.Text      = cityDest;
            goingDateLabel.Text = goingDay.ToString() + "-" + goingMonth.ToString() + "-" + goingYear.ToString();

            if (isReturn)
            {
                returnDateLabel.Text = returnDay.ToString() + "-" + returnMonth.ToString() + "-" + returnYear.ToString();
            }
            else
            {
                dataVoltaLabel.Visible  = false;
                returnDateLabel.Visible = false;
            }
            hotelLabel.Text  = hotelName;
            guestsLabel.Text = numberOfGuests.ToString();
            priceLabel.Text  = totalPrice.ToString();
        }
Esempio n. 4
0
        /**
         * @name    PackageInterest
         * @brief   Default Class Constructor
         *          Its only work is to call the constructor of every needed private member
         * @param  _citySource         :  City of origin (source) of where the flight will be taken
         * @param  _cityDest           :  City of destination of where the flight will be landed
         * @param  _hotelName          :  Hotel name
         * @param  _goingDay           :  Day where the flight will be taken
         * @param  _goingMonth         :  Month where the flight will be taken
         * @param  _goingYear          :  Year where the flight will be taken
         * @param   _isReturn          :  Flag that indicates if the package includes a return ticket
         * @param   _returnDay         :  Day where the return flight will be taken
         * @param  _returnMonth        :  Month where the return flight will be taken
         * @param  _returnYear         :  Year where the return flight will be taken
         */
        public PackageInterest(String _citySource,
                               String _cityDest,
                               int _goingDay,
                               int _goingMonth,
                               int _goingYear,
                               bool _isReturn,
                               int _returnDay,
                               int _returnMonth,
                               int _returnYear)
        {
            InitializeComponent();

            citySource  = _citySource;
            cityDest    = _cityDest;
            goingDay    = _goingDay;
            goingMonth  = _goingMonth;
            goingYear   = _goingYear;
            isReturn    = _isReturn;
            returnDay   = _returnDay;
            returnMonth = _returnMonth;
            returnYear  = _returnYear;

            // Firstly, configure the web service object
            webService = new localhost.TravelAgencyServiceImplService();

            // Interest is not registered yet
            registerCompleted = false;

            sourceLabel.Text    = citySource;
            destLabel.Text      = cityDest;
            goingDateLabel.Text = goingDay.ToString() + "-" + goingMonth.ToString() + "-" + goingYear.ToString();

            if (isReturn)
            {
                returnDateLabel.Text = returnDay.ToString() + "-" + returnMonth.ToString() + "-" + returnYear.ToString();
            }
            else
            {
                dataVoltaLabel.Visible  = false;
                returnDateLabel.Visible = false;
            }
        }
Esempio n. 5
0
        /**
         * @name    HotelDetails
         * @brief   Default Class Constructor
         *          Its only work is to call the constructor of every needed private member
         * @param   _cityName       : The city name
         * @param   _hotelName      : The hotel name
         * @param   _guests         : The number of guests per room
         * @param   _price          : The price per night per room
         */
        public HotelDetails(String _cityName,
                            String _hotelName,
                            int _guests,
                            float _price)
        {
            InitializeComponent();

            cityName  = _cityName;
            hotelName = _hotelName;
            price     = _price;
            guests    = _guests;

            // Firstly, configure the web service object
            webService = new localhost.TravelAgencyServiceImplService();

            cityLabel.Text      = cityName;
            hotelNameLabel.Text = hotelName;
            guestsLabel.Text    = guests.ToString();
            priceLabel.Text     = price.ToString();
        }
Esempio n. 6
0
        /**
         * @name    PackageDetails
         * @brief   Default Class Constructor
         *          Its only work is to call the constructor of every needed private member
         * @param  _citySource          :  City of origin (source) of where the flight will be taken
         * @param  _cityDest            :  City of destination of where the flight will be landed
         * @param  _day                 :  Day where the flight will be taken
         * @param  _month               :  Month where the flight will be taken
         * @param  _year                :  Year where the flight will be taken
         * @param  _price               :  Total price of the ticket
         */
        public ticketDetails(String _citySource,
                             String _cityDest,
                             int _day,
                             int _month,
                             int _year,
                             float _price)
        {
            InitializeComponent();

            citySource = _citySource;
            cityDest   = _cityDest;
            day        = _day;
            month      = _month;
            year       = _year;
            price      = _price;

            // Firstly, configure the web service object
            webService = new localhost.TravelAgencyServiceImplService();

            sourceLabel.Text = citySource;
            destLabel.Text   = cityDest;
            dateLabel.Text   = day.ToString() + "-" + month.ToString() + "-" + year.ToString();
            priceLabel.Text  = price.ToString();
        }