/// <summary> /// Armado y envio del comando a MySabre por primera vez /// </summary> private void FirstCommandsSend() { string dateSelected; string localizerRecord; string dWLIST; send = string.Empty; localizerRecord = Resources.Constants.COMMANDS_MD_SLASH; dWLIST = Resources.Constants.COMMANDS_DWLIST; if ((txtDateSelected.Text.Equals(dateNow)) || (string.IsNullOrEmpty(txtDateSelected.Text))) { dateSelected = string.Empty; } else { dateSelected = string.Concat(Resources.Constants.SLASH, txtDateSelected.Text); } send = string.Concat(dWLIST, dateSelected); using (CommandsAPI objCommand = new CommandsAPI()) { sabreAnswer = objCommand.SendReceive(send); } firstCommandSend = true; send = string.Empty; if (!string.IsNullOrEmpty(txtLocalizerRecord.Text)) { send = string.Concat(localizerRecord, txtLocalizerRecord.Text); using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } } else { btnMoveUp.Visible = true; btnMoveUp.Enabled = true; btnMoveDown.Visible = true; btnMoveDown.Enabled = true; } this.InitialControlFocus = txtItemToPrint; txtItemToPrint.Focus(); txtLocalizerRecord.Enabled = false; txtLocalizerRecord.BackColor = SystemColors.Control; txtDateSelected.Enabled = false; txtDateSelected.BackColor = SystemColors.Control; picCalendar.Enabled = false; lblItemtoPrint.Visible = true; txtItemToPrint.Visible = true; statusFirstClick = true; }
/// <summary> /// Armado del comando que se debe enviar a sabre /// </summary> private void BuildCommand() { bool status = false; string send = string.Empty; if (!string.IsNullOrEmpty(txtLine1.Text)) { send = string.Concat((rdoAccounting.Checked) ? "5.S" : "5‡S", txtSegment1.Text, txtLine1.Text); status = true; } if (!string.IsNullOrEmpty(txtLine2.Text)) { if (status) { send = string.Concat(send, (rdoAccounting.Checked) ? "?5.S" : "?5‡S", txtSegment2.Text, txtLine2.Text); } else { send = string.Concat((rdoAccounting.Checked) ? "5.S" : "5‡S", txtSegment2.Text, txtLine2.Text); status = true; } } if (!string.IsNullOrEmpty(txtLine3.Text)) { if (status) { send = string.Concat(send, (rdoAccounting.Checked) ? "?5.S" : "?5‡S", txtSegment3.Text, txtLine3.Text); } else { send = string.Concat((rdoAccounting.Checked) ? "5.S" : "5‡S", txtSegment3.Text, txtLine3.Text); status = true; } } if (!string.IsNullOrEmpty(txtLine4.Text)) { if (status) { send = string.Concat(send, (rdoAccounting.Checked) ? "?5.S" : "?5‡S", txtSegment4.Text, txtLine4.Text); } else { send = string.Concat((rdoAccounting.Checked) ? "5.S" : "5‡S", txtSegment4.Text, txtLine4.Text); } } if (!string.IsNullOrEmpty(send)) { using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
/// <summary> /// Envio de comandos /// </summary> private void CommandsSend() { string send = string.Empty; send = Resources.Group.Constants.COMMANDS_AST_INDENT_B_SLASH; send = string.Concat(send, txtNameGroup.Text); using (CommandsAPI objCommands = new CommandsAPI()) { result = objCommands.SendReceive(send); } }
/// <summary> /// Permite el envio de comandos hacia Sabre /// </summary> private void commandsSend() { if (!string.IsNullOrEmpty(HistoryRecordInQueue)) { //Envia el comando contenido en la variable HistoryRecordInQueue using (CommandsAPI objCommands = new CommandsAPI()) { objCommands.SendReceive(HistoryRecordInQueue); } } }
/// <summary> /// Armado del comando que se envia a sabre /// </summary> private void BuildCommand() { string send = string.Concat("RD", txtDateBoletage.Text, txtOrigin.Text, txtDestino.Text, txtDateDeparture.Text, txtFareBasis.Text, "-", txtAirline.Text); using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
/// <summary> /// Permite el envio de comandos hacia Sabre /// </summary> private void commandsSend() { if (!string.IsNullOrEmpty(ExitFromQueue)) { //Envia el comando en la variable ExitFromQueue using (CommandsAPI objCommands = new CommandsAPI()) { objCommands.SendReceive(ExitFromQueue); } } }
/// <summary> /// Se envia el comando de acuerdo a los campos ingresados /// </summary> private void CommandsSendwithDate() { string send; send = Resources.Constants.COMMANDS_DC_CROSS_USD1_SLAHS_MXN_ + txtDateSelect.Text; using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
/// <summary> /// En MoreFlight solo manda un comando para mostrar mas vuelos /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnMoreFlights_Click(object sender, EventArgs e) { //áplica coloreo string Moreflight; Moreflight = Resources.Constants.COMMANDS_ONE_AST; using (CommandsAPI objCommands = new CommandsAPI()) { result = objCommands.SendReceive(Moreflight); } }
/// <summary> /// Manda el comando inicial al emulador de MySabre para desplegar /// los segmentos del record /// </summary> private void SendInitialCommand() { string send = string.Empty; send = Resources.TicketEmission.Constants.COMMANDS_AST_I; using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } txtSegment1.Focus(); }
/// <summary> /// Armado del comando enviado a Sabre /// </summary> private void BuildCommand() { bool status = false; string send = string.Empty; if (!string.IsNullOrEmpty(txtLine1.Text)) { send = string.Concat("5.", txtLine1.Text); status = true; } if (!string.IsNullOrEmpty(txtLine2.Text)) { if (status) { send = string.Concat(send, Resources.Constants.ENDIT, "5", txtLine2.Text); } else { send = string.Concat("5.", txtLine2.Text); status = true; } } if (!string.IsNullOrEmpty(txtLine3.Text)) { if (status) { send = string.Concat(send, Resources.Constants.ENDIT, "5", txtLine3.Text); } else { send = string.Concat("5.", txtLine3.Text); status = true; } } if (!string.IsNullOrEmpty(txtLine4.Text)) { if (status) { send = string.Concat(send, Resources.Constants.ENDIT, "5", txtLine4.Text); } else { send = string.Concat("5.", txtLine4.Text); } } if (!string.IsNullOrEmpty(send)) { using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
/// <summary> /// Armado y envio del comando a MySabre cuando al opción /// "Ignora y recupera" esta selccionada y se presiona el boton Aceptar /// </summary> public void IgnoreAndSaveCommandsSend() { string ignoreAndSave; ignoreAndSave = Resources.Constants.COMMANDS_IR; send = ignoreAndSave; using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
private void APIResponseER() { if ((!string.IsNullOrEmpty(result))) { ERR_ConcludeReservation.err_concludereservation(result); if (ERR_ConcludeReservation.Status) { if (!string.IsNullOrEmpty(ERR_ConcludeReservation.CustomUserMsg)) { errorER = true; MessageBox.Show(ERR_ConcludeReservation.CustomUserMsg, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Warning); Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); } } else if (ERR_ConcludeReservation.StatusDKNull) { errorER = true; Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCDKCLIENT); } else if (ERR_ConcludeReservation.Command) { errorER = false; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(Resources.Constants.COMMANDS_N_AST_NM, 0, 1); } send = Resources.Constants.COMMANDS_ER; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send); } string resultAux = result.Replace("‡", "\n"); string[] sabreAnswerInfo = resultAux.Split(new char[] { '\n' }); if (sabreAnswerInfo.Length > 0 && sabreAnswerInfo[0].Length == 6 && ValidateRegularExpression.ValidatePNR(sabreAnswerInfo[0])) { GetValuesWebServices(sabreAnswerInfo[0]); } } else if (ERR_ConcludeReservation.CommandF) { errorER = false; using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(Resources.Constants.COMMANDS_F); objCommand.SendReceive(Resources.Constants.COMMANDS_ER); } } else { errorER = false; } } }
/// <summary> /// Método para la obtención del número de pasajeros /// en el record /// </summary> private void commandSend() { sabreAnswer = string.Empty; string searchPax = Resources.TicketEmission.Constants.COMMANDS_TN; using (CommandsAPI objCommand = new CommandsAPI()) { sabreAnswer = objCommand.SendReceive(searchPax); } sabreconcat = string.Concat(sabreAnswer, "?"); }
/// <summary> /// Función que envia el comando MD /// </summary> private void SendScrollCommand() { string send = string.Empty; send = string.Empty; sabreAnswer = string.Empty; send = Resources.TicketEmission.Constants.COMMANDS_MD; using (CommandsAPI objCommand = new CommandsAPI()) { sabreAnswer = objCommand.SendReceive(send, 0, 0); } }
private void ucQREX_Load(object sender, EventArgs e) { ucAvailability.IsInterJetProcess = false; send = Resources.TicketEmission.Constants.COMMANDS_AST_T; using (CommandsAPI objCommand = new CommandsAPI()) { sabreAnswer = objCommand.SendReceive(send); } txtCommand.Focus(); send = string.Empty; Qrex = true; }
private void ucSplitConfirmation_Load(object sender, EventArgs e) { ucAvailability.IsInterJetProcess = false; rdoYes.Checked = true; rdoYes.Focus(); string send = Resources.Constants.COMMANDS_F; using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } }
//Manda comando o muestra los datos deacuerdo a la opción elegida private void SendCommand() { int col = 0; int row = 0; bool notcontinue = false; string result = string.Empty; string send = string.Empty; string sabre = string.Empty; send = string.Concat("HB", txtFirmNumber.Text); using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send); } CommandsQik.searchResponse(result, "RESTRICTED", ref row, ref col); if (row != 0 || col != 0) { using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive("I"); } MessageBox.Show(Resources.Reservations.NO_TIENE_AUTORIZACION_LIMPIAR_FIRMAS, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); notcontinue = true; row = 0; col = 0; } CommandsQik.searchResponse(result, "NEW EMPLOYEE", ref row, ref col); if (row != 0 || col != 0) { using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive("I"); } MessageBox.Show(Resources.Reservations.LA_FIRMA_NO_EXISTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); notcontinue = true; row = 0; col = 0; } else if (!notcontinue) { send = "H/AUTH BY" + txtAuthorization.Text; sabre = "HPCLEAR"; using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); objCommand.SendReceive(sabre); } MessageBox.Show(Resources.Reservations.FIRMA_LIMPIADA_EXITO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); } }
//User Control Load /// <summary> /// Se asignas los colores a los Botones de Si y No /// Se asigna el foco al Boton principal No /// Se manda un comando para verificar si existen segmentos que borrar /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ucCancelSegments_Load(object sender, EventArgs e) { ucAvailability.IsInterJetProcess = false; btnYes.Focus(); btnYes.ForeColor = Color.OrangeRed; btnNo.FlatAppearance.BorderColor = Color.White; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(Resources.Constants.COMMANDS_AST_I); } APIResponse(); }
/// <summary> /// Se envia el comando de acuerdo a los campos ingresados /// </summary> private void CommandsSend() { int flag = 0; string send = string.Empty; if (!string.IsNullOrEmpty(txtLine1.Text)) { send = string.Concat(send, Resources.Constants.FIVE_H_INDENT, txtLine1.Text); flag = 1; } if (!string.IsNullOrEmpty(txtLine2.Text)) { if (flag == 1) { send = string.Concat(send, Resources.Constants.END_ITEM_FIVE_H_INDENT, txtLine2.Text); } else { send = string.Concat(send, Resources.Constants.FIVE_H_INDENT, txtLine2.Text); flag = 1; } } if (!string.IsNullOrEmpty(txtLine3.Text)) { if (flag == 1) { send = string.Concat(send, Resources.Constants.END_ITEM_FIVE_H_INDENT, txtLine3.Text); } else { send = string.Concat(send, Resources.Constants.FIVE_H_INDENT, txtLine3.Text); flag = 1; } } if (!string.IsNullOrEmpty(txtLine4.Text)) { if (flag == 1) { send = string.Concat(send, Resources.Constants.END_ITEM_FIVE_H_INDENT, txtLine4.Text); } else { send = string.Concat(send, Resources.Constants.FIVE_H_INDENT, txtLine4.Text); flag = 1; } } using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } }
/// <summary> /// Se envia el comando de acuerdo a los campos ingresados /// </summary> private void CommandsSendForName() { if ((!string.IsNullOrEmpty(txtLastName.Text)) && (!string.IsNullOrEmpty(txtName.Text)) && string.IsNullOrEmpty(txtPCC.Text)) { send = Resources.Constants.COMMANDS_AST_INDENT + txtLastName.Text + Resources.Constants.SLASH + txtName.Text; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send); } } else if ((!string.IsNullOrEmpty(txtLastName.Text)) && (!string.IsNullOrEmpty(txtName.Text)) && (!string.IsNullOrEmpty(txtPCC.Text))) { send = Resources.Constants.COMMANDS_AST_INDENT + txtPCC.Text + Resources.Constants.INDENT + txtLastName.Text + Resources.Constants.SLASH + txtName.Text; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send); } } else if ((!string.IsNullOrEmpty(txtLastName.Text)) && (string.IsNullOrEmpty(txtName.Text)) && string.IsNullOrEmpty(txtPCC.Text)) { send = Resources.Constants.COMMANDS_AST_INDENT + txtLastName.Text; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send); } } else if ((!string.IsNullOrEmpty(txtLastName.Text)) && (string.IsNullOrEmpty(txtName.Text)) && (!string.IsNullOrEmpty(txtPCC.Text))) { send = Resources.Constants.COMMANDS_AST_INDENT + txtPCC.Text + Resources.Constants.INDENT + txtLastName.Text; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send); } } }
//Manda comando o muestra los datos deacuerdo a la opción elegida private void SendCommand() { int col = 0; int row = 0; string result = string.Empty; string send = string.Empty; string sabre = string.Empty; string he = string.Empty; send = string.Concat("HB", txtFirmNumber.Text); using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send); } CommandsQik.searchResponse(result, "NEW EMPLOYEE", ref row, ref col); if (row != 0 || col != 0) { using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive("I"); } MessageBox.Show(Resources.Reservations.LA_FIRMA_NO_EXISTE, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); row = 0; col = 0; } else { send = "H/AUTH BY " + txtAuthorization.Text; sabre = "H/PASS" + txtPasswordTemp.Text; he = "HE"; using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); objCommand.SendReceive(sabre); result = objCommand.SendReceive(he); objCommand.SendReceive("I"); } CommandsQik.searchResponse(result, "DONE", ref row, ref col); if (row != 0 || col != 0) { MessageBox.Show(Resources.Reservations.PASSCODE_TEMPORAL_ASIGNADO, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); } else { MessageBox.Show(Resources.Reservations.PRESENTO_ERROR, Resources.Constants.MYCTS, MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
/// <summary> /// Se envia el comando de acuerdo a los campos ingresados /// </summary> private void CommandsSend() { string extract; string send; extract = txtPCC.Text; send = Resources.Constants.COMMANDS_AAA + extract.Substring(0, 4); using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
/// <summary> /// asignación de valores iniciales envio de comando WPA /// y evaluación de errores /// </summary> private void InitialValues() { txtShowRate.Focus(); string send = string.Empty; send = Resources.Constants.COMMANDS_WPA; using (CommandsAPI objCommand = new CommandsAPI()) { sabreAnswer = objCommand.SendReceive(send); } firstEvaluation = false;; APIResponse(); }
private void GeneracionRemarks() { for (int i = 0; i < lstDatosTarjeta.Count; i++) { if (lstDatosTarjeta[i].Remark != null && lstDatosTarjeta[i].Remark != String.Empty) { using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceiveEmission(lstDatosTarjeta[i].Remark); } } } }
/// <summary> /// Sends the command. /// </summary> /// <param name="command">The command.</param> /// <returns></returns> public string SendCommand(string command) { string responseFromApi = ""; using (var commandSender = new CommandsAPI()) { if (!string.IsNullOrEmpty(command)) { responseFromApi = commandSender.SendReceive(command.ToUpper()); } } return(responseFromApi); }
private void ucPlaceRecordQueue_Load(object sender, EventArgs e) { string sabreAnswer = String.Empty; string QueueBritish = ParameterBL.GetParameterValue("QueueBritish").Values; using (CommandsAPI objCommand = new CommandsAPI()) { sabreAnswer = objCommand.SendReceive(QueueBritish); CommandsQik.CopyResponse(sabreAnswer, ref ucFirstValidations.dk, 1, 19, 6); } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
/// <summary> /// Armado y envio del comando correspondiente de esta mascarilla aMySabre /// </summary> private void CommandsSend() { string send = string.Concat(Resources.Constants.COMMANDS_W_CROSSLORAINE_RG, txtNumberTicket.Text, Resources.Constants.COMMANDS_CROSSLORAINE_RE); using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(send); } Loader.AddToPanel(Loader.Zone.Middle, this, Resources.Constants.UCWELCOME); }
private void RecuperarPNR() { if (String.IsNullOrEmpty(recLoc)) { using (CommandsAPI objCommand = new CommandsAPI()) { string recordLocalizador = string.Empty; string sabreAnswer = objCommand.SendReceive(ChargesPerService.PreguntasASabre.VERIFICAR_RESERVA); CommandsQik.CopyResponse(sabreAnswer, ref recordLocalizador, 1, 1, 6); recLoc = recordLocalizador; } } }
/// <summary> /// En este se tiene que aumentar 300 dias a la fecha actual para mandar /// el comando con la nueva fecha y las instucciones para realizar el /// segmento de protección /// </summary> private void SegmentProtection() { string datefinal = string.Empty; DateTime lastDate = DateTime.Now.AddDays(300); datefinal = lastDate.ToString("ddMMM", new System.Globalization.CultureInfo("en-US")).ToUpper(); send = string.Format(Resources.Constants.COMMANDS_SEGMENT_PROTECTION, datefinal); using (CommandsAPI objCommand = new CommandsAPI()) { objCommand.SendReceive(Resources.Constants.COMMANDS_0A); objCommand.SendReceive(send); } }
/// <summary> /// En esta funcion extrae el DK, primero se manda un comando /// despues se buscada una frase y si la encuentra copia el DK /// pero por el momento tampoco se usa /// </summary> private void DK() { send = Resources.TicketEmission.Constants.COMMANDS_AST_PDK; using (CommandsAPI objCommand = new CommandsAPI()) { result = objCommand.SendReceive(send, 0, 0); } CommandsQik.searchResponse(result, Resources.TicketEmission.ValitationLabels.CUSTOMER_NUMBER, ref row, ref col, 1, 2, 1, 64); if (row != 0 || col != 0) { dk = string.Empty; CommandsQik.CopyResponse(result, ref dk, row, 19, 6); } }