예제 #1
0
        public IntSync.Price GetPrice(QTouristik.Interface.Sync.PriceArg arg, IntOffice.PriceList priceList)
        {
            MasterDataManager mda = new MasterDataManager();
            var unit = mda.GetTouristUnit(arg.TouristSiteCode, arg.OfferCode);

            var offer = mda.GetUnitOffer(arg.TourOperatorCode, arg.TouristSiteCode, arg.OfferCode);

            Utility.PriceCalculator.CalculatorPriceList cpl = ConvertToCalculatorPriceList(priceList, unit.UnitStopBooking);
            var calcArg = new QTouristik.Utility.PriceCalculator.PriceArg();

            calcArg.CheckIn              = arg.CheckIn.Date;
            calcArg.CheckOut             = arg.CheckOut.Date;
            calcArg.OfferCode            = arg.OfferCode;
            calcArg.Pets                 = arg.Pets;
            calcArg.TouristSiteId        = arg.TouristSiteCode;
            calcArg.TourOperatorCode     = arg.TourOperatorCode;
            calcArg.Traveler             = arg.Birthdays;
            calcArg.PaymentOfferOptionId = arg.PaymentOfferOptionId;


            var calculatorPrice = new QTouristik.Utility.PriceCalculator.PriceCalculateUtility(cpl).GetPrice(calcArg);
            var price           = ConvertToPrice(calculatorPrice);

            price.OfferCode    = priceList.OfferCode;
            price.OfferName    = offer.OfferTitel;
            price.PlaceName    = unit.PlaceName;
            price.RegionName   = unit.RegionName;
            price.SiteCode     = unit.SiteCode;
            price.FacilityName = unit.SiteName;


            return(price);
        }
예제 #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));
 }