private string GetHotels(string sc, string searchid) { string rq = ""; //pcc = "VL5H"; //ipcc = "7A7H"; ; //username = "******"; //password = "******"; //result = XMLRead.ContextChange(pcc,ipcc,username,password,searchid); result = XMLRead.ContextChange(searchid); ContextResult = result; if (result.ToString() != "") { DataSet ds = new DataSet(); DataSet dsSession = new DataSet(); StringReader se_stream = new StringReader(result); dsSession.ReadXml(se_stream); string Rq = ""; if (dsSession.Tables["BinarySecurityToken"] != null) { DataTable dtBinarySecurityToken = dsSession.Tables["BinarySecurityToken"]; DataTable dtMessageData = dsSession.Tables["MessageData"]; DataTable dtMessageHeader = dsSession.Tables["MessageHeader"]; string timestamp = DateTime.UtcNow.ToString(); rq = GetRq(dtBinarySecurityToken, dtMessageData, dtMessageHeader, sc); result = XMLRead.SendQuery(rq); XMLRead.SaveXMLFile(rq, result, searchid + "_hotelsAvail"); } } return(result); }
public PNRData(string searchid, CustomerInfo ci, string rph, string ContextResult, string BookinID) { //string filePathContext = Path.Combine(HttpRuntime.AppDomainAppPath, "HotelXML/" + searchid + "_ContextChange-RS.xml"); //if (File.Exists(filePathContext)) //{ // ContextResult = File.ReadAllText(filePathContext); //} //else //{ // ContextResult = XMLRead.ContextChange(searchid); //} string result = ""; int rphl = rph.ToString().Length; if (rphl == 1) { rph = "0" + rph.ToString(); } string RateBodyRQ = GetRateDescBodyRQ(rph); string PassengerBodyRQ = GetPassengerBodyRQ(ci); string HoteResBodyRQ = GetHotelResBodyRQ(ci, rph); string RateRQ = GetRateDescRQ(ContextResult, RateBodyRQ); result = XMLRead.SendQuery(RateRQ); XMLRead.SaveXMLFile(RateRQ, result, BookinID + "_RateDesec"); string PassengerRQ = GetPassengerXMLRQ(result, PassengerBodyRQ); result = XMLRead.SendQuery(PassengerRQ); XMLRead.SaveXMLFile(RateRQ, result, BookinID + "_PassengerDet"); string HotelResRq = GetHotelResXMLRQ(result, HoteResBodyRQ); result = XMLRead.SendQuery(HotelResRq); XMLRead.SaveXMLFile(RateRQ, result, BookinID + "_HotelResDet"); string EndTransRQ = GetEndTransRQ(result); result = XMLRead.SendQuery(EndTransRQ); XMLRead.SaveXMLFile(RateRQ, result, BookinID + "_EndTrans"); string EndTransXML = result; Hes = new HotelEndTrans(EndTransXML); if (result.ToString() != "") { DataSet ds = new DataSet(); DataSet dsSession = new DataSet(); StringReader se_stream = new StringReader(result); dsSession.ReadXml(se_stream); string Rq = ""; if (dsSession.Tables["BinarySecurityToken"] != null) { DataTable dtBinarySecurityToken = dsSession.Tables["BinarySecurityToken"]; DataTable dtMessageData = dsSession.Tables["MessageData"]; DataTable dtMessageHeader = dsSession.Tables["MessageHeader"]; string timestamp = DateTime.UtcNow.ToString(); string cresult = XMLRead.closession(dtMessageData.Rows[0]["MessageId"].ToString(), timestamp, dtBinarySecurityToken.Rows[0]["BinarySecurityToken_Text"].ToString(), searchid + "_PNREndTrans", XMLRead.pcc, XMLRead.ipcc); } } }
public string GetImageXMLContext(string Hotelcode, string searchid, string ContextResult) { XMLRead xmlHotelImage = new XMLRead(); string rq = ""; string result = ""; rq = GetXMLRQ(ContextResult, Hotelcode); result = XMLRead.SendQuery(rq); XMLRead.SaveXMLFile(rq, result, searchid + "_hotelsImage" + "_" + Hotelcode); return(result); }
private string GetHotel(string rqbody, string searchid, string hotelcode, string CurrencyCode, string b2c_idn) { string rq = ""; XMLRead.GetPccDetails(b2c_idn); string htlAvuri = ConfigurationManager.AppSettings["HotelPortalUri"] != null ? ConfigurationManager.AppSettings["HotelPortalUri"].ToString() : string.Empty; if (!string.IsNullOrEmpty(htlAvuri)) { result = XMLRead.SendQuery(rqbody, htlAvuri); XMLRead.SaveXMLFile(rqbody, result, searchid + "_propertydesc_" + hotelcode + "_" + CurrencyCode + "_hotelsAvail"); } return(result); }
public string GetImageXML(string Hotelcode, string searchid) { //pcc = "VL5H"; //ipcc = "7A7H"; ; //username = "******"; //password = "******"; //XMLRead xmlHotelImage = new XMLRead(); string result = ""; // result = XMLRead.ContextChange(pcc, ipcc, username, password, searchid); result = XMLRead.ContextChange(searchid); string rq = ""; rq = GetXMLRQ(result, Hotelcode); result = XMLRead.SendQuery(rq); XMLRead.SaveXMLFile(rq, result, searchid + "_hotelsImage" + "_" + Hotelcode); return(result); }