From 26ce21ccb9184e998def4bd3c54c3522c7d51a57 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 14 May 2013 12:48:42 +0000 Subject: [PATCH] connect library documents for procedures that have many sections (step/sequence was non-alpha) --- PROMS/DataLoader/Sections.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PROMS/DataLoader/Sections.cs b/PROMS/DataLoader/Sections.cs index 03bbd5d3..3c4bf42f 100644 --- a/PROMS/DataLoader/Sections.cs +++ b/PROMS/DataLoader/Sections.cs @@ -559,7 +559,16 @@ namespace DataLoader ci.AddItem("Section", "NumPages", sequence.Substring(3, 1)); // see if it's a libdoc too - string thekey = procnum.PadRight(20) + step.Substring(0, 1).PadRight(10); + string mystep = null; + try + { + mystep = dr["Step"].ToString(); + } + catch (Exception ex) + { + Console.WriteLine("testing - error = {0}", ex.Message); + } + string thekey = procnum.PadRight(20) + ((mystep!=null)?mystep.Substring(0,1).PadRight(10):step.Substring(0, 1).PadRight(10)); if (dicLibDocRef.ContainsKey(thekey)) { // if it is a library document, see if the section record has already been