/// <summary>
        /// Agrega un regitro en base de datos con la información de la emisión y el código de autorización
        /// </summary>
        private void SetCSCLog()
        {
            if ((ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_AMERICANEXPRESS) || ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_MIXPAYMENT)) && (ucFormPayment.CardType.Equals("VI") || ucFormPayment.CardType.Equals("CA")))
            {
                string tickets = string.Empty;

                if (listNewTickets.Count > 0)
                {
                    for (int i = 0; i < listNewTickets.Count; i++)
                    {
                        tickets = string.Concat(tickets, listNewTickets[i], ",");
                    }

                    tickets = tickets.Remove(tickets.Length - 1);
                    UpdateAuthCodeBL.UpdateAuthCode(ucFirstValidations.LocatorRecord, ucTicketEmissionConfirmation.AuthCode, tickets);
                }
                else if (string.IsNullOrEmpty(ucTicketsEmissionInstructions.CodeAuth.PNR))
                {
                    SetAuthCodeBL.SetAuthCode(ucFirstValidations.LocatorRecord, ucTicketEmissionConfirmation.AuthCode, ucFormPayment.CardType, ucFormPayment.Amount, ucFormPayment.Bank, null, DateTime.Now, ucFormPayment.SendCommandWP);
                }
            }
            ucFormPayment.ReturnForMisc           = false;
            ucTicketEmissionConfirmation.AuthCode = string.Empty;
            ucFormPayment.Bank   = string.Empty;
            ucFormPayment.Amount = string.Empty;
            //listNewTickets.Clear();
        }
示例#2
0
        private void btnAccept_Click(object sender, EventArgs e)
        {
            if (ValidBussinesRules)
            {
                AuthCode codeAuth = GetAuthCodeBL.GetAuthCode(txtPNR.Text);

                if (!string.IsNullOrEmpty(codeAuth.PNR))
                {
                    DialogResult result = MessageBox.Show("Desea CANCELAR éste código de autorización" + "\n\n CÖDIGO: " + codeAuth.Code + "\n TARJETA: " + codeAuth.CardType + "\n BANCO: " + codeAuth.Bank.ToUpper() + "\n MONTO: " + codeAuth.Amount + "\n FORMATO DE COTIZACIÓN: " + codeAuth.CommandWP,
                                                          Resources.Constants.MYCTS, MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                    if (result.Equals(DialogResult.Yes))
                    {
                        UpdateAuthCodeBL.UpdateAuthCode(codeAuth.PNR, codeAuth.Code, string.Concat("CANCEL - AUTH - ", DateTime.Now.ToString()));
                        MessageBox.Show("La autorización se ha cancelado con éxito",
                                        Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show("La autorización no se ha cancelado",
                                        Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                else
                {
                    MessageBox.Show("No se encontró ninguna autorización pendiente",
                                    Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

                txtPNR.Text = string.Empty;
            }
        }