Removed GetRoChildFromID which was not working properly

Added GetROIDByAccPagID to get ROID from Accessory Page ID
This commit is contained in:
Rich 2011-01-20 20:20:10 +00:00
parent fbe94ed3a0
commit 5994bf2e4e

View File

@ -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)