Esempio n. 1
0
        private void ReadPNR(string token)
        {
            TravelItineraryRead.TravelItineraryReadPortTypeClient client = TIR.returnClient(token);

            TravelItineraryRead.MessageHeader message_header = TIR.returnMessageHeader();
            TravelItineraryRead.Security1     security       = TIR.returnSecurityHeader(token);

            // this line is to use TLS 1.2 otherwise it cannot connect to the end point

            System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
            TravelItineraryRead.TravelItineraryReadRS response;
            try
            {
                response = client.TravelItineraryReadRQ(ref message_header, ref security, WSPayloads.buildRequestForTravelItinRead());
                // MessageBox.Show(response.ToString());
                SerializeAndShowWSResponse(response);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
            finally
            {
            }
        }
Esempio n. 2
0
 //Called if another type of Percentile is merged with this one
 public void Merge(TIR other)
 {
     balance.AddRange(other.balance);
 }