private void Edit(object sender, EventArgs e)
        {
            var editLoan = new EditLoanForm(_loan);

            editLoan.ShowDialog();
            UpdateForm();
        }
Example #2
0
        private void Edit(object sender, EventArgs e)
        {
            if (LoansListBox.SelectedItem == null)
            {
                MessageBox.Show(@"You must select the loan you want to edit", @"No loan selected", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            var editLoan = new EditLoanForm((Loan)LoansListBox.SelectedItem);

            editLoan.ShowDialog();
            Search(sender, e);
            UpdateList();
        }