C# Class SIP_Agent.Model.Person

Inheritance: Crud, ICrud
显示文件 Open project: anroots/SIP-Agent Class Usage Examples

Protected Properties

Property Type Description
Contacts IQueryable

Private Properties

Property Type Description
LoadContacts void

Public Methods

Method Description
FindAll ( int Limit ) : IQueryable

Finds all persons

FullName ( person row ) : string

Take a DB person row and concat first + last names

GetEmail ( ) : string

Get's the person's email

GetPhone ( ) : string

Search for the person's phone

Load ( int PersonId ) : bool

Login ( string Username, string Password ) : bool

Authenticate the user

Logout ( ) : void

Log the user out

New ( ) : int

Creates a new row in the database

Person ( ) : System

Empty constructor

Person ( int PersonId ) : System

Create and load the model

PreviousCalls ( System.DateTime Until ) : call[]

Get previous calls (up to that point) by the caller

Save ( ) : int

Validation checks before saving

Private Methods

Method Description
LoadContacts ( ) : void

Loads the loaded person's contact entries

Method Details

FindAll() public method

Finds all persons
public FindAll ( int Limit ) : IQueryable
Limit int The max number of rows to return
return IQueryable

FullName() public static method

Take a DB person row and concat first + last names
public static FullName ( person row ) : string
row person
return string

GetEmail() public method

Get's the person's email
public GetEmail ( ) : string
return string

GetPhone() public method

Search for the person's phone
public GetPhone ( ) : string
return string

Load() public method

public Load ( int PersonId ) : bool
PersonId int
return bool

Login() public method

Authenticate the user
public Login ( string Username, string Password ) : bool
Username string
Password string
return bool

Logout() public method

Log the user out
public Logout ( ) : void
return void

New() public method

Creates a new row in the database
public New ( ) : int
return int

Person() public method

Empty constructor
public Person ( ) : System
return System

Person() public method

Create and load the model
public Person ( int PersonId ) : System
PersonId int
return System

PreviousCalls() public method

Get previous calls (up to that point) by the caller
public PreviousCalls ( System.DateTime Until ) : call[]
Until System.DateTime Previous calls up to that point
return call[]

Save() public method

Validation checks before saving
public Save ( ) : int
return int

Property Details

Contacts protected_oe property

Holds phonebook entries
protected IQueryable Contacts
return IQueryable