This commit is contained in:
2021-05-25 13:58:34 +00:00
parent b4864020e5
commit 0faf92a852
2 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,49 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using AyaNova.Biz;
namespace AyaNova.PickList
{
internal class TaskGroupPickList : AyaPickList
{
public TaskGroupPickList()
{
DefaultListAType = AyaType.TaskGroup;
SQLFrom = "from ataskgroup";
AllowedRoles = BizRoles.GetRoleSet(DefaultListAType).Select;
dynamic dTemplate = new JArray();
dynamic cm = null;
cm = new JObject();
cm.fld = "taskgroupname";
dTemplate.Add(cm);
base.DefaultTemplate = dTemplate.ToString(Newtonsoft.Json.Formatting.None);
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined table need to be specified completely
ColumnDefinitions = new List<AyaPickListFieldDefinition>();
ColumnDefinitions.Add(new AyaPickListFieldDefinition
{
TKey = "Active",
FieldKey = "taskgroupactive",
ColumnDataType = UiFieldDataType.Bool,
SqlValueColumnName = "ataskgroup.active",
IsActiveColumn = true
});
ColumnDefinitions.Add(new AyaPickListFieldDefinition
{
TKey = "Name",
FieldKey = "taskgroupname",
ColumnDataType = UiFieldDataType.Text,
SqlIdColumnName = "ataskgroup.id",
SqlValueColumnName = "ataskgroup.name",
IsRowId = true
});
}
}//eoc
}//eons

View File

@@ -107,8 +107,6 @@ namespace AyaNova.Biz
if (logTheGetEvent && ret != null)
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct);
return ret;
}