【问题标题】:Combo Box Task Data Binding Mode : using previous combo box to set the where condition组合框任务数据绑定模式:使用前一个组合框设置 where 条件
【发布时间】:2011-06-21 03:09:57
【问题描述】:

我有 2 个组合框。第一个是区域,第二个是客户。

我希望第二个 ComboBox 仅显示来自所选区域的客户。

所以第二个ComboBox 应该只有这个:

从客户 WHERE customer_region = selected_region 中选择 Customer_Name

如何使用 GUI winform,ComboBox 任务执行此操作?我可以只修改select 语句吗?如何做到这一点?

【问题讨论】:

    标签: c# combobox bind


    【解决方案1】:

    您需要获取所选区域并在 SQL 查询中将其用作参数。这将为您提供与所选区域相对应的客户名称。然后,您只需将结果添加到 Customer ComboBox。以下链接应该为您提供一个很好的起点。

    http://social.msdn.microsoft.com/Forums/en-IE/csharplanguage/thread/f3539705-a1d0-4201-a8fe-32e5b0f82e93

    【讨论】:

      猜你喜欢
      • 2016-08-23
      • 1970-01-01
      • 1970-01-01
      • 2016-05-02
      • 2012-01-24
      • 1970-01-01
      • 2013-03-18
      • 1970-01-01
      • 2017-11-16
      相关资源
      最近更新 更多