コード例 #1
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            if (IsBtnConfirmEnabled())
            {
                try
                {
                    mainController.AddClientDebt(
                        new ClientDebt(clients.Find(client => client.Oib == ((Client)comboBoxClientInDebt.SelectedValue).Oib),
                                       numericUpDownAmount.Value, textBoxDescription.Text));

                    DialogResult = DialogResult.OK;
                }
                catch (IncompleteDataException)
                {
                    MessageBox.Show("Nepotpuni ili neispravni podaci", "Greška!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }