コード例 #1
0
        /// <summary>
        /// Sets the agent as contact.
        /// </summary>
        /// <param name="contact">The contact.</param>
        private void SetAgentAsContact(InterJetAgentContact contact)
        {
            SmartTextBox nameTextBox = this.GetSmartTextBoxByName("contactNameTextBox");

            nameTextBox.Text = contact.Name;

            SmartTextBox lastNameTextBox = this.GetSmartTextBoxByName("contactLastNameTextBox");

            lastNameTextBox.Text = contact.LastName;

            SmartTextBox addres1TextBox = this.GetSmartTextBoxByName("contactAddress1TextBox");

            addres1TextBox.Text = contact.Address1;

            SmartTextBox addres2TextBox = this.GetSmartTextBoxByName("contactAddress2TextBox");

            addres2TextBox.Text = contact.Address2;

            SmartTextBox addres3TextBox = this.GetSmartTextBoxByName("contactAddress3TextBox");

            addres3TextBox.Text = contact.Address3;

            SmartTextBox cityTextBox = this.GetSmartTextBoxByName("contactCityTextBox");

            cityTextBox.Text = contact.City;

            //TODO : Estado from catlaogo?
            ComboBox stateComboBox = this.GetComboBoxByName("contactStateComboBox");

            stateComboBox.SelectedIndex = 8;

            SmartTextBox postalCodeTextBox = this.GetSmartTextBoxByName("contactPostalCodeTextBox");

            postalCodeTextBox.Text = contact.PostalCode;
            //TODO : country from catalogo?
            ComboBox countryTextComboBox = this.GetComboBoxByName("contactCountryComboBox");

            countryTextComboBox.SelectedIndex = 141;


            SmartTextBox primaryTelephone = this.GetSmartTextBoxByName("contactPrimaryTelephoneTextBox");

            primaryTelephone.Text = contact.PrimaryTelephone;

            SmartTextBox emailTextBox = this.GetSmartTextBoxByName("contactEmailTextBox");

            emailTextBox.Text = contact.Email;

            SmartTextBox confirmationEmail = this.GetSmartTextBoxByName("contactEmailConfirmationTextBox");

            confirmationEmail.Text = contact.Email;
        }
コード例 #2
0
        /// <summary>
        /// Pres the load.
        /// </summary>
        private void PreLoad(InterJetAgentContact agentContact)
        {
            //this.ProgressBar.Minimum = 0;
            //this.ProgressBar.Maximum = 100;
            //this.ProgressBar.Percentage = 20;

            ComboBox titleComboBox = this.ContactPanel.Controls.Find("contactTitleComboBox", true).FirstOrDefault() as ComboBox;

            if (titleComboBox != null)
            {
                titleComboBox.DataSource    = this.GetTitles();
                titleComboBox.DisplayMember = "Text";
                titleComboBox.ValueMember   = "Value";
            }

            ComboBox countryComboBox = this.ContactPanel.Controls.Find("contactCountryComboBox", true).FirstOrDefault() as ComboBox;

            if (countryComboBox != null)
            {
                countryComboBox.DataSource    = this.Countrys;
                countryComboBox.DisplayMember = "Text";
                countryComboBox.ValueMember   = "Value";

                countryComboBox.SelectedValue = "MX";
            }

            ComboBox stateComboBox = this.ContactPanel.Controls.Find("contactStateComboBox", true).FirstOrDefault() as ComboBox;

            if (stateComboBox != null)
            {
                stateComboBox.DataSource    = this.States;
                stateComboBox.DisplayMember = "Name";
                stateComboBox.ValueMember   = "ID";
            }

            if (!HasAContact)
            {
                if (IsAnyPassangerIsContact)
                {
                    SetContactFromPassanger();
                }
                else
                {
                    SetAgentAsContact(agentContact);
                }
            }
            else
            {
                this.SetContact();
            }
        }