C# Class Nop.Core.Domain.Customers.CustomerExtentions

Mostrar archivo Open project: emilianionascu/NopCommerce

Public Methods

Method Description
AddRewardPointsHistoryEntry ( this customer, int points, string message = "", Nop.Core.Domain.Orders.Order usedWithOrder = null, decimal usedAmount = 0M ) : void
ApplyGiftCardCouponCode ( this customer, string couponCode ) : void

Adds a coupon code

GetRewardPointsBalance ( this customer ) : int

Gets reward points balance

IsAdmin ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is administrator

IsForumModerator ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is a forum moderator

IsGuest ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is guest

IsInCustomerRole ( this customer, string customerRoleSystemName, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is in a certain customer role

IsRegistered ( this customer, bool onlyActiveCustomerRoles = true ) : bool

Gets a value indicating whether customer is registered

IsSearchEngineAccount ( this customer ) : bool

Gets a value indicating whether customer a search engine

ParseAppliedGiftCardCouponCodes ( this customer ) : string[]

Gets coupon codes

RemoveAddress ( this customer, Nop.Core.Domain.Common.Address address ) : void
RemoveGiftCardCouponCode ( this customer, string couponCode ) : void

Removes a coupon code

Method Details

AddRewardPointsHistoryEntry() public static method

public static AddRewardPointsHistoryEntry ( this customer, int points, string message = "", Nop.Core.Domain.Orders.Order usedWithOrder = null, decimal usedAmount = 0M ) : void
customer this
points int
message string
usedWithOrder Nop.Core.Domain.Orders.Order
usedAmount decimal
return void

ApplyGiftCardCouponCode() public static method

Adds a coupon code
public static ApplyGiftCardCouponCode ( this customer, string couponCode ) : void
customer this Customer
couponCode string Coupon code
return void

GetRewardPointsBalance() public static method

Gets reward points balance
public static GetRewardPointsBalance ( this customer ) : int
customer this
return int

IsAdmin() public static method

Gets a value indicating whether customer is administrator
public static IsAdmin ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsForumModerator() public static method

Gets a value indicating whether customer is a forum moderator
public static IsForumModerator ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsGuest() public static method

Gets a value indicating whether customer is guest
public static IsGuest ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsInCustomerRole() public static method

Gets a value indicating whether customer is in a certain customer role
public static IsInCustomerRole ( this customer, string customerRoleSystemName, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
customerRoleSystemName string Customer role system name
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsRegistered() public static method

Gets a value indicating whether customer is registered
public static IsRegistered ( this customer, bool onlyActiveCustomerRoles = true ) : bool
customer this Customer
onlyActiveCustomerRoles bool A value indicating whether we should look only in active customer roles
return bool

IsSearchEngineAccount() public static method

Gets a value indicating whether customer a search engine
public static IsSearchEngineAccount ( this customer ) : bool
customer this Customer
return bool

ParseAppliedGiftCardCouponCodes() public static method

Gets coupon codes
public static ParseAppliedGiftCardCouponCodes ( this customer ) : string[]
customer this Customer
return string[]

RemoveAddress() public static method

public static RemoveAddress ( this customer, Nop.Core.Domain.Common.Address address ) : void
customer this
address Nop.Core.Domain.Common.Address
return void

RemoveGiftCardCouponCode() public static method

Removes a coupon code
public static RemoveGiftCardCouponCode ( this customer, string couponCode ) : void
customer this Customer
couponCode string Coupon code to remove
return void