我有两个类,即
我的问题是当我使用懒加载模式来加载订单时,我的详细
用户界面(UI)。
CustomerOrder
和Customer
类,其中Customer
类引用了一个订单集合。我使用主从BindingSource
来绑定数据。我的问题是当我使用懒加载模式来加载订单时,我的详细
BindingSource
没有更新。用户界面(UI)。
BindingSource1.datasource = GetCustomers();
BindingSource2.DataMember = "Orders";
BindingSource2.datasource = BindingsSource1;
在我的datagridView1
点击事件中:
if (customer.orders != null)
{
customer.Orders = LoadOrders();
}
我很感激你能帮我处理这个问题。