/// <summary> /// Valida que se ingrese una tarjeta correcta /// </summary> /// <param name="code">Código de tarjeta</param> /// <returns>Status</returns> private bool ValidateCredictCardCode(string code) { List <CatCreditCardsCodes> CreditCardsCodes = CatCreditCardsCodesBL.GetCreditCardsCodes(code); if (CreditCardsCodes.Count > 0) { return(true); } else { return(false); } }
/// <summary> /// Valida las reglas de negocio existentes en la emision de boleto actual y las muestra en la mascarilla /// </summary> private void validateBusinessRules() { validatebusinessrules = true; List <CatCreditCardsCodes> CatCreditCardsCodesList = CatCreditCardsCodesBL.GetCreditCardsCodes(ucFormPayment.creditCardName); if (CatCreditCardsCodesList.Count.Equals(0)) { lblCreditCardName.Text = string.Empty; } else { lblCreditCardName.Text = CatCreditCardsCodesList[0].CatCreCarCodName; } if (ucTicketsEmissionInstructions.ticketType.Equals(Resources.TicketEmission.Constants.NORMAL_TICKET)) { lblTicketType.Text = Resources.TicketEmission.Constants.NORMAL; } else if (ucTicketsEmissionInstructions.ticketType.Equals(Resources.TicketEmission.Constants.PHASE35375)) { lblTicketType.Text = Resources.TicketEmission.Constants.PHASE_35_OR_375; } else if (ucTicketsEmissionInstructions.ticketType.Equals(Resources.TicketEmission.Constants.PHASEIV)) { lblTicketType.Text = Resources.TicketEmission.Constants.PHASE_IV; } lblAirLine.Text = ucTicketsEmissionInstructions.AirlineName; try { lblComission.Text = string.Concat(ucTicketsEmissionInstructions.Commission.Substring(3, 2), Resources.TicketEmission.Constants.SPACE, Resources.TicketEmission.Constants.PERCENTAGE); } catch { lblComission.Text = string.Concat(ucTicketsEmissionInstructions.Commission.Substring(3, 1), Resources.TicketEmission.Constants.SPACE, Resources.TicketEmission.Constants.PERCENTAGE); } if (ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_AMERICANEXPRESS)) { lblPaymentForm.Text = Resources.TicketEmission.Constants.CREDIT_CARD_SYSTEM; lblCreditCardName.Visible = true; } else if (ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_CREDITCARD)) { lblPaymentForm.Text = Resources.TicketEmission.Constants.CREDIT_CARD_MANUAL; lblCreditCardName.Visible = true; } else if (ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_CASH)) { lblPaymentForm.Text = Resources.TicketEmission.Constants.EFECTIVO; } else if (ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_MIXPAYMENT)) { lblPaymentForm.Text = Resources.TicketEmission.Constants.PAGO_MIXTO; } else if (ucTicketsEmissionInstructions.wayPayment.Equals(Resources.TicketEmission.Constants.PAYMENT_MISCELANEOUS)) { lblPaymentForm.Text = Resources.TicketEmission.Constants.MISCELANEA; } lblTourCode.Text = ucTicketsEmissionInstructions.tourCode; lblNegotiatedFare.Text = ucTicketsEmissionInstructions.quaNegociated; lblCorporateID.Text = ucTicketsEmissionInstructions.corporateID; lblAccountCode.Text = ucTicketsEmissionInstructions.accountCode; if (ucTicketsEmissionInstructions.printItinerary.Equals(Resources.TicketEmission.Constants.COMMANDS_CROSSLORAINE_DPB)) { lblItinerary.Text = Resources.TicketEmission.Constants.Yes; } else { lblItinerary.Text = Resources.TicketEmission.Constants.No; } if (!string.IsNullOrEmpty(ucTicketsEmissionInstructions.OSI)) { lblOsiValue.Text = ucTicketsEmissionInstructions.OSI.Remove(0, 1); } else { lblOsiValue.Text = string.Empty; } }