private void btnAddDeposit_Click(object sender, EventArgs e)
        {
            List<QuickbooksPaytype> availableQuickbooksPayTypes = getUnconfiguredQuickbookPayTypes();
            DepositConfiguration newConfig = new DepositConfiguration();
            frmDeposit frmDeposit = new frmDeposit(availableQuickbooksPayTypes, newConfig);

            if (availableQuickbooksPayTypes.Count == 0)
            {
                MessageBox.Show("All payment types are already configured, you must remove a payment type from an existing deposit first.");
                return;
            }

            if (frmDeposit.ShowDialog() == DialogResult.OK)
            {
                _depositConfigurations.Add(newConfig);
            }
        }
        private void btnAddDeposit_Click(object sender, EventArgs e)
        {
            List <QuickbooksPaytype> availableQuickbooksPayTypes = getUnconfiguredQuickbookPayTypes();
            DepositConfiguration     newConfig = new DepositConfiguration();
            frmDeposit frmDeposit = new frmDeposit(availableQuickbooksPayTypes, newConfig);

            if (availableQuickbooksPayTypes.Count == 0)
            {
                MessageBox.Show("All payment types are already configured, you must remove a payment type from an existing deposit first.");
                return;
            }

            if (frmDeposit.ShowDialog() == DialogResult.OK)
            {
                _depositConfigurations.Add(newConfig);
            }
        }
        private void btnEditDeposit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
            {
                return;
            }

            List <QuickbooksPaytype> availableQuickbooksPayTypes = getUnconfiguredQuickbookPayTypes();
            DepositConfiguration     originalConfig = dataGridView1.SelectedRows[0].DataBoundItem as DepositConfiguration;
            DepositConfiguration     editedConfig   = originalConfig.Clone();
            frmDeposit frmDeposit = new frmDeposit(availableQuickbooksPayTypes, editedConfig);

            frmDeposit.Text = "Edit Deposit: " + originalConfig.Memo;
            if (frmDeposit.ShowDialog() == DialogResult.OK)
            {
                _depositConfigurations[_depositConfigurations.IndexOf(originalConfig)] = editedConfig;
                _depositConfigurations.ResetItem(_depositConfigurations.IndexOf(editedConfig));
            }
        }
        private void btnEditDeposit_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count == 0)
                return;

            List<QuickbooksPaytype> availableQuickbooksPayTypes = getUnconfiguredQuickbookPayTypes();
            DepositConfiguration originalConfig = dataGridView1.SelectedRows[0].DataBoundItem as DepositConfiguration;
            DepositConfiguration editedConfig = originalConfig.Clone();
            frmDeposit frmDeposit = new frmDeposit(availableQuickbooksPayTypes, editedConfig);
            frmDeposit.Text = "Edit Deposit: " + originalConfig.Memo;
            if (frmDeposit.ShowDialog() == DialogResult.OK)
            {
                _depositConfigurations[_depositConfigurations.IndexOf(originalConfig)] = editedConfig;
                _depositConfigurations.ResetItem(_depositConfigurations.IndexOf(editedConfig));
            }
        }