在窗口应用程序中的SQL Server中存储产品详细信息数据 [英] To store a product details data in sql server in an window application

查看:107
本文介绍了在窗口应用程序中的SQL Server中存储产品详细信息数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,
我正在一个存储用户账单明细的项目.每个用户可以购买10个产品.在前端,我们插入产品名称,价格,数量和总成本.我们希望在网格视图中显示用户的购买详细信息.

我该如何解决呢?

Hii,
I am working on a project that store a bill details of a user. Each user can purchase 10 products . In the front end we insert product name, price , quantity and total cost. And we want to show the user''s purchase details in a grid view.

How can I solve it ?

推荐答案

通过编写代码.如果没有为您做的工作,就无法回答.您可以使用select count(*)来计算某人购买了多少商品,并将其停止在10.您可以编写数据层或使用实体框架类在数据库中存储订单和用户.您可以将此数据绑定到网格视图.您要问的所有内容都已被广泛记录在案,您应该至少可以在寻求具体帮助之前尝试一下.
By writing code. There''s no way to answer this without doing your work for you. You can use select count(*) to work out how many items someone has bought, and stop them at 10. You can write a data layer or use entity framework classes to store orders and users in your database. You can bind this data to a grid view. Everything you''re asking is widely documented and you should be able to at least attempt it before asking for specific help.


每次输入产品时,将产品详细信息插入表格中详细信息.
每次输入后,获取网格视图的行数.如果等于10,则显示相应的消息.所有输入之后,将每一行从网格视图保存到数据库.
Insert the product details to a grid each time when you enter a product details.
After each entry, get the count of grid view rows.if it is equal to 10,then show appropriate message.After all entry,save each rows to database from the grid view.


这篇关于在窗口应用程序中的SQL Server中存储产品详细信息数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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