예제 #1
0
 private IntSync.Price ConvertToPrice(CalculatorPrice price)
 {
     IntSync.Price pr = new IntSync.Price()
     {
         Adults                  = price.Adults,
         CheckIn                 = price.CheckIn,
         CheckOut                = price.CheckOut,
         Children                = price.Children,
         ValueByArrival          = price.ValueByArrival,
         ValueByBooking          = price.ValueByBooking,
         Currency                = price.Currency,
         ValueListPriceByBooking = price.ValueListPriceByBooking,
         FromPersons             = price.FromPersons,
         ToPersons               = price.ToPersons,
         PaymentOptionsSelectId  = price.PaymentOfferOptionId
     };
     foreach (var i in price.ArrivalServiceList)
     {
         pr.ArrivalServiceList.Add(new IntSync.ServicePriceItem()
         {
             Description = i.Description, Eur = i.Eur, ServiceType = (IntSync.ServiceType)i.ServiceType
         });
     }
     foreach (var i in price.BookingServiceList)
     {
         pr.BookingServiceList.Add(new IntSync.ServicePriceItem()
         {
             Description = i.Description, Eur = i.Eur, ServiceType = (IntSync.ServiceType)i.ServiceType
         });
     }
     foreach (var i in price.PaymentInfoList)
     {
         pr.PaymentInfoList.Add(new IntSync.PaymentInfo()
         {
             Date = i.Date, Eur = i.Eur, Percent = i.Percent
         });
     }
     foreach (var i in price.PaymentOfferOptionsList)
     {
         pr.PaymentOfferOptionsList.Add(new IntSync.PaymentOfferOption()
         {
             PaymentModeTitel = i.PaymentModeTitel, PaymentModeDescription = i.PaymentModeDescription, PaymentOfferEur = i.PaymentOfferEur, PaymentOfferId = i.PaymentOfferId, CancellationFeesPercent = i.CancellationFeesPercent, CancellationFeesToDays = i.CancellationFeesToDays
         });
     }
     return(pr);
 }
예제 #2
0
 public IntSync.Price GetPrice(IntSync.PriceArg arg)
 {
     IntSync.Price       price = new IntSync.Price();
     IntOffice.PriceList pr    = new PlugInPriceLists.PriceListManager().GetPriceList("IDOM", arg.TouristSiteCode, arg.OfferCode, IntOffice.PriceListType.RetailPrice);
     return(GetPrice(arg, pr));
 }