private void toolStripButtonViewInvoice_Click(object sender, EventArgs e) { BuildElectronicTicketContract ws = new BuildElectronicTicketContract(); string request = ws.Encrypt(string.Concat(Login.Firm, ";", Login.passWord, ";", Login.PCC)); string url = string.Concat("http://201.149.13.14/Login.aspx?byPass=", request); Process.Start(url); }
private bool ValidarTarjetaCTS(string sNumberCardCTS, TextBox txtGenerico) { try { WsMyCTS wsServ = new WsMyCTS(); BuildElectronicTicketContract getDK = new BuildElectronicTicketContract(); GetInfoPassengerByPNR getPNR = new GetInfoPassengerByPNR(); var respuesta = getPNR.GetInfoPassengerPNR(recLoc); ucFirstValidations.DK = respuesta.CustomerIdentifier; MyCTS.Services.ValidateDKsAndCreditCards.ClientCreditCard clientCreditCard = wsServ.GetClientCreditCardNumber(sNumberCardCTS, ucFirstValidations.DK); if (string.IsNullOrEmpty(sNumberCardCTS)) { this.Focus(); MessageBox.Show("Debes ingresar un número de tarjeta. Ingrese", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); txtGenerico.Text = string.Empty; return(false); } if (!string.IsNullOrEmpty(sNumberCardCTS)) { string creditCard = wsServ.GetCreditCardNumberCTS(txtNumberCardCTS.Text); if (!string.IsNullOrEmpty(creditCard)) { this.Focus(); MessageBox.Show("Debes ingresar un número de tarjeta diferente a una de CTS. Reingrese", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); txtGenerico.Text = string.Empty; return(false); } if (string.IsNullOrEmpty(creditCard)) { string clientCreditCardNumber = wsServ.GetClientCreditCardNumberATT(txtNumberCardCTS.Text); if (string.IsNullOrEmpty(clientCreditCardNumber)) { if (ValidateCreditCardNumber) { // No hace nada } } else if (clientCreditCard.CreditCardNumber != txtNumberCardCTS.Text) { MessageBox.Show("El número de tarjeta ingresado pertenece a un cliente diferente, ingrese un número de tarjeta válido", Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); txtNumberCardCTS.Focus(); return(false); } } } } catch (Exception ex) { this.Focus(); MessageBox.Show("Error al validar tarjeta. Reintente"); txtGenerico.Text = string.Empty; return(false); } return(true); }
private void SendURL() { BuildElectronicTicketContract ws = new BuildElectronicTicketContract(); string request = ws.Encrypt(string.Concat(txtInvoice.Text, ";", Login.Firm, ";", Login.passWord, ";", Login.PCC)); string url = string.Concat("http://201.149.13.14/Login.aspx?byPass=", request); Process.Start(url); Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
public static void ReSendPDFDocumnets(string ticketNumber, string urlVirtuallyThere, string ccMail) { Parameter mailToSend = ParameterBL.GetParameterValue("MailThatSendFeeRule"); Parameter mailPassword = ParameterBL.GetParameterValue("PasswordThatMailToSend"); Parameter displyName = ParameterBL.GetParameterValue("NameSendEmail"); try { BuildElectronicTicketContract ws = new BuildElectronicTicketContract(); ws.SendPDFDocuments(ticketNumber, Login.Mail, ccMail, urlVirtuallyThere, mailToSend.Values, mailPassword.Values, displyName.Values); } catch { } }
public static void CreateFilesPDF(List <string> tickets) { Parameter mailToSend = ParameterBL.GetParameterValue("MailThatSendFeeRule"); Parameter mailPassword = ParameterBL.GetParameterValue("PasswordThatMailToSend"); Parameter displyName = ParameterBL.GetParameterValue("NameSendEmail"); string[] tiketsArray = new string[tickets.Count]; string[] virtuallyThere = new string[tickets.Count]; List <GetLinkByTkt> indexList = null; for (int j = 0; j < tickets.Count; j++) { tiketsArray[j] = tickets[j]; indexList = new List <GetLinkByTkt>(); indexList = GetLinkByTktBL.GetLinkByTkt(tickets[j].Substring(3, 10), Login.OrgId); if (indexList.Count > 0) { virtuallyThere[j] = indexList[0].LinkVirtuallyThere; } else { virtuallyThere[j] = "http://www.google.com.mx"; } } if (tickets.Count > 0) { try { string mail = Login.Mail; if (!string.IsNullOrEmpty(ucSendTicketPrinter.TempCCMail)) { mail = string.Concat(mail, ";", ucSendTicketPrinter.TempCCMail); ucSendTicketPrinter.TempCCMail = string.Empty; } if (ucFirstValidations.Attribute1 != null) { if (ucFirstValidations.Attribute1.Equals(Resources.TicketEmission.Constants.ATTRIBUTE1_CFE100)) { BuildElectronicTicketCFEContract ws = new BuildElectronicTicketCFEContract(); ws.SendInfoToBuilPDF(tiketsArray, virtuallyThere, ucTicketsEmissionInstructions.Airline, mailToSend.Values, mailPassword.Values, mail, displyName.Values); } else { BuildElectronicTicketContract ws = new BuildElectronicTicketContract(); ws.SendInfoToBuilPDF(tiketsArray, virtuallyThere, ucTicketsEmissionInstructions.Airline, mailToSend.Values, mailPassword.Values, mail, displyName.Values); } } else { if (!string.IsNullOrEmpty(ucSendTicketPrinter.DK)) { GetAttribute1 attribute1 = GetAttribute1BL.GetAttribute(ucSendTicketPrinter.DK, Login.OrgId); if (attribute1.Attribute1.Equals(Resources.TicketEmission.Constants.ATTRIBUTE1_CFE100)) { BuildElectronicTicketCFEContract ws = new BuildElectronicTicketCFEContract(); ws.SendInfoToBuilPDF(tiketsArray, virtuallyThere, ucTicketsEmissionInstructions.Airline, mailToSend.Values, mailPassword.Values, mail, displyName.Values); } else { BuildElectronicTicketContract ws = new BuildElectronicTicketContract(); ws.SendInfoToBuilPDF(tiketsArray, virtuallyThere, ucTicketsEmissionInstructions.Airline, mailToSend.Values, mailPassword.Values, mail, displyName.Values); } ucSendTicketPrinter.DK = string.Empty; } else { BuildElectronicTicketContract ws = new BuildElectronicTicketContract(); ws.SendInfoToBuilPDF(tiketsArray, virtuallyThere, ucTicketsEmissionInstructions.Airline, mailToSend.Values, mailPassword.Values, mail, displyName.Values); } } } catch { } } }