have children's shoes to ask about the sorting problem of dictionary library , Here's a quick introduction to a new skill .
Data Dictionary Usage scenario: the type of leave in the absence process, sick leave, leave, take some and so on.
definitionData Dictionary, and used in the processsheetdropdownlistorsheetradiobuttonlistShow byUserto choose,
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/8F/61/wKiom1jcdiziEihdAABCIthxOMc436.png-wh_500x0-wm_ 3-wmp_4-s_830740192.png "title=" image 1.png "alt=" wkiom1jcdizieihdaabcithxomc436.png-wh_50 "/>
Data dictionary
Usesheetdropdownlist , and set the control's property masterdatacategory to "leave type", the code might look like this:
<sheetcontrols:sheetdropdownlistid= "sheetdropdownlist1 "runat=" server "datafield=" leave type "masterdatacategory=" Leave type "></sheetcontrols:sheetdropdownlist>
The effects shown in the form are as follows:
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M02/8F/61/wKiom1jcdk-R_yNqAAAkwSakA-E193.png-wh_500x0-wm_ 3-wmp_4-s_1206057136.png "title=" image 2.png "alt=" Wkiom1jcdk-r_ynqaaakwsaka-e193.png-wh_50 "/>
sheetdropdownlist Use Data Dictionary
Form Design used in the device
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M02/8F/5F/wKioL1jcdl7QWCxWAACD8SH0qG0337.png-wh_500x0-wm_ 3-wmp_4-s_3690030872.png "title=" image 3.png "alt=" Wkiol1jcdl7qwcxwaacd8sh0qg0337.png-wh_50 "/>
forsheetdropdownlist,SheetcheckboxList,sheetradiobuttonlistcontrol, you can bind directlyData Dictionarydisplay options.
data dictionary is convenient, accidentally built more, the dictionary library is a bit more trouble to use.
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/8F/61/wKiom1jcdnLyQW5VAAEZ74gMaEU365.png-wh_500x0-wm_ 3-wmp_4-s_1400342394.png "title=" image 4.png "alt=" Wkiom1jcdnlyqw5vaaez74gmaeu365.png-wh_50 "/>
Let's teach you a simple and practical sort of skill .
First find
\portal\admin\mvcdesigner\mvcdesignerservice.ashx
The following function
#region Get a data dictionary
public void Getmasterdatacategory (HttpContext context)
{
list<string> items = new list<string> ();
dictionary<string, string> table = OThinker.H3.WorkSheet.AppUtility.Engine.MetadataRepository.GetCategoryTable ();
foreach (string key in table. (S=>s.value). Select (X=>x.key))
{
Items. ADD (Table[key]);
}
Context. Response.Write (jsserializer.serialize (items));
}
#endregion
put the original table. The Keys are changed into
Table. (S=>s.value). Select (X=>x.key)
Can be arbitrarily changed to like the sort can be.
BPM instance sharing: Playing the data dictionary new skills-Dictionary library sort