public void DeleteCommander(EDCommander cmdr) { using (SQLiteConnectionUser conn = new SQLiteConnectionUser()) { using (DbCommand cmd = conn.CreateCommand("UPDATE Commanders SET Deleted = 1 WHERE Id = @Id")) { cmd.AddParameterWithValue("@Id", cmdr.Nr); cmd.ExecuteNonQuery(); } } LoadCommanders(); // refresh in-memory copy }
public void DeleteCommander(EDCommander cmdr) { SQLiteDBClass.PutSettingBool("EDCommanderDeleted" + cmdr.Nr.ToString(), true); LoadCommanders(); }
private void comboBoxCommanders_SelectedIndexChanged(object sender, EventArgs e) { selectedCommander = (EDCommander)comboBoxCommanders.SelectedItem; }