public void AddDataTransactionComboBox() { DataTable dt = AccountControl.TransactionSelectedDataControl(paidBy); TransactionTypeComboBox.ValueMember = dt.Columns[0].ColumnName; TransactionTypeComboBox.DisplayMember = dt.Columns[1].ColumnName; TransactionTypeComboBox.DataSource = dt; }
private void EditPaidByComboBox_SelectedIndexChanged(object sender, EventArgs e) { ComboBox cmb = (ComboBox)sender; paidBy = Int32.Parse((string)cmb.SelectedValue); DataTable dt = AccountControl.TransactionSelectedDataControl(paidBy); // AddDataTransactionComboBox(); TransactionTypeComboBox.ValueMember = dt.Columns[0].ColumnName; TransactionTypeComboBox.DisplayMember = dt.Columns[1].ColumnName; TransactionTypeComboBox.DataSource = dt; }