Esempio n. 1
0
 private void GetSharedFile(int itemId)
 {
     using (IDataReader reader = DBSharedFiles.GetSharedFile(itemId))
     {
         if (reader.Read())
         {
             this.itemID           = Convert.ToInt32(reader["ItemID"]);
             this.moduleID         = Convert.ToInt32(reader["ModuleID"]);
             this.uploadUserID     = Convert.ToInt32(reader["UploadUserID"]);
             this.friendlyName     = reader["FriendlyName"].ToString();
             this.originalFileName = reader["OriginalFileName"].ToString();
             this.serverFileName   = reader["ServerFileName"].ToString();
             this.sizeInKB         = Convert.ToInt32(reader["SizeInKB"]);
             this.uploadDate       = Convert.ToDateTime(reader["UploadDate"]);
             this.folderID         = Convert.ToInt32(reader["FolderID"]);
             this.moduleGuid       = new Guid(reader["ModuleGuid"].ToString());
             string u = reader["UserGuid"].ToString();
             if (u.Length == 36)
             {
                 this.userGuid = new Guid(u);
             }
             u = reader["FolderGuid"].ToString();
             if (u.Length == 36)
             {
                 this.folderGuid = new Guid(u);
             }
             this.description   = reader["Description"].ToString();
             this.downloadCount = Convert.ToInt32(reader["DownloadCount"]);
         }
     }
 }