VII. Dictionary data configuration management based on the basic functions of the performaniseframework

Source: Internet
Author: User

The "general dictionary data Configuration Management" in the framework mainly solves the problem that all industry software provides customers with the first step of basic data maintenance, and a system dictionary is indispensable, the wider the scope of the business involved, the more dictionaries. If every Dictionary data has an interface for data maintenance, the development workload will be relatively large, therefore, we must consider designing a general module to manage the dictionary data;

1) list of general dictionary management functions

Module name

Function Name

Function Description

System Dictionary data

Basic Data configuration

Dictionary category Directory, which can be added, modified, or deleted
Dictionary management,
1) Select a database table to add a dictionary.
2) generate interface control elements based on database table fields
3) add, delete, modify, and query database tables

Data permission settings

Dictionary for system role configuration and operation

Basic Data Management

Display operational dictionaries based on user login roles
Dictionary maintenance, addition, deletion, modification, and query operations

 

2) display of the general dictionary management interface, including winform and Web

 

 

 

3) general dictionary management core business flow chart and database table Relationship Diagram

 

 

4) Key Technology Implementation of General dictionary management

1. Data Storage in dictionaries

// Save the public object saveresultdatatable (INT titleid, string idname, object idvalue, Dictionary <string, Object> fieldandvalue) {If (idvalue. equals (system. dbnull. value) = true) // insert data {string fields = ""; string values = ""; string strsql = "insert into {0} ({1 }) values ({2}) "; foreach (keyvaluepair <string, Object> Val in fieldandvalue) {fields ++ = (fields = ""? "": ",") + Val. Key; values + = (values = ""? "": ",") + Convertdbvalue (Val. value);} basegeneraltitle Title = newobject <basegeneraltitle> (). getModel (titleid) as basegeneraltitle; idvalue = oledb. insertrecord (string. format (strsql, title. tablename, fields, values);} else // update data {string field_values = ""; string strsql = "Update {0} set {1} Where {2 }"; foreach (keyvaluepair <string, Object> Val in fieldandvalue) {field_values + = (field_value S = ""? "": ",") + Val. key + "=" + convertdbvalue (Val. value);} basegeneraltitle Title = newobject <basegeneraltitle> (). getModel (titleid) as basegeneraltitle; oledb. docommand (string. format (strsql, title. tablename, field_values, idname + "=" + convertdbvalue (idvalue);} return idvalue ;}
View code

2. Dynamic gird control column of jqueryeasyui for Web

<Div id = "resulttool" class = "toolbar"> <a href = "#" class = "easyui-linkbutton" plain = "true" iconcls = "icon-search" onclick = "btnresult_search (); "> query </a> <a href =" # "class =" easyui-linkbutton "plain =" true "iconcls =" icon-Add "onclick =" btnresult_adddata (); "> added </a> <a href =" # "class =" easyui-linkbutton "plain =" true "iconcls =" icon-edit "onclick =" btnresult_editdata (); "> edit </a> <a href =" # "class =" easyui-linkbutton "plain =" true "iconcls =" icon-cancel "onclick =" btnresult_deldata (); "> Delete </a> </div> <Table id =" resultgird "class =" easyui-DataGrid "Fit =" true "border =" false "toolbar =" # resulttool "iconcls =" icon-edit "pagination =" true "idfield =" <% = session ["resulstdatakeyname"] %> "> <thead> <tr> <TH field =" ck "checkbox =" true "> </Th> <% = session [" resulstdatacolmodel "] %> </tr> </thead> </table>
View code

 

VII. Dictionary data configuration management based on the basic functions of the performaniseframework

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.