Example #1
0
        private void EditCustomer(object p)
        {
            CustomerModel customer     = (CustomerModel)p;
            CustomerEdit  customerEdit = new CustomerEdit(customer.GetShallowCopy());

            if ((customerEdit.ShowDialog() ?? true) && customerEdit.DialogResult.Value == true)
            {
                CustomerModel changedCustomer = ((CustomerEditViewModel)customerEdit.DataContext).Customer;
                var           cust            = Customers.Where(c => c.IdCustomer == customer.IdCustomer);
                foreach (CustomerModel customerModel in cust)
                {
                    customerModel.Reload(dbAccess);
                }
            }
        }