/
ECommerceModule.cs
82 lines (66 loc) · 3.04 KB
/
ECommerceModule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using System;
using Cuyahoga.Core;
using Cuyahoga.Core.DataAccess;
using Cuyahoga.Modules.ECommerce.Core;
using Cuyahoga.Modules.ECommerce.DataAccess;
using Cuyahoga.Modules.ECommerce.Util.Interfaces;
using Cuyahoga.Modules.ECommerce.Service;
using Cuyahoga.Modules.ECommerce.Service.PaymentProvider;
using Cuyahoga.Modules.ECommerce.Service.OrderProcessor;
using Cuyahoga.Core.Service;
using Cuyahoga.Core.Service.Email;
using Cuyahoga.Core.Service.Membership;
using System.Collections.Generic;
namespace Cuyahoga.Modules.ECommerce {
/// <summary>
/// Summary description for CatalogueViewModule.
/// </summary>
public class ECommerceModule : CatalogueViewModule, INHibernateModule {
private ICommerceDao _dao;
private IExtCommonDao _commonDao;
private List<IPaymentProvider> _paymentProviders;
private IPaymentProvider _paymentProvider;
private IBasketRules _rules;
public ECommerceModule(ICatalogueViewService catatalogueService, ICommerceService commerceService, ICatalogueModificationService editService, IAccountService accountService, IOrderService orderService, IEmailSender emailSender, IDeliveryService deliveryService, ICultureService cultureService, IUserService userService) : base(catatalogueService, commerceService, editService, accountService, orderService, emailSender, deliveryService, cultureService, userService) {
}
public ECommerceModule(ICommerceService commerceService, ICatalogueViewService catatalogueService, ICommerceDao dao, IExtCommonDao commonDao, IBasketRules rules, ICatalogueModificationService editService, IAccountService accountService, IOrderService orderService, IEmailSender emailSender, IDeliveryService deliveryService, ICultureService cultureService, IUserService userService)
: base(catatalogueService, commerceService, editService, accountService, orderService, emailSender, deliveryService, cultureService, userService) {
_dao = dao;
_commonDao = commonDao;
_rules = rules;
//we now get payment providers from the DB to make it more user friendly
//PaymentProviders = CommerceService.GetEnabledPaymentProviders();
}
public ICommerceDao CommerceDao {
get {
return _dao;
}
}
public IExtCommonDao CommonDao {
get {
return _commonDao;
}
}
public IPaymentProvider PaymentProvider {
get {
return _paymentProvider;
}
set {
_paymentProvider = value;
}
}
public List<IPaymentProvider> PaymentProviders {
get {
return _paymentProviders;
}
set {
_paymentProviders = value;
}
}
public IBasketRules Rules {
get {
return _rules;
}
}
}
}