Step by step, we will teach you how to use the agileeas. net base class library for application development-winform application-implementation of complex services (import of commodities)-case-based operation video

Source: Internet
Author: User
Tags dotnet
Series Review

Winform I used twoArticleThe example demonstrates a typical simple Application Scenario Based on agileeas. Net to add, delete, modify, query, and print a simple application. This is a typical application scenario of the MIS system.

In the previous article, we will teach you how to use agileeas step by step. net base class library for application development-winform application-applying the datauimapper component in the UI completes the transformation of the commodity Dictionary Editing interface, from the original display and write backCodeChange to the UI ing mode of the dataobject <=> UI control of the datauimapper component.

In combination with the previous two articles, the first module "Product Dictionary" in the example can be said to have come to an end, we will start the development of the second model "goods warehouse receiving.

Content

The "goods warehouse receiving" module is a typical business processing module. During the product warehouse receiving process, we require that "one warehouse receiving ticket can contain 1-N warehouse receiving records, there may not be two product records of the same variety in the same warehouse receiving ticket. "In this module, we will focus on the fare printing, transaction processing, business layer encoding, cache query, and other technologies of the warehouse receiving service.

Next I will show you what we want to achieve in the form of a video (capture the running results of the case) [the first time we get this stuff, the effect is relatively poor, you can understand ]:

ID column and receipt document number of the table

In this simple application case, a total of three tables are defined, the product dictionary dB. product, product inventory table DBO. pstore, product warehouse receiving record table DBO. pin, which defines a business-independent column ID in the three tables. The primary key of the product table is the product code [Code], the primary key of the product warehouse receiving table is the document number + product code [billcode + code], and the inventory table is the product code + price [code + price]. For the value of the ID field in all tables, see DOTNET Enterprise Architecture Application practices-Database Table Record uniqueness design and primary key setting principles. The warehouse receiving ticket number is set by date (yyyymmdd) + six-digit maximum serial numbers. All the records with the largest current value are stored in a separate table, agileeas.. NET platform is stored in the table EAS. identityvalues is stored in the DBO table in this example. identityvalues, value and update process by DBO. getidentityvalue/DBO. getidentityvalue is complete, inProgramUse the following method to read the maximum size:

1 ///   <Summary>
2 /// Obtain the record number.
3 ///   </Summary>
4 ///   <Returns> </returns>
5 Public   Int Getmaxnewidn ()
6 {
7 Parametercollection PC =   New Parametercollection ();
8 PC. Add ( " Itemkey " , This . Dbtablename );
9 Return ( Int ) This . Dataaccessor. Query ( " Exec DBO. getidentityvalue @ itemkey =? " , PC );
10 }
11
12 ///   <Summary>
13 /// Obtain the document number.
14 ///   </Summary>
15 ///   <Returns> </returns>
16 Public   String Getmaxbillcode ()
17 {
18 Parametercollection PC =   New Parametercollection ();
19 PC. Add ( " Itemkey " , " Productinbillcode " );
20 Int Code = ( Int ) This . Dataaccessor. Query ( " Exec DBO. getidentityvalue @ itemkey =? " , PC );
21 Return Datetime. Now. tostring ( " Yyyymmdd " ) + Code. tostring ( " D6 " );
22 }

Note: The product. UI project in this case adds a "unique key value update SQL statement. SQL" that contains the above SQL steps required in this case. Please update the SQL to the database on your own.

Goods warehouse receiving

To import products to the database, we need. two new forms productinform and selectdictform are added to the UI project. productinform is the business operation interface for product warehouse receiving, and selectdictform is the additional interface for product information retrieval from the product dictionary, let's take a look at the two interfaces, productinform:

 

Productinform is the main interface of the product warehouse receiving module. The operator enters the product code in the product editing input box, for example, penicillin (QMS), and then press the Enter key to open the selectdictform form:

 

Selectdictform searches the database based on the product pinyin code entered by the operator and lists all matching dictionary records for the operator to choose from, select a record, press ENTER or space key, or click Select to jump back to productinform. In the operation, enter the product price and quantity, and press Enter, the system saves the input result in the listview control at the bottom of the interface. You can enter multiple product warehouse receiving records for a single document, or you can select the warehouse receiving list record to delete the warehouse receiving record by using the delete key, finally, you can use the import button to complete the import operation.

About Business Processing

For the product warehouse receiving processing in this example, I propose to process the input of an independent business object in the project product. BL defines the productinbl business layer object. For more information about the code, see DOTNET Enterprise Architecture Application practices-business hierarchy in instance architecture design-extract independent business layers.

About code/download

This article is here today. I will not post the detailed code in the "product warehouse receiving" business module here, too many. You can see it after downloading the complete code, in the following article, I will introduce the application of cache query.

For the structure of the data table involved in this example, refer to based on agileeas. NET platform basic library for application development-General description and data definition, for data object model definition files, documents, DDL scripts download: Workshop.

Finally, I would like to declare that "barkball" is not welcome "! I don't want to talk about anything. Don't join in.

Link

Step by step teach you how to use the agileeas. net base class library for application development-series directory

Agileeas. NET platform development guide-series Directories

Introduction to agileeas. NET application development platform-Index

Agileeas. NET platform application development tutorial-case plan

Official website of agileeas. net

Agile Software Engineering Lab

QQ: 116773358

 

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.