Example of agileeas. NET platform development-pharmacy system-prepare development environment (II)

Source: Internet
Author: User
Introduction

In the previous article, we talked about how to set up a business logic layer and some details and processes that should be paid attention to in the UI Layer. This article will introduce the specific applications in the UI Layer.ProgramProcess andCodeFor your reference,

Of course, it may be because of my poor horizontal mailbox or expressive ability. If you have any questions or are not particularly clear, please also point out. This article provides the following improvements:

1. display data in the list of drug dictionaries in the previous article, and edit, add, and delete functions.

2. To test the module's functional correctness, we need to build a test environment for the module.

Next we will discuss and explain the two topics separately.

Outline

1. Improve the query, add, edit, and delete functions of the list in the drug dictionary.

2. Build a module test environment and use the resource management platform to manage the functions of each module.

Drug dictionary Function

In the previous article, we just marked the list and features of the module clearly. Below we will improve some functions of the module, such as the development of functions such as adding, editing, and deleting. Next we will first consider the need in the drug dictionary

Which information is contained.

Let's take a look at the database design documentation:

Through the above documents, we know that the drug type may need to be maintained by enumeration or database tables. Our design scheme here is to maintain the drug type separately. Let's look at the database table design of the drug type:

In this way, we have maintained the basic data of the drug dictionary and drug type, so I will not talk about it. For detailed design, refer"Database Design Document".

1. initialize basic information such as "drug type" and report in the related list:

2. When the selection of the drug type changes:

3. Let's take a look at the specific definition of the loaddrugdict query method:

4. Define the method for binding the datagridview:

5. the preceding section describes the approximate logic method and initialization information of a query method. Let's take a look at other functions, for example, when we enter the "keyword" in the text box and press "enter ",

Query:

6. add, edit, and delete events:

7. Specific event definitions of buttons:

8. Specific Code implementation:

A. Delete:

B. Edit:

C. Add:

9. Let's take a look at the definition and implementation of the "drugdicteditor" format used for editing and deletion:

Based on the definition of the database design document of the "drug Dictionary" described above, we will draw out the following design interface:

Specific Code implementation.

Onload event:

Edit the "drug Dictionary" to initialize the information:

Initialization and editing information:

Save the Edit information or save the Save event of the new information:

In this way, we have completed the relevant editing work. Now that we have completed the basic function editing of the two modules, we will complete the setup of the test environment of the modules, because we can easily

Multiple projects or projects are built to test different UI projects.

Build a test environment

Now that our module has been developed, if we cannot test and run it, it will be useless. Next, let's take a look at how to build a test environment to run the user controls we developed,

And to test the correctness of our development functions.

1. Create a winfrom application project.

Add the following reference:

The main method of modifying the application entry function in "programs" is as follows:

2. Modify the property information of a project.

3. Set the project to start the project:

4. Add the "Application configuration file" to create a configuration file:

5. Copy the following code to the configuration file:

6. Let's analyze the functions and functions of each configuration section:

With these configurations, we only need "F5" to see the running effect of the resource manager.

This indicates that the configuration is successful and no other problems occur. If the connection fails after we enter the password, the possible cause is "Incorrect database link string configuration ".

Enter the password:

Click "OK:

Click the drug dictionary:

We have already written the relevant query method correctly here, So we click here to retrieve the drug dictionary information starting with the Chinese character "C:

Of course, we need to adjust the detailed content, for example, the display format conversion between types and text descriptions.

Summary

This article describes how to develop a simple function module and sample code for related functions. You should find that the function code is the same as the function code developed at ordinary times, there is no difference, because the platform has

There are many restrictions and so on, and the platform provides the relevant test environment, as long as the components that meet the plug-in contract can be loaded by the Resource Management Platform for module testing. For specific use, please feel it in the Process of use!

 

Pharmacy system source code

 

 

More communication

 

Official blog: http://www.smarteas.net/

Http://www.agilelab.cn/

If you have any questions about using the agileeas. NET development platform, use the following contact methods or communication methods.

1. Telephone-Email:

He gozhou: hegezhou_hot@163.com mobile phone: 18691480181 blog: http://www.cnblogs.com/hegezhou_hot/

2. QQ chat group:

308961614 Network Name: h.o. t

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.