This commit is contained in:
@@ -188,7 +188,7 @@ namespace AyaNova.Api.Controllers
|
||||
/// <param name="apiVersion">From route path</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("data")]
|
||||
public async Task<IActionResult> GetReportData([FromBody] ReportDataParameter reportDataParam, ApiVersion apiVersion)
|
||||
public async Task<IActionResult> GetReportData([FromBody] DataListSelection reportDataParam, ApiVersion apiVersion)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
|
||||
@@ -316,7 +316,7 @@ namespace AyaNova.Biz
|
||||
//REPORT DATA
|
||||
//Data fetched to return to report designer for Client report design usage
|
||||
|
||||
public async Task<Newtonsoft.Json.Linq.JArray> GetReportData(ReportDataParameter reportDataParam, AuthorizationRoles overrideRoles = AuthorizationRoles.NoRole)
|
||||
public async Task<Newtonsoft.Json.Linq.JArray> GetReportData(DataListSelection reportDataParam, AuthorizationRoles overrideRoles = AuthorizationRoles.NoRole)
|
||||
{
|
||||
var log = AyaNova.Util.ApplicationLogging.CreateLogger("ReportBiz::GetReportData");
|
||||
AuthorizationRoles effectiveRoles = CurrentUserRoles;
|
||||
@@ -381,7 +381,7 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
//Get data
|
||||
var ReportData = await GetReportData(new ReportDataParameter() { ObjectType = report.ObjectType, SelectedRowIds = reportParam.SelectedRowIds, DataListKey = reportParam.DataListKey, ListView = reportParam.ListView });
|
||||
var ReportData = await GetReportData(new DataListSelection() { ObjectType = report.ObjectType, SelectedRowIds = reportParam.SelectedRowIds, DataListKey = reportParam.DataListKey, ListView = reportParam.ListView });
|
||||
|
||||
//initialization
|
||||
log.LogDebug("Initializing report system");
|
||||
|
||||
15
server/AyaNova/models/dto/DataListSelection.cs
Normal file
15
server/AyaNova/models/dto/DataListSelection.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using AyaNova.Biz;
|
||||
using Newtonsoft.Json.Linq;
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
public class DataListSelection
|
||||
{
|
||||
public AyaType ObjectType { get; set; }
|
||||
public long[] SelectedRowIds { get; set; }
|
||||
public string DataListKey { get; set; }
|
||||
public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -2,15 +2,7 @@ using AyaNova.Biz;
|
||||
using Newtonsoft.Json.Linq;
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
public class ReportDataParameter
|
||||
{
|
||||
public AyaType ObjectType { get; set; }
|
||||
public long[] SelectedRowIds { get; set; }
|
||||
public string DataListKey { get; set; }
|
||||
public string ListView { get; set; }//optional, if null or empty will use default list view built into DataList
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class RenderReportParameter
|
||||
{
|
||||
public long ReportId { get; set; }
|
||||
Reference in New Issue
Block a user