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));
 }
Example #3
0
 public Employee GetByEmail(string email)
 {
     return(_employeeObject.GetByEmail(email));
 }