From d7d8e9340c2b91dcfc09143978f949d71bed826e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 11 Mar 2022 15:17:01 +0000 Subject: [PATCH] --- .../AyaNova/Controllers/AttachmentController.cs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/server/AyaNova/Controllers/AttachmentController.cs b/server/AyaNova/Controllers/AttachmentController.cs index 4d9ac188..09396468 100644 --- a/server/AyaNova/Controllers/AttachmentController.cs +++ b/server/AyaNova/Controllers/AttachmentController.cs @@ -615,7 +615,7 @@ namespace AyaNova.Api.Controllers using (var cmd = ct.Database.GetDbConnection().CreateCommand()) { await ct.Database.OpenConnectionAsync(); - cmd.CommandText = $@"select afileattachment.id, displayfilename,contenttype,lastmodified, afileattachment.notes, size, auser.name as attachedbyuser from afileattachment + cmd.CommandText = $@"select afileattachment.id, afileattachment.xmin as concurrency, displayfilename,contenttype,lastmodified, afileattachment.notes, size, auser.name as attachedbyuser from afileattachment left join auser on (afileattachment.attachedByUserId=auser.id) where attachtoatype={(int)ayaType} and attachtoobjectid={ayaId} order by displayfilename"; @@ -637,12 +637,13 @@ namespace AyaNova.Api.Controllers retList.Add(new FileAttachmentListItem() { Id = dr.GetInt64(0), - DisplayFileName = dr.GetString(1), - ContentType = dr.GetString(2), - LastModified = dr.GetDateTime(3), - Notes = dr.GetString(4), - Size = dr.GetInt64(5), - AttachedByUser = dr.GetString(6) + Concurrency=(UInt32)dr.GetValue(1), + DisplayFileName = dr.GetString(2), + ContentType = dr.GetString(3), + LastModified = dr.GetDateTime(4), + Notes = dr.GetString(5), + Size = dr.GetInt64(6), + AttachedByUser = dr.GetString(7) }); } } @@ -654,7 +655,7 @@ namespace AyaNova.Api.Controllers private class FileAttachmentListItem { public long Id { get; set; } - // public uint Concurrency { get; set; } + public uint Concurrency { get; set; } public string DisplayFileName { get; set; } public string ContentType { get; set; }//mime type public DateTime LastModified { get; set; }