Exemplo n.º 1
0
 private void tsBtnEdit_Click(object sender, System.EventArgs e)
 {
     if (this.bsBankAccounts.get_Current() is BankAccount)
     {
         AddChangeBankAccountForm form = new AddChangeBankAccountForm(this.bsBankAccounts.get_Current() as BankAccount);
         if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             this.tsBtnSearch_Click(sender, e);
             this.bsBankAccounts.set_Position(this.bsBankAccounts.IndexOf(form.BankAccount));
         }
     }
 }
Exemplo n.º 2
0
 private void tsBtnAdd_Click(object sender, System.EventArgs e)
 {
     AddChangeBankAccountForm form = new AddChangeBankAccountForm(this.mtbAccountNumber.get_Text(), this.selectOwner.SelectedOwner, this.selectBank.SelectedBank, this.cbOwnersPrimary.get_Checked());
     if (form.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         this.bsBankAccounts.Add(form.BankAccount);
         this.bsBankAccounts.set_Position(this.bsBankAccounts.IndexOf(form.BankAccount));
     }
 }