Ejemplo n.º 1
0
        public IHttpActionResult GetEmpList()
        {
            JSONTemplateListModel <Employees> response = new JSONTemplateListModel <Employees>()
            {
                Data   = null,
                Status = API_Enum.API_STATUS_RESULT.FAIL
            };

            try
            {
                EmployeeManagement Emp = new EmployeeManagement();
                response.Data   = Emp.GetEmployeesList();
                response.Status = API_Enum.API_STATUS_RESULT.SUCCESS;
                return(JsonResp(response));
            }
            catch (Exception ex)
            {
                response.Message = "Error, Please try again later.";
                return(JsonResp(response));
            }
        }
Ejemplo n.º 2
0
        public List <Employee> GetEmployees()
        {
            List <Employee> employees = employeeManagement.GetEmployeesList();

            return(employees);
        }