-
Notifications
You must be signed in to change notification settings - Fork 1
/
AFCRecordManager.cs
61 lines (51 loc) · 1.35 KB
/
AFCRecordManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
using System;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.Generic;
namespace AFCoreEx
{
public class AFCRecordManager : AFIRecordManager
{
public AFCRecordManager(AFIDENTID ident)
{
mSelf = ident;
mhtRecord = new Dictionary<string, AFIRecord>();
}
public override void RegisterCallback(string strRecordName, AFIRecord.RecordEventHandler handler)
{
if (mhtRecord.ContainsKey(strRecordName))
{
AFIRecord record = (AFIRecord)mhtRecord[strRecordName];
record.RegisterCallback(handler);
}
}
public override AFIRecord AddRecord(string strRecordName, int nRow, AFIDataList varData)
{
AFIRecord record = new AFCRecord(mSelf, strRecordName, nRow, varData);
mhtRecord.Add(strRecordName, record);
return record;
}
public override AFIRecord GetRecord(string strPropertyName)
{
AFIRecord record = null;
if (mhtRecord.ContainsKey(strPropertyName))
{
record = (AFIRecord)mhtRecord[strPropertyName];
}
return record;
}
public override AFIDataList GetRecordList()
{
AFIDataList varData = new AFCDataList();
foreach (KeyValuePair<string, AFIRecord> de in mhtRecord)
{
varData.AddString(de.Key);
}
return varData;
}
AFIDENTID mSelf;
//Hashtable mhtRecord;
Dictionary<string, AFIRecord> mhtRecord;
}
}