private void Button_Click_1(object sender, RoutedEventArgs e) { NGame n = new NGame(); grid.ItemsSource = null; grid.ItemsSource = n.Select(); }
private void Button_Click_Delete(object sender, RoutedEventArgs e) { Game g = new Game(); NGame n = new NGame(); g.Id = int.Parse(txtId.Text); n.Delete(g); grid.ItemsSource = n.Select(); }
private void Button_Click_Insert(object sender, RoutedEventArgs e) { Game g = new Game(); NGame n = new NGame(); g.Id = 0; g.Nome = txtNome.Text; g.Fabricante = txtFab.Text; g.DataCompra = DateTime.Parse(txtData.Text); g.Estrelas = int.Parse(txtEstrela.Text); n.Insert(g); grid.ItemsSource = n.Select(); }