protected void lbtnVersionComment_Click(Object sender, EventArgs e)
        {
            int currentFileId = int.Parse((String)ViewState[CURRENT_FILE_ID]);
            DocumentsExchangeModuleController moduleController =
                new DocumentsExchangeModuleController();
            String fileContentType = moduleController.GetFileContentType(currentFileId);
            String originalFileName = moduleController.GetOriginalFileName(currentFileId);
            int versionId = int.Parse(lstVersions.DataKeys
                                            [((DataListItem)((Control)sender).NamingContainer).ItemIndex]
                                            .ToString());
            String localFileName = moduleController.GetVersionLocalName(versionId);

            if (!String.IsNullOrWhiteSpace(fileContentType) &&
                !String.IsNullOrWhiteSpace(localFileName))
            {
                (new DocumentsExchangeModuleController()).
                        DownloadFile(Server.MapPath(UPLOADS_FOLDER_RELATIVE_PATH),
                             localFileName,
                             originalFileName,
                             fileContentType,
                             Response);
            }
        }
        private void ShowFileVersions(int fileId)
        {
            if (fileId < 1)
            {
                return;
            }

            DocumentsExchangeModuleController moduleController =
                new DocumentsExchangeModuleController();
            String currentFileName = moduleController.GetOriginalFileName(fileId);
            lblCurrentFileDescription.Text = String.Format("Versions of file \"{0}\":", currentFileName);
            lstVersions.DataSource = moduleController.GetVersions(fileId);
            lstVersions.DataBind();
            multiView.SetActiveView(versionsPage);
        }
 protected void lbtnFileName_Click(object sender, EventArgs e)
 {
     int fileId = int.Parse(lstFiles.
                             DataKeys[
                                 ((DataListItem)((LinkButton)sender).
                                         NamingContainer).ItemIndex]
                             .ToString());
     DocumentsExchangeModuleController moduleController =
         new DocumentsExchangeModuleController();
     String fileContentType = moduleController.GetFileContentType(fileId);
     String originalFileName = moduleController.GetOriginalFileName(fileId);
     String localFileName = moduleController.GetFileLastVersionLocalName(fileId);
     if (!String.IsNullOrWhiteSpace(fileContentType) &&
         !String.IsNullOrWhiteSpace(localFileName))
     {
         (new DocumentsExchangeModuleController()).
                 DownloadFile(Server.MapPath(UPLOADS_FOLDER_RELATIVE_PATH),
                      localFileName,
                      originalFileName,
                      fileContentType,
                      Response);
     }
 }