void ProcessEtickets() { Travelbytes.WebService.Itinerary.Decoder Decoder = new Travelbytes.WebService.Itinerary.Decoder(); Decoder.Reload = false; Decoder.Config = Server.MapPath(""); Decoder.Templates = Server.MapPath("Templates/"); Decoder.AddressDSN = GetAddressDataSourceMySQL(); Credentials Cred = GetUser("Galileo"); Decoder.User = Cred.User; Decoder.PSW = Cred.PSW; Decoder.HAP = Cred.HAP; Decoder.URL = Cred.URL; Decoder.RLOC = m_RLOC; Decoder.Offset = GetOffSet(); String GetTick = ""; if (Request.QueryString["ET"] != null) { GetTick = Request.QueryString["ET"].ToString(); } Decoder.ItineraryURL = Cred.ItineraryURL; int i = 0; string Location = Server.MapPath("temp"); if (!Location.EndsWith(@"\")) Location += @"\"; if (m_Etickets.Count > 1) { ArrayList MyTickets = Decoder.FormatMultipleEticketRecovery(m_Etickets, Location, Session.SessionID, m_Surname); if (MyTickets == null || MyTickets.Count == 0) { //DropDownList1.Visible = false; //Need to Work //Submit1.Visible = false; //etLabel.Visible = false; //outError.InnerHtml = msg; return; } else if (MyTickets.Count == 1) { // go direct Travelbytes.WebService.Itinerary.LocalEticketRetrieval str = (Travelbytes.WebService.Itinerary.LocalEticketRetrieval)MyTickets[0]; Travelbytes.WebService.Itinerary.LocalEticketRetrieval mytkt = (Travelbytes.WebService.Itinerary.LocalEticketRetrieval)MyTickets[0]; Tranx Trans1 = new Tranx(); Trans1.EticketRetrieve(this.m_RLOC, m_Surname, mytkt.Eticket.AirV + " " + mytkt.Eticket.FirstTkNum); Response.Redirect("temp/" + str.FileName, true); } int TKTCount = 0; foreach (Travelbytes.WebService.Itinerary.LocalEticketRetrieval str in MyTickets) { if (GetTick.Length > 10) { if (str.FileName.IndexOf(GetTick) != -1) { Response.Redirect("temp/" + str.FileName, true); } } { } TKTCount++; if (str.Eticket != null && str.Status.Length == 0) { //ListItem item = new ListItem(str.Eticket.AirV + " " + str.Eticket.FirstTkNum, "temp/" + str.FileName); //DropDownList1.Items.Add(item); } else { //ListItem item = new ListItem(string.Format("Ticket {0}", TKTCount), "temp/" + str.FileName); //DropDownList1.Items.Add(item); } } } else { // for a single eticket foreach (Travelbytes.ClassMap.ETicketNum T in m_Etickets) { string Name = Session.SessionID + i.ToString() + ".xml"; if (Decoder.GetTicket(T.AirV + T.FirstTkNum, Name, Server.MapPath("temp"))) { this.m_TicketNumber = T.AirV + T.FirstTkNum; m_URLS.Add("temp/" + Name); } } //Decoder.EndSession(); if (m_URLS.Count == 1) { Tranx Trans1 = new Tranx(); Trans1.EticketRetrieve(this.m_RLOC, m_Surname, m_TicketNumber); Response.Redirect(m_URLS[0].ToString(), true); } } }
void ProcessEtickets() { Travelbytes.WebService.Itinerary.Decoder Decoder = new Travelbytes.WebService.Itinerary.Decoder(); Decoder.Reload = false; Decoder.Config = Server.MapPath(""); Decoder.Templates = Server.MapPath("Templates/"); Decoder.AddressDSN = GetAddressDataSourceMySQL(); Credentials Cred = GetUser("Galileo"); Decoder.User = Cred.User; Decoder.PSW = Cred.PSW; Decoder.HAP = Cred.HAP; Decoder.URL = Cred.URL; Decoder.RLOC = m_RLOC; Decoder.Offset = GetOffSet(); String GetTick = ""; if (Request.QueryString["ET"] != null) { GetTick = Request.QueryString["ET"].ToString(); } Decoder.ItineraryURL = Cred.ItineraryURL; int i = 0; string Location = Server.MapPath("temp"); if (!Location.EndsWith(@"\")) { Location += @"\"; } if (m_Etickets.Count > 1) { ArrayList MyTickets = Decoder.FormatMultipleEticketRecovery(m_Etickets, Location, Session.SessionID, m_Surname); if (MyTickets == null || MyTickets.Count == 0) { //DropDownList1.Visible = false; //Need to Work //Submit1.Visible = false; //etLabel.Visible = false; //outError.InnerHtml = msg; return; } else if (MyTickets.Count == 1) { // go direct Travelbytes.WebService.Itinerary.LocalEticketRetrieval str = (Travelbytes.WebService.Itinerary.LocalEticketRetrieval)MyTickets[0]; Travelbytes.WebService.Itinerary.LocalEticketRetrieval mytkt = (Travelbytes.WebService.Itinerary.LocalEticketRetrieval)MyTickets[0]; Tranx Trans1 = new Tranx(); Trans1.EticketRetrieve(this.m_RLOC, m_Surname, mytkt.Eticket.AirV + " " + mytkt.Eticket.FirstTkNum); Response.Redirect("temp/" + str.FileName, true); } int TKTCount = 0; foreach (Travelbytes.WebService.Itinerary.LocalEticketRetrieval str in MyTickets) { if (GetTick.Length > 10) { if (str.FileName.IndexOf(GetTick) != -1) { Response.Redirect("temp/" + str.FileName, true); } } { } TKTCount++; if (str.Eticket != null && str.Status.Length == 0) { //ListItem item = new ListItem(str.Eticket.AirV + " " + str.Eticket.FirstTkNum, "temp/" + str.FileName); //DropDownList1.Items.Add(item); } else { //ListItem item = new ListItem(string.Format("Ticket {0}", TKTCount), "temp/" + str.FileName); //DropDownList1.Items.Add(item); } } } else { // for a single eticket foreach (Travelbytes.ClassMap.ETicketNum T in m_Etickets) { string Name = Session.SessionID + i.ToString() + ".xml"; if (Decoder.GetTicket(T.AirV + T.FirstTkNum, Name, Server.MapPath("temp"))) { this.m_TicketNumber = T.AirV + T.FirstTkNum; m_URLS.Add("temp/" + Name); } } //Decoder.EndSession(); if (m_URLS.Count == 1) { Tranx Trans1 = new Tranx(); Trans1.EticketRetrieve(this.m_RLOC, m_Surname, m_TicketNumber); Response.Redirect(m_URLS[0].ToString(), true); } } }