示例#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;
        }
示例#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);
        }