private void Delete() { if (selectedManga != null) { DataBase.SqlConnection.Open(); SqlCommand cmd = new SqlCommand(); cmd.CommandText = $"delete from Manga where Manga_id =" + selectedManga.ID; cmd.Connection = DataBase.SqlConnection; cmd.ExecuteNonQuery(); Manga.Remove(selectedManga); } else { MessageBox.Show("Выберите мангу"); } }