ASP. NET Aries 4.0 open-source release: optimized and rewritten basic functions, asp. netaries
Major updates:
1: added the AR. Global. GetUser () method to return the user information of the current login.
2: rewrite AR. Combobox to support the drop-down tree.
3: Adjust and extend the configuration parameters in the Input drop-down list.
4: optimize and add methods related to AR. Combobox.
5: rewrite the configuration and algorithm of the level header.
6. Extend the parameters of the drop-down data.
7. Rewrite the Excel import module.
8: rewrite the Excel file to export data.
9: some parameters are simplified and their names are adjusted.
Notes for upgrading from an earlier version:
1: Config_Excel table field change: add (WhereType, AcceptType) two fields, remove (IsUniqueOr) field.
Update method: Delete the table (run the script again)
2: The Config-related html name has been changed.
Upgrade Method: Modify the path to which the menu points.
3: added configuration items (unique or (corresponding to WhereType) and import method (corresponding to AcceptType) in Config_KeyValue (configuration and maintenance table )).
Upgrade Method: there are not many data, manually add the data, or find the script for execution.
4: modify the configuration header of the Config_Grid system:
Upgrade Method: re-run the data script or ignore the system configuration (manually adjust the configuration in the configuration header as needed ).
Open Source Address:
GitHub: https://github.com/cyq1162/Aries
Demo: http://aries.cyqdata.com/login.html
Detailed introduction to the upgrade function: 1: get information about the current Login User
To obtain user information in the background, you can use the static class: UserAuth or get;
The front-end obtains User information, except that the Cookie User obtains the User name. There is no other way, so an additional method is provided: AR. Global. GetUser (callback );
The following describes how to use it:
The first call (index.html already called) needs to pass the callback function:
<script> AR.Global.GetUser(function (data) { $("#lbUserName").html('【' + data.fullname + '】'); }); </script>
For subsequent calls, you do not need to re-call (directly return to index.html to get the data ):
Var user = AR. Global. GetUser ();
The following describes the thinking process:
I have been thinking about how to provide a simple call method on the front end, while maximizing both performance and real-time performance.
I thought about sending requests to cookies, backend caches, or front-end requests. Finally, all the requests were rejected by the spirit. I was satisfied with the implementation only when the above solution was developed.
2: AR. Combobox and Input configuration: 1: Input configuration: (Unified Combobox and Combotree configuration)
Tree drop-down, only one more tree attribute is required. The effect is as follows:
2: AR. Combobox. setParas method:
To add filtering conditions for the drop-down data:
In html, you can:
AR. Combobox. setParas ({C_SYS_Deparment: "parameter value "});
Parameters are taken to the background and replaced with conditions.
3: The defaultWhere parameter is modified:
If you use the dg. addWhere method to add the default parameter, It is not affected. If you use:
Dg. options. defaultWhere = [{paramName: "abc", paramPattern: "=", paramValue: 1}], the simplified parameter is:
Dg. options. defaultWhere = [{name: "abc", pattern: "=", value: 1}]
4: Simplified hierarchical header configuration:
For the following complex headers, you only need to specify the header to span several columns:
Related table header configuration [hierarchical table header fields starting with mg _] (the old version configuration is complicated and will not be described ):
Configuration method: Add a field (starting with mg _) and set the sequence number and cross-column number.
5: Export: with multi-level header:
6: Import: Template and import error verification function
1: The downloaded template carries validation data:
Sheet2 archive drop-down data:
3: Excel import error prompt:
Return the error message on the downloaded Excel list: (the error field and error message will be highlighted in red)
Summary:
Recently, almost all the time has been spent on the optimization and rewriting of the Aries framework;
After countless times of staying up late, all the frontend and backend functions of the Aries framework have been fully implemented;
The framework has been fully implemented in terms of performance, security, usability, and scalability, and has never been reached before;
Finally, it's time to sleep at night ~~~~
The following is a buzzword: