This commit is contained in:
parent
9ece5ac125
commit
95ab4cea21
@ -75,6 +75,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private int TableID;
|
private int TableID;
|
||||||
private string fstPath;
|
private string fstPath;
|
||||||
private HybridDictionary dicRos;
|
private HybridDictionary dicRos;
|
||||||
|
private HybridDictionary dicRosIntIDs;
|
||||||
|
|
||||||
public ROFST(string path)
|
public ROFST(string path)
|
||||||
{
|
{
|
||||||
@ -85,12 +86,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dicRos = new HybridDictionary();
|
dicRos = new HybridDictionary();
|
||||||
|
dicRosIntIDs = new HybridDictionary();
|
||||||
ParseIntoDictionary();
|
ParseIntoDictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
// remove the dictionary
|
// remove the dictionary
|
||||||
|
dicRosIntIDs.Clear();
|
||||||
|
dicRosIntIDs = null;
|
||||||
dicRos.Clear();
|
dicRos.Clear();
|
||||||
dicRos = null;
|
dicRos = null;
|
||||||
}
|
}
|
||||||
@ -107,7 +111,30 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
return null;
|
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()
|
public rodbi[] GetRODatabaseList()
|
||||||
{
|
{
|
||||||
return myHdr.myDbs;
|
return myHdr.myDbs;
|
||||||
@ -146,6 +173,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
tmp.appid = tmpg.appid;
|
tmp.appid = tmpg.appid;
|
||||||
tmp.roid = TableID.ToString("X4") + tmp.ID.ToString("X8");
|
tmp.roid = TableID.ToString("X4") + tmp.ID.ToString("X8");
|
||||||
dicRos.Add(tmp.roid, tmp);
|
dicRos.Add(tmp.roid, tmp);
|
||||||
|
if (!dicRosIntIDs.Contains(tmp.ID)) dicRosIntIDs.Add(tmp.ID, tmp);
|
||||||
int j;
|
int j;
|
||||||
for (j = i - 1; j >= 0 && tmp.ID < myGrp.children[j].ID; j--)
|
for (j = i - 1; j >= 0 && tmp.ID < myGrp.children[j].ID; j--)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user