将Gridview中的数据保存到数据库中 [英] Save the Data in Gridview into Database

查看:159
本文介绍了将Gridview中的数据保存到数据库中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在使用C#开发销售库存计划.我在将整个客户订单保存到数据库中的交易表时遇到问题.

状况:
我从产品列表中单击更多产品,并且我单击的所有产品都显示在其他datagridview中,其中描述了该次交易中整个订单的情况.

我现在的问题是如何将整个订单保存到数据库中的交易表中.

我在此应用程序中使用了MySQL数据库.你能帮我吗?

谢谢,
Nico

Hello everyone,
I am developing Sales Inventory Program using C#. I got problem to save the entire order of customer into transaction table in my database.

Situation:
I click more product from product list and all of the product I click was displayed in other datagridview in which it describe for my whole order in that certain transaction.

My problem now is how can I save the entire order into transaction table in my database.

I used MySQL Database in this application. Can you help me?

Thanks,
Nico

推荐答案

您不知道.使用OrderId作为主键的订单(而不是订单明细)进入表中.订单明细(订单的行项目)使用OrderId作为外键进入另一个表.

抱歉,我真的无法提供进一步的帮助,但是您没有完全提供有关数据库设置或需求的详细信息.当您说销售清单"时,我什至不知道您在说什么.这两个词并没有真正融合在一起.
You don''t. An order (not the order details) goes in a table using an OrderId as a primary key. Order details (line items of the order) go in another table using the OrderId as the foreign key.

Sorry I can''t really help any further, but you haven''t exactly given very much detail about the setup of your database, nor your requirements. I don''t even know what you''re talking about when you say "Sales Inventory". Those two terms don''t really go together.


这篇关于将Gridview中的数据保存到数据库中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆