示例#1
0
        public List<EmployeeViewModels> SearchEmployee(SeachFormModels searchForm)
        {
            var employeeDao = new EmployeeDao();

            var emplyoeeList = employeeDao.GetEmployeeListFromJson();

            char[] delimiter = { ' ', ',' };

            string[] formName = searchForm.Name.Split(delimiter);
            string[] formAge = searchForm.Age.Split(delimiter);
            string[] formDpertment = searchForm.Depertment.Split(delimiter);

            var ret = emplyoeeList.Where(row => formName.Any(keyword => row.Name.Contains(keyword)))
                                  .ToList();

            return ret;
        }
示例#2
0
        public List<EmployeeViewModels> SearchEmployee()
        {
            var employeeDao = new EmployeeDao();

            return employeeDao.GetEmployeeList();
        }
示例#3
0
 public WorkerService()
 {
     employeeDao = new EmployeeDao();
 }