Bugfix to SQL query
This commit is contained in:
@@ -75,7 +75,7 @@ namespace Swarmops.Database
|
||||
DbCommand command =
|
||||
GetDbCommand(
|
||||
"SELECT Documents.DocumentId,Documents.ServerFileName,Documents.ClientFileName,Documents.Description,DocumentTypes.Name AS DocumentType,Documents.ForeignId,Documents.FileSize,Documents.UploadedByPersonId,Documents.UploadedDateTime From Documents,DocumentTypes " +
|
||||
"WHERE Documents.Description = '" + description.Replace ("'", "''") + " AND " +
|
||||
"WHERE Documents.Description = '" + description.Replace ("'", "''") + "' AND " +
|
||||
"Documents.UploadedDateTime > '" + DateTime.UtcNow.AddDays(-1).ToString("yyyy-MM-dd HH:mm") + "'", connection);
|
||||
|
||||
using (DbDataReader reader = command.ExecuteReader())
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace Swarmops.Frontend.Automation
|
||||
file.InputStream.Position = 0;
|
||||
file.SaveAs (StorageRoot + fileFolder + Path.DirectorySeparatorChar + fileName);
|
||||
|
||||
Document.Create (StorageRoot + fileFolder + Path.DirectorySeparatorChar + fileName, file.FileName, file.ContentLength,
|
||||
Document.Create (fileFolder + Path.DirectorySeparatorChar + fileName, file.FileName, file.ContentLength,
|
||||
guid, null, authData.CurrentUser);
|
||||
|
||||
statuses.Add (new FilesStatus (fullName, file.ContentLength));
|
||||
|
||||
Reference in New Issue
Block a user