J'ai un formulaire Windows (net 2.0) avec des contrôles liés à une entité (w/INotifyPropertyChanged) via un BindingSource..works.Winform BindingSources - Question
Sur la même forme que j'ai une liste déroulante qui est également câblé par un BindingSource..works
Voici un échantillon du code correspondant:
m_PlanItemLookupBindingSource.DataSource = GetBusinessLogic().RetrievePaymentPlanLookups(); // Collection of PaymentPlans
paymentPlanType.Properties.DataSource = m_PlanItemLookupBindingSource;
paymentPlanType.Properties.DisplayMember = "Name";
paymentPlanType.Properties.ValueMember = "ID";
paymentPlanType.DataBindings.Add(new Binding("EditValue", m_PlanBindingSource, "PaymentPlanID", true, DataSourceUpdateMode.OnPropertyChanged, null, "D"));
agencyComission.DataBindings.Add(new Binding("EditValue", m_PlanBindingSource, "AgencyCommission", true, DataSourceUpdateMode.OnPropertyChanged, null, "P1"));
billingType.DataBindings.Add(new Binding("Text", m_PlanBindingSource, "BillingType"));
Alors, quand je change une valeur Dans la liste déroulante, je pensais que la propriété m_PlanItemLookupBindingSource Current changerait avec la propriété PaymentPlanID de l'entité qui change.
Juste un peu confus.
Merci à l'avance, Stephen