11.11 what is the definition of data dictionary in the system and how to use it?

Source: Internet
Author: User

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

}

}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.