public object GetProjects(DataTablesAjaxRequestModel tableModel, int companyId)
        {
            int total         = 0;
            int totalFiltered = 0;
            var records       = _projectManagementService.GetProjects(
                companyId,
                tableModel.PageIndex,
                tableModel.PageSize,
                tableModel.SearchText,
                out total,
                out totalFiltered);

            return(new
            {
                recordsTotal = total,
                recordsFiltered = totalFiltered,
                data = (from record in records
                        select new string[]
                {
                    record.Id.ToString(),
                    record.Name,
                    record.Description,
                    record.Id.ToString()
                }
                        ).ToArray()
            });
        }
Ejemplo n.º 2
0
 public ServiceResponseDTO <IEnumerable <ProjectDTO> > Get()
 {
     return(_projectManagementService.GetProjects());
 }