B2015-071: Fixed handling of sublevels in templates (for EXEBCK)

B2015-071: EXEBCK template had spaces in template text, fixed parsing of this
This commit is contained in:
2015-06-22 14:41:55 +00:00
parent 3c489b709e
commit 7bc11c7fb6
2 changed files with 29 additions and 10 deletions

View File

@@ -288,7 +288,22 @@ namespace VEPROMS.CSLA.Library
string[] tmpOld = tpl.Split(" ".ToCharArray());
level = Convert.ToInt32(tmpOld[0]);
type = Convert.ToInt32(tmpOld[1]);
stmp = tmpOld.Length <= 2 ? null : tmpOld[2];
if (tmpOld.Length <= 2)
stmp = null;
else if (tmpOld.Length > 3)
{
// Braidwood has spaces as part of the text in the 3rd field, i.e. (See Deviation Document)
// handle this special case
int indxx = tpl.IndexOf(" ");
if (indxx < 0) stmp = null;
else
{
indxx = tpl.IndexOf(" ", indxx+1);
stmp = (indxx > -1) ? tpl.Substring(indxx) : null;
}
}
else
stmp = tmpOld[2];
}
else
{