C2022-001 fixed index out of range when updating RO values
C2022-001 pass in Otherxxx parent/child information to get correct child RO value C2022-001 new logic to get parent (default) RO value.
This commit is contained in:
parent
8a2b19521d
commit
b10d66fc53
@ -397,7 +397,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
string defPrefix = tText.Substring(start - 3, 3);
|
||||
if (defPrefix != @"\v ") throw new Exception(string.Format("rtf string {0} does not match expected format", defPrefix));
|
||||
string txt = tText.Substring(lastIndex, start - lastIndex - 3);
|
||||
string txt = tText.Substring(lastIndex, start - (lastIndex - 3));
|
||||
int lastSlash = txt.LastIndexOf(@"\");
|
||||
int lastSpace = txt.LastIndexOf(" ");
|
||||
int lastCR = txt.LastIndexOf("\r");
|
||||
|
@ -1049,9 +1049,19 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
if (docVersionInfo.DocVersionAssociationCount == 1)
|
||||
{
|
||||
string otherChildUnit = null;
|
||||
ROFstInfo rofstinfo = docVersionInfo.DocVersionAssociations[0].MyROFst;
|
||||
//rofstinfo.docVer = docVersionInfo;
|
||||
ROFSTLookup lookup = rofstinfo.GetROFSTLookup(docVersionInfo);
|
||||
string rawPrcNum = itemInfo.MyProcedure.MyContent.Number;
|
||||
// C2022-001 see if we need to get the Other child info from ROLookUp
|
||||
if (rawPrcNum.ToUpper().StartsWith("<U\\U8209?OTHER")) // proc number has <u-otherxxx> in its definiation (procedure property page)
|
||||
{
|
||||
string procnum = itemInfo.MyProcedure.DisplayNumber; // get the cooked (resolved) procedure number
|
||||
int idx = procnum.IndexOf('-');
|
||||
otherChildUnit = procnum.Substring(0, idx); // we need to get RO info for the Other child applicability - this gets child's number
|
||||
}
|
||||
|
||||
ROFSTLookup lookup = rofstinfo.GetROFSTLookup(docVersionInfo, otherChildUnit);
|
||||
lookup.MyDocVersionInfo = docVersionInfo;
|
||||
//DateTime dts = DateTime.Now;
|
||||
if (itemInfo.MyContent.ContentGridCount > 0)
|
||||
|
@ -331,7 +331,8 @@ namespace Volian.Controls.Library
|
||||
int EndCVidx = rntval.IndexOf(" /APL>", startCVIdx);
|
||||
string aplicValues = rntval.Substring(startCVIdx, EndCVidx + 6 - startCVIdx);
|
||||
int endDefIdx = rntval.IndexOf(",", startCVIdx);
|
||||
string defValue = rntval.Substring(startCVIdx + 16, endDefIdx - (startCVIdx + 16));
|
||||
// C2022-001 - handle if there is no child value in the RO FSt
|
||||
string defValue = rntval.Substring(startCVIdx + 16, ((endDefIdx > 0) ? endDefIdx : EndCVidx) - (startCVIdx + 16));
|
||||
rntval = rntval.Replace(aplicValues, defValue);
|
||||
}
|
||||
return rntval;
|
||||
|
Loading…
x
Reference in New Issue
Block a user