Ejemplo n.º 1
0
    public List<EmployeeAttrib> getEmployeesByStatus(string status, List<EmployeeAttrib> emp_attribs)
    {
        if (emp_attribs == null) return null;

        SQLDB sql = new SQLDB();
        List<EmployeeAttrib> emps = new List<EmployeeAttrib>();

        int status_1 = 0;
        int status_2 = Convert.ToInt32(status);

        foreach (EmployeeAttrib em in emp_attribs)
        {
            status_1 = sql.getStatusOverhours(em.EmployeeID, em.StartPeriod, em.BeginDate, em.EndDate);

            if (status_1 == status_2) emps.Add(em);
        }

        return emps;
    }