Exemplo n.º 1
0
 public OrdersHandler(IEmailsCommand emailsCommand, IEmployersQuery employersQuery, ICreditsQuery creditsQuery, IProductsQuery productsQuery)
 {
     _emailsCommand  = emailsCommand;
     _employersQuery = employersQuery;
     _creditsQuery   = creditsQuery;
     _productsQuery  = productsQuery;
 }
Exemplo n.º 2
0
 public JobAdController(IEmployerJobAdsCommand employerJobAdsCommand, IAnonymousJobAdsCommand anonymousJobAdsCommand, IEmployerLogosCommand employerLogosCommand, IJobAdsCommand jobAdsCommand, IJobAdsQuery jobAdsQuery, IJobPostersQuery jobPostersQuery, IMemberJobAdViewsQuery memberJobAdViewsQuery, ICreditsQuery creditsQuery, IProductsQuery productsQuery, ICouponsQuery couponsQuery, IOrdersCommand ordersCommand, IOrdersQuery ordersQuery, IEmployerAllocationsCommand employerAllocationsCommand, IEmployerCreditsQuery employerCreditsQuery, IEmployerOrdersCommand employerOrdersCommand, IEmployerOrdersQuery employerOrdersQuery, ILocationQuery locationQuery, IIndustriesQuery industriesQuery, IAccountsManager accountsManager, ILoginCredentialsQuery loginCredentialsQuery, ILoginAuthenticationCommand loginAuthenticationCommand, IAuthenticationManager authenticationManager)
 {
     _employerJobAdsCommand      = employerJobAdsCommand;
     _anonymousJobAdsCommand     = anonymousJobAdsCommand;
     _employerLogosCommand       = employerLogosCommand;
     _jobAdsCommand              = jobAdsCommand;
     _jobAdsQuery                = jobAdsQuery;
     _jobPostersQuery            = jobPostersQuery;
     _memberJobAdViewsQuery      = memberJobAdViewsQuery;
     _creditsQuery               = creditsQuery;
     _productsQuery              = productsQuery;
     _couponsQuery               = couponsQuery;
     _ordersCommand              = ordersCommand;
     _ordersQuery                = ordersQuery;
     _employerAllocationsCommand = employerAllocationsCommand;
     _employerCreditsQuery       = employerCreditsQuery;
     _employerOrdersCommand      = employerOrdersCommand;
     _employerOrdersQuery        = employerOrdersQuery;
     _locationQuery              = locationQuery;
     _industriesQuery            = industriesQuery;
     _accountsManager            = accountsManager;
     _loginCredentialsQuery      = loginCredentialsQuery;
     _loginAuthenticationCommand = loginAuthenticationCommand;
     _authenticationManager      = authenticationManager;
 }
Exemplo n.º 3
0
 public EmployerAllocationsCommand(IAllocationsCommand allocationsCommand, IAllocationsQuery allocationsQuery, ICreditsQuery creditsQuery, IEmployerCreditsQuery employerCreditsQuery)
 {
     _allocationsCommand   = allocationsCommand;
     _allocationsQuery     = allocationsQuery;
     _creditsQuery         = creditsQuery;
     _employerCreditsQuery = employerCreditsQuery;
 }
Exemplo n.º 4
0
 public OrdersController(IEmployerOrdersCommand employerOrdersCommand, IEmployerOrdersQuery employerOrdersQuery, IProductsQuery productsQuery, ICouponsQuery couponsQuery, ICreditsQuery creditsQuery)
 {
     _employerOrdersCommand = employerOrdersCommand;
     _employerOrdersQuery   = employerOrdersQuery;
     _productsQuery         = productsQuery;
     _couponsQuery          = couponsQuery;
     _creditsQuery          = creditsQuery;
 }
Exemplo n.º 5
0
 protected AllocationCreditInfo(bool verified, bool hasExpired, CreditAllocation creditAllocation, IEmployerAccountsCommand employerAccountsCommand, IOrganisationsCommand organisationsCommand, ICreditsQuery creditsQuery, IAllocationsCommand allocationsCommand)
     : base(verified, employerAccountsCommand, organisationsCommand)
 {
     _hasExpired         = hasExpired;
     _creditAllocation   = creditAllocation;
     _creditsQuery       = creditsQuery;
     _allocationsCommand = allocationsCommand;
 }
Exemplo n.º 6
0
 public EmployerCreditsCommand(ICreditsQuery creditsQuery, IAllocationsQuery allocationsQuery, IExercisedCreditsCommand exercisedCreditsCommand, IExercisedCreditsQuery exercisedCreditsQuery, IEmployersQuery employersQuery, IRecruitersQuery recruitersQuery, IJobAdApplicantsQuery jobAdApplicantsQuery, int maxCreditsPerJobAd)
     : base(creditsQuery, allocationsQuery)
 {
     _exercisedCreditsCommand = exercisedCreditsCommand;
     _exercisedCreditsQuery   = exercisedCreditsQuery;
     _employersQuery          = employersQuery;
     _recruitersQuery         = recruitersQuery;
     _jobAdApplicantsQuery    = jobAdApplicantsQuery;
     _maxCreditsPerJobAd      = maxCreditsPerJobAd;
 }
Exemplo n.º 7
0
 public ProductsController(IEmployerOrdersQuery employerOrdersQuery, IProductsCommand productsCommand, IOrdersQuery ordersQuery, ICreditsQuery creditsQuery, IAllocationsQuery allocationsQuery, IRecruitersQuery recruitersQuery, IOrganisationsQuery organisationsQuery)
 {
     _employerOrdersQuery = employerOrdersQuery;
     _productsCommand     = productsCommand;
     _ordersQuery         = ordersQuery;
     _creditsQuery        = creditsQuery;
     _allocationsQuery    = allocationsQuery;
     _recruitersQuery     = recruitersQuery;
     _organisationsQuery  = organisationsQuery;
 }
Exemplo n.º 8
0
        private static void SortItems(ICreditsQuery creditsQuery, Order order, IEnumerable <Product> products)
        {
            // Reorder the items by primary credit description just to introduce some certainty.

            order.Items = (from i in order.Items
                           join p in products on i.ProductId equals p.Id
                           let a = p.GetPrimaryCreditAdjustment()
                                   let c = a == null ? null : creditsQuery.GetCredit(a.CreditId)
                                           orderby c == null ? "" : c.Description
                                           select i).ToList();
        }
Exemplo n.º 9
0
 public OrganisationCreditsController(IOrganisationsQuery organisationsQuery, IEmployersQuery employersQuery, IMembersQuery membersQuery, IJobAdsQuery jobAdsQuery, IAllocationsQuery allocationsQuery, IAllocationsCommand allocationsCommand, ICreditsQuery creditsQuery, IExercisedCreditsQuery exercisedCreditsQuery, IOrdersQuery ordersQuery)
 {
     _organisationsQuery    = organisationsQuery;
     _employersQuery        = employersQuery;
     _membersQuery          = membersQuery;
     _jobAdsQuery           = jobAdsQuery;
     _allocationsQuery      = allocationsQuery;
     _allocationsCommand    = allocationsCommand;
     _creditsQuery          = creditsQuery;
     _exercisedCreditsQuery = exercisedCreditsQuery;
     _ordersQuery           = ordersQuery;
 }
Exemplo n.º 10
0
 public CreditsHandler(IEmailsCommand emailsCommand, IEmployersQuery employersQuery, IOrganisationsQuery organisationsQuery, IRecruitersQuery recruitersQuery, IAdministratorsQuery administratorsQuery, IAllocationsCommand allocationsCommand, IAllocationsQuery allocationsQuery, ICreditsQuery creditsQuery, IJobAdsCommand jobAdsCommand, IJobAdsQuery jobAdsQuery)
 {
     _emailsCommand       = emailsCommand;
     _employersQuery      = employersQuery;
     _organisationsQuery  = organisationsQuery;
     _recruitersQuery     = recruitersQuery;
     _administratorsQuery = administratorsQuery;
     _allocationsCommand  = allocationsCommand;
     _allocationsQuery    = allocationsQuery;
     _creditsQuery        = creditsQuery;
     _jobAdsCommand       = jobAdsCommand;
     _jobAdsQuery         = jobAdsQuery;
 }
Exemplo n.º 11
0
 public NewOrderController(IPageflowEngine pageflowEngine, IEmployerOrdersCommand employerOrdersCommand, IEmployerOrdersQuery employerOrdersQuery, IProductsQuery productsQuery, ICreditsQuery creditsQuery, ICouponsQuery couponsQuery, IOrdersCommand ordersCommand, IOrdersQuery ordersQuery, IAccountsManager accountsManager, ILoginCredentialsQuery loginCredentialsQuery, ILoginAuthenticationCommand loginAuthenticationCommand, IAuthenticationManager authenticationManager, IIndustriesQuery industriesQuery)
     : base(Routes, pageflowEngine)
 {
     _employerOrdersCommand      = employerOrdersCommand;
     _employerOrdersQuery        = employerOrdersQuery;
     _productsQuery              = productsQuery;
     _creditsQuery               = creditsQuery;
     _couponsQuery               = couponsQuery;
     _ordersCommand              = ordersCommand;
     _ordersQuery                = ordersQuery;
     _accountsManager            = accountsManager;
     _loginCredentialsQuery      = loginCredentialsQuery;
     _loginAuthenticationCommand = loginAuthenticationCommand;
     _authenticationManager      = authenticationManager;
     _industriesQuery            = industriesQuery;
 }
Exemplo n.º 12
0
 public SettingsController(IEmployerAccountsCommand employerAccountsCommand, IOrganisationsCommand organisationsCommand, IOrganisationsQuery organisationsQuery, IPhoneNumbersQuery phoneNumbersQuery, IIndustriesQuery industriesQuery, ILoginCredentialsCommand loginCredentialsCommand, ILoginCredentialsQuery loginCredentialsQuery, IAuthenticationManager authenticationManager, ICreditsQuery creditsQuery, IEmployerCreditsQuery employerCreditsQuery, IJobPostersCommand jobPostersCommand, IJobPostersQuery jobPostersQuery, INonMemberSettingsCommand nonMemberSettingsCommand, INonMemberSettingsQuery nonMemberSettingsQuery, ISettingsCommand settingsCommand, ISettingsQuery settingsQuery, ILinkedInCommand linkedInCommand, ILinkedInQuery linkedInQuery)
 {
     _employerAccountsCommand  = employerAccountsCommand;
     _authenticationManager    = authenticationManager;
     _creditsQuery             = creditsQuery;
     _employerCreditsQuery     = employerCreditsQuery;
     _jobPostersQuery          = jobPostersQuery;
     _nonMemberSettingsQuery   = nonMemberSettingsQuery;
     _settingsQuery            = settingsQuery;
     _linkedInQuery            = linkedInQuery;
     _linkedInCommand          = linkedInCommand;
     _nonMemberSettingsCommand = nonMemberSettingsCommand;
     _jobPostersCommand        = jobPostersCommand;
     _settingsCommand          = settingsCommand;
     _loginCredentialsCommand  = loginCredentialsCommand;
     _loginCredentialsQuery    = loginCredentialsQuery;
     _industriesQuery          = industriesQuery;
     _phoneNumbersQuery        = phoneNumbersQuery;
     _organisationsCommand     = organisationsCommand;
     _organisationsQuery       = organisationsQuery;
 }
Exemplo n.º 13
0
        public static Order PrepareOrder(this IEmployerOrdersCommand employerOrdersCommand, IProductsQuery productsQuery, ICreditsQuery creditsQuery, IEnumerable <Guid> productIds, Coupon coupon, Discount discount, CreditCardType creditCardType)
        {
            var order = employerOrdersCommand.PrepareOrder(productIds, coupon, discount, creditCardType);

            SortItems(creditsQuery, order, productsQuery.GetProducts());
            return(order);
        }
Exemplo n.º 14
0
 public AllocationsQuery(ICreditsRepository repository, ICreditsQuery creditsQuery)
 {
     _repository   = repository;
     _creditsQuery = creditsQuery;
 }
Exemplo n.º 15
0
 public SomeCreditsCreditInfo(int quantity, bool verified, bool hasExpired, CreditAllocation creditAllocation, IEmployerAccountsCommand employerAccountsCommand, IOrganisationsCommand organisationsCommand, ICreditsQuery creditsQuery, IAllocationsCommand allocationsCommand)
     : base(verified, hasExpired, creditAllocation, employerAccountsCommand, organisationsCommand, creditsQuery, allocationsCommand)
 {
     _quantity = quantity;
 }
Exemplo n.º 16
0
 public ProductsRepository(IDataContextFactory dataContextFactory, ICreditsQuery creditsQuery)
     : base(dataContextFactory)
 {
     _creditsQuery = creditsQuery;
 }
Exemplo n.º 17
0
 public AdjustmentComparer(ICreditsQuery creditsQuery)
 {
     _contactCreditId   = creditsQuery.GetCredit <ContactCredit>().Id;
     _applicantCreditId = creditsQuery.GetCredit <ApplicantCredit>().Id;
 }
Exemplo n.º 18
0
 public CreditReportsQuery(ICreditReportsRepository repository, ICreditsQuery creditsQuery)
 {
     _repository   = repository;
     _creditsQuery = creditsQuery;
 }
Exemplo n.º 19
0
 public SomeCreditsUsedCreditCreditInfo(bool verified, bool hasExpired, CreditAllocation creditAllocation, IEmployerAccountsCommand employerAccountsCommand, IOrganisationsCommand organisationsCommand, ICreditsQuery creditsQuery, IAllocationsCommand allocationsCommand, IEmployerCreditsCommand employerCreditsCommand, IEmployerMemberViewsQuery employerMemberViewsQuery)
     : base(verified, hasExpired, creditAllocation, employerAccountsCommand, organisationsCommand, creditsQuery, allocationsCommand)
 {
     _employerCreditsCommand   = employerCreditsCommand;
     _employerMemberViewsQuery = employerMemberViewsQuery;
 }
Exemplo n.º 20
0
 public UnlimitedCreditsCreditInfo(bool verified, bool hasExpired, CreditAllocation creditAllocation, IEmployerAccountsCommand employerAccountsCommand, IOrganisationsCommand organisationsCommand, ICreditsQuery creditsQuery, IAllocationsCommand allocationsCommand)
     : base(verified, hasExpired, creditAllocation, employerAccountsCommand, organisationsCommand, creditsQuery, allocationsCommand)
 {
 }
Exemplo n.º 21
0
        public static OrderSummaryModel GetOrderSummary(this IEmployerOrdersQuery employerOrdersQuery, ICreditsQuery creditsQuery, IOrdersQuery ordersQuery, Order order, IEnumerable <Product> products, IRegisteredUser purchaser)
        {
            // Reorder the items by product name just to introduce some certainty.

            SortItems(creditsQuery, order, products);
            var receipt = ordersQuery.GetPurchaseReceipt(order.Id) as CreditCardReceipt;

            return(new OrderSummaryModel {
                OrderDetails = employerOrdersQuery.GetOrderDetails(creditsQuery, order, products), Receipt = receipt, Purchaser = purchaser
            });
        }
Exemplo n.º 22
0
 public ExercisedCreditsQuery(ICreditsRepository repository, ICreditsQuery creditsQuery)
 {
     _repository   = repository;
     _creditsQuery = creditsQuery;
 }
Exemplo n.º 23
0
 protected EmployerCreditsComponent(ICreditsQuery creditsQuery, IAllocationsQuery allocationsQuery)
 {
     _creditsQuery     = creditsQuery;
     _allocationsQuery = allocationsQuery;
 }
Exemplo n.º 24
0
 public EmployerCreditsQuery(ICreditsQuery creditsQuery, IAllocationsQuery allocationsQuery, IRecruitersQuery recruitersQuery)
     : base(creditsQuery, allocationsQuery)
 {
     _recruitersQuery = recruitersQuery;
 }
Exemplo n.º 25
0
 public static OrderDetailsModel GetOrderDetails(this IEmployerOrdersQuery employerOrdersQuery, ICreditsQuery creditsQuery, Order order, IEnumerable <Product> products)
 {
     return(new OrderDetailsModel
     {
         Order = order,
         Products = products.ToList(),
         OrderProducts = GetOrderProducts(order, products),
         Credits = creditsQuery.GetCredits().ToDictionary(c => c.Id, c => c),
     });
 }
Exemplo n.º 26
0
 public EmployerOrdersQuery(IProductsQuery productsQuery, ICreditsQuery creditsQuery)
 {
     _productsQuery = productsQuery;
     _creditsQuery  = creditsQuery;
 }