This commit is contained in:
@@ -474,12 +474,19 @@ namespace AyaNova.Biz
|
||||
break;
|
||||
case "eventlog":
|
||||
{
|
||||
var V7Id = new Guid(j["ID"].Value<string>());
|
||||
//handle EventLog entries for users now that we have the user's created
|
||||
//Log
|
||||
//EventLogProcessor.AddEntry(new Event(userId, o.Id, AyaType.User, AyaEvent.Created), ct);
|
||||
//MODIFIED HERE
|
||||
// await ct.SaveChangesAsync();
|
||||
var V7Id = new Guid(j["ID"].Value<string>());
|
||||
var RavenUserId = importMap.Where(m => m.V7ObjectId == V7Id).First().NewObjectAyaTypeId.ObjectId;
|
||||
var Creator = importMap.Where(m => m.V7ObjectId == new Guid(j["Creator"].Value<string>())).First().NewObjectAyaTypeId.ObjectId;
|
||||
var Modifier = importMap.Where(m => m.V7ObjectId == new Guid(j["Modifier"].Value<string>())).First().NewObjectAyaTypeId.ObjectId;
|
||||
var Created = j["Created"].Value<DateTime>();
|
||||
var Modified = j["Modified"].Value<DateTime>();
|
||||
|
||||
//handle EventLog entries for users now that we have the user's created
|
||||
//Created
|
||||
EventLogProcessor.AddEntry(new Event(Creator, RavenUserId, AyaType.User, AyaEvent.Created, Created), ct);
|
||||
//MODIFIED
|
||||
EventLogProcessor.AddEntry(new Event(Modifier, RavenUserId, AyaType.User, AyaEvent.Modified, Modified), ct);
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -47,6 +47,21 @@ namespace AyaNova.Models
|
||||
}
|
||||
}
|
||||
|
||||
public Event(long ownerId, long ayId, AyaType ayType, AyaEvent ayEvent, DateTime created, string textra = null)
|
||||
{
|
||||
Created = created;
|
||||
OwnerId = ownerId;
|
||||
AyId = ayId;
|
||||
AyType = ayType;
|
||||
AyEvent = ayEvent;
|
||||
if (textra != null)
|
||||
{
|
||||
if (textra.Length > 255)
|
||||
textra = textra.Substring(0, 255);
|
||||
Textra = textra;
|
||||
}
|
||||
}
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
|
||||
Reference in New Issue
Block a user