Files
raven/server/AyaNova/DataList/ReportDataList.cs

47 lines
1.7 KiB
C#

using System.Collections.Generic;
using AyaNova.Biz;
namespace AyaNova.DataList
{
internal class ReportDataList : DataListProcessingBase
{
public ReportDataList()
{
DefaultListAType = AyaType.Report;
SQLFrom = "from aReport";
var RoleSet = BizRoles.GetRoleSet(DefaultListAType);
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
DefaultColumns = new List<string>() { "name", "aType", "active" };
DefaultSortBy = new Dictionary<string, string>() { { "name", "+" } };
FieldDefinitions = new List<DataListFieldDefinition>();
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Report",
FieldKey = "name",
AType = (int)AyaType.Report,
UiFieldDataType = (int)UiFieldDataType.Text,
SqlIdColumnName = "aReport.id",
SqlValueColumnName = "aReport.name",
IsRowId = true
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "AyaType",
FieldKey = "aType",
UiFieldDataType = (int)UiFieldDataType.Enum,
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString()),
SqlValueColumnName = "areport.AType"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "Active",
FieldKey = "active",
UiFieldDataType = (int)UiFieldDataType.Bool,
SqlValueColumnName = "aReport.active"
});
}
}//eoc
}//eons