private void cmbTypeCard_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cmbTypeCard.SelectedIndex > 0)
     {
         txtNumberCardCTS.PasswordChar = new char();
         txtNumberCardCTS.Font         = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Regular);
         ListItem item = (ListItem)cmbTypeCard.SelectedItem;
         if (item.Value.Equals("CASH"))
         {
             txtNumberCardCTS.Text    = string.Empty;
             txtNumberCardCTS.Visible = false;
             lblCardNumberCTS.Visible = false;
             btnShowCTS.Visible       = false;
         }
         else if (item.Value.Equals("TR") || item.Value.Equals("CH"))
         {
             btnShowCTS.Visible         = false;
             txtNumberCardCTS.MaxLength = 4;
             lblCardNumberCTS.Text      = "Número de cuenta";
             lblCardNumberCTS.Visible   = true;
             MyCTS.Services.ValidateDKsAndCreditCards.GetTranferCheckNumber data = new MyCTS.Services.ValidateDKsAndCreditCards.GetTranferCheckNumber();
             data = wsServ.GetTranferCheckNumberMyCTS(ucFirstValidations.DK);
             txtNumberCardCTS.Text         = data.ct_banc_cbr;
             txtNumberCardCTS.Visible      = true;
             txtNumberCardCTS.PasswordChar = '·';
             txtNumberCardCTS.Font         = new Font("Symbol", 9F, FontStyle.Regular);
         }
         else
         {
             btnShowCTS.Visible            = true;
             lblCardNumberCTS.Text         = "Número de tarjeta";
             txtNumberCardCTS.Visible      = true;
             lblCardNumberCTS.Visible      = true;
             txtNumberCardCTS.MaxLength    = 16;
             txtNumberCardCTS.PasswordChar = '·';
             txtNumberCardCTS.Font         = new Font("Symbol", 9F, FontStyle.Regular);
         }
     }
 }
Beispiel #2
0
        private void creditCardCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            FormOfPayment form = creditCardCombo.SelectedItem as FormOfPayment;

            if (form != null)
            {
                Font nvaFuente = new Font("Tahoma", 8.25F);
                creditCardTextBox.Text = String.Empty;
                creditCardTextBox.Properties.PasswordChar = new char();
                creditCardTextBox.Font = nvaFuente;

                if (form.Type == GenericFormOfPayment.Cash)
                {
                    this.EnabledCreditCardFieldsCash(false);
                }
                else if (form.Type == GenericFormOfPayment.Transfer || form.Type == GenericFormOfPayment.Check)
                {
                    this.EnabledCreditCardFieldsCheckAndTransfer(false);
                    WsMyCTS wsServ = new WsMyCTS();
                    MyCTS.Services.ValidateDKsAndCreditCards.GetTranferCheckNumber data = new MyCTS.Services.ValidateDKsAndCreditCards.GetTranferCheckNumber();
                    data = wsServ.GetTranferCheckNumberMyCTS(ucFirstValidations.Attribute1);
                    creditCardTextBox.Text = data.ct_banc_cbr;
                    Font nvaFuentePassword = new Font("Symbol", 9F);
                    creditCardTextBox.Properties.PasswordChar = '·';
                    creditCardTextBox.Font = nvaFuentePassword;
                    creditCardTextBox.Focus();
                }
                else
                {
                    this.EnabledCreditCardFieldsCash(true);
                    Font nvaFuentePassword = new Font("Symbol", 9F);
                    creditCardTextBox.Properties.PasswordChar = '·';
                    creditCardTextBox.Font = nvaFuentePassword;
                }
                creditCardTextBox.Focus();
            }
        }
        private void HideAndShowCaptureControls(int iCurrentPaxNumberMenosUno, ListItem item)
        {
            txtNumberCardCTS.PasswordChar = new char();
            switch (item.Value)
            {
            case "CASH":
                txtNumberCardCTS.Text    = string.Empty;
                txtNumberCardCTS.Visible = false;
                lblCardNumberCTS.Visible = false;

                txtDigitoSeguridad.Visible       = false;
                cmbMesVencimiento.Visible        = false;
                cmbAnioVencimiento.Visible       = false;
                txtNombreTarjetahabiente.Visible = false;
                lblDigitoSeguridad.Visible       = false;
                lblMesVencimiento.Visible        = false;
                lblAnioVencimiento.Visible       = false;
                lblNombreTarjetahabiente.Visible = false;
                break;

            case "CH":
            case "TR":
            case "TP":
                switch (item.Value)
                {
                case "TP":
                    lblCardNumberCTS.Text         = "Número de tarjeta";
                    txtNumberCardCTS.MaxLength    = 16;
                    txtNumberCardCTS.PasswordChar = '·';
                    txtNumberCardCTS.Font         = new Font("Symbol", 9F, FontStyle.Regular);
                    break;

                default:
                    lblCardNumberCTS.Text         = "Número de cuenta";
                    txtNumberCardCTS.MaxLength    = 4;
                    txtNumberCardCTS.PasswordChar = '·';
                    txtNumberCardCTS.Font         = new Font("Symbol", 9F, FontStyle.Regular);
                    break;
                }
                lblCardNumberCTS.Visible = true;
                if (item.Value != "TP")
                {
                    if (string.IsNullOrEmpty(ChargesPerService.DKActual))
                    {
                        ChargesPerService.RecuperarDK();
                    }
                    WsMyCTS wsServ = new WsMyCTS();

                    MyCTS.Services.ValidateDKsAndCreditCards.GetTranferCheckNumber data = new MyCTS.Services.ValidateDKsAndCreditCards.GetTranferCheckNumber();
                    data = wsServ.GetTranferCheckNumberMyCTS(ChargesPerService.DKActual);
                    txtNumberCardCTS.Text = data.ct_banc_cbr;
                }
                else
                {
                    txtNumberCardCTS.Text = String.Empty;
                }
                txtNumberCardCTS.Visible         = true;
                txtDigitoSeguridad.Visible       = false;
                cmbMesVencimiento.Visible        = false;
                cmbAnioVencimiento.Visible       = false;
                txtNombreTarjetahabiente.Visible = false;
                lblDigitoSeguridad.Visible       = false;
                lblMesVencimiento.Visible        = false;
                lblAnioVencimiento.Visible       = false;
                lblNombreTarjetahabiente.Visible = false;
                break;

            default:
                lblCardNumberCTS.Text         = "Número de tarjeta";
                txtNumberCardCTS.Visible      = true;
                lblCardNumberCTS.Visible      = true;
                txtNumberCardCTS.PasswordChar = '·';
                txtNumberCardCTS.Font         = new Font("Symbol", 9F, FontStyle.Regular);


                txtDigitoSeguridad.Visible       = true;
                cmbMesVencimiento.Visible        = true;
                cmbAnioVencimiento.Visible       = true;
                txtNombreTarjetahabiente.Visible = true;
                lblDigitoSeguridad.Visible       = true;
                lblMesVencimiento.Visible        = true;
                lblAnioVencimiento.Visible       = true;
                lblNombreTarjetahabiente.Visible = true;
                btnAccept.Text = "Aplicar cargo en línea";


                switch (((ListItem)cmbTypeCard.SelectedItem).Value)
                {
                case "AX":
                    txtNumberCardCTS.MaxLength    = 16;
                    txtDigitoSeguridad.MaxLength  = 4;
                    txtNumberCardCTS.PasswordChar = '·';
                    txtNumberCardCTS.Font         = new Font("Symbol", 9F, FontStyle.Regular);
                    break;

                default:
                    txtNumberCardCTS.MaxLength    = 16;
                    txtDigitoSeguridad.MaxLength  = 3;
                    txtNumberCardCTS.PasswordChar = '·';
                    txtNumberCardCTS.Font         = new Font("Symbol", 9F, FontStyle.Regular);
                    break;
                }
                break;
            }
        }