diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs index 11505ce1..156c59c4 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ROFSTLookup.cs @@ -188,19 +188,21 @@ namespace VEPROMS.CSLA.Library tmp.ID = -1; return tmp; } - public rochild GetRoChildFromID(int id) - { - if (dicRosIntIDs == null) ParseIntoDictionary(_ROFst != null ? _ROFst.ROLookup : _ROFstInfo.ROLookup); - // Use the id to get the value from the dictionary - if (dicRosIntIDs.ContainsKey(id)) - { - rochild rochld = (rochild)dicRosIntIDs[id]; - return rochld; - } - rochild tmp = new rochild(); - tmp.ID = -1; - return tmp; - } + // The following Method is not correct. It needs to have a RO database id as well as an id. Without that, + // the first RO with a specific id will be found regardless of the RO Database id. + //public rochild GetRoChildFromID(int id) + //{ + // if (dicRosIntIDs == null) ParseIntoDictionary(_ROFst != null ? _ROFst.ROLookup : _ROFstInfo.ROLookup); + // // Use the id to get the value from the dictionary + // if (dicRosIntIDs.ContainsKey(id)) + // { + // rochild rochld = (rochild)dicRosIntIDs[id]; + // return rochld; + // } + // rochild tmp = new rochild(); + // tmp.ID = -1; + // return tmp; + //} public rodbi[] GetRODatabaseList() { return myHdr.myDbs; @@ -687,6 +689,12 @@ namespace VEPROMS.CSLA.Library if (child != null) return ((rochild)child).type; return null; } + public string GetROIDByAccPagID(string accPageID, string spDefault, string igDefault) + { + rochild? child = GetRoChildByAccPagID(accPageID, spDefault, igDefault); + if (child != null) return ((rochild)child).roid; + return null; + } public rochild? GetRoChildByAccPagID(string accPageID, string spDefault, string igDefault) { if (_dicROAPID == null)