如何在C#.NET表单中准备桌面应用程序 [英] How can i prepare a Desktop application in C#.NET Form

查看:65
本文介绍了如何在C#.NET表单中准备桌面应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

桌面应用程序在c#.net



我正在准备批发商店管理项目..

我遇到了问题同时以不同价格出售多件物品..



我没有得到,我应该使用哪种控件或控件格式..动态输入多个产品物品,价格和数量,并获得所有价值的总成本.......



i使用文本框控件输入最多10个值......但问题是.....



如果有15-20个用户必须输入...那么我怎样才能动态处理它们..



以及如何从数据库输入和检索这多个值......



怎么能我设计这个表格...........



i使用了lblproduct,txtproductname,txtproductprice,txtproductqty,txtprodamt ......

i使用了lblproduct,txtproductname1,txtproductprice,txtproductqty,txtprodamt ......

i使用了lblproduct,txtproductname2,txtproductprice,txtproductqty,txtprodamt ......

i使用过lblproduct,txtproductname3,txtproductprice,txtproductqty,txtprodamt ......





如何以更具体和动态的方式设计此表格.....



plz回复我完整的解决方案..........尽快

Desktop application in c#.net

I am preparing a project on wholesale shop mgmt..
I am getting a problem in selling multiple items at different price at same time..

I am not getting , which type of controls or format of controls should i use.. to dynamically enter multiple product items , prices and quantity and get total cost of all values.......

i have used textbox controls for entering upto 10 values .......but the problem is .....

if there are 15- 20 items user have to enter... so how can i dynamically handle them..

and how to enter and retrieve this multiple values from database......

how can i design this form ...........

i have used lblproduct , txtproductname, txtproductprice, txtproductqty, txtprodamt...
i have used lblproduct , txtproductname1, txtproductprice, txtproductqty, txtprodamt...
i have used lblproduct , txtproductname2, txtproductprice, txtproductqty, txtprodamt...
i have used lblproduct , txtproductname3, txtproductprice, txtproductqty, txtprodamt...


how can i design this form in more specific and dynamic way.....

plz reply me the complete solution..........as soon as possible

推荐答案

尝试这个想法....



有一个文本框文本框1和两个GridView GvItems和GVBilling。创建textbox1的KeyUp事件,检查是否是用户按下的回车键,然后运行数据库查询,获取根据textbox1中项目名称过滤的所有数据。

bind GvItems与数据集对象。你可以在你的库存表中找到所有具有不同价格和描述的同名商品。

现在在GvItems_cellClick事件中获取行的值并将其添加到第二个GridView GVBilling中。



现在计算TOTAL写代码GVBilling_rowsAdded

GVBilling特定单元格的总和值,并将其显示在另一个txtbox中.....
Try this idea....

Have a single textbox textbox 1 and two GridView GvItems and GVBilling. Create KeyUp event of textbox1 , check if it is enter key pressed by User,
then run a Database Query, Fetch all data filtered according to item name in textbox1.
bind GvItems with dataset object. you will find all items of same name with different prices and description from ur stock table.
Now on GvItems_cellClick event Fetch the values of row and add it in the second GridView GVBilling.

Now to calculate TOTAL write code GVBilling_rowsAdded
sum toal value of specific cells of GVBilling and display it in another txtbox.....


这篇关于如何在C#.NET表单中准备桌面应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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