B2023-006 Get RO values based on the ACCPageID with the child extension instead of the base (default) ACCPageID

This commit is contained in:
John Jenko 2023-01-25 21:23:33 +00:00
parent a000ece249
commit e464522163

View File

@ -1393,21 +1393,21 @@ namespace VEPROMS.CSLA.Library
MSWordToPDF.RoPrintCache = new Dictionary<string, ROFSTLookup.rochild>(); MSWordToPDF.RoPrintCache = new Dictionary<string, ROFSTLookup.rochild>();
// Check if the Rochild is in the PrintCache (use base accPageID without specific extension) // Check if the Rochild is in the PrintCache (use base accPageID without specific extension)
if (!RoPrintCache.ContainsKey(accPageBase)) if (!RoPrintCache.ContainsKey(accPageKey)) //B2023-006 pass in the actual key instead of the base key.//old code=> accPageBase))
{ {
// Lookup RoChild Info from database // Lookup RoChild Info from database
roc = lookup.GetROChildByAccPageID(accPageBase); roc = lookup.GetROChildByAccPageID(accPageKey); //B2023-006 pass in the actual key instead of the base key.//old code=> accPageBase);
// Check if RO is valid // Check if RO is valid
if (roc.ID < 0 || string.IsNullOrEmpty(roc.roid)) if (roc.ID < 0 || string.IsNullOrEmpty(roc.roid))
return ROFSTLookup.GetEmptyRoChild(); return ROFSTLookup.GetEmptyRoChild();
// If Valid Rochild, then add Rochild to Print Cache // If Valid Rochild, then add Rochild to Print Cache
RoPrintCache.Add(accPageBase, roc); RoPrintCache.Add(accPageKey, roc); //B2023-006 pass in the actual key instead of the base key.//old code=> accPageBase, roc);
} }
else // Get Base Rochild from Print Cache else // Get Base Rochild from Print Cache
{ {
roc = (ROFSTLookup.rochild)RoPrintCache[accPageBase]; roc = (ROFSTLookup.rochild)RoPrintCache[accPageKey]; //B2023-006 pass in the actual key instead of the base key.//old code=> [accPageBase];
} }
// Check if RO is a "Unit Information" value (Ex: <U-ID>, etc..) // Check if RO is a "Unit Information" value (Ex: <U-ID>, etc..)