This commit is contained in:
2020-07-01 19:38:10 +00:00
parent cd16d4acbf
commit c8fdd73ade
2 changed files with 3 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ namespace AyaNova.DataList
dynamic cm = new JObject(); dynamic cm = new JObject();
cm.fld = "eventcreated"; cm.fld = "eventcreated";
cm.sort="-";
dlistView.Add(cm); dlistView.Add(cm);
cm = new JObject(); cm = new JObject();

View File

@@ -40,7 +40,7 @@ namespace AyaNova.Biz
internal static async Task DeleteObjectLogAsync(long userId, AyaType ayaType, long ayId, string textra, AyContext ct) internal static async Task DeleteObjectLogAsync(long userId, AyaType ayaType, long ayId, string textra, AyContext ct)
{ {
await ct.Database.ExecuteSqlInterpolatedAsync($"delete from aevent where ayatype = {ayaType} and ayid={ayId}"); await ct.Database.ExecuteSqlInterpolatedAsync($"delete from aevent where ayatype = {ayaType} and ayid={ayId}");
await ct.Event.AddAsync(new Event(userId, ayId, ayaType, AyaEvent.Deleted, textra)); await ct.Event.AddAsync(new Event(userId, ayId, ayaType, AyaEvent.Deleted, $"{textra} (id {ayId})"));
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
} }