Exemple #1
0
 /// <summary>
 /// Checks the actual reported file size on disk and updates its size in the database.
 /// </summary>
 /// <returns>Returns the file size in bytes</returns>
 public long UpdateFileSizeOnDisk()
 {
     Functions F = new Functions();
     long FileSize = F.GetActualFileSizeOnDisk(this.Description);
     this.Update(FileSize);
     return FileSize;
 }
Exemple #2
0
 /// <summary>
 /// Updates the Database with the current reported file size on disk
 /// </summary>
 /// <returns>File size in bytes</returns>
 public long RefreshFileSizeOnDisk()
 {
     Functions F = new Functions();
     long FileSize = F.GetActualFileSizeOnDisk(this.StoredName);
     string sSQL = "Update tblAttachments SET FileSize = " + FileSize.ToString() +
         "WHERE Id = " + mvarID;
     F.ExecuteNonQuery(sSQL);
     return FileSize;
 }