/// <summary>
 /// Se busca si existe un Segmento de Protección
 /// </summary>
 private void APIResponseSegment()
 {
     if ((!string.IsNullOrEmpty(result)))
     {
         ERR_ConcludeReservation.err_concludereservation(result);
         if (!ERR_ConcludeReservation.Segment)
         {
             SegmentProtection();
         }
     }
 }
예제 #2
0
 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>
        /// Inserta segmento de proteccion
        /// </summary>
        public void SegmentProtectionValidation()
        {
            string sabreAnswer = string.Empty;

            using (CommandsAPI objCommand = new CommandsAPI())
            {
                sabreAnswer = objCommand.SendReceive(Resources.Constants.COMMANDS_AST_IO);
            }

            if ((!string.IsNullOrEmpty(sabreAnswer)))
            {
                ERR_ConcludeReservation.err_concludereservation(sabreAnswer);

                if (!ERR_ConcludeReservation.Segment)
                {
                    SegmentProtection();
                }
            }
        }