管理員部分用來實現管理員的登錄
AdministratorId
主鍵
Int
IsPreset
預置
Bool
否
False
僅系統預置的那個賬號為True
UserName
用戶名
String(
否
PassWord
密碼
String(
否
Name
姓名
String(
是
電子郵件
String(
否
public bool Add(Administrator admin)
public bool Modify (Administrator admin)
public bool Delete (int adminId)
public bool Delete (Administrator admin)
public int Authentication (string userName
passWord為加密後的密碼
返回值
Public IQueryable<Administrator> Find();
查找所有管理員
Public Administrator Find(int adminId);
根據管理員id查找管理員
[AdminAuthorize]
Public ActionResult Add()
[AdminAuthorize]
[HttpPost]
Public ActionResult Add(Administrator admin)
[AdminAuthorize]
Public ActionResult List()
[AdminAuthorize]
Public ActionResult Modify ()
[AdminAuthorize]
[HttpPost]
Public ActionResult Modify (Administrator admin)
[AdminAuthorize]
[HttpPost]
Public ActionResult Delete(int adminId)
Public ActionResult Login ()
[HttpPost]
Public ActionResult Login (string userName
passWord為加密後的密碼
Public ActionResult LogOut()
與Controller對應
待續…………
From:http://tw.wingwit.com/Article/program/net/201311/12006.html