public DataTable ConfirmTicketCancellation(string bookingId, String[] SeatNo)
 {
     try
     {
         TGTravelServiceClient o = new TGTravelServiceClient();
         o.Open();
         DataTable data = new DataTable();
         data.Columns.Add("Status");
         data.Columns.Add("refundAmount");
         CancellationDetails CDetails = o.confirmTicketCancellation(UserId, Password, bookingId, SeatNo);
         DataRow row = data.NewRow();
         if (CDetails.status.message.ToString() == "Success")
         {
             row["refundAmount"] = CDetails.refundAmount;
             row["Status"] = CDetails.status.message;
             data.Rows.Add(row);
         }
         o.Close();
         return data;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Method for ticket cancellation confirmation
 /// </summary>
 /// <returns></returns>
 public String confirmTicketCancellation(String bookingId, String seatNumbers, String URL, String ConsumerKey, String ConsumerSecret)
 {
     client = new TGTravelServiceClient("TGSWS", URL);
     string[] seats = seatNumbers.Split(',');
     CancellationDetails response = client.confirmTicketCancellation(ConsumerKey, ConsumerSecret, bookingId, seats);
     return JsonConvert.SerializeObject(response);
     //return JsonConvert.SerializeObject(response);
 }