C# Class Nop.Services.Customers.CustomerService

Customer service
Inheritance: ICustomerService
Afficher le fichier Open project: grandnode/grandnode

Méthodes publiques

Méthode Description
CustomerService ( ICacheManager cacheManager, IRepository customerRepository, IRepository customerRoleRepository, IRepository customerRoleProductRepository, IRepository orderRepository, IRepository forumPostRepository, IRepository forumTopicRepository, IRepository blogCommentRepository, IRepository newsCommentRepository, IRepository pollVotingRecordRepository, IRepository productReviewRepository, IRepository productReviewHelpfulnessRepository, IGenericAttributeService genericAttributeService, IDataProvider dataProvider, IEventPublisher eventPublisher, CustomerSettings customerSettings, CommonSettings commonSettings ) : System
DeleteAddress ( Nop.Core.Domain.Common.Address address ) : void
DeleteCustomer ( Customer customer ) : void

Delete a customer

DeleteCustomerRole ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void

Delete a customer role

DeleteCustomerRoleInCustomer ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
DeleteCustomerRoleProduct ( Nop.Core.Domain.Customers.CustomerRoleProduct customerRoleProduct ) : void

Delete a customer role product

DeleteGuestCustomers ( System.DateTime createdFromUtc, System.DateTime createdToUtc, bool onlyWithoutShoppingCart ) : int

Delete guest customer records

DeleteShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
GetAllCustomerRoles ( bool showHidden = false ) : IList

Gets all customer roles

GetAllCustomers ( System.DateTime createdFromUtc = null, System.DateTime createdToUtc = null, int affiliateId, int vendorId, int customerRoleIds = null, string email = null, string username = null, string firstName = null, string lastName = null, int dayOfBirth, int monthOfBirth, string company = null, string phone = null, string zipPostalCode = null, bool loadOnlyWithShoppingCart = false, ShoppingCartType sct = null, int pageIndex, int pageSize = 2147483647 ) : IPagedList

Gets all customers

GetAllCustomersByPasswordFormat ( PasswordFormat passwordFormat ) : IList

Gets all customers by customer format (including deleted ones)

GetCustomerByEmail ( string email ) : Customer

Get customer by email

GetCustomerByGuid ( System.Guid customerGuid ) : Customer

Gets a customer by GUID

GetCustomerById ( int customerId ) : Customer

Gets a customer

GetCustomerBySystemName ( string systemName ) : Customer

Get customer by system name

GetCustomerByUsername ( string username ) : Customer

Get customer by username

GetCustomerRoleById ( int customerRoleId ) : Nop.Core.Domain.Customers.CustomerRole

Gets a customer role

GetCustomerRoleBySystemName ( string systemName ) : Nop.Core.Domain.Customers.CustomerRole

Gets a customer role

GetCustomerRoleProduct ( int customerRoleId, int productId ) : Nop.Core.Domain.Customers.CustomerRoleProduct

Gets customer roles products for customer role

GetCustomerRoleProductById ( int id ) : Nop.Core.Domain.Customers.CustomerRoleProduct

Gets customer roles product

GetCustomerRoleProducts ( int customerRoleId ) : IList

Gets customer roles products for customer role

GetCustomersByIds ( int customerIds ) : IList

Get customers by identifiers

GetOnlineCustomers ( System.DateTime lastActivityFromUtc, int customerRoleIds, int pageIndex, int pageSize = int.MaxValue ) : IPagedList

Gets online customers

InsertAddress ( Nop.Core.Domain.Common.Address address ) : void
InsertCustomer ( Customer customer ) : void

Insert a customer

InsertCustomerRole ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void

Inserts a customer role

InsertCustomerRoleInCustomer ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
InsertCustomerRoleProduct ( Nop.Core.Domain.Customers.CustomerRoleProduct customerRoleProduct ) : void

Inserts a customer role product

InsertGuestCustomer ( ) : Customer

Insert a guest customer

InsertShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
RemoveShippingAddress ( int customerId ) : void
ResetCheckoutData ( Customer customer, int storeId, bool clearCouponCodes = false, bool clearCheckoutAttributes = false, bool clearRewardPoints = true, bool clearShippingMethod = true, bool clearPaymentMethod = true ) : void

Reset data required for checkout

UpdateActive ( Customer customer ) : void
UpdateAddress ( Nop.Core.Domain.Common.Address address ) : void
UpdateAffiliate ( Customer customer ) : void

Updates the customer - last activity date

UpdateBillingAddress ( Nop.Core.Domain.Common.Address address ) : void
UpdateCustomer ( Customer customer ) : void

Updates the customer

UpdateCustomerLastActivityDate ( Customer customer ) : void

Updates the customer - last activity date

UpdateCustomerLastIpAddress ( Customer customer ) : void

Updates the customer - last activity date

UpdateCustomerLastLoginDate ( Customer customer ) : void

Updates the customer - last activity date

UpdateCustomerPassword ( Customer customer ) : void

Updates the customer - password

UpdateCustomerRole ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void

Updates the customer role

UpdateCustomerRoleProduct ( Nop.Core.Domain.Customers.CustomerRoleProduct customerRoleProduct ) : void

Updates the customer role product

UpdateCustomerVendor ( Customer customer ) : void
UpdateCustomerinAdminPanel ( Customer customer ) : void
UpdateHasBlogComments ( int customerId ) : void
UpdateHasForumPost ( int customerId ) : void
UpdateHasForumTopic ( int customerId ) : void
UpdateHasOrders ( int customerId ) : void
UpdateHasPoolVoting ( int customerId ) : void
UpdateHasProductReview ( int customerId ) : void
UpdateHasProductReviewH ( int customerId ) : void
UpdateHasShoppingCartItems ( Customer customer ) : void
UpdateNewsItem ( Customer customer ) : void
UpdateShippingAddress ( Nop.Core.Domain.Common.Address address ) : void
UpdateShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void

Method Details

CustomerService() public méthode

public CustomerService ( ICacheManager cacheManager, IRepository customerRepository, IRepository customerRoleRepository, IRepository customerRoleProductRepository, IRepository orderRepository, IRepository forumPostRepository, IRepository forumTopicRepository, IRepository blogCommentRepository, IRepository newsCommentRepository, IRepository pollVotingRecordRepository, IRepository productReviewRepository, IRepository productReviewHelpfulnessRepository, IGenericAttributeService genericAttributeService, IDataProvider dataProvider, IEventPublisher eventPublisher, CustomerSettings customerSettings, CommonSettings commonSettings ) : System
cacheManager ICacheManager
customerRepository IRepository
customerRoleRepository IRepository
customerRoleProductRepository IRepository
orderRepository IRepository
forumPostRepository IRepository
forumTopicRepository IRepository
blogCommentRepository IRepository
newsCommentRepository IRepository
pollVotingRecordRepository IRepository
productReviewRepository IRepository
productReviewHelpfulnessRepository IRepository
genericAttributeService IGenericAttributeService
dataProvider IDataProvider
eventPublisher IEventPublisher
customerSettings Nop.Core.Domain.Customers.CustomerSettings
commonSettings Nop.Core.Domain.Common.CommonSettings
Résultat System

DeleteAddress() public méthode

public DeleteAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
Résultat void

DeleteCustomer() public méthode

Delete a customer
public DeleteCustomer ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

DeleteCustomerRole() public méthode

Delete a customer role
public DeleteCustomerRole ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
customerRole Nop.Core.Domain.Customers.CustomerRole Customer role
Résultat void

DeleteCustomerRoleInCustomer() public méthode

public DeleteCustomerRoleInCustomer ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
customerRole Nop.Core.Domain.Customers.CustomerRole
Résultat void

DeleteCustomerRoleProduct() public méthode

Delete a customer role product
public DeleteCustomerRoleProduct ( Nop.Core.Domain.Customers.CustomerRoleProduct customerRoleProduct ) : void
customerRoleProduct Nop.Core.Domain.Customers.CustomerRoleProduct Customer role product
Résultat void

DeleteGuestCustomers() public méthode

Delete guest customer records
public DeleteGuestCustomers ( System.DateTime createdFromUtc, System.DateTime createdToUtc, bool onlyWithoutShoppingCart ) : int
createdFromUtc System.DateTime Created date from (UTC); null to load all records
createdToUtc System.DateTime Created date to (UTC); null to load all records
onlyWithoutShoppingCart bool A value indicating whether to delete customers only without shopping cart
Résultat int

DeleteShoppingCartItem() public méthode

public DeleteShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
shoppingCartItem Nop.Core.Domain.Orders.ShoppingCartItem
Résultat void

GetAllCustomerRoles() public méthode

Gets all customer roles
public GetAllCustomerRoles ( bool showHidden = false ) : IList
showHidden bool A value indicating whether to show hidden records
Résultat IList

GetAllCustomers() public méthode

Gets all customers
public GetAllCustomers ( System.DateTime createdFromUtc = null, System.DateTime createdToUtc = null, int affiliateId, int vendorId, int customerRoleIds = null, string email = null, string username = null, string firstName = null, string lastName = null, int dayOfBirth, int monthOfBirth, string company = null, string phone = null, string zipPostalCode = null, bool loadOnlyWithShoppingCart = false, ShoppingCartType sct = null, int pageIndex, int pageSize = 2147483647 ) : IPagedList
createdFromUtc System.DateTime Created date from (UTC); null to load all records
createdToUtc System.DateTime Created date to (UTC); null to load all records
affiliateId int Affiliate identifier
vendorId int Vendor identifier
customerRoleIds int A list of customer role identifiers to filter by (at least one match); pass null or empty list in order to load all customers;
email string Email; null to load all customers
username string Username; null to load all customers
firstName string First name; null to load all customers
lastName string Last name; null to load all customers
dayOfBirth int Day of birth; 0 to load all customers
monthOfBirth int Month of birth; 0 to load all customers
company string Company; null to load all customers
phone string Phone; null to load all customers
zipPostalCode string Phone; null to load all customers
loadOnlyWithShoppingCart bool Value indicating whether to load customers only with shopping cart
sct ShoppingCartType Value indicating what shopping cart type to filter; userd when 'loadOnlyWithShoppingCart' param is 'true'
pageIndex int Page index
pageSize int Page size
Résultat IPagedList

GetAllCustomersByPasswordFormat() public méthode

Gets all customers by customer format (including deleted ones)
public GetAllCustomersByPasswordFormat ( PasswordFormat passwordFormat ) : IList
passwordFormat PasswordFormat Password format
Résultat IList

GetCustomerByEmail() public méthode

Get customer by email
public GetCustomerByEmail ( string email ) : Customer
email string Email
Résultat Nop.Core.Domain.Customers.Customer

GetCustomerByGuid() public méthode

Gets a customer by GUID
public GetCustomerByGuid ( System.Guid customerGuid ) : Customer
customerGuid System.Guid Customer GUID
Résultat Nop.Core.Domain.Customers.Customer

GetCustomerById() public méthode

Gets a customer
public GetCustomerById ( int customerId ) : Customer
customerId int Customer identifier
Résultat Nop.Core.Domain.Customers.Customer

GetCustomerBySystemName() public méthode

Get customer by system name
public GetCustomerBySystemName ( string systemName ) : Customer
systemName string System name
Résultat Nop.Core.Domain.Customers.Customer

GetCustomerByUsername() public méthode

Get customer by username
public GetCustomerByUsername ( string username ) : Customer
username string Username
Résultat Nop.Core.Domain.Customers.Customer

GetCustomerRoleById() public méthode

Gets a customer role
public GetCustomerRoleById ( int customerRoleId ) : Nop.Core.Domain.Customers.CustomerRole
customerRoleId int Customer role identifier
Résultat Nop.Core.Domain.Customers.CustomerRole

GetCustomerRoleBySystemName() public méthode

Gets a customer role
public GetCustomerRoleBySystemName ( string systemName ) : Nop.Core.Domain.Customers.CustomerRole
systemName string Customer role system name
Résultat Nop.Core.Domain.Customers.CustomerRole

GetCustomerRoleProduct() public méthode

Gets customer roles products for customer role
public GetCustomerRoleProduct ( int customerRoleId, int productId ) : Nop.Core.Domain.Customers.CustomerRoleProduct
customerRoleId int Customer role id
productId int Product id
Résultat Nop.Core.Domain.Customers.CustomerRoleProduct

GetCustomerRoleProductById() public méthode

Gets customer roles product
public GetCustomerRoleProductById ( int id ) : Nop.Core.Domain.Customers.CustomerRoleProduct
id int
Résultat Nop.Core.Domain.Customers.CustomerRoleProduct

GetCustomerRoleProducts() public méthode

Gets customer roles products for customer role
public GetCustomerRoleProducts ( int customerRoleId ) : IList
customerRoleId int Customer role id
Résultat IList

GetCustomersByIds() public méthode

Get customers by identifiers
public GetCustomersByIds ( int customerIds ) : IList
customerIds int Customer identifiers
Résultat IList

GetOnlineCustomers() public méthode

Gets online customers
public GetOnlineCustomers ( System.DateTime lastActivityFromUtc, int customerRoleIds, int pageIndex, int pageSize = int.MaxValue ) : IPagedList
lastActivityFromUtc System.DateTime Customer last activity date (from)
customerRoleIds int A list of customer role identifiers to filter by (at least one match); pass null or empty list in order to load all customers;
pageIndex int Page index
pageSize int Page size
Résultat IPagedList

InsertAddress() public méthode

public InsertAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
Résultat void

InsertCustomer() public méthode

Insert a customer
public InsertCustomer ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

InsertCustomerRole() public méthode

Inserts a customer role
public InsertCustomerRole ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
customerRole Nop.Core.Domain.Customers.CustomerRole Customer role
Résultat void

InsertCustomerRoleInCustomer() public méthode

public InsertCustomerRoleInCustomer ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
customerRole Nop.Core.Domain.Customers.CustomerRole
Résultat void

InsertCustomerRoleProduct() public méthode

Inserts a customer role product
public InsertCustomerRoleProduct ( Nop.Core.Domain.Customers.CustomerRoleProduct customerRoleProduct ) : void
customerRoleProduct Nop.Core.Domain.Customers.CustomerRoleProduct Customer role product
Résultat void

InsertGuestCustomer() public méthode

Insert a guest customer
public InsertGuestCustomer ( ) : Customer
Résultat Nop.Core.Domain.Customers.Customer

InsertShoppingCartItem() public méthode

public InsertShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
shoppingCartItem Nop.Core.Domain.Orders.ShoppingCartItem
Résultat void

RemoveShippingAddress() public méthode

public RemoveShippingAddress ( int customerId ) : void
customerId int
Résultat void

ResetCheckoutData() public méthode

Reset data required for checkout
public ResetCheckoutData ( Customer customer, int storeId, bool clearCouponCodes = false, bool clearCheckoutAttributes = false, bool clearRewardPoints = true, bool clearShippingMethod = true, bool clearPaymentMethod = true ) : void
customer Nop.Core.Domain.Customers.Customer Customer
storeId int Store identifier
clearCouponCodes bool A value indicating whether to clear coupon code
clearCheckoutAttributes bool A value indicating whether to clear selected checkout attributes
clearRewardPoints bool A value indicating whether to clear "Use reward points" flag
clearShippingMethod bool A value indicating whether to clear selected shipping method
clearPaymentMethod bool A value indicating whether to clear selected payment method
Résultat void

UpdateActive() public méthode

public UpdateActive ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
Résultat void

UpdateAddress() public méthode

public UpdateAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
Résultat void

UpdateAffiliate() public méthode

Updates the customer - last activity date
public UpdateAffiliate ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

UpdateBillingAddress() public méthode

public UpdateBillingAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
Résultat void

UpdateCustomer() public méthode

Updates the customer
public UpdateCustomer ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

UpdateCustomerLastActivityDate() public méthode

Updates the customer - last activity date
public UpdateCustomerLastActivityDate ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

UpdateCustomerLastIpAddress() public méthode

Updates the customer - last activity date
public UpdateCustomerLastIpAddress ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

UpdateCustomerLastLoginDate() public méthode

Updates the customer - last activity date
public UpdateCustomerLastLoginDate ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

UpdateCustomerPassword() public méthode

Updates the customer - password
public UpdateCustomerPassword ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

UpdateCustomerRole() public méthode

Updates the customer role
public UpdateCustomerRole ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
customerRole Nop.Core.Domain.Customers.CustomerRole Customer role
Résultat void

UpdateCustomerRoleProduct() public méthode

Updates the customer role product
public UpdateCustomerRoleProduct ( Nop.Core.Domain.Customers.CustomerRoleProduct customerRoleProduct ) : void
customerRoleProduct Nop.Core.Domain.Customers.CustomerRoleProduct Customer role product
Résultat void

UpdateCustomerVendor() public méthode

public UpdateCustomerVendor ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
Résultat void

UpdateCustomerinAdminPanel() public méthode

public UpdateCustomerinAdminPanel ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
Résultat void

UpdateHasBlogComments() public méthode

public UpdateHasBlogComments ( int customerId ) : void
customerId int
Résultat void

UpdateHasForumPost() public méthode

public UpdateHasForumPost ( int customerId ) : void
customerId int
Résultat void

UpdateHasForumTopic() public méthode

public UpdateHasForumTopic ( int customerId ) : void
customerId int
Résultat void

UpdateHasOrders() public méthode

public UpdateHasOrders ( int customerId ) : void
customerId int
Résultat void

UpdateHasPoolVoting() public méthode

public UpdateHasPoolVoting ( int customerId ) : void
customerId int
Résultat void

UpdateHasProductReview() public méthode

public UpdateHasProductReview ( int customerId ) : void
customerId int
Résultat void

UpdateHasProductReviewH() public méthode

public UpdateHasProductReviewH ( int customerId ) : void
customerId int
Résultat void

UpdateHasShoppingCartItems() public méthode

public UpdateHasShoppingCartItems ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
Résultat void

UpdateNewsItem() public méthode

public UpdateNewsItem ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
Résultat void

UpdateShippingAddress() public méthode

public UpdateShippingAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
Résultat void

UpdateShoppingCartItem() public méthode

public UpdateShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
shoppingCartItem Nop.Core.Domain.Orders.ShoppingCartItem
Résultat void