public Account ReadAccount(int id) { if ((int)account.AccountLevel <= 1 && id <= 0) { throw new NotImplementedException(); } return(AccountMehod.Read(id)); }
public List <Account> ReadAccount() { if ((int)account.AccountLevel <= 1) { throw new NotImplementedException(); } return(AccountMehod.Read()); }
public bool Login(string username, string password) { bool isValid = !IsStringEmpty(username, password); if (!isValid) { return(false); } int id = AccountMehod.Login(username, password); if (id > 0) { _account = AccountMehod.Read(id); return(true); } return(false); }