问题描述
我在过滤绑定源时遇到问题。我上了订单OrderMaster
I am having problem in filtering binding source. I got class OrderMaster
公共课OrdersMaster
{
public OrdersMaster()
{}
公众  string barCode {get;组; }
公众  string prodCode {get;组; }
公众  string prodDesc {get;组; }
公众  int ordQty {get;组; }
公众  int ordId {get;组; }
public int packed {get;组; }
public string multiOrder {get;组; }
}
public class OrdersMaster
{
public OrdersMaster()
{}
public string barCode { get; set; }
public string prodCode { get; set; }
public string prodDesc { get; set; }
public int ordQty { get; set; }
public int ordId { get; set; }
public int packed { get; set; }
public string multiOrder { get; set; }
}
linq方法getOrderLines(txtPick.Text)返回OrderMaster列表,我将此方法的结果分配给绑定列表
The linq method getOrderLines(txtPick.Text) returns list of OrderMaster, I am assiging the result of this method to binding list
BindingSource oDetail;
BindingList<OrdersMaster> o;
List<OrdersMaster> oM = OrderManagementData.OrderManager.Instance.getOrderLines(txtPick.Text);
o = new BindingList<OrdersMaster>(oM);
oDetail = new BindingSource();
oDetail.DataSource = o;
推荐答案
oDetails.Filter = "prodCode LIKE '" + txtSku.Text + "'";
这篇关于Filetring bindingsource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!