The function of data dictionary in the system is to maintain some commonly used words and record users' idioms so that the system can automatically improve itself during use. For example: the natural person information must be recorded by a natural person's ethnic group. China has 56 ethnic groups. However, due to the distribution of different regions, there are only a few ethnic groups in a region, this avoids listing all 56 ethnic groups. If there are too many users, it is difficult to obtain useful information.
Component:IBeamMDAACommon. dll
Namespace:IBeam. MDAA. ORMObjects (Database entity)
IBeam. MDAA. Objects (Business Object)
Example:
In the clientPartySaving nationalities:
String _ Category = "national ";
If (! String. IsNullOrEmpty (party. Nationality )&&! DALDictionaries. Exists (party. OwnerID, _ Category, party. Nationality ))
{
DALDictionaries dictionaries = new DALDictionaries ();
Dictionaries. Category = _ Category;
Dictionaries. DataType = "string ";
Dictionaries. SortIndex = (int) DALDictionaries. FindCountByCategory (party. OwnerID, _ Category) + 1;
Dictionaries. Phrase = party. Nationality;
Dictionaries. OwnerID = party. OwnerID;
Dictionaries. Save ();
}
Use the data dictionary on the editing page:
DictionaryList dictionaryList = DictionaryList. GetDictionaryList ("ethnic ");
Foreach (var item in dictionaryList)
{
If (! CmbNationality. Items. Contains (item. Phrase ))
{
CmbNationality. Items. Add (item. Phrase );
}
}