This commit is contained in:
2020-10-26 19:43:40 +00:00
parent 6a1600dbbb
commit b88636ad3e
2 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace AyaNova.Biz
{
/// <summary>
/// Interface for biz objects that support importing from JSON
/// </summary>
internal interface IImportAbleObject
{
Task ImportData(JArray ja);
}
}

View File

@@ -11,7 +11,7 @@ using System.Collections.Generic;
namespace AyaNova.Biz
{
internal class WidgetBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject, IExportAbleObject
internal class WidgetBiz : BizObject, IJobObject, ISearchAbleObject, IReportAbleObject, IExportAbleObject, IImportAbleObject
{
@@ -313,6 +313,10 @@ namespace AyaNova.Biz
return ReportData;
}
#region IMPORT EXPORT
//Get data for export
public async Task<JArray> GetExportData(long[] idList)
{
@@ -321,6 +325,12 @@ namespace AyaNova.Biz
return await GetReportData(idList);
}
public Task ImportData(JArray ja)
{
throw new NotImplementedException();
}
// public async Task<object[]> GetObjectArrayExportData(long[] idList)
// {
@@ -352,6 +362,10 @@ namespace AyaNova.Biz
// return wList.ToArray();
// }
#endregion import export
////////////////////////////////////////////////////////////////////////////////////////////////
//JOB / OPERATIONS
//
@@ -430,6 +444,7 @@ namespace AyaNova.Biz
/////////////////////////////////////////////////////////////////////
}//eoc