private void AddButton_Click(object sender, EventArgs e) { /*SQLiteConnection connection = Utils.getConnection(); * String sql = "INSERT INTO Klub (Nazwa, DataZgloszenia, OsobaZglaszajaca) VALUES ('Abc','2015-02-27','Akukuku!')"; * SQLiteCommand command2 = new SQLiteCommand(sql, connection); * command2.ExecuteNonQuery();*/ AddClubForm acf = new AddClubForm(null, "", "", ""); acf.ShowDialog(); if (acf.NewAdded) { UpdateDataTable(); UpdateDataTableWithFilter(); } }
private void EditButton_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { DataGridViewRow row = this.dataGridView1.SelectedRows[0]; String id = row.Cells[0].Value.ToString(); String name = row.Cells[1].Value.ToString(); String date = row.Cells[2].Value.ToString(); String person = row.Cells[3].Value.ToString(); AddClubForm acf = new AddClubForm(id, name, date, person); acf.ShowDialog(); if (acf.NewAdded) { UpdateDataTable(); UpdateDataTableWithFilter(); } } }