Example #1
0
 private List<PriceTemp> getListprices(HtmlNode htmlNode)
 {
     List<PriceTemp> liP = null;
     try
     {
         liP = new List<PriceTemp>();
         PriceTemp p = new PriceTemp();
         p.name = "";
         p.price = decimal.Parse(htmlNode.SelectSingleNode(".//span[@class='price']").InnerText.Replace("USD ", "")) * MoneyRate.MONEY_RATE;
         liP.Add(p);
     }
     catch { }
     return liP;
 }
Example #2
0
 private List<PriceTemp> getListprices(HtmlNode htmlNode)
 {
     List<PriceTemp> liP = null;
     try
     {
         liP = new List<PriceTemp>();
         PriceTemp p = new PriceTemp();
         p.name = "";
         //tinh tong gia cua ca nguoi lon, tre em,tre so sinh(gia da gom thue va phu phi)
         HtmlNodeCollection ncP = htmlNode.SelectNodes("div/div[@class='price']");
         int indexPrice = 0;
         if(_input.Adults>0)
         {
             decimal price = decimal.Parse(ncP[indexPrice].InnerText.Replace(" USD", "")) * MoneyRate.MONEY_RATE;
             p.PriceAdult = price * _input.Adults;
             indexPrice++;
         }
         if (_input.Children > 0)
         {
             decimal price = decimal.Parse(ncP[indexPrice].InnerText.Replace(" USD", "")) * MoneyRate.MONEY_RATE;
             p.PriceChild = price * _input.Children;
             indexPrice++;
         }
         if (_input.Inf > 0)
         {
             decimal price = decimal.Parse(ncP[indexPrice].InnerText.Replace(" USD", "")) * MoneyRate.MONEY_RATE;
             p.PriceInfant = price*_input.Inf;
         }
         liP.Add(p);
     }
     catch { }
     return liP;
 }