This commit is contained in:
@@ -615,7 +615,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
using (var cmd = ct.Database.GetDbConnection().CreateCommand())
|
using (var cmd = ct.Database.GetDbConnection().CreateCommand())
|
||||||
{
|
{
|
||||||
await ct.Database.OpenConnectionAsync();
|
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)
|
left join auser on (afileattachment.attachedByUserId=auser.id)
|
||||||
where attachtoatype={(int)ayaType} and attachtoobjectid={ayaId}
|
where attachtoatype={(int)ayaType} and attachtoobjectid={ayaId}
|
||||||
order by displayfilename";
|
order by displayfilename";
|
||||||
@@ -637,12 +637,13 @@ namespace AyaNova.Api.Controllers
|
|||||||
retList.Add(new FileAttachmentListItem()
|
retList.Add(new FileAttachmentListItem()
|
||||||
{
|
{
|
||||||
Id = dr.GetInt64(0),
|
Id = dr.GetInt64(0),
|
||||||
DisplayFileName = dr.GetString(1),
|
Concurrency=(UInt32)dr.GetValue(1),
|
||||||
ContentType = dr.GetString(2),
|
DisplayFileName = dr.GetString(2),
|
||||||
LastModified = dr.GetDateTime(3),
|
ContentType = dr.GetString(3),
|
||||||
Notes = dr.GetString(4),
|
LastModified = dr.GetDateTime(4),
|
||||||
Size = dr.GetInt64(5),
|
Notes = dr.GetString(5),
|
||||||
AttachedByUser = dr.GetString(6)
|
Size = dr.GetInt64(6),
|
||||||
|
AttachedByUser = dr.GetString(7)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -654,7 +655,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
private class FileAttachmentListItem
|
private class FileAttachmentListItem
|
||||||
{
|
{
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
// public uint Concurrency { get; set; }
|
public uint Concurrency { get; set; }
|
||||||
public string DisplayFileName { get; set; }
|
public string DisplayFileName { get; set; }
|
||||||
public string ContentType { get; set; }//mime type
|
public string ContentType { get; set; }//mime type
|
||||||
public DateTime LastModified { get; set; }
|
public DateTime LastModified { get; set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user