This commit is contained in:
2022-02-25 00:57:58 +00:00
parent 0796eede63
commit 20c7f8437a
2 changed files with 5 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ namespace AyaNova.KPI
}
System.Text.StringBuilder sbData = new System.Text.StringBuilder();
JArray jData = new JArray();
string sMeta = string.Empty;
#if (DEBUG && AYSHOWKPIQUERYINFO)
@@ -82,7 +82,7 @@ namespace AyaNova.KPI
{
//only one column and it's the zeroth json string column
if (!dr.IsDBNull(0))
sbData.Append(dr.GetString(0));
jData.Add(JObject.Parse(dr.GetString(0)));
}
}
@@ -135,8 +135,8 @@ namespace AyaNova.KPI
return JObject.FromObject(new
{
meta = sMeta,
data = sbData
meta = JObject.Parse(sMeta),
data = jData
});
}
}

View File

@@ -1,8 +1,4 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz;
using System.Linq;
using System;
namespace AyaNova.KPI
{
@@ -12,7 +8,7 @@ namespace AyaNova.KPI
private string _dataQuery = null;
private string _errorMessage = null;
public AuthorizationRoles AllowedRoles { get => BizRoles.GetRoleSet(AyaType.WorkOrderItemLabor).ReadFullRecord; }
public AuthorizationRoles AllowedRoles { get => AuthorizationRoles.Tech | AuthorizationRoles.TechRestricted; }
public string MetaQuery => _metaQuery;
public string DataQuery => _dataQuery;