Paip. Improve development efficiency-use Pinyin

Source: Internet
Author: User

Paip. Improve development efficiency-use Pinyin


Recently, many projects have been developed using pinyin, greatly improving the efficiency ..

1. User Interface
In terms of user interface, there are many TEXTBOX. I used TO use the default name without changing it. In this way, when BIND FORM TO OBJ, you need TO set the corresponding string of its ID and OBJ attribute .. And

Poor readability ..

Now all TEXTBOX names use Pinyin
: For example, textBoxKaiDanRen, it is easy to bind to OBJ without setting the corresponding string. The property name of OBJ is exactly

The textBox on the front of KaiDanRen... can indicate the control type, so that different methods can be called when the value is set ..
And the readability is also greatly enhanced. At first glance, you will know that it is a "single user "...


You can use the code generator to generate TEXTBOX without manual generation .. As long as the form field is input, the corresponding LABEL and TEXTBOX can be generated .. For example

Name, pick-up ticket number, warehouse picking category, pick-up customer, delivery time, pick-up vehicle number, delivery remarks, opening person, billing time, reviewer, review time, update times, Updater, update Time "...


2. GRIDVIEW on the user interface


The header of the GRIDVIEW can be generated by a string, and its DataPropertyName can be used in pinyin of the corresponding header. When the DATATABLE or LIST is bound, its internal attributes can also be pinyin.

.. It's easy to BIND ..

Foreach (maid in dgvpro. Columns)
{
Item. DataPropertyName = MOLE. meadsi. Hz2Py. Convert (item. HeaderText); // Convert it to pinyin.
}


3. BIND FORM TO OBJECT
When saving data, you need to bind the FROM field to OBJ .. The Control ID exactly corresponds to the OBJ attribute in the pinyin format and is easy to bind.
Public void BindFormToObject (String s, Object obj, Control winform)

4. generate an OBJECT

Generate entities and use code generators ..

You need to use the code generator to generate a creat SQL statement based on its field list string, and then execute the SQL statement to generate a table. The table Fields use the corresponding pinyin format .. Then use the generator to generate www.2cto.com Based on the table.

Object...


5. In this way, the FORM field, the object attribute, the table field, and the Chinese meaning of the field can be matched one by one, so that automatic binding can be easily realized... Oh ..

Author: attilax

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.