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