ASP. NET Aries development tutorial 9: business form development, asp. netaries

Source: Internet
Author: User

ASP. NET Aries development tutorial 9: business form development, asp. netaries
Preface:

After so many articles on the list, I finally came to the form development that everyone was looking forward.

This is the last article in this series!

1: permission settings and inheritance for form pages

For form pages, there are two types of permission settings:

1: You can select Add menu (set to not show) and Configure permissions.

2: permissions are not set and inherited from the parent page.

Therefore, if you open a page that does not have the permissions set separately, the result is:

2: Demo1: New articleedit.html

Htmlis a simple adjustment from useredit.html Copy, after all, to unify the style.

Of course, you can also customize the style, so you only need to pay attention to the content of 1, 2, 3.

The content of the form is:

<Div class = "line"> <div class = "short"> <label> <em> * </em> document category: </label> <input name = "CateID" objname = "C_Demo_ArticleClass" defaultitem = "false"/> </div> <div class = "short"> <label> title: </label> <input name = "Title" missingmessage = "" class = 'easyui-validatebox'/> </div> <div class = "short"> <label> Create time: </label> <input name = "CreateTime" class = "easyui-datetimebox" style = "width: 150px; "required =" true "editable =" false "/> </div>

Then it's done. You don't need to write events.

Effect: (ignore the style issue when the button is not centered)

2: How does one load data?

By default, objName and tableName will be obtained from the parent page, and the passed id parameter will be uploaded to the backend. Call the Get method to retrieve data and load the data.

2: No need to write Event code?

By default, the framework integrates a submission event. By default, the objName and tableName will be obtained from the parent page, and the data of the search form will be submitted to the backend, And the Add or Update method is called to process the data.

3: How does the framework identify "Add" or "Update?

The method name has been specified when the form is opened.

4: How did the drop-down data come out?

Do you still remember the formatting of Daming Lake fat? It is the # configuration item or # C_XXX.

You only need to add attributes to input:

Configkey = "Config map"

Objname = "C_XX"

3: custom form Event 1: How do I append custom parameters to the self-written background method when reading and loading data?

Before loading a form event, modify the request method name to GetMyBlog.

Where is the GetMyBlog method defined?

The location of the ArticleEdit.html FileFolder nameIs Article, so define a: ArticleController

Send the processed Json result to jsonResult.

2: Modify parameters submitted by event-form:

For example, when you introduce Rich Text editors such as CKEditor or UEEditor, The automatically collected forms cannot receive them, so dynamic assignment is required.

FormData is the collected form data, which can be modified, removed, or appended.

3: Event-parameter modification during form loading:

Similarly, for Rich Text editors, the system's automatic filling value cannot be processed, and dynamic assignment is required.

4. Additional information: 1. I have already introduced how to specify a custom method name for the front-end, and how to process multiple tables in the background?

This is a problem with CYQ. Data database operations. For details, refer to the Demo tutorial link at the Github URL:

Https://github.com/cyq1162/cyqdata

You can also refer to useredit.html in the system, which is also a multi-Table processing by default.

2: For the Form Content, writing one by one seems a bit complicated. The framework provides form generation:

On the list page, configure the header, generate the form html, get the data, and then adjust it.

Now, the Getting Started tutorial has been written here, and we are not going to release 10th articles.

It is not easy to write a tutorial. You can create a Demo, run F5, and think about how to improve the Code and usage.

So we just submitted the source code update.

Summary:

My friends who have studied it carefully have found that there are a lot of interesting areas in front-end and back-end.

As far as possible, the framework is designed to ensure that there is no intrusion and full coverage means upgrading.

In terms of extension, the Framework provides a variety of methods, and the methods are unified.

All you need can be processed through event extension without modifying any source code of the framework.

Thank you for your attention and support. This series ends now!

Related Article

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.