Exemplo n.º 1
0
 private void buttonOk_Click(object sender, EventArgs e)
 {
     try {
         Decimal value = Decimal.Parse(textBoxInitialBalance.Text);
         services.CreateBankDepositAccount(
             textBoxShortName.Text,
             textBoxName.Text,
             textBoxBankName.Text,
             textBoxBankAgencyId.Text,
             textBoxBankAccountId.Text,
             comboBoxCurrency.SelectedItem as string,
             value);
         Close();
     } catch (FormatException) {
         labelStatus.Text = "Initial Balance isn't a valid number";
     } catch (Exception ex) {
         labelStatus.Text = ex.Message;
     }
 }
Exemplo n.º 2
0
 public void CreateBankDepositAccount_FailNoShortname()
 {
     services.CreateBankDepositAccount(null, "name", "bankname", "001", "999-9", "R$", 1m);
 }