C# Class EGSW.Services.CustomerService

Inheritance: ICustomerService
Datei anzeigen Open project: careerengine/EGSW-Project

Public Methods

Method Description
CustomerService ( IDbContext context, IRepository customerRepository, IRepository customerRoleRepository, IRepository contactUsRepository ) : System
GetAllCustomerRoles ( bool showHidden = false ) : IList
GetAllCustomers ( int customerRoleIds = null ) : IList
GetAllCustomers ( int customerId = null, string firstName = null, string lastName = null, string customerEmail = null, string zipCode = null, int pageIndex, int pageSize = int.MaxValue, int customerRoleIds = null ) : PagedList.IPagedList
GetCustomerByEmail ( string email ) : Customer

Get customer by email

GetCustomerByGuid ( System.Guid customerGuid ) : Customer

Gets a customer by GUID

GetCustomerById ( int customerId ) : Customer
GetCustomerBySystemName ( string systemName ) : Customer

Get customer by system name

GetCustomerRoleBySystemName ( string systemName ) : CustomerRole

Gets a customer role

InsertContactUs ( ContactU contactUs ) : void
InsertCustomer ( Customer customer ) : void

Insert a customer

InsertGuestCustomer ( ) : Customer

Insert a guest customer

RegisterCustomer ( CustomerRegistrationRequest request ) : CustomerRegistrationResult

Register customer

UpdateCustomer ( Customer customer ) : void

Updates the customer

ValidateCustomer ( string usernameOrEmail, string password ) : CustomerLoginResults

Method Details

CustomerService() public method

public CustomerService ( IDbContext context, IRepository customerRepository, IRepository customerRoleRepository, IRepository contactUsRepository ) : System
context IDbContext
customerRepository IRepository
customerRoleRepository IRepository
contactUsRepository IRepository
return System

GetAllCustomerRoles() public method

public GetAllCustomerRoles ( bool showHidden = false ) : IList
showHidden bool
return IList

GetAllCustomers() public method

public GetAllCustomers ( int customerRoleIds = null ) : IList
customerRoleIds int
return IList

GetAllCustomers() public method

public GetAllCustomers ( int customerId = null, string firstName = null, string lastName = null, string customerEmail = null, string zipCode = null, int pageIndex, int pageSize = int.MaxValue, int customerRoleIds = null ) : PagedList.IPagedList
customerId int
firstName string
lastName string
customerEmail string
zipCode string
pageIndex int
pageSize int
customerRoleIds int
return PagedList.IPagedList

GetCustomerByEmail() public method

Get customer by email
public GetCustomerByEmail ( string email ) : Customer
email string Email
return EGSW.Data.Customer

GetCustomerByGuid() public method

Gets a customer by GUID
public GetCustomerByGuid ( System.Guid customerGuid ) : Customer
customerGuid System.Guid Customer GUID
return EGSW.Data.Customer

GetCustomerById() public method

public GetCustomerById ( int customerId ) : Customer
customerId int
return EGSW.Data.Customer

GetCustomerBySystemName() public method

Get customer by system name
public GetCustomerBySystemName ( string systemName ) : Customer
systemName string System name
return EGSW.Data.Customer

GetCustomerRoleBySystemName() public method

Gets a customer role
public GetCustomerRoleBySystemName ( string systemName ) : CustomerRole
systemName string Customer role system name
return EGSW.Data.CustomerRole

InsertContactUs() public method

public InsertContactUs ( ContactU contactUs ) : void
contactUs EGSW.Data.ContactU
return void

InsertCustomer() public method

Insert a customer
public InsertCustomer ( Customer customer ) : void
customer EGSW.Data.Customer Customer
return void

InsertGuestCustomer() public method

Insert a guest customer
public InsertGuestCustomer ( ) : Customer
return EGSW.Data.Customer

RegisterCustomer() public method

Register customer
public RegisterCustomer ( CustomerRegistrationRequest request ) : CustomerRegistrationResult
request CustomerRegistrationRequest Request
return CustomerRegistrationResult

UpdateCustomer() public method

Updates the customer
public UpdateCustomer ( Customer customer ) : void
customer EGSW.Data.Customer Customer
return void

ValidateCustomer() public method

public ValidateCustomer ( string usernameOrEmail, string password ) : CustomerLoginResults
usernameOrEmail string
password string
return CustomerLoginResults