private void LoadComboBoxes() { try { stateList = StateDB.GetStateList(); stateComboBox.DataSource = stateList; List <Terms> termslist; termslist = TermsDB.GetTermsList(); termsIDComboBox.DataSource = termslist; List <GLAccount> accountList; accountList = GLAccountDB.GetGLAccountList(); accountNoComboBox.DataSource = accountList; } catch (Exception ex) { MessageBox.Show(ex.Message, ex.GetType().ToString()); } }
private void frmAddInvoice_Load(object sender, EventArgs e) { txtVendor.Text = vendor.Name; invoiceNoTextBox.Text = ""; invoiceDateDateTimePicker.Value = DateTime.Today; termsList = TermsDB.GetTermsList(); termsIDComboBox.DataSource = termsList; termsIDComboBox.SelectedValue = vendor.DefaultTermsID; List <GLAccount> accountList = GLAccountDB.GetGLAccountList(); accountNoComboBox.DataSource = accountList; accountNoComboBox.SelectedValue = vendor.DefaultAccountNo; payable = new Payable(); lineItemDataGridView.DataSource = payable.LineItems; cm = (CurrencyManager)lineItemDataGridView.BindingContext[payable.LineItems]; invoiceNoTextBox.Focus(); }