如何匹配不同数组中的两个值? [英] How can i match two values in different arrays?

查看:95
本文介绍了如何匹配不同数组中的两个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我正在尝试为我的项目开发一个简单的订单处理系统.我在比较两个数组列表时遇到问题,例如;品牌,物品.我有一个品牌列表框和另一个项目框.假设用户选择了品牌:Apple,lenovo,Dell和项目:Macbook,Pc,Laptop等,那么价格应以表格或新表格的形式显示在标签或文本框中.
希望很快能收到答复.
谢谢

Hello,
I was trying to develop a simple order processing system for my project. I''m having problems in comparing two list of arrays eg; brands, items. I''ve got one listbox of brands and another of items. Suppose a user selects Brands: Apple, lenovo, Dell and items : Macbook, Pc, Laptop etc. then the price should be displayed in a label or textbox in the form or new form.
Hope to see a reply quickly.
thanks

推荐答案

我们不是在这里为您做功课,所以您不会为您编写任何代码.

我们还会通过在这里浪费自己的时间来回答问题,而不是根据您的要求.

您的设计中存在一些非常严重的缺陷.您将所有数据存储在列表框中,这对您没有任何帮助.将信息存储在结构中的单个项目(例如制造商,产品名称,价格")中,然后可以将每个结构项目存储在可查询的列表中.

然后,可以使用列表中的数据填充列表框.一旦用户在列表框中选择了项目,您就可以返回到列表项目并添加所选项目的价格.
We''re not here to do your homework for you, so you''re not going to get any code written for you.

We also answer questions by volumnteering our own time here, not on your demands.

You''ve got some very serious flaws in your design. You''re storing all of your data in listboxes, which does nothing for you. Storing your information for a single item in a structure, like "Manufacturer, ProductName, Price", then you can store each structure item in a queryable list.

You can then populate the listboxs with the data in the list. Once the user selects items in the listboxs you can then go back to the list items and add up the prices of what has been selected.


这篇关于如何匹配不同数组中的两个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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