public List <AssignRole> ListOfAssignRoleInDepartment(string deptCode)
        {
            List <Employee>   empList    = edao.SearchByDept(deptCode);
            List <AssignRole> assignList = new List <AssignRole>();

            foreach (Employee e in empList)
            {
                List <AssignRole> assList = adao.SearchByEmployeeCode(e.EmployeeCode);
                foreach (AssignRole a in assList)
                {
                    assignList.Add(a);
                }
            }
            return(assignList);
        }
        private List <String> GetRecepientsEmail(string deptCode, List <String> roles)
        {
            List <String> emails = new List <string>();

            foreach (string role in roles)
            {
                List <Employee> employees = employeeDAO.SearchByDept(deptCode);
                foreach (Employee e in employees)
                {
                    Role r = userDAO.getRoleNameByUsername(e.UserName);
                    if (r != null)
                    {
                        if (r.Id == role)
                        {
                            emails.Add(GetUserEmail(e.UserName));
                        }
                    }
                }
            }
            return(emails);
        }