private void btnDeleteAcc_Click(object sender, EventArgs e) { FinancialAccount selectedAccount = (FinancialAccount)CboAccounts.SelectedItem; FinancialAccountDB.Delete(selectedAccount); CboAccounts.Update(); frmFinAccManager_Load(sender, e); }
private void btnSave_Click(object sender, EventArgs e) { FinancialAccount temp = new FinancialAccount(); temp.AccountName = txt_AccName.Text; temp.AccountDescription = txt_AccDescription.Text; FinancialAccountDB.Add(temp); frmFinAccManager_Load(sender, e); }
private void PopulateCboAccounts() { List <FinancialAccount> allAcc = FinancialAccountDB.GetAllFinancialAccounts(); CboAccounts.Items.Clear(); foreach (FinancialAccount a in allAcc) { CboAccounts.Items.Add(a); } // lst_ExistingAccounts.DataSource = allAcc; }