예제 #1
0
 public WarehouseController(IGunRepository r, IPriceCalculation p, IOrderRepository o, IWarehouseRepository w)
 {
     repo     = r;
     price    = p;
     orderrep = o;
     ware     = w;
 }
예제 #2
0
            public string GetMyComputerPrice(IPriceCalculation cmpCal, IComputerPrice cmpPrice)
            {
                var myCompprice = "El Precio es : " +
                                  cmpCal.CalculatePriceAfterTax(cmpPrice).ToString();

                return(myCompprice);
            }
예제 #3
0
 public OrderService(IGunRepository gunRepo, IPriceCalculation priceCalculation,
                     IOrderRepository orderRepo)
 {
     gunRepository     = gunRepo;
     orderRepository   = orderRepo;
     _priceCalculation = priceCalculation;
 }
예제 #4
0
 public GunController(IGunRepository r, IPriceCalculation p, IOrderRepository o, IReservationService rs, IReservationRepository rr)
 {
     gunrepo  = r;
     price    = p;
     orderrep = o;
     resserv  = rs;
     resrepo  = rr;
 }
예제 #5
0
 public PriceController(IRepository <Size> sizeRepository, IRepository <Color> colorRepository,
                        IRepository <Quantity> quantityRepository, IPriceCalculation priceCalculation, IMapper mapper)
 {
     _sizeRepository     = sizeRepository;
     _colorRepository    = colorRepository;
     _quantityRepository = quantityRepository;
     _priceCalculation   = priceCalculation;
     _mapper             = mapper;
 }
예제 #6
0
        protected override IEnumerable <ProductPrice> GetProductPrice(IList <PriceMatrix> priceMatrixList, PricingServiceParameter pricingServiceParameter, PriceMatrix selectedPriceMatrix, bool regularPrice)
        {
            List <ProductPrice> productPriceList = new List <ProductPrice>();
            List <PriceBracket> matrixBrackets   = this.GetMatrixBrackets(selectedPriceMatrix);
            CurrencyDto         currency         = this.GetCurrency(selectedPriceMatrix.CurrencyCode);
            Decimal             basePrice        = this.GetBasePrice(pricingServiceParameter);

            foreach (PriceBracket priceBracket1 in matrixBrackets)
            {
                PriceData priceData1 = new PriceData();
                priceData1.PricingServiceParameter = pricingServiceParameter;
                Product product = this.Product;
                priceData1.Product = product;
                Customer billTo = this.BillTo;
                priceData1.BillTo = billTo;
                Customer shipTo = GetSiteContextShipTo();//BUSA-42 : Duplicate Customers on Production.
                priceData1.ShipTo = shipTo;
                List <PriceBracket> priceBracketList = matrixBrackets;
                priceData1.MatrixBrackets = priceBracketList;
                PriceBracket priceBracket2 = priceBracket1;
                priceData1.PriceBracket = priceBracket2;
                if (selectedPriceMatrix.RecordType.EqualsIgnoreCase("Product"))
                {
                    var priceBracket = GetAllCustomerItemPriceBracket();
                    if (priceBracket != null)
                    {
                        priceData1.PriceBracket.AdjustmentType = priceBracket.AdjustmentType;
                        priceData1.PriceBracket.PriceBasis     = priceBracket.PriceBasis;
                        priceData1.PriceBracket.Amount         = priceBracket.Amount;
                        priceData1.PriceBracket.AltAmount      = priceBracket.AltAmount;
                    }
                }
                Decimal num = basePrice;
                priceData1.BasePrice = num;
                string calculationFlags = selectedPriceMatrix.CalculationFlags;
                priceData1.CalculationFlags = calculationFlags;
                if (selectedPriceMatrix.RecordType.EqualsIgnoreCase("Product"))
                {
                    priceData1.TempBasis = priceData1.PriceBracket.AltAmount;
                }
                else
                {
                    priceData1.TempBasis = this.GetTempBasisValue(priceBracket1.PriceBasis, priceMatrixList, pricingServiceParameter, regularPrice);
                }
                PriceData         priceData        = priceData1;
                IPriceCalculation priceCalculation = this.PriceCalculations.FirstOrDefault <IPriceCalculation>((Func <IPriceCalculation, bool>)(r => r.IsMatch(priceData)));
                if (priceCalculation != null)
                {
                    ProductPrice productPrice = new ProductPrice();
                    productPrice.BreakQty = priceData.PriceBracket.BreakQty;
                    if (regularPrice)
                    {
                        //Start:Revert BUSA 682 :The Base price of the product in ERP and the base price of the same product on the PDP are different.Revert BUSA: 696 Acct #78803:1076826 - Product (5011768U0) price differs in ERP and on the PDP.
                        var price = GetPriceListAmount("P2");
                        productPrice.Price = !string.IsNullOrEmpty(price) ? Convert.ToDecimal(price) : this.GetBasePrice(pricingServiceParameter);
                        //productPrice.Price = !string.IsNullOrEmpty(price) ? Convert.ToDecimal(price) : this.Product.BasicListPrice;

                        //End:Revert BUSA 682 :The Base price of the product in ERP and the base price of the same product on the PDP are different.Revert BUSA: 696 Acct #78803:1076826 - Product (5011768U0) price differs in ERP and on the PDP.
                    }
                    else
                    {
                        productPrice.Price = priceCalculation.CalculatePrice(priceData);
                    }

                    productPrice.Price        = this.ApplyProductMultiplier(pricingServiceParameter, productPrice.Price);
                    productPrice.Price        = selectedPriceMatrix.UnitOfMeasure == pricingServiceParameter.UnitOfMeasure || selectedPriceMatrix.UnitOfMeasure.IsBlank() && pricingServiceParameter.UnitOfMeasure == this.Product.UnitOfMeasure || priceBracket1.PriceBasis.Equals("CLM", StringComparison.OrdinalIgnoreCase) ? productPrice.Price : this.AdjustForUnitOfMeasure(pricingServiceParameter, productPrice.Price);
                    productPrice.PriceDisplay = this.CurrencyFormatProvider.GetString(productPrice.Price, currency);
                    productPriceList.Add(productPrice);
                }
            }
            return(productPriceList);
        }
예제 #7
0
 public BookingService(IPriceCalculation calculation)
 {
     db = new HotelContext();
     calc = calculation;
 }
예제 #8
0
 public OrderController(ILogger <OrderController> logger, IPriceCalculation priceCalculation)
 {
     _logger           = logger;
     _priceCalculation = priceCalculation;
 }
 public BookingService(IPriceCalculation calculation)
 {
     db   = new HotelContext();
     calc = calculation;
 }