private DataSet methodround() { try { #region Variables string str = string.Empty; string FlightSegmentsID = string.Empty; string DepartureAirportCode = string.Empty; string ArrivalDateTime = string.Empty; string DepartureAirportName = string.Empty; string DepartureDateTime = string.Empty; string FlightNumber = string.Empty; string MarketingAirlineCode = string.Empty; string OperatingAirlineCode = string.Empty; string OperatingAirlineName = string.Empty; string OperatingAirlineFlightNumber = string.Empty; string NumStops = string.Empty; string LinkSellAgrmnt = string.Empty; string Conx = string.Empty; string AirpChg = string.Empty; string InsideAvailOption = string.Empty; string GenTrafRestriction = string.Empty; string DaysOperates = string.Empty; string JrnyTm = string.Empty; string EndDt = string.Empty; string StartTerminal = string.Empty; string EndTerminal = string.Empty; string FltTm = string.Empty; string LSAInd = string.Empty; string Mile = string.Empty; string Availability = string.Empty; string BIC = string.Empty; string bookingclass = string.Empty; string classType = string.Empty; string farebasiscode = string.Empty; string Rule = string.Empty; string PsgrType = string.Empty; string BaseFare = string.Empty; string Tax = string.Empty; string BagInfo = string.Empty; string AirEquipType = string.Empty; string ArrivalAirportCode = string.Empty; string ArrivalAirportName = string.Empty; string return1 = string.Empty; string id = string.Empty; string key = string.Empty; string ActualBaseFare = string.Empty; string FareTax = string.Empty; string STax = string.Empty; string TCharge = string.Empty; string SCharge = string.Empty; string TDiscount = string.Empty; string TMarkup = string.Empty; string TPartnerCommission = string.Empty; string TSdiscount = string.Empty; string FarePsgrType = string.Empty; string FareBaseFare = string.Empty; string FareTax1 = string.Empty; string Country = string.Empty; string Amt = string.Empty; string ocTax = string.Empty; string onwardId = string.Empty; string OriginDestinationOption_Id = string.Empty; string FareDetails_id = string.Empty; string FareBreakUp_Id = string.Empty; string FareAry_id = string.Empty; string FareId = string.Empty; string bookingclassFareId = string.Empty; string psgrBreakUp_Id = string.Empty; string psgrAy_id = string.Empty; string country = string.Empty; string taxAmt = string.Empty; string taxData = string.Empty; string taxDataAry_id = string.Empty; string returnId = string.Empty; string FlightSegmentsIDRet = string.Empty; string DepartureAirportCodeRet = string.Empty; string ArrivalDateTimeRet = string.Empty; string DepartureAirportNameRet = string.Empty; string DepartureDateTimeRet = string.Empty; string FlightNumberRet = string.Empty; string MarketingAirlineCodeRet = string.Empty; string OperatingAirlineCodeRet = string.Empty; string OperatingAirlineNameRet = string.Empty; string OperatingAirlineFlightNumberRet = string.Empty; string NumStopsRet = string.Empty; string LinkSellAgrmntRet = string.Empty; string ConxRet = string.Empty; string AirpChgRet = string.Empty; string InsideAvailOptionRet = string.Empty; string GenTrafRestrictionRet = string.Empty; string DaysOperatesRet = string.Empty; string JrnyTmRet = string.Empty; string EndDtRet = string.Empty; string StartTerminalRet = string.Empty; string EndTerminalRet = string.Empty; string FltTmRet = string.Empty; string LSAIndRet = string.Empty; string MileRet = string.Empty; string AvailabilityRet = string.Empty; string BICRet = string.Empty; string bookingclassRet = string.Empty; string classTypeRet = string.Empty; string farebasiscodeRet = string.Empty; string RuleRet = string.Empty; string PsgrTypeRet = string.Empty; string BaseFareRet = string.Empty; string TaxRet = string.Empty; string BagInfoRet = string.Empty; string AirEquipTypeRet = string.Empty; string ArrivalAirportCodeRet = string.Empty; string ArrivalAirportNameRet = string.Empty; string idRet = string.Empty; string keyRet = string.Empty; string ActualBaseFareRet = string.Empty; string FareTaxRet = string.Empty; string STaxRet = string.Empty; string TChargeRet = string.Empty; string SChargeRet = string.Empty; string TDiscountRet = string.Empty; string TMarkupRet = string.Empty; string TPartnerCommissionRet = string.Empty; string TSdiscountRet = string.Empty; string FarePsgrTypeRet = string.Empty; string FareBaseFareRet = string.Empty; string FareTax1Ret = string.Empty; string CountryRet = string.Empty; string AmtRet = string.Empty; string ocTaxRet = string.Empty; string onwardIdRet = string.Empty; string OriginDestinationOption_IdRet = string.Empty; string FareDetails_idRet = string.Empty; string FareBreakUp_IdRet = string.Empty; string FareAry_idRet = string.Empty; string FareIdRet = string.Empty; string bookingclassFareIdRet = string.Empty; string psgrBreakUp_IdRet = string.Empty; string psgrAy_idRet = string.Empty; string countryRet = string.Empty; string taxAmtRet = string.Empty; string taxDataRet = string.Empty; string taxDataAry_idRet = string.Empty; string returnIdRet = string.Empty; string taxdatapsgr = string.Empty; string taxdatapsgrRet = string.Empty; #endregion #region old //DataTable dtPricingreqFare = dsIntFlights.Tables["Fare"]; //if (dtPricingreqFare.Rows.Count > 0) //{ // DataRow[] rowFare = dtPricingreqFare.Select("FareAry_id=" + FareAry_id); // foreach (DataRow row in rowFare) // { // if (row.Table.Rows.Count == 0) // { // str = "<Fare><PsgrType>" + row["PsgrType"].ToString() + "</PsgrType><BaseFare>" + row["BaseFare"].ToString() + "</BaseFare><Tax>" + row["Tax"].ToString() + "</Tax></Fare>"; // } // else // { // str = str + "<Fare><PsgrType>" + row["PsgrType"].ToString() + "</PsgrType><BaseFare>" + row["BaseFare"].ToString() + "</BaseFare><Tax>" + row["Tax"].ToString() + "</Tax></Fare>";//<TaxDataAry>" + str + "</TaxDataAry> // } // } //} //FlightBAL objFlightsBal = new FlightBAL(); //string xmlpricingrequestforInt = "<PriceRequest><noadults>" + ddlAdultsInt.SelectedValue + "</noadults><nochild>" + ddlChildsInt.SelectedValue + "</nochild><noinfant>" + ddlInfantsInt.SelectedValue + "</noinfant><Clientid>" + FlightsConstants.USERID + "</Clientid><Clientpassword>" + FlightsConstants.PASSWORD + "</Clientpassword><Clienttype>ArzooINTLWS1.0</Clienttype>"; //xmlpricingrequestforInt = xmlpricingrequestforInt + "<OriginDestinationOption><FareDetails><ActualBaseFare>" + ActualBaseFare + "</ActualBaseFare><Tax>" + Tax + "</Tax><STax>" + STax + "</STax><TCharge>" + TCharge + "</TCharge><SCharge>" + SCharge + "</SCharge><TDiscount>" + TDiscount + "</TDiscount><TMarkup>" + TMarkup + "</TMarkup><TPartnerCommission>" + TPartnerCommission + "</TPartnerCommission><TSdiscount>" + TSdiscount + "</TSdiscount><FareBreakup><FareAry>" + str + "</FareAry></FareBreakup><ocTax>" + ocTax + "</ocTax></FareDetails>";//<Fare><PsgrType>" + PsgrType + "</PsgrType><BaseFare>" + BaseFare + "</BaseFare><Tax>" + FareTax + "</Tax></Fare> //xmlpricingrequestforInt = xmlpricingrequestforInt + "<onward><FlightSegments>"; //DataTable dtpricingreqOnward = dsIntFlights.Tables["Onward"]; //if (dtpricingreqOnward.Rows.Count > 0) //{ // DataRow[] rowOnward = dtpricingreqOnward.Select("OriginDestinationOption_Id=" + lblOriginDestinationRoundTrip.Text); // onwardId = rowOnward[0]["onward_id"].ToString(); //} //DataTable dtpricingreqFlightSegments = dsIntFlights.Tables["FlightSegments"]; //if (dtpricingreqFlightSegments.Rows.Count > 0) //{ // DataRow[] rowFlightSegments = dtpricingreqFlightSegments.Select("onward_id=" + onwardId); // FlightSegmentsID = rowFlightSegments[0]["FlightSegments_Id"].ToString(); //} //DataTable dtpricingreqFlightSegment = dsIntFlights.Tables["FlightSegment"]; //DataTable dtpricingreqBookingClass = dsIntFlights.Tables["BookingClass"]; //DataTable dtpricingreqBookingClassFare = dsIntFlights.Tables["BookingClassFare"]; //DataTable dtpricingreqPsgrBreakUp = dsIntFlights.Tables["PsgrBreakUp"]; //DataTable dtpricingreqPsgrAry = dsIntFlights.Tables["PsgrAry"]; //DataTable dtpricingreqPsgr = dsIntFlights.Tables["Psgr"]; //DataTable dtpricingreqTaxDataAry = dsIntFlights.Tables["TaxDataAry"]; //DataTable dtpricingreqTaxData = dsIntFlights.Tables["TaxData"]; //if (dtpricingreqFlightSegment.Rows.Count > 0) //{ // DataRow[] rowFlightSegment = dtpricingreqFlightSegment.Select("FlightSegments_Id=" + FlightSegmentsID); // for (int i = 0; i < rowFlightSegment.Length; i++) // { // AirEquipType = rowFlightSegment[i]["AirEquipType"].ToString(); // ArrivalAirportCode = rowFlightSegment[i]["ArrivalAirportCode"].ToString(); // ArrivalAirportName = rowFlightSegment[i]["ArrivalAirportName"].ToString(); // ArrivalDateTime = rowFlightSegment[i]["ArrivalDateTime"].ToString(); // DepartureAirportCode = rowFlightSegment[i]["DepartureAirportCode"].ToString(); // DepartureAirportName = rowFlightSegment[i]["DepartureAirportName"].ToString(); // DepartureDateTime = rowFlightSegment[i]["DepartureDateTime"].ToString(); // FlightNumber = rowFlightSegment[i]["FlightNumber"].ToString(); // MarketingAirlineCode = rowFlightSegment[i]["MarketingAirlineCode"].ToString(); // OperatingAirlineCode = rowFlightSegment[i]["OperatingAirlineCode"].ToString(); // OperatingAirlineName = rowFlightSegment[i]["OperatingAirlineName"].ToString(); // OperatingAirlineFlightNumber = rowFlightSegment[i]["OperatingAirlineFlightNumber"].ToString(); // NumStops = rowFlightSegment[i]["NumStops"].ToString(); // LinkSellAgrmnt = rowFlightSegment[i]["LinkSellAgrmnt"].ToString(); // Conx = rowFlightSegment[i]["Conx"].ToString(); // AirpChg = rowFlightSegment[i]["AirpChg"].ToString(); // InsideAvailOption = rowFlightSegment[i]["InsideAvailOption"].ToString(); // GenTrafRestriction = rowFlightSegment[i]["GenTrafRestriction"].ToString(); // DaysOperates = rowFlightSegment[i]["DaysOperates"].ToString(); // JrnyTm = rowFlightSegment[i]["JrnyTm"].ToString(); // EndDt = rowFlightSegment[i]["EndDt"].ToString(); // StartTerminal = rowFlightSegment[i]["StartTerminal"].ToString(); // EndTerminal = rowFlightSegment[i]["EndTerminal"].ToString(); // FltTm = rowFlightSegment[i]["FltTm"].ToString(); // LSAInd = rowFlightSegment[i]["LSAInd"].ToString(); // Mile = rowFlightSegment[i]["Mile"].ToString(); // if (dtpricingreqBookingClass.Rows.Count > 0) // { // DataRow[] rowBookingClass = dtpricingreqBookingClass.Select("FlightSegment_Id=" + rowFlightSegment[i]["FlightSegment_Id"].ToString()); // Availability = rowBookingClass[0]["Availability"].ToString(); // BIC = rowBookingClass[0]["BIC"].ToString(); // } // if (dtpricingreqBookingClassFare.Rows.Count > 0) // { // DataRow[] rowBookingClassFare = dtpricingreqBookingClassFare.Select("FlightSegment_Id=" + rowFlightSegment[i]["FlightSegment_Id"].ToString()); // bookingclass = rowBookingClassFare[0]["bookingclass"].ToString(); // classType = rowBookingClassFare[0]["classType"].ToString(); // farebasiscode = rowBookingClassFare[0]["farebasiscode"].ToString(); // Rule = rowBookingClassFare[0]["Rule"].ToString(); // bookingclassFareId = rowBookingClassFare[0]["bookingclassFare_Id"].ToString(); // } // if (dtpricingreqPsgrBreakUp.Rows.Count > 0) // { // DataRow[] rowPsgrBreakUp = dtpricingreqPsgrBreakUp.Select("bookingclassFare_Id=" + bookingclassFareId); // psgrBreakUp_Id = rowPsgrBreakUp[0]["psgrBreakUp_Id"].ToString(); // } // if (dtpricingreqPsgrAry.Rows.Count > 0) // { // DataRow[] rowPsgrAry = dtpricingreqPsgrAry.Select("psgrBreakUp_Id=" + psgrBreakUp_Id); // psgrAy_id = rowPsgrAry[0]["psgrAry_Id"].ToString(); // } // if (dtpricingreqPsgr.Rows.Count > 0) // { // DataRow[] rowPsgr = dtpricingreqPsgr.Select("psgrAry_Id=" + psgrAy_id); // FarePsgrType = rowPsgr[0]["psgrType"].ToString(); // FareBaseFare = rowPsgr[0]["BaseFare"].ToString(); // FareTax1 = rowPsgr[0]["Tax"].ToString(); // BagInfo = rowPsgr[0]["BagInfo"].ToString(); // } // if (dtpricingreqTaxDataAry.Rows.Count > 0) // { // DataRow[] rowTaxDataAry = dtpricingreqTaxDataAry.Select("Fare_id=" + FareId); // taxDataAry_id = rowTaxDataAry[0]["TaxdataAry_Id"].ToString(); // } // if (dtpricingreqTaxData.Rows.Count > 0) // { // DataRow[] rowTaxData = dtpricingreqTaxData.Select("TaxdataAry_Id=" + taxDataAry_id); // for (int j = 0; j < rowTaxData.Length; j++) // { // if (rowTaxData.Length == 0) // { // taxData = "<TaxData><Country>" + rowTaxData[j]["Country"].ToString() + "</Country><Amt>" + rowTaxData[j]["Amt"].ToString() + "</Amt></TaxData>"; // } // else // { // taxData = taxData + "<TaxData><Country>" + rowTaxData[j]["Country"].ToString() + "</Country><Amt>" + rowTaxData[j]["Amt"].ToString() + "</Amt></TaxData>"; // } // } // } // if (dtpricingreqPsgr.Rows.Count > 0) // { // DataRow[] rowPsgr = dtpricingreqPsgr.Select("psgrAry_Id=" + psgrAy_id); // foreach (DataRow rows in rowPsgr) // { // if (rows.Table.Rows.Count == 0) // { // taxdatapsgr = "<Psgr><PsgrType>" + rows["psgrType"].ToString() + "</PsgrType><BaseFare>" + rows["BaseFare"].ToString() + "</BaseFare><Tax>" + rows["Tax"].ToString() + "</Tax><BagInfo>" + rows["BagInfo"].ToString() + "</BagInfo></Psgr>"; // } // else // { // taxdatapsgr = taxdatapsgr + "<Psgr><PsgrType>" + rows["psgrType"].ToString() + "</PsgrType><BaseFare>" + rows["BaseFare"].ToString() + "</BaseFare><Tax>" + rows["Tax"].ToString() + "</Tax><BagInfo>" + rows["BagInfo"].ToString() + "</BagInfo></Psgr>"; // } // } // } // xmlpricingrequestforInt = xmlpricingrequestforInt + "<FlightSegment><AirEquipType>" + AirEquipType + "</AirEquipType><ArrivalAirportCode>" + ArrivalAirportCode + "</ArrivalAirportCode><ArrivalAirportName>" + ArrivalAirportName + "</ArrivalAirportName><ArrivalDateTime>" + ArrivalDateTime + "</ArrivalDateTime><DepartureAirportCode>" + DepartureAirportCode + "</DepartureAirportCode><DepartureAirportName>" + DepartureAirportName + "</DepartureAirportName><DepartureDateTime>" + DepartureDateTime + "</DepartureDateTime><FlightNumber>" + FlightNumber + "</FlightNumber>"; // xmlpricingrequestforInt = xmlpricingrequestforInt + "<MarketingAirlineCode>" + MarketingAirlineCode + "</MarketingAirlineCode><OperatingAirlineCode>" + OperatingAirlineCode + "</OperatingAirlineCode><OperatingAirlineName>" + OperatingAirlineName + "</OperatingAirlineName><OperatingAirlineFlightNumber>" + OperatingAirlineFlightNumber + "</OperatingAirlineFlightNumber><NumStops>" + NumStops + "</NumStops><LinkSellAgrmnt>" + LinkSellAgrmnt + "</LinkSellAgrmnt><Conx>" + Conx + "</Conx><AirpChg>" + AirpChg + "</AirpChg><InsideAvailOption>" + InsideAvailOption + "</InsideAvailOption><GenTrafRestriction>" + GenTrafRestriction + "</GenTrafRestriction><DaysOperates>" + DaysOperates + "</DaysOperates><JrnyTm>" + JrnyTm + "</JrnyTm><EndDt>" + EndDt + "</EndDt><StartTerminal>" + StartTerminal + "</StartTerminal><EndTerminal>" + EndTerminal + "</EndTerminal>"; // xmlpricingrequestforInt = xmlpricingrequestforInt + "<FltTm>" + FltTm + "</FltTm><LSAInd>" + LSAInd + "</LSAInd><Mile>" + Mile + "</Mile><BookingClass><Availability>" + Availability + "</Availability><BIC>" + BIC + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclass + "</bookingclass><classType>" + classType + "</classType><farebasiscode>" + farebasiscode + "</farebasiscode><Rule>" + Rule.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry>" + taxdatapsgr + "</PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>";//<Psgr><PsgrType>" + FarePsgrType + "</PsgrType><BaseFare>" + FareBaseFare + "</BaseFare><Tax>" + FareTax1 + "</Tax><BagInfo></BagInfo></Psgr> // } //} #endregion DataSet ds = new DataSet(); FlightBAL objFlightsBal = new FlightBAL(); string ReferenceNo = Convert.ToString(Session["Order_Id"]); DataSet dtid = objFlightsBal.FGetInternationalFlightDetails(ReferenceNo); #region oneway // return1 = dtid.Tables[0].Rows[0]["Return1"].ToString(); id1 = dtid.Tables[0].Rows[0]["id"].ToString(); key = dtid.Tables[0].Rows[0]["Key1"].ToString(); string[] actualBaseFare = dtid.Tables[0].Rows[0]["ActualBasefare"].ToString().Split('.'); ActualBaseFare = actualBaseFare[0].ToString(); string[] tx = dtid.Tables[0].Rows[0]["Tax"].ToString().Split('.'); Tax = tx[0].ToString(); string[] stx = dtid.Tables[0].Rows[0]["STax"].ToString().Split('.'); STax = stx[0].ToString(); string[] schrge = dtid.Tables[0].Rows[0]["Scharge"].ToString().Split('.'); SCharge = schrge[0].ToString(); string[] tdis = dtid.Tables[0].Rows[0]["TDiscount"].ToString().Split('.'); TDiscount = tdis[0].ToString(); string[] tpartcomm = dtid.Tables[0].Rows[0]["TPartnerCommission"].ToString().Split('.'); TPartnerCommission = tpartcomm[0].ToString(); string[] tsdisc = dtid.Tables[0].Rows[0]["TSDiscount"].ToString().Split('.'); TSdiscount = tsdisc[0].ToString(); ocTax = dtid.Tables[0].Rows[0]["Octax"].ToString(); string[] tmrkup = dtid.Tables[0].Rows[0]["TMarkUp"].ToString().Split('.'); TMarkup = tmrkup[0].ToString(); string[] tchge = dtid.Tables[0].Rows[0]["TCharge"].ToString().Split('.'); TCharge = tchge[0].ToString(); string ReferenceNo1 = dtid.Tables[0].Rows[0]["Int_Booking_Id"].ToString(); DataSet dsdbsave = objFlightsBal.GetInternationalFlightDetails1(ReferenceNo1); if (dsdbsave.Tables.Count > 0) { if (dsdbsave.Tables[0].Rows.Count > 0) { //foreach (DataRow row in dsdbsave.Tables[0].Rows) //{ if (dsdbsave.Tables[0].Rows[0]["FarePsgrType"].ToString().Contains(";")) { rows = dsdbsave.Tables[0].Rows[0]["FarePsgrType"].ToString().Split(';'); int count = rows.Count(); for (int i = 0; i < count; i++) { if (rows[i].Contains("|")) { string[] str2 = rows[i].ToString().Split('|'); Irows = str2.ToString().Split(','); } else { Irows = rows[i].ToString().Split(','); } // Irows = rows.ToString().Split(','); if (str == "") { str = "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>"; //taxdatapsgr = "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[0]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[0]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[0]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgr = taxdatapsgr + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } else { if (Irows[0].ToString() == "") { } else { str = str + "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>";//<TaxDataAry>" + str + "</TaxDataAry> // taxdatapsgr = taxdatapsgr + "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[0]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[0]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[0]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgr = taxdatapsgr + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } } } } else { Irows = dsdbsave.Tables[0].Rows[0]["FarePsgrType"].ToString().Split(','); // Irows = rows.ToString().Split(','); if (str == "") { str = "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>"; //taxdatapsgr = "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[0]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[0]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[0]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgr = taxdatapsgr + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } else { str = str + "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>";//<TaxDataAry>" + str + "</TaxDataAry> // taxdatapsgr = taxdatapsgr + "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[0]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[0]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[0]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgr = taxdatapsgr + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } } //} // string XmlPricingRequest = "<PriceRequest><noadults>" + ddlAdultsInt.SelectedValue + "</noadults><nochild>" + ddlChildsInt.SelectedValue + "</nochild><noinfant>" + ddlInfantsInt.SelectedValue + "</noinfant><Clientid>" + FlightsConstants.USERID + "</Clientid><Clientpassword>" + FlightsConstants.PASSWORD + "</Clientpassword><Clienttype>ArzooINTLWS1.0</Clienttype><OriginDestinationOption><FareDetails><ActualBaseFare>" + ActualBaseFare + "</ActualBaseFare><Tax>" + Tax + "</Tax><STax>" + STax + "</STax><TCharge>" + TCharge + "</TCharge><SCharge>" + SCharge + "</SCharge><TDiscount>" + TDiscount + "</TDiscount><TMarkup>" + TMarkup + "</TMarkup><TPartnerCommission>" + TPartnerCommission + "</TPartnerCommission><TSdiscount>" + TSdiscount + "</TSdiscount><FareBreakup><FareAry><Fare><PsgrType>" + PsgrType + "</PsgrType><BaseFare>" + BaseFare + "</BaseFare><Tax>" + FareTax + "</Tax></Fare></FareAry></FareBreakup><ocTax>" + ocTax + "</ocTax></FareDetails>"; xmlpricingrequestforInt = "<PriceRequest><noadults>" + dtid.Tables[0].Rows[0]["AdultPax"].ToString() + "</noadults><nochild>" + dtid.Tables[0].Rows[0]["ChildPax"].ToString() + "</nochild><noinfant>" + dtid.Tables[0].Rows[0]["InfantPax"].ToString() + "</noinfant><Clientid>" + FlightsConstants.USERID + "</Clientid><Clientpassword>" + FlightsConstants.PASSWORD + "</Clientpassword><Clienttype>ArzooINTLWS1.0</Clienttype><OriginDestinationOption><FareDetails><ActualBaseFare>" + ActualBaseFare + "</ActualBaseFare><Tax>" + Tax + "</Tax><STax>" + STax + "</STax><TCharge>" + TCharge + "</TCharge><SCharge>" + SCharge + "</SCharge><TDiscount>" + TDiscount + "</TDiscount><TMarkup>" + TMarkup + "</TMarkup><TPartnerCommission>" + TPartnerCommission + "</TPartnerCommission><TSdiscount>" + TSdiscount + "</TSdiscount><FareBreakup><FareAry>" + str + "</FareAry></FareBreakup><ocTax>" + ocTax + "</ocTax></FareDetails>"; xmlpricingrequestforInt = xmlpricingrequestforInt + "<onward><FlightSegments>"; //foreach (DataRow row in dsdbsave.Tables[0].Rows) //{ AirEquipType = dsdbsave.Tables[0].Rows[0]["AirEquipType"].ToString(); ArrivalAirportCode = dsdbsave.Tables[0].Rows[0]["ArrivalAirportCode"].ToString(); ArrivalAirportName = dsdbsave.Tables[0].Rows[0]["ArrivalAirportName"].ToString(); ArrivalDateTime = dsdbsave.Tables[0].Rows[0]["ArrivalDateTime"].ToString(); DepartureAirportCode = dsdbsave.Tables[0].Rows[0]["DepartureAirportCode"].ToString(); DepartureAirportName = dsdbsave.Tables[0].Rows[0]["DepartureAirportName"].ToString(); DepartureDateTime = dsdbsave.Tables[0].Rows[0]["DepartureDateTime"].ToString(); FlightNumber = dsdbsave.Tables[0].Rows[0]["FlightNumber"].ToString(); MarketingAirlineCode = dsdbsave.Tables[0].Rows[0]["MarketingAirlineCode"].ToString(); OperatingAirlineCode = dsdbsave.Tables[0].Rows[0]["OperatingAirlineCode"].ToString(); OperatingAirlineName = dsdbsave.Tables[0].Rows[0]["OperatingAirlineName"].ToString(); OperatingAirlineFlightNumber = dsdbsave.Tables[0].Rows[0]["OperatingAirlineFlightNumber"].ToString(); NumStops = dsdbsave.Tables[0].Rows[0]["NumStops"].ToString(); LinkSellAgrmnt = dsdbsave.Tables[0].Rows[0]["LinkSellAgrmnt"].ToString(); Conx = dsdbsave.Tables[0].Rows[0]["Conx"].ToString(); AirpChg = dsdbsave.Tables[0].Rows[0]["AirpChg"].ToString(); InsideAvailOption = dsdbsave.Tables[0].Rows[0]["InsideAvailOption"].ToString(); GenTrafRestriction = dsdbsave.Tables[0].Rows[0]["GenTrafRestriction"].ToString(); DaysOperates = dsdbsave.Tables[0].Rows[0]["DaysOperates"].ToString(); JrnyTm = dsdbsave.Tables[0].Rows[0]["JrnyTm"].ToString(); EndDt = dsdbsave.Tables[0].Rows[0]["EndDt"].ToString(); StartTerminal = dsdbsave.Tables[0].Rows[0]["StartTerminal"].ToString(); EndTerminal = dsdbsave.Tables[0].Rows[0]["EndTerminal"].ToString(); FltTm = dsdbsave.Tables[0].Rows[0]["FltTm"].ToString(); LSAInd = dsdbsave.Tables[0].Rows[0]["LSAInd"].ToString(); Mile = dsdbsave.Tables[0].Rows[0]["Mile"].ToString(); Availability = dsdbsave.Tables[0].Rows[0]["Availability"].ToString(); BIC = dsdbsave.Tables[0].Rows[0]["BIC"].ToString(); bookingclass = dsdbsave.Tables[0].Rows[0]["bookingclass"].ToString(); classType = dsdbsave.Tables[0].Rows[0]["classType"].ToString(); farebasiscode = dsdbsave.Tables[0].Rows[0]["farebasiscode"].ToString(); Rule = dsdbsave.Tables[0].Rows[0]["Fare_Rule"].ToString(); FarePsgrType = dsdbsave.Tables[0].Rows[0]["PsgrType"].ToString(); FareBaseFare = dsdbsave.Tables[0].Rows[0]["BaseFare"].ToString(); FareTax1 = dsdbsave.Tables[0].Rows[0]["psgrTax"].ToString(); BagInfo = dsdbsave.Tables[0].Rows[0]["BagInfo"].ToString(); xmlpricingrequestforInt = xmlpricingrequestforInt + "<FlightSegment><AirEquipType>" + AirEquipType + "</AirEquipType><ArrivalAirportCode>" + ArrivalAirportCode + "</ArrivalAirportCode><ArrivalAirportName>" + ArrivalAirportName + "</ArrivalAirportName><ArrivalDateTime>" + ArrivalDateTime + "</ArrivalDateTime><DepartureAirportCode>" + DepartureAirportCode + "</DepartureAirportCode><DepartureAirportName>" + DepartureAirportName + "</DepartureAirportName><DepartureDateTime>" + DepartureDateTime + "</DepartureDateTime><FlightNumber>" + FlightNumber + "</FlightNumber>"; xmlpricingrequestforInt = xmlpricingrequestforInt + "<MarketingAirlineCode>" + MarketingAirlineCode + "</MarketingAirlineCode><OperatingAirlineCode>" + OperatingAirlineCode + "</OperatingAirlineCode><OperatingAirlineName>" + OperatingAirlineName + "</OperatingAirlineName><OperatingAirlineFlightNumber>" + OperatingAirlineFlightNumber + "</OperatingAirlineFlightNumber><NumStops>" + NumStops + "</NumStops><LinkSellAgrmnt>" + LinkSellAgrmnt + "</LinkSellAgrmnt><Conx>" + Conx + "</Conx><AirpChg>" + AirpChg + "</AirpChg><InsideAvailOption>" + InsideAvailOption + "</InsideAvailOption><GenTrafRestriction>" + GenTrafRestriction + "</GenTrafRestriction><DaysOperates>" + DaysOperates + "</DaysOperates><JrnyTm>" + JrnyTm + "</JrnyTm><EndDt>" + EndDt + "</EndDt><StartTerminal>" + StartTerminal + "</StartTerminal><EndTerminal>" + EndTerminal + "</EndTerminal>"; // xmlpricingrequestforInt = xmlpricingrequestforInt + "<FltTm>" + FltTm + "</FltTm><LSAInd>" + LSAInd + "</LSAInd><Mile>" + Mile + "</Mile><BookingClass><Availability>" + Availability + "</Availability><BIC>" + BIC + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclass + "</bookingclass><classType>" + classType + "</classType><farebasiscode>" + farebasiscode + "</farebasiscode><Rule>" + Rule.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry><Psgr><PsgrType>" + FarePsgrType + "</PsgrType><BaseFare>" + FareBaseFare + "</BaseFare><Tax>" + FareTax1 + "</Tax><BagInfo></BagInfo></Psgr></PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>"; xmlpricingrequestforInt = xmlpricingrequestforInt + "<FltTm>" + FltTm + "</FltTm><LSAInd>" + LSAInd + "</LSAInd><Mile>" + Mile + "</Mile><BookingClass><Availability>" + Availability + "</Availability><BIC>" + BIC + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclass + "</bookingclass><classType>" + classType + "</classType><farebasiscode>" + farebasiscode + "</farebasiscode><Rule>" + Rule.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry>" + taxdatapsgr + "</PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>"; // } } } #endregion xmlpricingrequestforInt = xmlpricingrequestforInt + "</FlightSegments></onward><Return><FlightSegments>"; #region old return //DataTable dtpricingreqReturn = dsIntFlights.Tables["Return"]; //if (dtpricingreqReturn.Rows.Count > 0) //{ // DataRow[] rowReturn = dtpricingreqReturn.Select("OriginDestinationOption_Id=" + lblOriginDestinationRoundTrip.Text); // returnId = rowReturn[0]["return_id"].ToString(); //} //DataTable dtpricingreqFlightSegmentsRet = dsIntFlights.Tables["FlightSegments"]; //if (dtpricingreqFlightSegmentsRet.Rows.Count > 0) //{ // DataRow[] rowFlightSegmentsRet = dtpricingreqFlightSegmentsRet.Select("return_id=" + returnId); // FlightSegmentsIDRet = rowFlightSegmentsRet[0]["FlightSegments_Id"].ToString(); //} //DataTable dtpricingreqFlightSegmentRet = dsIntFlights.Tables["FlightSegment"]; //DataTable dtpricingreqBookingClassRet = dsIntFlights.Tables["BookingClass"]; //DataTable dtpricingreqBookingClassFareRet = dsIntFlights.Tables["BookingClassFare"]; //DataTable dtpricingreqPsgrBreakUpRet = dsIntFlights.Tables["PsgrBreakUp"]; //DataTable dtpricingreqPsgrAryRet = dsIntFlights.Tables["PsgrAry"]; //DataTable dtpricingreqPsgrRet = dsIntFlights.Tables["Psgr"]; //DataTable dtpricingreqTaxDataAryRet = dsIntFlights.Tables["TaxDataAry"]; //DataTable dtpricingreqTaxDataRet = dsIntFlights.Tables["TaxData"]; //if (dtpricingreqFlightSegmentRet.Rows.Count > 0) //{ // DataRow[] rowFlightSegmentRet = dtpricingreqFlightSegmentRet.Select("FlightSegments_Id=" + FlightSegmentsIDRet); // for (int i = 0; i < rowFlightSegmentRet.Length; i++) // { // AirEquipTypeRet = rowFlightSegmentRet[i]["AirEquipType"].ToString(); // ArrivalAirportCodeRet = rowFlightSegmentRet[i]["ArrivalAirportCode"].ToString(); // ArrivalAirportNameRet = rowFlightSegmentRet[i]["ArrivalAirportName"].ToString(); // ArrivalDateTimeRet = rowFlightSegmentRet[i]["ArrivalDateTime"].ToString(); // DepartureAirportCodeRet = rowFlightSegmentRet[i]["DepartureAirportCode"].ToString(); // DepartureAirportNameRet = rowFlightSegmentRet[i]["DepartureAirportName"].ToString(); // DepartureDateTimeRet = rowFlightSegmentRet[i]["DepartureDateTime"].ToString(); // FlightNumberRet = rowFlightSegmentRet[i]["FlightNumber"].ToString(); // MarketingAirlineCodeRet = rowFlightSegmentRet[i]["MarketingAirlineCode"].ToString(); // OperatingAirlineCodeRet = rowFlightSegmentRet[i]["OperatingAirlineCode"].ToString(); // OperatingAirlineNameRet = rowFlightSegmentRet[i]["OperatingAirlineName"].ToString(); // OperatingAirlineFlightNumberRet = rowFlightSegmentRet[i]["OperatingAirlineFlightNumber"].ToString(); // NumStopsRet = rowFlightSegmentRet[i]["NumStops"].ToString(); // LinkSellAgrmntRet = rowFlightSegmentRet[i]["LinkSellAgrmnt"].ToString(); // ConxRet = rowFlightSegmentRet[i]["Conx"].ToString(); // AirpChgRet = rowFlightSegmentRet[i]["AirpChg"].ToString(); // InsideAvailOptionRet = rowFlightSegmentRet[i]["InsideAvailOption"].ToString(); // GenTrafRestrictionRet = rowFlightSegmentRet[i]["GenTrafRestriction"].ToString(); // DaysOperatesRet = rowFlightSegmentRet[i]["DaysOperates"].ToString(); // JrnyTmRet = rowFlightSegmentRet[i]["JrnyTm"].ToString(); // EndDtRet = rowFlightSegmentRet[i]["EndDt"].ToString(); // StartTerminalRet = rowFlightSegmentRet[i]["StartTerminal"].ToString(); // EndTerminalRet = rowFlightSegmentRet[i]["EndTerminal"].ToString(); // FltTmRet = rowFlightSegmentRet[i]["FltTm"].ToString(); // LSAIndRet = rowFlightSegmentRet[i]["LSAInd"].ToString(); // MileRet = rowFlightSegmentRet[i]["Mile"].ToString(); // if (dtpricingreqBookingClassRet.Rows.Count > 0) // { // DataRow[] rowBookingClassRet = dtpricingreqBookingClassRet.Select("FlightSegment_Id=" + rowFlightSegmentRet[i]["FlightSegment_Id"].ToString()); // AvailabilityRet = rowBookingClassRet[0]["Availability"].ToString(); // BICRet = rowBookingClassRet[0]["BIC"].ToString(); // } // if (dtpricingreqBookingClassFareRet.Rows.Count > 0) // { // DataRow[] rowBookingClassFareRet = dtpricingreqBookingClassFareRet.Select("FlightSegment_Id=" + rowFlightSegmentRet[i]["FlightSegment_Id"].ToString()); // bookingclassRet = rowBookingClassFareRet[0]["bookingclass"].ToString(); // classTypeRet = rowBookingClassFareRet[0]["classType"].ToString(); // farebasiscodeRet = rowBookingClassFareRet[0]["farebasiscode"].ToString(); // RuleRet = rowBookingClassFareRet[0]["Rule"].ToString(); // bookingclassFareIdRet = rowBookingClassFareRet[0]["bookingclassFare_Id"].ToString(); // } // if (dtpricingreqPsgrBreakUpRet.Rows.Count > 0) // { // DataRow[] rowPsgrBreakUpRet = dtpricingreqPsgrBreakUpRet.Select("bookingclassFare_Id=" + bookingclassFareIdRet); // psgrBreakUp_IdRet = rowPsgrBreakUpRet[0]["psgrBreakUp_Id"].ToString(); // } // if (dtpricingreqPsgrAryRet.Rows.Count > 0) // { // DataRow[] rowPsgrAryRet = dtpricingreqPsgrAryRet.Select("psgrBreakUp_Id=" + psgrBreakUp_IdRet); // psgrAy_idRet = rowPsgrAryRet[0]["psgrAry_Id"].ToString(); // } // if (dtpricingreqPsgrRet.Rows.Count > 0) // { // DataRow[] rowPsgrRet = dtpricingreqPsgrRet.Select("psgrAry_Id=" + psgrAy_idRet); // FarePsgrTypeRet = rowPsgrRet[0]["psgrType"].ToString(); // FareBaseFareRet = rowPsgrRet[0]["BaseFare"].ToString(); // FareTax1Ret = rowPsgrRet[0]["Tax"].ToString(); // BagInfoRet = rowPsgrRet[0]["BagInfo"].ToString(); // } // if (dtpricingreqPsgrRet.Rows.Count > 0) // { // DataRow[] rowPsgr = dtpricingreqPsgrRet.Select("psgrAry_Id=" + psgrAy_idRet); // foreach (DataRow rows in rowPsgr) // { // if (rows.Table.Rows.Count == 0) // { // taxdatapsgrRet = "<Psgr><PsgrType>" + rows["psgrType"].ToString() + "</PsgrType><BaseFare>" + rows["BaseFare"].ToString() + "</BaseFare><Tax>" + rows["Tax"].ToString() + "</Tax><BagInfo>" + rows["BagInfo"].ToString() + "</BagInfo></Psgr>"; // } // else // { // taxdatapsgrRet = taxdatapsgrRet + "<Psgr><PsgrType>" + rows["psgrType"].ToString() + "</PsgrType><BaseFare>" + rows["BaseFare"].ToString() + "</BaseFare><Tax>" + rows["Tax"].ToString() + "</Tax><BagInfo>" + rows["BagInfo"].ToString() + "</BagInfo></Psgr>"; // } // } // } // xmlpricingrequestforInt = xmlpricingrequestforInt + "<FlightSegment><AirEquipType>" + AirEquipTypeRet + "</AirEquipType><ArrivalAirportCode>" + ArrivalAirportCodeRet + "</ArrivalAirportCode><ArrivalAirportName>" + ArrivalAirportNameRet + "</ArrivalAirportName><ArrivalDateTime>" + ArrivalDateTimeRet + "</ArrivalDateTime><DepartureAirportCode>" + DepartureAirportCodeRet + "</DepartureAirportCode><DepartureAirportName>" + DepartureAirportNameRet + "</DepartureAirportName><DepartureDateTime>" + DepartureDateTimeRet + "</DepartureDateTime><FlightNumber>" + FlightNumberRet + "</FlightNumber>"; // xmlpricingrequestforInt = xmlpricingrequestforInt + "<MarketingAirlineCode>" + MarketingAirlineCodeRet + "</MarketingAirlineCode><OperatingAirlineCode>" + OperatingAirlineCodeRet + "</OperatingAirlineCode><OperatingAirlineName>" + OperatingAirlineNameRet + "</OperatingAirlineName><OperatingAirlineFlightNumber>" + OperatingAirlineFlightNumberRet + "</OperatingAirlineFlightNumber><NumStops>" + NumStopsRet + "</NumStops><LinkSellAgrmnt>" + LinkSellAgrmntRet + "</LinkSellAgrmnt><Conx>" + ConxRet + "</Conx><AirpChg>" + AirpChgRet + "</AirpChg><InsideAvailOption>" + InsideAvailOptionRet + "</InsideAvailOption><GenTrafRestriction>" + GenTrafRestrictionRet + "</GenTrafRestriction><DaysOperates>" + DaysOperatesRet + "</DaysOperates><JrnyTm>" + JrnyTmRet + "</JrnyTm><EndDt>" + EndDtRet + "</EndDt><StartTerminal>" + StartTerminalRet + "</StartTerminal><EndTerminal>" + EndTerminalRet + "</EndTerminal>"; // xmlpricingrequestforInt = xmlpricingrequestforInt + "<FltTm>" + FltTmRet + "</FltTm><LSAInd>" + LSAIndRet + "</LSAInd><Mile>" + MileRet + "</Mile><BookingClass><Availability>" + AvailabilityRet + "</Availability><BIC>" + BICRet + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclassRet + "</bookingclass><classType>" + classTypeRet + "</classType><farebasiscode>" + farebasiscodeRet + "</farebasiscode><Rule>" + RuleRet.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry>" + taxdatapsgrRet + "</PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>";//<Psgr><PsgrType>" + FarePsgrTypeRet + "</PsgrType><BaseFare>" + FareBaseFareRet + "</BaseFare><Tax>" + FareTax1Ret + "</Tax><BagInfo></BagInfo></Psgr> // } //} #endregion #region return //idRet = dtid.Tables[0].Rows[1]["id"].ToString(); //keyRet = dtid.Tables[0].Rows[1]["Key1"].ToString(); //ActualBaseFareRet = dtid.Tables[0].Rows[1]["ActualBasefare"].ToString(); //TaxRet = dtid.Tables[0].Rows[1]["Tax"].ToString(); //STaxRet = dtid.Tables[0].Rows[1]["STax"].ToString(); //SChargeRet = dtid.Tables[0].Rows[1]["Scharge"].ToString(); //TDiscountRet = dtid.Tables[0].Rows[1]["TDiscount"].ToString(); //TPartnerCommissionRet = dtid.Tables[0].Rows[1]["TPartnerCommission"].ToString(); //TSdiscountRet = dtid.Tables[0].Rows[1]["TSDiscount"].ToString(); //ocTaxRet = dtid.Tables[0].Rows[1]["Octax"].ToString(); //TMarkupRet = dtid.Tables[0].Rows[1]["TMarkUp"].ToString(); //TChargeRet = dtid.Tables[0].Rows[1]["TCharge"].ToString(); //string ReferenceNo2 = dtid.Tables[0].Rows[1]["Int_Booking_Id"].ToString(); //DataSet dsdbsaveRet = objFlightsBal.GetInternationalFlightDetails1(ReferenceNo2); if (dsdbsave.Tables.Count > 0) { if (dsdbsave.Tables[0].Rows.Count > 0) { //foreach (DataRow row in dsdbsave.Tables[0].Rows) //{ str = ""; if (dsdbsave.Tables[0].Rows[1]["FarePsgrType"].ToString().Contains(";")) { rows = dsdbsave.Tables[0].Rows[1]["FarePsgrType"].ToString().Split(';'); int count = rows.Count(); for (int i = 0; i < count; i++) { if (rows.Contains("|")) { string[] str2 = rows[i].ToString().Split('|'); Irows = str2.ToString().Split(','); } else { Irows = rows[i].ToString().Split(','); } // Irows = rows.ToString().Split(','); if (str == "") { str = "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>"; // taxdatapsgrRet = "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[1]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[1]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[1]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgrRet = taxdatapsgrRet + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } else { if (Irows[0].ToString() == "") { } else { str = str + "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>";//<TaxDataAry>" + str + "</TaxDataAry> // taxdatapsgrRet = taxdatapsgrRet + "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[1]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[1]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[1]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgrRet = taxdatapsgrRet + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } } } } else { Irows = dsdbsave.Tables[0].Rows[0]["FarePsgrType"].ToString().Split(','); // Irows = rows.ToString().Split(','); if (str == "") { str = "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>"; // taxdatapsgrRet = "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[1]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[1]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[1]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgrRet = taxdatapsgrRet + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } else { str = str + "<Fare><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax></Fare>";//<TaxDataAry>" + str + "</TaxDataAry> // taxdatapsgrRet = taxdatapsgrRet + "<Psgr><PsgrType>" + dsdbsave.Tables[0].Rows[1]["PsgrType"].ToString() + "</PsgrType><BaseFare>" + dsdbsave.Tables[0].Rows[1]["BaseFare"].ToString() + "</BaseFare><Tax>" + dsdbsave.Tables[0].Rows[1]["psgrTax"].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; taxdatapsgrRet = taxdatapsgrRet + "<Psgr><PsgrType>" + Irows[0].ToString() + "</PsgrType><BaseFare>" + Irows[1].ToString() + "</BaseFare><Tax>" + Irows[2].ToString() + "</Tax><BagInfo></BagInfo></Psgr>"; } } // foreach (DataRow row in dsdbsave.Tables[0].Rows) //{ AirEquipTypeRet = dsdbsave.Tables[0].Rows[1]["AirEquipType"].ToString(); ArrivalAirportCodeRet = dsdbsave.Tables[0].Rows[1]["ArrivalAirportCode"].ToString(); ArrivalAirportNameRet = dsdbsave.Tables[0].Rows[1]["ArrivalAirportName"].ToString(); ArrivalDateTimeRet = dsdbsave.Tables[0].Rows[1]["ArrivalDateTime"].ToString(); DepartureAirportCodeRet = dsdbsave.Tables[0].Rows[1]["DepartureAirportCode"].ToString(); DepartureAirportNameRet = dsdbsave.Tables[0].Rows[1]["DepartureAirportName"].ToString(); DepartureDateTimeRet = dsdbsave.Tables[0].Rows[1]["DepartureDateTime"].ToString(); FlightNumberRet = dsdbsave.Tables[0].Rows[1]["FlightNumber"].ToString(); MarketingAirlineCodeRet = dsdbsave.Tables[0].Rows[1]["MarketingAirlineCode"].ToString(); OperatingAirlineCodeRet = dsdbsave.Tables[0].Rows[1]["OperatingAirlineCode"].ToString(); OperatingAirlineNameRet = dsdbsave.Tables[0].Rows[1]["OperatingAirlineName"].ToString(); OperatingAirlineFlightNumberRet = dsdbsave.Tables[0].Rows[1]["OperatingAirlineFlightNumber"].ToString(); NumStopsRet = dsdbsave.Tables[0].Rows[1]["NumStops"].ToString(); LinkSellAgrmntRet = dsdbsave.Tables[0].Rows[1]["LinkSellAgrmnt"].ToString(); ConxRet = dsdbsave.Tables[0].Rows[1]["Conx"].ToString(); AirpChgRet = dsdbsave.Tables[0].Rows[1]["AirpChg"].ToString(); InsideAvailOptionRet = dsdbsave.Tables[0].Rows[1]["InsideAvailOption"].ToString(); GenTrafRestrictionRet = dsdbsave.Tables[0].Rows[1]["GenTrafRestriction"].ToString(); DaysOperatesRet = dsdbsave.Tables[0].Rows[1]["DaysOperates"].ToString(); JrnyTmRet = dsdbsave.Tables[0].Rows[1]["JrnyTm"].ToString(); EndDtRet = dsdbsave.Tables[0].Rows[1]["EndDt"].ToString(); StartTerminalRet = dsdbsave.Tables[0].Rows[1]["StartTerminal"].ToString(); EndTerminalRet = dsdbsave.Tables[0].Rows[1]["EndTerminal"].ToString(); FltTmRet = dsdbsave.Tables[0].Rows[1]["FltTm"].ToString(); LSAIndRet = dsdbsave.Tables[0].Rows[1]["LSAInd"].ToString(); MileRet = dsdbsave.Tables[0].Rows[1]["Mile"].ToString(); AvailabilityRet = dsdbsave.Tables[0].Rows[1]["Availability"].ToString(); BICRet = dsdbsave.Tables[0].Rows[1]["BIC"].ToString(); bookingclassRet = dsdbsave.Tables[0].Rows[1]["bookingclass"].ToString(); classTypeRet = dsdbsave.Tables[0].Rows[1]["classType"].ToString(); farebasiscodeRet = dsdbsave.Tables[0].Rows[1]["farebasiscode"].ToString(); RuleRet = dsdbsave.Tables[0].Rows[1]["Fare_Rule"].ToString(); FarePsgrTypeRet = dsdbsave.Tables[0].Rows[1]["PsgrType"].ToString(); FareBaseFareRet = dsdbsave.Tables[0].Rows[1]["BaseFare"].ToString(); FareTax1Ret = dsdbsave.Tables[0].Rows[1]["psgrTax"].ToString(); BagInfoRet = dsdbsave.Tables[0].Rows[1]["BagInfo"].ToString(); xmlpricingrequestforInt = xmlpricingrequestforInt + "<FlightSegment><AirEquipType>" + AirEquipTypeRet + "</AirEquipType><ArrivalAirportCode>" + ArrivalAirportCodeRet + "</ArrivalAirportCode><ArrivalAirportName>" + ArrivalAirportNameRet + "</ArrivalAirportName><ArrivalDateTime>" + ArrivalDateTimeRet + "</ArrivalDateTime><DepartureAirportCode>" + DepartureAirportCodeRet + "</DepartureAirportCode><DepartureAirportName>" + DepartureAirportNameRet + "</DepartureAirportName><DepartureDateTime>" + DepartureDateTimeRet + "</DepartureDateTime><FlightNumber>" + FlightNumberRet + "</FlightNumber>"; xmlpricingrequestforInt = xmlpricingrequestforInt + "<MarketingAirlineCode>" + MarketingAirlineCodeRet + "</MarketingAirlineCode><OperatingAirlineCode>" + OperatingAirlineCodeRet + "</OperatingAirlineCode><OperatingAirlineName>" + OperatingAirlineNameRet + "</OperatingAirlineName><OperatingAirlineFlightNumber>" + OperatingAirlineFlightNumberRet + "</OperatingAirlineFlightNumber><NumStops>" + NumStopsRet + "</NumStops><LinkSellAgrmnt>" + LinkSellAgrmntRet + "</LinkSellAgrmnt><Conx>" + ConxRet + "</Conx><AirpChg>" + AirpChgRet + "</AirpChg><InsideAvailOption>" + InsideAvailOptionRet + "</InsideAvailOption><GenTrafRestriction>" + GenTrafRestrictionRet + "</GenTrafRestriction><DaysOperates>" + DaysOperatesRet + "</DaysOperates><JrnyTm>" + JrnyTmRet + "</JrnyTm><EndDt>" + EndDtRet + "</EndDt><StartTerminal>" + StartTerminalRet + "</StartTerminal><EndTerminal>" + EndTerminalRet + "</EndTerminal>"; xmlpricingrequestforInt = xmlpricingrequestforInt + "<FltTm>" + FltTmRet + "</FltTm><LSAInd>" + LSAIndRet + "</LSAInd><Mile>" + MileRet + "</Mile><BookingClass><Availability>" + AvailabilityRet + "</Availability><BIC>" + BICRet + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclassRet + "</bookingclass><classType>" + classTypeRet + "</classType><farebasiscode>" + farebasiscodeRet + "</farebasiscode><Rule>" + RuleRet.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry>" + taxdatapsgrRet + "</PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>";//<Psgr><PsgrType>" + FarePsgrTypeRet + "</PsgrType><BaseFare>" + FareBaseFareRet + "</BaseFare><Tax>" + FareTax1Ret + "</Tax><BagInfo></BagInfo></Psgr> #endregion xmlpricingrequestforInt = xmlpricingrequestforInt + "</FlightSegments></Return><id>" + id1 + "</id><key>" + key + "</key>"; xmlpricingrequestforInt = xmlpricingrequestforInt + "</OriginDestinationOption></PriceRequest>"; DataSet dsPricingResponse = objFlightsBal.GetDatasetFromAPI(xmlpricingrequestforInt, "http://59.162.33.102:9301/Pricing"); if (dsPricingResponse != null) { if (dsPricingResponse.Tables.Count > 0) { if (!dsPricingResponse.Tables[0].Columns.Contains("error")) { DataTable dtpricingresFareDetails = dsPricingResponse.Tables["FareDetails"]; if (dtpricingresFareDetails.Rows.Count > 0) { DataRow[] rowFareDetails = dtpricingresFareDetails.Select("OriginDestinationOption_Id=" + lblOriginDestinationRoundTrip.Text); ActualBaseFare = rowFareDetails[0]["ActualBaseFare"].ToString(); Tax = rowFareDetails[0]["Tax"].ToString(); STax = rowFareDetails[0]["STax"].ToString(); TCharge = rowFareDetails[0]["TCharge"].ToString(); SCharge = rowFareDetails[0]["SCharge"].ToString(); TDiscount = rowFareDetails[0]["TDiscount"].ToString(); TMarkup = rowFareDetails[0]["TMarkup"].ToString(); TPartnerCommission = rowFareDetails[0]["TPartnerCommission"].ToString(); TSdiscount = rowFareDetails[0]["TSdiscount"].ToString(); ocTax = rowFareDetails[0]["ocTax"].ToString(); FareDetails_id = rowFareDetails[0]["FareDetails_id"].ToString(); } } } } } } #endregion string xmlRequest; #region new bookrequest onward string ref1 = Session["Order_Id"].ToString(); xmlRequest = "<Bookingrequest><noadults>" + dtid.Tables[0].Rows[0]["AdultPax"].ToString() + "</noadults><nochild>" + dtid.Tables[0].Rows[0]["ChildPax"].ToString() + "</nochild><noinfant>" + dtid.Tables[0].Rows[0]["InfantPax"].ToString() + "</noinfant><Clientid>" + FlightsConstants.USERID + "</Clientid><Clientpassword>" + FlightsConstants.PASSWORD + "</Clientpassword><Clienttype>ArzooINTLWS1.0</Clienttype><creditcardno></creditcardno><PartnerreferenceID>" + ref1 + "</PartnerreferenceID>"; xmlRequest = xmlRequest + "<personName>"; ///details changing // string strname = Convert.ToString(Session["customerInfo"]); string strname = dsdbsave.Tables[0].Rows[0]["CustomerDetails"].ToString(); string[] strrows = strname.ToString().Split(';'); int id2 = strrows.Count(); for (int m = 0; m < id2; m++) { if (strrows[m].Contains("adt")) { string[] stradt = strrows[m].ToString().Split('|'); xmlRequest = xmlRequest + "<CustomerInfo><givenName>" + stradt[1].ToString() + "</givenName><surName>" + stradt[2].ToString() + "</surName><nameReference>" + stradt[0].ToString() + "</nameReference><psgrtype>adt</psgrtype></CustomerInfo>"; } if (strrows[m].Contains("chd")) { string[] strchd = strrows[m].ToString().Split('|'); xmlRequest = xmlRequest + "<CustomerInfo><givenName>" + strchd[1].ToString() + "</givenName><surName>" + strchd[2].ToString() + "</surName><nameReference>" + strchd[0].ToString() + "</nameReference><dob>" + strchd[5].ToString() + "</dob><age>" + strchd[4].ToString() + "</age><psgrtype>chd</psgrtype></CustomerInfo>"; } if (strrows[m].Contains("inf")) { string[] strinf = strrows[m].ToString().Split('|'); xmlRequest = xmlRequest + "<CustomerInfo><givenName>" + strinf[1].ToString() + "</givenName><surName>" + strinf[2].ToString() + "</surName><nameReference>" + strinf[0].ToString() + "</nameReference><dob>" + strinf[5].ToString() + "</dob><age>" + strinf[4].ToString() + "</age><psgrtype>inf</psgrtype></CustomerInfo>"; } } xmlRequest = xmlRequest + "</personName><telePhone><phoneNumber>" + dsdbsave.Tables[0].Rows[0]["Telephone"].ToString() + "</phoneNumber></telePhone><email><emailAddress>" + dsdbsave.Tables[0].Rows[0]["EmailAddress"].ToString() + "</emailAddress></email>"; //xmlRequest = xmlRequest + "<OriginDestinationOption><FareDetails><ActualBaseFare>" + ActualBaseFare + "</ActualBaseFare><Tax>" + Tax + "</Tax><STax>" + STax + "</STax><TCharge>" + TCharge + "</TCharge><SCharge>" + SCharge + "</SCharge><TDiscount>" + TDiscount + "</TDiscount><TMarkup>" + TMarkup + "</TMarkup><TPartnerCommission>" + TPartnerCommission + "</TPartnerCommission><TSdiscount>" + TSdiscount + "</TSdiscount><FareBreakup><FareAry><Fare><PsgrType>" + PsgrType + "</PsgrType><BaseFare>" + BaseFare + "</BaseFare><Tax>" + FareTax + "</Tax><TaxDataAry>"; //xmlRequest = xmlRequest + taxData + "</TaxDataAry></Fare></FareAry></FareBreakup><ocTax>" + ocTax + "</ocTax></FareDetails><onward><FlightSegments>"; xmlRequest = xmlRequest + "<OriginDestinationOption><FareDetails><ActualBaseFare>" + ActualBaseFare + "</ActualBaseFare><Tax>" + Tax + "</Tax><STax>" + STax + "</STax><TCharge>" + TCharge + "</TCharge><SCharge>" + SCharge + "</SCharge><TDiscount>" + TDiscount + "</TDiscount><TMarkup>" + TMarkup + "</TMarkup><TPartnerCommission>" + TPartnerCommission + "</TPartnerCommission><TSdiscount>" + TSdiscount + "</TSdiscount><FareBreakup><FareAry>"; xmlRequest = xmlRequest + str + "</FareAry></FareBreakup><ocTax>" + ocTax + "</ocTax></FareDetails><onward><FlightSegments>"; //foreach (DataRow row in dsdbsave.Tables[0].Rows) //{ AirEquipType = dsdbsave.Tables[0].Rows[0]["AirEquipType"].ToString(); ArrivalAirportCode = dsdbsave.Tables[0].Rows[0]["ArrivalAirportCode"].ToString(); ArrivalAirportName = dsdbsave.Tables[0].Rows[0]["ArrivalAirportName"].ToString(); ArrivalDateTime = dsdbsave.Tables[0].Rows[0]["ArrivalDateTime"].ToString(); DepartureAirportCode = dsdbsave.Tables[0].Rows[0]["DepartureAirportCode"].ToString(); DepartureAirportName = dsdbsave.Tables[0].Rows[0]["DepartureAirportName"].ToString(); DepartureDateTime = dsdbsave.Tables[0].Rows[0]["DepartureDateTime"].ToString(); FlightNumber = dsdbsave.Tables[0].Rows[0]["FlightNumber"].ToString(); MarketingAirlineCode = dsdbsave.Tables[0].Rows[0]["MarketingAirlineCode"].ToString(); OperatingAirlineCode = dsdbsave.Tables[0].Rows[0]["OperatingAirlineCode"].ToString(); OperatingAirlineName = dsdbsave.Tables[0].Rows[0]["OperatingAirlineName"].ToString(); OperatingAirlineFlightNumber = dsdbsave.Tables[0].Rows[0]["OperatingAirlineFlightNumber"].ToString(); NumStops = dsdbsave.Tables[0].Rows[0]["NumStops"].ToString(); LinkSellAgrmnt = dsdbsave.Tables[0].Rows[0]["LinkSellAgrmnt"].ToString(); Conx = dsdbsave.Tables[0].Rows[0]["Conx"].ToString(); AirpChg = dsdbsave.Tables[0].Rows[0]["AirpChg"].ToString(); InsideAvailOption = dsdbsave.Tables[0].Rows[0]["InsideAvailOption"].ToString(); GenTrafRestriction = dsdbsave.Tables[0].Rows[0]["GenTrafRestriction"].ToString(); DaysOperates = dsdbsave.Tables[0].Rows[0]["DaysOperates"].ToString(); JrnyTm = dsdbsave.Tables[0].Rows[0]["JrnyTm"].ToString(); EndDt = dsdbsave.Tables[0].Rows[0]["EndDt"].ToString(); StartTerminal = dsdbsave.Tables[0].Rows[0]["StartTerminal"].ToString(); EndTerminal = dsdbsave.Tables[0].Rows[0]["EndTerminal"].ToString(); FltTm = dsdbsave.Tables[0].Rows[0]["FltTm"].ToString(); LSAInd = dsdbsave.Tables[0].Rows[0]["LSAInd"].ToString(); Mile = dsdbsave.Tables[0].Rows[0]["Mile"].ToString(); Availability = dsdbsave.Tables[0].Rows[0]["Availability"].ToString(); BIC = dsdbsave.Tables[0].Rows[0]["BIC"].ToString(); bookingclass = dsdbsave.Tables[0].Rows[0]["bookingclass"].ToString(); classType = dsdbsave.Tables[0].Rows[0]["classType"].ToString(); farebasiscode = dsdbsave.Tables[0].Rows[0]["farebasiscode"].ToString(); Rule = dsdbsave.Tables[0].Rows[0]["Fare_Rule"].ToString(); FarePsgrType = dsdbsave.Tables[0].Rows[0]["PsgrType"].ToString(); FareBaseFare = dsdbsave.Tables[0].Rows[0]["BaseFare"].ToString(); FareTax1 = dsdbsave.Tables[0].Rows[0]["psgrTax"].ToString(); BagInfo = dsdbsave.Tables[0].Rows[0]["BagInfo"].ToString(); xmlRequest = xmlRequest + "<FlightSegment><AirEquipType>" + AirEquipType + "</AirEquipType><ArrivalAirportCode>" + ArrivalAirportCode + "</ArrivalAirportCode><ArrivalAirportName>" + ArrivalAirportName + "</ArrivalAirportName><ArrivalDateTime>" + ArrivalDateTime + "</ArrivalDateTime><DepartureAirportCode>" + DepartureAirportCode + "</DepartureAirportCode><DepartureAirportName>" + DepartureAirportName + "</DepartureAirportName><DepartureDateTime>" + DepartureDateTime + "</DepartureDateTime><FlightNumber>" + FlightNumber + "</FlightNumber>"; xmlRequest = xmlRequest + "<MarketingAirlineCode>" + MarketingAirlineCode + "</MarketingAirlineCode><OperatingAirlineCode>" + OperatingAirlineCode + "</OperatingAirlineCode><OperatingAirlineName>" + OperatingAirlineName + "</OperatingAirlineName><OperatingAirlineFlightNumber>" + OperatingAirlineFlightNumber + "</OperatingAirlineFlightNumber><NumStops>" + NumStops + "</NumStops><LinkSellAgrmnt>" + LinkSellAgrmnt + "</LinkSellAgrmnt><Conx>" + Conx + "</Conx><AirpChg>" + AirpChg + "</AirpChg><InsideAvailOption>" + InsideAvailOption + "</InsideAvailOption><GenTrafRestriction>" + GenTrafRestriction + "</GenTrafRestriction><DaysOperates>" + DaysOperates + "</DaysOperates><JrnyTm>" + JrnyTm + "</JrnyTm><EndDt>" + EndDt + "</EndDt><StartTerminal>" + StartTerminal + "</StartTerminal><EndTerminal>" + EndTerminal + "</EndTerminal>"; xmlRequest = xmlRequest + "<FltTm>" + FltTm + "</FltTm><LSAInd>" + LSAInd + "</LSAInd><Mile>" + Mile + "</Mile><BookingClass><Availability>" + Availability + "</Availability><BIC>" + BIC + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclass + "</bookingclass><classType>" + classType + "</classType><farebasiscode>" + farebasiscode + "</farebasiscode><Rule>" + Rule.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry>" + taxdatapsgrRet + "</PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>"; // } #endregion xmlRequest = xmlRequest + "</FlightSegments></onward><Return><FlightSegments>"; #region old return //DataTable dtReturn = dsIntFlights.Tables["Return"]; //if (dtReturn.Rows.Count > 0) //{ // DataRow[] rowReturn = dtReturn.Select("OriginDestinationOption_Id=" + lblOriginDestinationRoundTrip.Text); // returnId = rowReturn[0]["return_id"].ToString(); //} //DataTable dtFlightSegmentsRet = dsIntFlights.Tables["FlightSegments"]; //if (dtFlightSegmentsRet.Rows.Count > 0) //{ // DataRow[] rowFlightSegmentsRet = dtFlightSegmentsRet.Select("return_id=" + returnId); // FlightSegmentsIDRet = rowFlightSegmentsRet[0]["FlightSegments_Id"].ToString(); //} //DataTable dtFlightSegmentRet = dsIntFlights.Tables["FlightSegment"]; //DataTable dtBookingClassRet = dsIntFlights.Tables["BookingClass"]; //DataTable dtBookingClassFareRet = dsIntFlights.Tables["BookingClassFare"]; //DataTable dtPsgrBreakUpRet = dsIntFlights.Tables["PsgrBreakUp"]; //DataTable dtPsgrAryRet = dsIntFlights.Tables["PsgrAry"]; //DataTable dtPsgrRet = dsIntFlights.Tables["Psgr"]; //DataTable dtTaxDataAryRet = dsIntFlights.Tables["TaxDataAry"]; //DataTable dtTaxDataRet = dsIntFlights.Tables["TaxData"]; //if (dtFlightSegmentRet.Rows.Count > 0) //{ // DataRow[] rowFlightSegmentRet = dtFlightSegmentRet.Select("FlightSegments_Id=" + FlightSegmentsIDRet); // for (int i = 0; i < rowFlightSegmentRet.Length; i++) // { // AirEquipTypeRet = rowFlightSegmentRet[i]["AirEquipType"].ToString(); // ArrivalAirportCodeRet = rowFlightSegmentRet[i]["ArrivalAirportCode"].ToString(); // ArrivalAirportNameRet = rowFlightSegmentRet[i]["ArrivalAirportName"].ToString(); // ArrivalDateTimeRet = rowFlightSegmentRet[i]["ArrivalDateTime"].ToString(); // DepartureAirportCodeRet = rowFlightSegmentRet[i]["DepartureAirportCode"].ToString(); // DepartureAirportNameRet = rowFlightSegmentRet[i]["DepartureAirportName"].ToString(); // DepartureDateTimeRet = rowFlightSegmentRet[i]["DepartureDateTime"].ToString(); // FlightNumberRet = rowFlightSegmentRet[i]["FlightNumber"].ToString(); // MarketingAirlineCodeRet = rowFlightSegmentRet[i]["MarketingAirlineCode"].ToString(); // OperatingAirlineCodeRet = rowFlightSegmentRet[i]["OperatingAirlineCode"].ToString(); // OperatingAirlineNameRet = rowFlightSegmentRet[i]["OperatingAirlineName"].ToString(); // OperatingAirlineFlightNumberRet = rowFlightSegmentRet[i]["OperatingAirlineFlightNumber"].ToString(); // NumStopsRet = rowFlightSegmentRet[i]["NumStops"].ToString(); // LinkSellAgrmntRet = rowFlightSegmentRet[i]["LinkSellAgrmnt"].ToString(); // ConxRet = rowFlightSegmentRet[i]["Conx"].ToString(); // AirpChgRet = rowFlightSegmentRet[i]["AirpChg"].ToString(); // InsideAvailOptionRet = rowFlightSegmentRet[i]["InsideAvailOption"].ToString(); // GenTrafRestrictionRet = rowFlightSegmentRet[i]["GenTrafRestriction"].ToString(); // DaysOperatesRet = rowFlightSegmentRet[i]["DaysOperates"].ToString(); // JrnyTmRet = rowFlightSegmentRet[i]["JrnyTm"].ToString(); // EndDtRet = rowFlightSegmentRet[i]["EndDt"].ToString(); // StartTerminalRet = rowFlightSegmentRet[i]["StartTerminal"].ToString(); // EndTerminalRet = rowFlightSegmentRet[i]["EndTerminal"].ToString(); // FltTmRet = rowFlightSegmentRet[i]["FltTm"].ToString(); // LSAIndRet = rowFlightSegmentRet[i]["LSAInd"].ToString(); // MileRet = rowFlightSegmentRet[i]["Mile"].ToString(); // if (dtBookingClassRet.Rows.Count > 0) // { // DataRow[] rowBookingClassRet = dtBookingClassRet.Select("FlightSegment_Id=" + rowFlightSegmentRet[i]["FlightSegment_Id"].ToString()); // AvailabilityRet = rowBookingClassRet[0]["Availability"].ToString(); // BICRet = rowBookingClassRet[0]["BIC"].ToString(); // } // if (dtBookingClassFareRet.Rows.Count > 0) // { // DataRow[] rowBookingClassFareRet = dtBookingClassFareRet.Select("FlightSegment_Id=" + rowFlightSegmentRet[i]["FlightSegment_Id"].ToString()); // bookingclassRet = rowBookingClassFareRet[0]["bookingclass"].ToString(); // classTypeRet = rowBookingClassFareRet[0]["classType"].ToString(); // farebasiscodeRet = rowBookingClassFareRet[0]["farebasiscode"].ToString(); // RuleRet = rowBookingClassFareRet[0]["Rule"].ToString(); // bookingclassFareIdRet = rowBookingClassFareRet[0]["bookingclassFare_Id"].ToString(); // } // if (dtPsgrBreakUpRet.Rows.Count > 0) // { // DataRow[] rowPsgrBreakUpRet = dtPsgrBreakUpRet.Select("bookingclassFare_Id=" + bookingclassFareIdRet); // psgrBreakUp_IdRet = rowPsgrBreakUpRet[0]["psgrBreakUp_Id"].ToString(); // } // if (dtPsgrAryRet.Rows.Count > 0) // { // DataRow[] rowPsgrAryRet = dtPsgrAryRet.Select("psgrBreakUp_Id=" + psgrBreakUp_IdRet); // psgrAy_idRet = rowPsgrAryRet[0]["psgrAry_Id"].ToString(); // } // if (dtPsgrRet.Rows.Count > 0) // { // DataRow[] rowPsgrRet = dtPsgrRet.Select("psgrAry_Id=" + psgrAy_idRet); // FarePsgrTypeRet = rowPsgrRet[0]["psgrType"].ToString(); // FareBaseFareRet = rowPsgrRet[0]["BaseFare"].ToString(); // FareTax1Ret = rowPsgrRet[0]["Tax"].ToString(); // BagInfoRet = rowPsgrRet[0]["BagInfo"].ToString(); // } // //if (dtTaxDataAryRet.Rows.Count > 0) // //{ // // DataRow[] rowTaxDataAryRet = dtTaxDataAryRet.Select("Fare_id=" + FareIdRet); // // taxDataAry_id = rowTaxDataAryRet[0]["TaxdataAry_Id"].ToString(); // //} // //if (dtTaxDataRet.Rows.Count > 0) // //{ // // DataRow[] rowTaxDataRet = dtTaxDataRet.Select("TaxdataAry_Id=" + taxDataAry_idRet); // // for (int j = 0; j < rowTaxDataRet.Length; j++) // // { // // if (rowTaxDataRet.Length == 0) // // { // // taxDataRet = "<TaxData><Country>" + rowTaxDataRet[j]["Country"].ToString() + "</Country><Amt>" + rowTaxDataRet[j]["Amt"].ToString() + "</Amt></TaxData>"; // // } // // else // // { // // taxDataRet = taxDataRet + "<TaxData><Country>" + rowTaxDataRet[j]["Country"].ToString() + "</Country><Amt>" + rowTaxDataRet[j]["Amt"].ToString() + "</Amt></TaxData>"; // // } // // } // //} // xmlRequest = xmlRequest + "<FlightSegment><AirEquipType>" + AirEquipTypeRet + "</AirEquipType><ArrivalAirportCode>" + ArrivalAirportCodeRet + "</ArrivalAirportCode><ArrivalAirportName>" + ArrivalAirportNameRet + "</ArrivalAirportName><ArrivalDateTime>" + ArrivalDateTimeRet + "</ArrivalDateTime><DepartureAirportCode>" + DepartureAirportCodeRet + "</DepartureAirportCode><DepartureAirportName>" + DepartureAirportNameRet + "</DepartureAirportName><DepartureDateTime>" + DepartureDateTimeRet + "</DepartureDateTime><FlightNumber>" + FlightNumberRet + "</FlightNumber>"; // xmlRequest = xmlRequest + "<MarketingAirlineCode>" + MarketingAirlineCodeRet + "</MarketingAirlineCode><OperatingAirlineCode>" + OperatingAirlineCodeRet + "</OperatingAirlineCode><OperatingAirlineName>" + OperatingAirlineNameRet + "</OperatingAirlineName><OperatingAirlineFlightNumber>" + OperatingAirlineFlightNumberRet + "</OperatingAirlineFlightNumber><NumStops>" + NumStopsRet + "</NumStops><LinkSellAgrmnt>" + LinkSellAgrmntRet + "</LinkSellAgrmnt><Conx>" + ConxRet + "</Conx><AirpChg>" + AirpChgRet + "</AirpChg><InsideAvailOption>" + InsideAvailOptionRet + "</InsideAvailOption><GenTrafRestriction>" + GenTrafRestrictionRet + "</GenTrafRestriction><DaysOperates>" + DaysOperatesRet + "</DaysOperates><JrnyTm>" + JrnyTmRet + "</JrnyTm><EndDt>" + EndDtRet + "</EndDt><StartTerminal>" + StartTerminalRet + "</StartTerminal><EndTerminal>" + EndTerminalRet + "</EndTerminal>"; // xmlRequest = xmlRequest + "<FltTm>" + FltTmRet + "</FltTm><LSAInd>" + LSAIndRet + "</LSAInd><Mile>" + MileRet + "</Mile><BookingClass><Availability>" + AvailabilityRet + "</Availability><BIC>" + BICRet + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclassRet + "</bookingclass><classType>" + classTypeRet + "</classType><farebasiscode>" + farebasiscodeRet + "</farebasiscode><Rule>" + RuleRet.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry>" + taxdatapsgrRet + "</PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>";//<Psgr><PsgrType>" + FarePsgrTypeRet + "</PsgrType><BaseFare>" + FareBaseFareRet + "</BaseFare><Tax>" + FareTax1Ret + "</Tax><BagInfo></BagInfo></Psgr> // } //} #endregion #region bookrequest return xmlRequest = xmlRequest + "<FlightSegment><AirEquipType>" + AirEquipTypeRet + "</AirEquipType><ArrivalAirportCode>" + ArrivalAirportCodeRet + "</ArrivalAirportCode><ArrivalAirportName>" + ArrivalAirportNameRet + "</ArrivalAirportName><ArrivalDateTime>" + ArrivalDateTimeRet + "</ArrivalDateTime><DepartureAirportCode>" + DepartureAirportCodeRet + "</DepartureAirportCode><DepartureAirportName>" + DepartureAirportNameRet + "</DepartureAirportName><DepartureDateTime>" + DepartureDateTimeRet + "</DepartureDateTime><FlightNumber>" + FlightNumberRet + "</FlightNumber>"; xmlRequest = xmlRequest + "<MarketingAirlineCode>" + MarketingAirlineCodeRet + "</MarketingAirlineCode><OperatingAirlineCode>" + OperatingAirlineCodeRet + "</OperatingAirlineCode><OperatingAirlineName>" + OperatingAirlineNameRet + "</OperatingAirlineName><OperatingAirlineFlightNumber>" + OperatingAirlineFlightNumberRet + "</OperatingAirlineFlightNumber><NumStops>" + NumStopsRet + "</NumStops><LinkSellAgrmnt>" + LinkSellAgrmntRet + "</LinkSellAgrmnt><Conx>" + ConxRet + "</Conx><AirpChg>" + AirpChgRet + "</AirpChg><InsideAvailOption>" + InsideAvailOptionRet + "</InsideAvailOption><GenTrafRestriction>" + GenTrafRestrictionRet + "</GenTrafRestriction><DaysOperates>" + DaysOperatesRet + "</DaysOperates><JrnyTm>" + JrnyTmRet + "</JrnyTm><EndDt>" + EndDtRet + "</EndDt><StartTerminal>" + StartTerminalRet + "</StartTerminal><EndTerminal>" + EndTerminalRet + "</EndTerminal>"; xmlRequest = xmlRequest + "<FltTm>" + FltTmRet + "</FltTm><LSAInd>" + LSAIndRet + "</LSAInd><Mile>" + MileRet + "</Mile><BookingClass><Availability>" + AvailabilityRet + "</Availability><BIC>" + BICRet + "</BIC></BookingClass><BookingClassFare><bookingclass>" + bookingclassRet + "</bookingclass><classType>" + classTypeRet + "</classType><farebasiscode>" + farebasiscodeRet + "</farebasiscode><Rule>" + RuleRet.Replace("<", "<").Replace(">", ">") + "</Rule><PsgrBreakup><PsgrAry>" + taxdatapsgrRet + "</PsgrAry></PsgrBreakup></BookingClassFare></FlightSegment>";//<Psgr><PsgrType>" + FarePsgrTypeRet + "</PsgrType><BaseFare>" + FareBaseFareRet + "</BaseFare><Tax>" + FareTax1Ret + "</Tax><BagInfo></BagInfo></Psgr> xmlRequest = xmlRequest + "</FlightSegments></Return><id>" + id1 + "</id><key>" + key + "</key>"; xmlRequest = xmlRequest + "</OriginDestinationOption></Bookingrequest>"; #endregion DataSet dsResponse = new DataSet(); StringBuilder stt = new StringBuilder(); stt.Append("xmlRequest"); stt.Append("="); stt.Append(Server.UrlEncode(xmlRequest)); byte[] requestData = Encoding.UTF8.GetBytes(stt.ToString()); HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://live.arzoo.com:9302/Booking"); request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.Accept = "application/json"; request.ContentLength = requestData.Length; using (Stream requestStream = request.GetRequestStream()) { requestStream.Write(requestData, 0, requestData.Length); } using (HttpWebResponse response = (HttpWebResponse)request.GetResponse()) { using (Stream stream = response.GetResponseStream()) { using (StreamReader reader = new StreamReader(stream, Encoding.ASCII)) result = reader.ReadToEnd(); XmlDocument doc = new XmlDocument(); doc.LoadXml(result); XmlNodeReader xmlReader = new XmlNodeReader(doc); dsResponse.ReadXml(xmlReader); } } return dsResponse; } catch (Exception ex) { throw; } }