Ejemplo n.º 1
0
        private void OnCommandAddAccount()
        {
            var newCustomerAccountWrapper = new CustomerBankAccountWrapper(new BankAccount());

            newCustomerAccountWrapper.PropertyChanged += CustomerAccountWrapper_PropertyChanged;
            ListCustomerBankAccountWrapper.Add(newCustomerAccountWrapper);

            Customer.Entity.BankAccounts.Add(newCustomerAccountWrapper.Entity);

            //Trigger Validation
            newCustomerAccountWrapper.AccountNo = "";
        }
Ejemplo n.º 2
0
 private void InitializeListCustomerAccountWrapper(Customer customer)
 {
     foreach (var customerAccountWrapper in ListCustomerBankAccountWrapper)
     {
         customerAccountWrapper.PropertyChanged -= CustomerAccountWrapper_PropertyChanged;
     }
     ListCustomerBankAccountWrapper.Clear();
     foreach (var customerBankAccount in customer.BankAccounts)
     {
         var customerAccountWrapper = new CustomerBankAccountWrapper(customerBankAccount);
         ListCustomerBankAccountWrapper.Add(customerAccountWrapper);
         customerAccountWrapper.PropertyChanged += CustomerAccountWrapper_PropertyChanged;
     }
 }