示例#1
0
 public CustomersController(ICustomerManager customerManager, IContactManager contactManager, IBuildingManager buildingManager,
                            IRequestManager requestManager,
                            IInterventionManager interventionManager, IOfferManager offerManager,
                            IOrderManager orderManager, IDepositInvoiceManager depositInvoiceManager, IInvoiceManager invoiceManager,
                            ITagManager tagManager, ICountryManager countryManager, ILanguageManager languageManager,
                            IHonorificPrefixManager honorificPrefixManager, IIncludedCollector includedCollector,
                            IMapper mapper, IJsonApiBuilder jsonApiBuilder)
 {
     _customerManager        = customerManager;
     _contactManager         = contactManager;
     _buildingManager        = buildingManager;
     _requestManager         = requestManager;
     _interventionManager    = interventionManager;
     _offerManager           = offerManager;
     _orderManager           = orderManager;
     _depositInvoiceManager  = depositInvoiceManager;
     _invoiceManager         = invoiceManager;
     _tagManager             = tagManager;
     _countryManager         = countryManager;
     _languageManager        = languageManager;
     _honorificPrefixManager = honorificPrefixManager;
     _includedCollector      = includedCollector;
     _mapper         = mapper;
     _jsonApiBuilder = jsonApiBuilder;
 }
 public StatisticProvider(IESStorage esstorage,
                          ISkillManager skillsStorage,
                          IOfferManager offerManager,
                          IEmployeeManager employeeManager)
 {
     this.esstorage       = esstorage;
     this.skillsStorage   = skillsStorage;
     this.offerManager    = offerManager;
     this.employeeManager = employeeManager;
 }
示例#3
0
 public OfferlinesController(IOfferlineManager offerlineManager, IOfferManager offerManager, IVatRateManager vatRateManager,
                             IIncludedCollector includedCollector, IMapper mapper, IJsonApiBuilder jsonApiBuilder,
                             ILogger <OffersController> logger)
 {
     _offerlineManager  = offerlineManager;
     _offerManager      = offerManager;
     _vatRateManager    = vatRateManager;
     _includedCollector = includedCollector;
     _mapper            = mapper;
     _jsonApiBuilder    = jsonApiBuilder;
     _logger            = logger;
 }
示例#4
0
 public RequestsController(IRequestManager requestManager, IOfferManager offerManager, IWayOfEntryManager wayOfEntryManager,
                           ICustomerManager customerManager, IContactManager contactManager, IBuildingManager buildingManager,
                           ICalendarEventManager calendarEventManager, IDocumentGenerationManager documentGenerationManager,
                           IIncludedCollector includedCollector, IMapper mapper, IJsonApiBuilder jsonApiBuilder)
 {
     _requestManager            = requestManager;
     _offerManager              = offerManager;
     _wayOfEntryManager         = wayOfEntryManager;
     _customerManager           = customerManager;
     _contactManager            = contactManager;
     _buildingManager           = buildingManager;
     _calendarEventManager      = calendarEventManager;
     _documentGenerationManager = documentGenerationManager;
     _includedCollector         = includedCollector;
     _mapper         = mapper;
     _jsonApiBuilder = jsonApiBuilder;
 }
示例#5
0
 public OffersController(IOfferManager offerManager, IRequestManager requestManager, IOrderManager orderManager,
                         ICustomerManager customerManager, IContactManager contactManager, IBuildingManager buildingManager,
                         IVatRateManager vatRateManager,
                         IDocumentGenerationManager documentGenerationManager, IIncludedCollector includedCollector,
                         IMapper mapper, IJsonApiBuilder jsonApiBuilder, ILogger <OffersController> logger)
 {
     _offerManager              = offerManager;
     _customerManager           = customerManager;
     _contactManager            = contactManager;
     _buildingManager           = buildingManager;
     _requestManager            = requestManager;
     _orderManager              = orderManager;
     _vatRateManager            = vatRateManager;
     _documentGenerationManager = documentGenerationManager;
     _includedCollector         = includedCollector;
     _mapper         = mapper;
     _jsonApiBuilder = jsonApiBuilder;
     _logger         = logger;
 }
示例#6
0
 public OrdersController(IOrderManager orderManager, IOfferManager offerManager, IInvoiceManager invoiceManager,
                         ICustomerManager customerManager, IContactManager contactManager, IBuildingManager buildingManager,
                         IDepositManager depositManager, IDepositInvoiceManager depositInvoiceManager, IVatRateManager vatRateManager,
                         IDocumentGenerationManager documentGenerationManager, IIncludedCollector includedCollector,
                         IMapper mapper, IJsonApiBuilder jsonApiBuilder)
 {
     _orderManager              = orderManager;
     _customerManager           = customerManager;
     _contactManager            = contactManager;
     _buildingManager           = buildingManager;
     _offerManager              = offerManager;
     _invoiceManager            = invoiceManager;
     _depositManager            = depositManager;
     _depositInvoiceManager     = depositInvoiceManager;
     _vatRateManager            = vatRateManager;
     _documentGenerationManager = documentGenerationManager;
     _includedCollector         = includedCollector;
     _mapper         = mapper;
     _jsonApiBuilder = jsonApiBuilder;
 }
示例#7
0
        /// <summary>
        /// Get total from basket with offers
        /// </summary>
        /// <param name="basket">basket to compute total from</param>
        /// <param name="offerManager">Offers available</param>
        /// <returns>Total</returns>
        public decimal GetTotal(Basket basket, IOfferManager offerManager)
        {
            decimal total = 0.00m;

            try
            {
                if (basket == null)
                {
                    throw new ArgumentNullException(nameof(basket));
                }

                if (!basket.Items.Any())
                {
                    return(total);
                }

                foreach (KeyValuePair <Item, int> kvp in basket.Items)
                {
                    Offer offer = offerManager.GetOfferForItem(kvp.Key);

                    if (offer == null)
                    {
                        total += GetTotalForItem(kvp);
                    }
                    else
                    {
                        total += GetTotalForItem(kvp, offer);
                    }
                }
            }
            catch (Exception ex)
            {
                _log.LogCritical(ex, $"{nameof(BasketManagerImpl)}.{nameof(GetTotal)} failed");
            }
            return(total);
        }
示例#8
0
 public OfferController(IOfferManager offerManager)
 {
     _offerManager = offerManager;
 }