C # winform Tip 5: winform Interface Generation

Source: Internet
Author: User
I. Summary

I used to be engaged in B/S development. Now, due to the company's development needs to have a relatively large C/S project, there are a large number of pages, and most of them are traditional pages, you just want to generate interfaces in batches.

Ii. Outline

A. Summary.

B. Outline of this article.

C. Vision.

D. Generate a tool.

E. Summary.

Iii. Vision

To generate:

We know that the List page and Edit page are mainly generated.

Their Naming rules are:

FRM ***** list (list page)

FRM ***** Manager (Edit page)

The implemented functions are simple business: Add, modify, and delete functions.

This page is generated based on database table objects. Therefore, you must have a database to generate the page.

When creating a data table in the database, be sure to enter description

Otherwise, the field name is displayed by default.

The naming rules for control on the page are

Textbox: Text ******

This is also because the interface is displayed.

Iv. generation tools

This image has already been posted on my blog. I don't want to re-develop an interface and use the originalCodeThe code is written

Some are messy. The code was generated several years ago.

Add a button to generate the winfrom model on this interface. You only need to click the button to generate the following file.

V. Summary

Only the code for database operation is not added to the interface. You need to manually add them, because the database operations in no place are different, so you will be lazy. This is also a small tool for getting myself out of the bitter sea. Now it is recorded to tell myself that I have done things and paid for me, you see that I have made a lot of pages and functions, and the number of lines of code is amazing, haha.

6. Download

 

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.