示例#1
0
        public bool CreateHistory(string sourceFilePath, string historyFolderPath)
        {
            bool historyCreated = false;

            File.Move(Path.Combine(sourceFilePath, Path.GetFileName(this.serverFileName)), Path.Combine(historyFolderPath, Path.GetFileName(this.serverFileName)));

            historyCreated = DBSharedFiles.AddHistory(
                this.itemGuid,
                this.moduleGuid,
                this.userGuid,
                this.itemID,
                this.moduleID,
                this.friendlyName,
                this.originalFileName,
                this.serverFileName,
                this.sizeInKB,
                this.uploadDate,
                this.uploadUserID,
                DateTime.Now);

            if (historyCreated)
            {
                this.serverFileName = System.Guid.NewGuid().ToString() + ".config";
            }
            return(historyCreated);
        }
示例#2
0
 public static bool AddHistory(
     Guid itemGuid,
     Guid moduleGuid,
     Guid userGuid,
     int itemId,
     int moduleId,
     string friendlyName,
     string originalFileName,
     string serverFileName,
     int sizeInKB,
     DateTime uploadDate,
     int uploadUserId,
     string viewRoles)
 {
     return(DBSharedFiles.AddHistory(
                itemGuid,
                moduleGuid,
                userGuid,
                itemId,
                moduleId,
                friendlyName,
                originalFileName,
                serverFileName,
                sizeInKB,
                uploadDate,
                uploadUserId,
                DateTime.UtcNow,
                viewRoles
                ));
 }