コード例 #1
0
        public void AddDataTransactionComboBox()
        {
            DataTable dt = AccountControl.TransactionSelectedDataControl(paidBy);

            TransactionTypeComboBox.ValueMember   = dt.Columns[0].ColumnName;
            TransactionTypeComboBox.DisplayMember = dt.Columns[1].ColumnName;
            TransactionTypeComboBox.DataSource    = dt;
        }
コード例 #2
0
        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;
        }