This commit is contained in:
@@ -133,6 +133,7 @@ namespace AyaNova.Api.Controllers
|
||||
//DateTime, UserId, Event, Textra
|
||||
public DateTime Date { get; set; }
|
||||
public long UserId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public AyaEvent Event { get; set; }
|
||||
public string Textra { get; set; }
|
||||
}
|
||||
@@ -143,6 +144,7 @@ namespace AyaNova.Api.Controllers
|
||||
public DateTime Date { get; set; }
|
||||
public AyaType ObjectType { get; set; }
|
||||
public long ObjectId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public AyaEvent Event { get; set; }
|
||||
public string Textra { get; set; }
|
||||
}
|
||||
|
||||
@@ -15,6 +15,10 @@ namespace AyaNova.Biz
|
||||
//Returns existance status of object type and id specified in database
|
||||
internal static string Name(AyaType aytype, long id, System.Data.Common.DbCommand cmd)
|
||||
{
|
||||
if (aytype == AyaType.NoType || id == 0)
|
||||
{
|
||||
return "-";
|
||||
}
|
||||
string TABLE = string.Empty;
|
||||
string COLUMN = "name";
|
||||
//CoreBizObject add here
|
||||
|
||||
@@ -61,15 +61,20 @@ namespace AyaNova.Biz
|
||||
var EventItems = await q.ToArrayAsync();
|
||||
|
||||
//convert the Event array to the correct return type array
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.ObjectEventLogItem()
|
||||
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
||||
{
|
||||
Date = m.Created,
|
||||
UserId = m.UserId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra
|
||||
}).ToArray();
|
||||
ct.Database.OpenConnection();
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.ObjectEventLogItem()
|
||||
{
|
||||
Date = m.Created,
|
||||
UserId = m.UserId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra,
|
||||
Name = BizObjectNameFetcherDirect.Name(AyaType.User, m.UserId, command)
|
||||
}).ToArray();
|
||||
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,18 +96,24 @@ namespace AyaNova.Biz
|
||||
|
||||
//Execute the query
|
||||
var EventItems = await q.ToArrayAsync();
|
||||
|
||||
//convert the Event array to the correct return type array
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.UserEventLogItem()
|
||||
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
||||
{
|
||||
Date = m.Created,
|
||||
ObjectType = m.AyType,
|
||||
ObjectId = m.AyId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra
|
||||
}).ToArray();
|
||||
ct.Database.OpenConnection();
|
||||
//convert the Event array to the correct return type array
|
||||
var ret = EventItems.Select(m => new AyaNova.Api.Controllers.EventLogController.UserEventLogItem()
|
||||
{
|
||||
|
||||
Date = m.Created,
|
||||
ObjectType = m.AyType,
|
||||
ObjectId = m.AyId,
|
||||
Event = m.AyEvent,
|
||||
Textra = m.Textra,
|
||||
Name = BizObjectNameFetcherDirect.Name(m.AyType, m.AyId, command)
|
||||
|
||||
}).ToArray();
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user