Ejemplo n.º 1
0
        private void AddClient_Click(object sender, RoutedEventArgs e)
        {
            var clVM            = new ClientViewModel();
            EditWindowClient ew = new EditWindowClient(clVM);
            var result          = ew.ShowDialog();

            if (result == true)
            {
                var org = OrgBox.SelectedItem as OrgViewModel;
                clientService.AddClientToOrg(org.OrgID, clVM);
                ew.Close();
                //orgs = orgService.GetAll();
                clients  = clientService.GetAll();
                orders   = orderService.GetAll();
                payments = paymentService.GetAll();
                //OrgBox.ItemsSource = orgs;
                ClientBox.ItemsSource   = clients;
                OrderBox.ItemsSource    = orders;
                PaymentGrid.ItemsSource = payments;
            }
        }