public List <Employee> ListOfEmployeeCodeInEmp(string empCode)
        {
            List <Employee> empCodeList   = new List <Employee>();
            List <Employee> empSearchList = empDao.SearchByEmployeeCode(empCode);

            //string userRoleName = null;

            //foreach (Employee emp in empSearchList)
            //{

            //    userRoleName = GetUserRoleName(emp.UserName);
            //    if (userRoleName.Equals("Store Supervisor"))
            //    {
            //        break;
            //    }
            //}

            foreach (Employee e in empSearchList)
            {
                if (e.DepartmentCode.Equals("STOR") && !GetUserRoleName(e.UserName).Equals("Store Supervisor"))
                {
                    empCodeList.Add(e);
                }
            }
            return(empCodeList);
        }
        public List <Employee> ListOfEmployeeCodeInDepartment(string empCode, string deptCode)
        {
            List <Employee> empList       = new List <Employee>();
            List <Employee> empSearchList = edao.SearchByEmployeeCode(empCode)
                                            .Where(e => e.DepartmentCode == deptCode).ToList();

            foreach (Employee e in empSearchList)
            {
                Role role = udao.getRoleNameByUsername(e.UserName);
                if (role != null)
                {
                    if (role.Id == "Empl")
                    {
                        empList.Add(e);
                    }
                }
            }
            return(empList);
        }