Fixed problem trying to convert an empty string to a number

B2013-007 fixed logic to handle “{Proc Num} ({Proc Title}) Step {First Step}” transition when no step number is used.  Needed to append a “)”.
This commit is contained in:
2013-01-17 18:17:53 +00:00
parent 6a325705d7
commit a8d351bfc2
2 changed files with 5 additions and 2 deletions

View File

@@ -719,7 +719,10 @@ namespace VEPROMS.CSLA.Library
else if ((tb._ToItem.IsSection || tb._ToItem.IsProcedure) && ((tb._TransUI & E_TransUI.StepAllowNone) == E_TransUI.StepAllowNone))
{
string tmpStr = tb.ToString();
if (tmpStr.ToUpper().EndsWith(", STEP ")) tb.Remove(tb.Length - 7, 7); // 7 is length of ", Step "
if (tmpStr.ToUpper().EndsWith(", STEP "))
tb.Remove(tb.Length - 7, 7); // 7 is length of ", Step "
else if (tb.Prefix != null && tb.Prefix.StartsWith(")"))
tb.Append(")");
return true;
}
else