From 0e94b48af254b8460daf7510314f189efbe13ea3 Mon Sep 17 00:00:00 2001 From: Rich Date: Mon, 23 Jan 2012 13:51:36 +0000 Subject: [PATCH] changes to support approval process --- PROMS/Volian.Base.Library/TmpFile.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PROMS/Volian.Base.Library/TmpFile.cs b/PROMS/Volian.Base.Library/TmpFile.cs index bd7502e6..45efa471 100644 --- a/PROMS/Volian.Base.Library/TmpFile.cs +++ b/PROMS/Volian.Base.Library/TmpFile.cs @@ -2,11 +2,24 @@ using System; using System.Collections.Generic; using System.Text; using System.IO; +using System.Text.RegularExpressions; namespace Volian.Base.Library { public static class TmpFile { + public static string CreateFileName(string procNumber, string sectNumber, string sectTitle) + { + return FixFileName(procNumber + "_" + ((sectNumber ?? "") != "" ? sectNumber : sectTitle)); + } + public static string CreateFileName(string procNumber) + { + return FixFileName(procNumber); + } + public static string FixFileName(string name) + { + return Regex.Replace(name, "[ .,/]", "_") + ".pdf"; + } public static void RemoveAllTmps() { RemoveTmpPDFs();