internal object GetGroups(DataTablesAjaxRequestModel tableModel) { var data = _groupService.GetGroups( tableModel.PageIndex, tableModel.PageSize, tableModel.SearchText, tableModel.GetSortText(new string[] { "GroupName" })); return(new { recordsTotal = data.total, recordsFiltered = data.totalDisplay, data = (from record in data.records select new string[] { record.GroupName, record.Id.ToString() } ).ToArray() }); }
internal object GetSmtps(DataTablesAjaxRequestModel tableModel) { var data = _smtpService.GetSmtps( tableModel.PageIndex, tableModel.PageSize, tableModel.SearchText, tableModel.GetSortText(new string[] { "SmtpProvider", "SmtpHostServer", "Port", "UserName" })); return(new { recordsTotal = data.total, recordsFiltered = data.totalDisplay, data = (from record in data.records select new string[] { record.SmtpProvider, record.SmtpHostServer, record.Port.ToString(), record.UserName, record.Id.ToString() } ).ToArray() }); }