C# Class CardShop.Service.Admin.ManageUserService

Inheritance: IManageUserService
Datei anzeigen Open project: egreene/PracticeGDVP Class Usage Examples

Public Methods

Method Description
ActAsUser ( int id, bool &success ) : void

Allows Admin to act as user

CreateStore ( User owner ) : Store

Create a store, sets store owner as Owner, if person already owns a store, return null

CreateUser ( User user, bool &isSuccess ) : User

Create a User

DeleteUser ( int userId, bool &isSuccess ) : User

Delete User

EditUser ( User user, bool &isSuccess ) : User

Edit a User

FindStore ( User owner ) : List

Returns all stores matching a Owner's UserId (Owner.UserId == Store.UserId)

GetAllUsers ( bool &isSuccess ) : List

Gets all users

GetAllUsersList ( ) : List

Returns a list of users, also brings back the webpages_Roles attached to user

GetRoleView ( bool &isSuccess ) : IEnumerable

Get RoleView, for @HTML select list

GetUser ( int id, bool &isSuccess ) : User

Get a User

ManageUserService ( ) : System

No-Args constructor, set

StopActingAsUser ( bool &success ) : void

Turns off user

Method Details

ActAsUser() public method

Allows Admin to act as user
public ActAsUser ( int id, bool &success ) : void
id int id of user to act as
success bool if succesful
return void

CreateStore() public method

Create a store, sets store owner as Owner, if person already owns a store, return null
public CreateStore ( User owner ) : Store
owner CardShop.Models.User User that is a StoreOwner
return CardShop.Models.Store

CreateUser() public method

Create a User
public CreateUser ( User user, bool &isSuccess ) : User
user CardShop.Models.User User to create
isSuccess bool if success
return CardShop.Models.User

DeleteUser() public method

Delete User
public DeleteUser ( int userId, bool &isSuccess ) : User
userId int id of user to delete
isSuccess bool if Delete is sucessful, returns true
return CardShop.Models.User

EditUser() public method

Edit a User
public EditUser ( User user, bool &isSuccess ) : User
user CardShop.Models.User User user
isSuccess bool if success
return CardShop.Models.User

FindStore() public method

Returns all stores matching a Owner's UserId (Owner.UserId == Store.UserId)
public FindStore ( User owner ) : List
owner CardShop.Models.User User who is storeOwner
return List

GetAllUsers() public method

Gets all users
public GetAllUsers ( bool &isSuccess ) : List
isSuccess bool if success
return List

GetAllUsersList() public method

Returns a list of users, also brings back the webpages_Roles attached to user
public GetAllUsersList ( ) : List
return List

GetRoleView() public method

Get RoleView, for @HTML select list
public GetRoleView ( bool &isSuccess ) : IEnumerable
isSuccess bool
return IEnumerable

GetUser() public method

Get a User
public GetUser ( int id, bool &isSuccess ) : User
id int
isSuccess bool
return CardShop.Models.User

ManageUserService() public method

No-Args constructor, set
public ManageUserService ( ) : System
return System

StopActingAsUser() public method

Turns off user
public StopActingAsUser ( bool &success ) : void
success bool set out parameter if is success
return void