Added Error Handling generically
B2018-113 - PDF filename based upon the procedure number. Embedded Slashes and Backslashes in the procedure number are changed to underscores as is done in PROMS. The code was giving a file-not-found error message.
This commit is contained in:
@@ -495,7 +495,8 @@ namespace Baseline
|
||||
private string OpenPDF(string line)
|
||||
{
|
||||
int page = int.Parse(line.Substring(0, 6));
|
||||
line = line.Substring(8, line.IndexOf(".S") - 8);
|
||||
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
|
||||
line = line.Substring(8, line.IndexOf(".S") - 8).Replace("/", "_").Replace("\\", "_");
|
||||
FindFile ff = lbDifferent.SelectedItem as FindFile;
|
||||
FileInfo fi1 = new FileInfo(ff.File1);
|
||||
FileInfo fi2 = new FileInfo(ff.File2);
|
||||
@@ -593,7 +594,8 @@ namespace Baseline
|
||||
/// <param name="list"></param>
|
||||
private void OpenOnePDF(Line myLine, int list)
|
||||
{
|
||||
string proc = myLine.MyProc.Number;
|
||||
// B2018-113 - Replace slashes and backslashes with underscores just as PROMS does when creating a PDF file.
|
||||
string proc = myLine.MyProc.Number.Replace("/","_").Replace("\\","_");
|
||||
int pagenum = myLine.MyPage.Number;
|
||||
FindFile ff = lbDifferent.SelectedItem as FindFile;
|
||||
FileInfo fi1 = new FileInfo(ff.File1);
|
||||
|
Reference in New Issue
Block a user