This commit is contained in:
49
server/AyaNova/PickList/TaskGroupPickList.cs
Normal file
49
server/AyaNova/PickList/TaskGroupPickList.cs
Normal 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
|
||||
@@ -107,8 +107,6 @@ namespace AyaNova.Biz
|
||||
if (logTheGetEvent && ret != null)
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct);
|
||||
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user