Пример #1
0
        public eAccount getOneAccount(string id)
        {
            var      result = accdal.getOneAccount(id);
            eAccount e      = new eAccount();

            e.UserName   = result.UserName;
            e.Password   = result.Password;
            e.EmployeeId = result.EmployeeID;
            return(e);
        }
Пример #2
0
        public List <eAccount> getAllAccount()
        {
            List <eAccount> ls = new List <eAccount>();

            foreach (Account record in accdal.getAllAccount())
            {
                eAccount temp = new eAccount();
                temp.EmployeeId = record.EmployeeID;
                temp.UserName   = record.UserName;
                temp.Password   = record.Password;
                ls.Add(temp);
            }
            return(ls);
        }
Пример #3
0
 public bool updateAccount(eAccount e)
 {
     try
     {
         Account temp = new Account();
         temp.EmployeeID = e.EmployeeId;
         temp.Password   = e.Password;
         temp.UserName   = e.UserName;
         accdal.updateAccount(temp);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Пример #4
0
        public List <eAccount> getAllAccount()
        {
            List <eAccount> ls = new List <eAccount>();

            foreach (Account record in accdal.getAllAccount())
            {
                eAccount temp = new eAccount();
                temp.EmployeeId = record.EmployeeID;
                temp.UserName   = record.UserName;
                temp.Password   = record.Password;
                Employee e = empdal.getOneEmployee(temp.EmployeeId);
                temp.FirstName  = e.FirstName;
                temp.LastName   = e.LastName;
                temp.MiddleName = e.MiddleName;
                temp.Position   = e.Position;
                temp.Active     = e.Active;
                ls.Add(temp);
            }
            return(ls);
        }