From ec25f6426ac0c20b6a8a23c515a37daf067f7961 Mon Sep 17 00:00:00 2001 From: mschill Date: Tue, 15 Jul 2025 13:43:19 -0400 Subject: [PATCH] C2025-024 Electronic Procedures Phase 2 - XML Export Export code cleanup and initial set RO Location code --- PROMS/VEPROMS User Interface/dlgExportImport.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index a644d255..d12a6d2c 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -1829,15 +1829,17 @@ namespace VEPROMS //use overridden method to set the location for ROs protected void SetROLocation(ref XmlElement xindivid, string roid, int rodbid) { - ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); - - using (RODbInfo myRODB = RODbInfoList.Get().FirstOrDefault(x => x.RODbID == rodbid)) + if (MyDocVersion != null) { - roid = ROFSTLookup.FormatRoidKey(roid, true); - ROFSTLookup.rochild roc = lookup.GetRoChild(roid); - SetROLocation(ref xindivid, roc, myRODB, roc.type != 8); - } + ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion); + using (RODbInfo myRODB = RODbInfoList.Get().FirstOrDefault(x => x.RODbID == rodbid)) + { + roid = ROFSTLookup.FormatRoidKey(roid, true); + ROFSTLookup.rochild roc = lookup.GetRoChild(roid); + SetROLocation(ref xindivid, roc, myRODB, roc.type != 8); + } + } } private void ExportItemAudits(XmlElement xn, ItemInfo ii)