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