This commit is contained in:
Kathy Ruffing 2008-03-03 15:07:54 +00:00
parent 9ece5ac125
commit 95ab4cea21

View File

@ -75,6 +75,7 @@ namespace VEPROMS.CSLA.Library
private int TableID;
private string fstPath;
private HybridDictionary dicRos;
private HybridDictionary dicRosIntIDs;
public ROFST(string path)
{
@ -85,12 +86,15 @@ namespace VEPROMS.CSLA.Library
return;
}
dicRos = new HybridDictionary();
dicRosIntIDs = new HybridDictionary();
ParseIntoDictionary();
}
public void Close()
{
// remove the dictionary
dicRosIntIDs.Clear();
dicRosIntIDs = null;
dicRos.Clear();
dicRos = null;
}
@ -107,7 +111,30 @@ namespace VEPROMS.CSLA.Library
}
return null;
}
public rochild GetRoChild(string ROID)
{
// Use the ROID to get the value from the dictionary
if (dicRos.Contains(ROID))
{
rochild rochld = (rochild)dicRos[ROID];
return rochld;
}
rochild tmp = new rochild();
tmp.ID = -1;
return tmp;
}
public rochild GetRoChildFromID(int id)
{
// Use the id to get the value from the dictionary
if (dicRosIntIDs.Contains(id))
{
rochild rochld = (rochild)dicRosIntIDs[id];
return rochld;
}
rochild tmp = new rochild();
tmp.ID = -1;
return tmp;
}
public rodbi[] GetRODatabaseList()
{
return myHdr.myDbs;
@ -146,6 +173,7 @@ namespace VEPROMS.CSLA.Library
tmp.appid = tmpg.appid;
tmp.roid = TableID.ToString("X4") + tmp.ID.ToString("X8");
dicRos.Add(tmp.roid, tmp);
if (!dicRosIntIDs.Contains(tmp.ID)) dicRosIntIDs.Add(tmp.ID, tmp);
int j;
for (j = i - 1; j >= 0 && tmp.ID < myGrp.children[j].ID; j--)
{