private void bNewPayment_Click(object sender, EventArgs e)
        {
            AddPayment addPayment = new AddPayment(selectedContractId);
            var        result     = addPayment.ShowDialog();

            if (result == DialogResult.OK)
            {
                PaymentRepository  paymentRepository = new PaymentRepository();
                ContractRepository repository        = new ContractRepository();
                radGridView1.DataSource = repository.getContractsByCustomerId(customerId).ToList();
                radGridView2.DataSource = paymentRepository.getPaymentsByContractId(selectedContractId).ToList();
            }
        }
 private void bNewPayment_Click(object sender, EventArgs e)
 {
     AddPayment addPayment = new AddPayment(selectedContractId);
     var result = addPayment.ShowDialog();
     if (result == DialogResult.OK)
     {
         PaymentRepository paymentRepository = new PaymentRepository();
         ContractRepository repository = new ContractRepository();
         radGridView1.DataSource = repository.getContractsByCustomerId(customerId).ToList();
         radGridView2.DataSource = paymentRepository.getPaymentsByContractId(selectedContractId).ToList();
     }
 }