Ejemplo n.º 1
0
        public GetAllDepartmentResponse GetAll()
        {
            GetAllDepartmentResponse response = new GetAllDepartmentResponse();

            try
            {
                IList<Department> lstDepartment = _departmentService.GetAll();

                response.List = lstDepartment.MapToDepartmentViewModelList();
                response.Success = true;
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return response;
        }
Ejemplo n.º 2
0
        public GetAllDepartmentResponse GetAll()
        {
            GetAllDepartmentResponse response = new GetAllDepartmentResponse();

            try
            {
                IList <Department> lstDepartment = _departmentService.GetAll();

                response.List    = lstDepartment.MapToDepartmentViewModelList();
                response.Success = true;
            }
            catch (Exception ex)
            {
                response.Success = false;
                response.Message = ex.Message;
            }

            return(response);
        }