This commit is contained in:
2020-03-12 19:25:20 +00:00
parent 2ac227875f
commit 2cf681d7d7
10 changed files with 784 additions and 24 deletions

View File

@@ -6,7 +6,7 @@ using Newtonsoft.Json.Linq;
using AyaNova.Util;
using AyaNova.Api.ControllerHelpers;
using AyaNova.Models;
//using AyaNova.PickList;
using AyaNova.PickList;
namespace AyaNova.Biz
@@ -39,18 +39,18 @@ namespace AyaNova.Biz
////////////////////////////////////////////////////////////////////////////////////////////////
/// GET
//Get one
internal async Task<DataListView> GetAsync(long fetchId, bool logTheGetEvent = true)
{
//This is simple so nothing more here, but often will be copying to a different output object or some other ops
var ret = await ct.DataListView.SingleOrDefaultAsync(m => m.Id == fetchId && (m.Public == true || m.UserId == UserId));
if (logTheGetEvent && ret != null)
{
//Log
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, fetchId, BizType, AyaEvent.Retrieved), ct);
}
return ret;
}
// //Get one
// internal async Task<DataListView> GetAsync(long fetchId, bool logTheGetEvent = true)
// {
// //This is simple so nothing more here, but often will be copying to a different output object or some other ops
// var ret = await ct.DataListView.SingleOrDefaultAsync(m => m.Id == fetchId && (m.Public == true || m.UserId == UserId));
// if (logTheGetEvent && ret != null)
// {
// //Log
// await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, fetchId, BizType, AyaEvent.Retrieved), ct);
// }
// return ret;
// }
@@ -67,7 +67,7 @@ namespace AyaNova.Biz
//get picklist templates, basically all the object types that support picklists
internal async Task<List<NameIdItem>> GetListOfAllPickListKeyNames()
{
throw new System.NotImplementedException();
return PickListFactory.GetListOfAllPickListKeyNames();
// List<NameIdItem> items = await PickListFetcher.GetResponseAsync(ayaType, query, ct, UserId, userRoles);
// return items;
}