public void Execute(ComboBox comboBox, EntityBaseCollection dataSource, EntityPersistence entityTarget, string propertyName) { comboBox.DataSource = dataSource; comboBox.DisplayMember = "Value"; comboBox.ValueMember = "Key"; object value = EntityReflection.Instance.GetValueProperty(entityTarget, propertyName); if (value != null && !string.IsNullOrEmpty(value.ToString())) { comboBox.SelectedValue = value; } Execute(comboBox, "SelectedValue", entityTarget, propertyName); }
public void Execute(ComboBox comboBox, EntityBaseCollection dataSource) { Execute(comboBox, dataSource, null, null); }