Location>code7788 >text

Known framework for practical exercises - sales and inventory framework building

Popularity:791 ℃/2024-07-22 09:13:11

This article describes how to use Known development framework to build the project structure of the inventory management system , as well as the development of some of the pre-configuration and basic code.

  • Project code: JxcLite
  • Open source address:/known/JxcLite

1. Creating the project structure

Using the cmd command tool, go toD:\Publics\JxcLitedirectory, first install the Known Framework project template, and then use the commands to create the project structure. The two commands are as follows:

dotnet new install KnownTemplate
dotnet new known --name=JxcLite

After the successful execution of the command, the JxcLite project file is automatically generated under the folder, and the structure of the project file is as follows:

JxcLite -> Project module library.
├─ -> Project front-end page library.
├─ -> Project Backend Business Logic Class Library.
├─ -> Project WinForm App.
├─ -> Project Solution Files.

double-click to openfile, you can modify and add system project files through the VS2022 development tool.

2. Pre-development preparations

2.1 Configuration database

This project defaults to using the Known framework template provided by theSQLitedatabase, if you want to change other databases, please refer to the official documentationReplacement of the database

2.2. Configuring the system name

After opening the project with VS2022, double-click theJxcLitein the projectfile to change the system name. The code is as follows:

public static class AppConfig
{
    public static string AppName => "merchandise management system (MMS)";
}

2.3. Configuring the System Extension Button

double-clickJxcLitein the projectResources\Resource file, where the functional buttons provided by the Known framework are extended with information, for example, in addition to the Add, Delete, Change, and Check guide buttons, this project also requires the Return, Confirm, Invoicing, and Payback buttons.

Return | return | rollback | primary
Confirm | confirm | check | primary
Invoice | invoice | profile | primary
Payment | pay-back | pay-circle | primary

2.4. Configuring multilingualism

If the project requires multiple languages, double-click to openJxcLitein the projectfile in theAddJxcLiteModify the multi-language setting in the method with the following code:

public static class AppConfig
{
    public static void AddJxcLite(this IServiceCollection services)
    {
        (info =>
        {
            ...
             = true;
            ...
        });
    }
}

existJxcLitein the projectResources\Localesfolder to modify the resource file for the corresponding language, the resource file isDictionaryobject's JSON data, as shown below:

// Simplified Chinese
{
  "": "BaseData",.
  "GoodsInfo": "GoodsInfo",
}
//English
{
  """: "Basic Data",
  "GoodsInfo": "Goods Info", }
}

2.5 System constants

The system constants contain the business partner type (PartnerType) and the business document type (BillType) with the following code:

public class PartnerType
{
    public const string Supplier = "provider";
    public const string Customer = "our customers";
}

public class BillType
{
    public const string Import = "imported goods";
    public const string ImportReturn = "inbound and outbound";
    public const string Export = "sell goods";
    public const string ExportReturn = "sell back";
}

3. Installation runs

After the configuration is complete, run the program directly. The first time you run it, you need to install the program first, fill in the enterprise information and administrator password, when installing, automatically generate the framework database tables and sample data. After successful installation, directly jump to the login page, enter Admin and the administrator password set during installation to login into the system.

4. Configuration data dictionary

existBasic Data - Data Dictionarymodule adds the following data dictionary.

Category Code Category name Dictionary content
GoodsType commodity category beta (software)
Unit unit of measure Pieces, kilograms
SettleMode settlement terms (accountancy, law) Cash, WeChat, Alipay, Reconciliation

5. Configuration function menu

Below we organize the functional module data according to the requirements document in theSystem Management - Module ManagementThe data for each module is tabulated below:

Level 1 module Secondary modules coding icon (computing) Url descriptive
Basic data BaseData database
Product Information GoodsList ordered-list /bds/goods Queries and maintains product information.
Supplier Management SupplierList usergroup-delete /bds/suppliers Query and maintain vendor information.
account management CustomerList usergroup-add /bds/customers Inquire and maintain customer information.
Incoming Goods Management Import import
purchase order ImportList unordered-list /bms/ImportList Queries and maintains purchase purchase order information.
Purchase returns ImportReturn unordered-list /bms/ImportReturn Query and maintain purchase return order information.
sales management Export export
sales order ExportList unordered-list /bms/ExportList Query and maintain sales shipment order information.
Sales Returns ExportReturn unordered-list /bms/ExportReturn Query and maintain sales return order information.
Inventory management Inventory appstore
Merchandise Inventory Table GoodsInventory table /wms/GoodsInventory Queries and maintains merchandise inventory tables.
financial management Finance property-safety
Customer statements CustomerAccount unordered-list /fms/CustomerAccount Inquire and maintain customer statement information.
Vendor statements SupplierAccount unordered-list /fms/SupplierAccount Query and maintain vendor statement information.
Statistical reports Report line-chart
Breakdown of purchases ImportDetail table /rms/ImportDetail Query Incoming Goods Detail.
Incoming and outgoing shipments ImportReturnDetail table /rms/ImportReturnDetail Query the purchase and return details.
Schedule of sales ExportDetail table /rms/ExportDetail Query the sales breakdown.
Sales and Returns Schedule ExportReturnDetail table /rms/ExportReturnDetail Query the breakdown of sales and returns.
Commodity Income Statement GoodsProfit table /rms/GoodsProfit Query the merchandise income statement.