public void refreshData() { listView_allDatalist.Items.Clear(); groupBox_mode.Text = "Unselected"; connect.Open(); SQLiteCommand command = new SQLiteCommand(QueryList.allDataSQL(), connect); SQLiteDataReader reader = command.ExecuteReader(); while (reader.Read()) { bool active = (bool)reader["active"]; string[] items = new string[] { reader["year"] + "-" + reader["month"] + "-" + reader["day"], reader["sethour"] + ":" + reader["setminute"], reader["text"].ToString(), active ? "O" : "X" }; listView_allDatalist.Items.Add(new ListViewItem(items)); } reader.Close(); connect.Close(); button_modify.Enabled = false; button_delete.Enabled = false; buttonClickDisableChanged(); }