public AdminWindow() { InitializeComponent(); Container container = Container.Instance; this.productManager = container.Get <Managers.Product>("manager.product"); this.orderManager = container.Get <Managers.Order>("manager.order"); productsDataGrid.ItemsSource = productManager.getAll(); orderDataGrid.ItemsSource = orderManager.getAll(); }
private void RemoveProduct(object sender, RoutedEventArgs e) { Models.Product model = (sender as Button).DataContext as Models.Product; this.productManager.remove(model); productsDataGrid.ItemsSource = productManager.getAll(); }