From b405d88a8358fe2f971441798734b8d2abcbd4fa Mon Sep 17 00:00:00 2001 From: John Date: Wed, 27 Jun 2012 14:04:51 +0000 Subject: [PATCH] Fixed problem where the sub-formats this was introduced with a fix for a procedure in the Wolf Creek SYS set. --- PROMS/DataLoader/Sections.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/PROMS/DataLoader/Sections.cs b/PROMS/DataLoader/Sections.cs index 0fe47ab9..a31ec1ea 100644 --- a/PROMS/DataLoader/Sections.cs +++ b/PROMS/DataLoader/Sections.cs @@ -402,8 +402,13 @@ namespace DataLoader string s = dr["text"].ToString().PadRight(130, ' '); string rid = dr["recid"].ToString(); // RECID string num = s.Substring(85, 20).TrimEnd(); - string fmt = s.Substring(75, 8).TrimEnd(); - if (fmt == "") fmt = null; + string fmt = s.Substring(75, 8).TrimEnd(); // base format name + string ufmt = s.Substring(83, 2).TrimEnd(); // user format number (see TSectEditDlg::SetupWindow() PROMSNT\EXE\WINED\SECTEDIT.CPP) + // Build the format name if one was specified for this section. + if (fmt == "") + fmt = null; + else if (ufmt.Length == 2 && char.IsDigit(ufmt[0]) && char.IsDigit(ufmt[1])) // user format reference must be two digits + fmt = fmt.PadRight(8,' ') + ufmt; // append the user format reference bool ismulti = false; bool conv_caret = true;