


//DEPRECATED: due to not working properly, can't easily set to only show current logged in user's subscriptions so it was showing all 
//which might be useful for a management type of situation but for a single user it's shit

// using System.Collections.Generic;
// using Newtonsoft.Json.Linq;
// using AyaNova.Biz;
// namespace AyaNova.DataList
// {
//     internal class NotifySubscriptionDataList : AyaDataList
//     {

//         public NotifySubscriptionDataList()
//         {
//             DefaultListObjectType = AyaType.NotifySubscription;
//             SQLFrom = "from anotifysubscription";
//             var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
//             AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;

//             //Default ListView
//             dynamic dlistView = new JArray();

//             dynamic cm = new JObject();
//             cm.fld = "id";
//             dlistView.Add(cm);

//             cm = new JObject();
//             cm.fld = "ayatype";
//             dlistView.Add(cm);

//             cm = new JObject();
//             cm.fld = "eventtype";
//             dlistView.Add(cm);

//             cm = new JObject();
//             cm.fld = "deliverymethod";
//             dlistView.Add(cm);

//             cm = new JObject();
//             cm.fld = "deliveryaddress";
//             dlistView.Add(cm);

//             cm = new JObject();
//             cm.fld = "tags";
//             dlistView.Add(cm);

          


//             DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
//             FieldDefinitions = new List<AyaDataListFieldDefinition>();

//             FieldDefinitions.Add(new AyaDataListFieldDefinition
//             {
//                 TKey = "ID",
//                 FieldKey = "id",
//                 UiFieldDataType = (int)UiFieldDataType.Integer,
//                 SqlIdColumnName = "anotifysubscription.id",
//                 SqlValueColumnName = "anotifysubscription.id",
//                 AyaObjectType = (int)AyaType.NotifySubscription,
//                 IsRowId = true
//             });

//             FieldDefinitions.Add(new AyaDataListFieldDefinition
//             {
//                 TKey = "AyaType",
//                 FieldKey = "ayatype",
//                 UiFieldDataType = (int)UiFieldDataType.Enum,
//                 EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AyaType).ToString())
//             });

//             FieldDefinitions.Add(new AyaDataListFieldDefinition
//             {
//                 TKey = "NotifyEventType",
//                 FieldKey = "eventtype",
//                 UiFieldDataType = (int)UiFieldDataType.Enum,
//                 EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifyEventType).ToString())
//             });

//             //  FieldDefinitions.Add(new AyaDataListFieldDefinition
//             // {
//             //     TKey = "FileAttachment",
//             //     FieldKey = "displayfilename",
//             //     AyaObjectType = (int)AyaType.FileAttachment,
//             //     UiFieldDataType = (int)UiFieldDataType.Text,
//             //     SqlIdColumnName = "afileattachment.id",
//             //     SqlValueColumnName = "afileattachment.displayfilename",
//             //     IsRowId = true
//             // });

//             FieldDefinitions.Add(new AyaDataListFieldDefinition
//             {
//                 TKey = "NotifyDeliveryMethod",
//                 FieldKey = "deliverymethod",
//                 UiFieldDataType = (int)UiFieldDataType.Enum,
//                 EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(NotifyDeliveryMethod).ToString())
//             });

//             FieldDefinitions.Add(new AyaDataListFieldDefinition
//             {
//                 TKey = "NotifyDeliveryAddress",
//                 FieldKey = "deliveryaddress",
//                 UiFieldDataType = (int)UiFieldDataType.Text
//             });

//             FieldDefinitions.Add(new AyaDataListFieldDefinition
//             {
//                 TKey = "InTags",
//                 FieldKey = "tags",
//                 UiFieldDataType = (int)UiFieldDataType.Tags
//             });

          


//         }
//     }//eoc
// }//eons