private void btnCreate_Click(object sender, EventArgs e) { CreateAccountDialog dlg = new CreateAccountDialog(); if (dlg.ShowDialog() == DialogResult.OK) { // Add this account to the database DBAccountRow accountRow = Database.AddAccount(dlg.tbAccount.Text, dlg.tbPassword.Text); // Add it to the list AddAccount(accountRow); } }