This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user