C# Class DBPOLLDemo.Models.userModel

Inheritance: System.Web.UI.Page
Mostra file Open project: Marknel/dbPOLL Class Usage Examples

Public Properties

Property Type Description
Created_At System.DateTime
Created_By int
Expires_At System.DateTime
Modified_At System.DateTime
Name string
Reset_Password_Key string
SysAdmin_ID int
UserID int
UserType int
createdat System.DateTime
createdby String
modifiedat System.DateTime
monthsLeft int
name String
sysAdmin string
username string
usertype int

Public Methods

Method Description
CreatePasswordHash ( string pwd, string salt ) : string
CreateSalt ( int size ) : string
Password_Generator ( ) : string
changePassword ( int UserID, string newPass ) : void
createUser ( int UserID, int UserType, string password, string name, string email, System.DateTime Expires_At, int SysAdmin_ID ) : bool
createUser ( int UserID, int UserType, string password, string name, string email, int created_by ) : bool
deleteUser ( ) : void
displayAllUsers ( ) : List
displayAssignedUsers ( int pollid, int usertype ) : List

Returns a list of poll masters who have been assigned to a given poll. List generic is userModel

displayPollAdminUsers ( ) : List

Returns a set of all poll admin users in the database

displayPollMasterUsers ( ) : List

Returns a set of all poll masters in database.

displayUnassignedUsers ( int pollid, int usertype ) : List

Returns a list of poll masters who have not been assigned to a given poll. List generic is userModel

getNewID ( ) : int
getUser ( int UserID ) : userModel
getUserList ( ) : List
getUserType ( int uid ) : int

Returns the user type code for a specified userid. (i.e 1 for poll user)

get_details ( int uid ) : USER
get_sys_admin_details ( int uid ) : SYSADMIN
updateUser ( int UserID, System.DateTime Expires_At, string Name, string username ) : void
updateUser ( int UserID, string Name, string username ) : void
userModel ( ) : System
userModel ( int UserID ) : System
verify ( string username ) : int

Takes a username and checks the user exists in the system and returns the user's userid code.

verify ( string username, string password ) : int

Takes a username and password, checks the user exists in the system and returns the user's userid code.

verify_as_sys_admin ( string username, string password ) : int

Private Methods

Method Description
sysAdminExist ( string email ) : bool
userExist ( string email ) : bool

Method Details

CreatePasswordHash() public method

public CreatePasswordHash ( string pwd, string salt ) : string
pwd string
salt string
return string

CreateSalt() public method

public CreateSalt ( int size ) : string
size int
return string

Password_Generator() public method

public Password_Generator ( ) : string
return string

changePassword() public method

public changePassword ( int UserID, string newPass ) : void
UserID int
newPass string
return void

createUser() public method

public createUser ( int UserID, int UserType, string password, string name, string email, System.DateTime Expires_At, int SysAdmin_ID ) : bool
UserID int
UserType int
password string
name string
email string
Expires_At System.DateTime
SysAdmin_ID int
return bool

createUser() public method

public createUser ( int UserID, int UserType, string password, string name, string email, int created_by ) : bool
UserID int
UserType int
password string
name string
email string
created_by int
return bool

deleteUser() public method

public deleteUser ( ) : void
return void

displayAllUsers() public method

public displayAllUsers ( ) : List
return List

displayAssignedUsers() public method

Returns a list of poll masters who have been assigned to a given poll. List generic is userModel
public displayAssignedUsers ( int pollid, int usertype ) : List
pollid int
usertype int
return List

displayPollAdminUsers() public method

Returns a set of all poll admin users in the database
public displayPollAdminUsers ( ) : List
return List

displayPollMasterUsers() public method

Returns a set of all poll masters in database.
public displayPollMasterUsers ( ) : List
return List

displayUnassignedUsers() public method

Returns a list of poll masters who have not been assigned to a given poll. List generic is userModel
public displayUnassignedUsers ( int pollid, int usertype ) : List
pollid int
usertype int
return List

getNewID() public method

public getNewID ( ) : int
return int

getUser() public method

public getUser ( int UserID ) : userModel
UserID int
return userModel

getUserList() public method

public getUserList ( ) : List
return List

getUserType() public method

Returns the user type code for a specified userid. (i.e 1 for poll user)
public getUserType ( int uid ) : int
uid int
return int

get_details() public method

public get_details ( int uid ) : USER
uid int
return USER

get_sys_admin_details() public method

public get_sys_admin_details ( int uid ) : SYSADMIN
uid int
return SYSADMIN

updateUser() public method

public updateUser ( int UserID, System.DateTime Expires_At, string Name, string username ) : void
UserID int
Expires_At System.DateTime
Name string
username string
return void

updateUser() public method

public updateUser ( int UserID, string Name, string username ) : void
UserID int
Name string
username string
return void

userModel() public method

public userModel ( ) : System
return System

userModel() public method

public userModel ( int UserID ) : System
UserID int
return System

verify() public method

Takes a username and checks the user exists in the system and returns the user's userid code.
public verify ( string username ) : int
username string username of user to verify
return int

verify() public method

Takes a username and password, checks the user exists in the system and returns the user's userid code.
public verify ( string username, string password ) : int
username string username of user to verify
password string password of user to verify
return int

verify_as_sys_admin() public method

public verify_as_sys_admin ( string username, string password ) : int
username string
password string
return int

Property Details

Created_At public_oe property

public DateTime,System Created_At
return System.DateTime

Created_By public_oe property

public int Created_By
return int

Expires_At public_oe property

public DateTime,System Expires_At
return System.DateTime

Modified_At public_oe property

public DateTime,System Modified_At
return System.DateTime

Name public_oe property

public string Name
return string

Reset_Password_Key public_oe property

public string Reset_Password_Key
return string

SysAdmin_ID public_oe property

public int SysAdmin_ID
return int

UserID public_oe property

public int UserID
return int

UserType public_oe property

public int UserType
return int

createdat public_oe property

public DateTime,System createdat
return System.DateTime

createdby public_oe property

public String createdby
return String

modifiedat public_oe property

public DateTime,System modifiedat
return System.DateTime

monthsLeft public_oe property

public int monthsLeft
return int

name public_oe property

public String name
return String

sysAdmin public_oe property

public string sysAdmin
return string

username public_oe property

public string username
return string

usertype public_oe property

public int usertype
return int