private void SaveButton_Click(object sender, EventArgs e) { var list = QuestInfoListBox.SelectedItems.Cast <QuestInfo>().ToList(); if (list.Count == 0) { MessageBox.Show("Not selected any Quest"); return; } for (int i = 0; i < list.Count; i++) { QuestInfo.SaveQuestDB(list[i]); } MessageBox.Show("Saved Questc(s)"); }