Ejemplo n.º 1
0
 public Account ReadAccount(int id)
 {
     if ((int)account.AccountLevel <= 1 && id <= 0)
     {
         throw new NotImplementedException();
     }
     return(AccountMehod.Read(id));
 }
Ejemplo n.º 2
0
 public List <Account> ReadAccount()
 {
     if ((int)account.AccountLevel <= 1)
     {
         throw new NotImplementedException();
     }
     return(AccountMehod.Read());
 }
Ejemplo n.º 3
0
        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);
        }