From 0faf92a852bd675b81989a8480e09a0863153038 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 25 May 2021 13:58:34 +0000 Subject: [PATCH] --- server/AyaNova/PickList/TaskGroupPickList.cs | 49 ++++++++++++++++++++ server/AyaNova/biz/TaskGroupBiz.cs | 2 - 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 server/AyaNova/PickList/TaskGroupPickList.cs diff --git a/server/AyaNova/PickList/TaskGroupPickList.cs b/server/AyaNova/PickList/TaskGroupPickList.cs new file mode 100644 index 00000000..f43deae8 --- /dev/null +++ b/server/AyaNova/PickList/TaskGroupPickList.cs @@ -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(); + 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 \ No newline at end of file diff --git a/server/AyaNova/biz/TaskGroupBiz.cs b/server/AyaNova/biz/TaskGroupBiz.cs index 0a2077b0..ba7d5762 100644 --- a/server/AyaNova/biz/TaskGroupBiz.cs +++ b/server/AyaNova/biz/TaskGroupBiz.cs @@ -107,8 +107,6 @@ namespace AyaNova.Biz if (logTheGetEvent && ret != null) await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct); - - return ret; }