This commit is contained in:
@@ -474,12 +474,19 @@ namespace AyaNova.Biz
|
|||||||
break;
|
break;
|
||||||
case "eventlog":
|
case "eventlog":
|
||||||
{
|
{
|
||||||
var V7Id = new Guid(j["ID"].Value<string>());
|
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
|
//handle EventLog entries for users now that we have the user's created
|
||||||
//Log
|
//Created
|
||||||
//EventLogProcessor.AddEntry(new Event(userId, o.Id, AyaType.User, AyaEvent.Created), ct);
|
EventLogProcessor.AddEntry(new Event(Creator, RavenUserId, AyaType.User, AyaEvent.Created, Created), ct);
|
||||||
//MODIFIED HERE
|
//MODIFIED
|
||||||
// await ct.SaveChangesAsync();
|
EventLogProcessor.AddEntry(new Event(Modifier, RavenUserId, AyaType.User, AyaEvent.Modified, Modified), ct);
|
||||||
|
await ct.SaveChangesAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
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
|
}//eoc
|
||||||
|
|
||||||
}//eons
|
}//eons
|
||||||
|
|||||||
Reference in New Issue
Block a user