Пример #1
0
        public bool GetByEmail(ref Employee emp)
        {
            var employee = ObjDb.GetByEmail(emp.Email);

            if (employee == null)
            {
                Errors.Add("Email does not exist");
            }
            else if (employee.Password != emp.Password)
            {
                Errors.Add("Invalid Password");
            }

            if (Errors.Count() == 0)
            {
                emp = employee;
                return(true);
            }
            else
            {
                return(false);
            }
        }
 public Employee GetByEmail(string email)
 {
     return(ObjDb.GetByEmail(email));
 }
Пример #3
0
 public Employee GetByEmail(string email)
 {
     return(_employeeObject.GetByEmail(email));
 }