Home > Net >  Winform is essentially to realize enterprise enters sells saves the inventory quantity problem
Winform is essentially to realize enterprise enters sells saves the inventory quantity problem

Time:09-22

My design is to add new products at the same time to the inventory list at the same time to add the goods quantity is zero, then the number of inventory changes depends on eight tables, storage table (warehouse id is a primary key column is whether checkout in it, only in the main table is check the status of the inventory quantity change, if cancel the check inventory quantity will change) schedule of put in storage (warehousing id key commodity id number) and six form incoming return table and schedule of warehousing, sales, the main table and schedule of sales, sales returns table with the same schedule of sales return, to meet every time I review of four orders pay or cancel the cashier before inventory quantity change, want to know how to write a SQL statement

CodePudding user response:

The business operations of this somewhat complicated, if you are proficient in the SQL compare, can consider to use stored procedures to implement completely, pay attention to an operation involving multiple tables to use transaction to ensure data integrity and data consistency between tables, otherwise you can consider to add and delete the simple data operation code encapsulation in c #, and then use SqlTransaction operation between the table on the c # complete inside,
SqlTransaction class document:
https://docs.microsoft.com/zh-cn/dotnet/api/system.data.sqlclient.sqltransaction? View=netframework 4.8
  •  Tags:  
  • C#
  • Related