C# Class Nop.Services.Customers.CustomerService

Customer service
Inheritance: ICustomerService
Mostrar archivo Open project: grandnode/grandnode

Public Methods

Method 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 method

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
return System

DeleteAddress() public method

public DeleteAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
return void

DeleteCustomer() public method

Delete a customer
public DeleteCustomer ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
return void

DeleteCustomerRole() public method

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

DeleteCustomerRoleInCustomer() public method

public DeleteCustomerRoleInCustomer ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
customerRole Nop.Core.Domain.Customers.CustomerRole
return void

DeleteCustomerRoleProduct() public method

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

DeleteGuestCustomers() public method

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
return int

DeleteShoppingCartItem() public method

public DeleteShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
shoppingCartItem Nop.Core.Domain.Orders.ShoppingCartItem
return void

GetAllCustomerRoles() public method

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

GetAllCustomers() public method

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
return IPagedList

GetAllCustomersByPasswordFormat() public method

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

GetCustomerByEmail() public method

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

GetCustomerByGuid() public method

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

GetCustomerById() public method

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

GetCustomerBySystemName() public method

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

GetCustomerByUsername() public method

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

GetCustomerRoleById() public method

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

GetCustomerRoleBySystemName() public method

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

GetCustomerRoleProduct() public method

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
return Nop.Core.Domain.Customers.CustomerRoleProduct

GetCustomerRoleProductById() public method

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

GetCustomerRoleProducts() public method

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

GetCustomersByIds() public method

Get customers by identifiers
public GetCustomersByIds ( int customerIds ) : IList
customerIds int Customer identifiers
return IList

GetOnlineCustomers() public method

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
return IPagedList

InsertAddress() public method

public InsertAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
return void

InsertCustomer() public method

Insert a customer
public InsertCustomer ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
return void

InsertCustomerRole() public method

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

InsertCustomerRoleInCustomer() public method

public InsertCustomerRoleInCustomer ( Nop.Core.Domain.Customers.CustomerRole customerRole ) : void
customerRole Nop.Core.Domain.Customers.CustomerRole
return void

InsertCustomerRoleProduct() public method

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

InsertGuestCustomer() public method

Insert a guest customer
public InsertGuestCustomer ( ) : Customer
return Nop.Core.Domain.Customers.Customer

InsertShoppingCartItem() public method

public InsertShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
shoppingCartItem Nop.Core.Domain.Orders.ShoppingCartItem
return void

RemoveShippingAddress() public method

public RemoveShippingAddress ( int customerId ) : void
customerId int
return void

ResetCheckoutData() public method

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
return void

UpdateActive() public method

public UpdateActive ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
return void

UpdateAddress() public method

public UpdateAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
return void

UpdateAffiliate() public method

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

UpdateBillingAddress() public method

public UpdateBillingAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
return void

UpdateCustomer() public method

Updates the customer
public UpdateCustomer ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
return void

UpdateCustomerLastActivityDate() public method

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

UpdateCustomerLastIpAddress() public method

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

UpdateCustomerLastLoginDate() public method

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

UpdateCustomerPassword() public method

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

UpdateCustomerRole() public method

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

UpdateCustomerRoleProduct() public method

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

UpdateCustomerVendor() public method

public UpdateCustomerVendor ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer Customer
return void

UpdateCustomerinAdminPanel() public method

public UpdateCustomerinAdminPanel ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
return void

UpdateHasBlogComments() public method

public UpdateHasBlogComments ( int customerId ) : void
customerId int
return void

UpdateHasForumPost() public method

public UpdateHasForumPost ( int customerId ) : void
customerId int
return void

UpdateHasForumTopic() public method

public UpdateHasForumTopic ( int customerId ) : void
customerId int
return void

UpdateHasOrders() public method

public UpdateHasOrders ( int customerId ) : void
customerId int
return void

UpdateHasPoolVoting() public method

public UpdateHasPoolVoting ( int customerId ) : void
customerId int
return void

UpdateHasProductReview() public method

public UpdateHasProductReview ( int customerId ) : void
customerId int
return void

UpdateHasProductReviewH() public method

public UpdateHasProductReviewH ( int customerId ) : void
customerId int
return void

UpdateHasShoppingCartItems() public method

public UpdateHasShoppingCartItems ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
return void

UpdateNewsItem() public method

public UpdateNewsItem ( Customer customer ) : void
customer Nop.Core.Domain.Customers.Customer
return void

UpdateShippingAddress() public method

public UpdateShippingAddress ( Nop.Core.Domain.Common.Address address ) : void
address Nop.Core.Domain.Common.Address
return void

UpdateShoppingCartItem() public method

public UpdateShoppingCartItem ( Nop.Core.Domain.Orders.ShoppingCartItem shoppingCartItem ) : void
shoppingCartItem Nop.Core.Domain.Orders.ShoppingCartItem
return void