private void ToolStripMenuItem_ClickNewSubject(object sender, EventArgs e) { Alanyok_kezelese subjectForm = new Alanyok_kezelese(); subjectForm.ShowDialog(); DialogResult result = subjectForm.DialogResult; if (result == DialogResult.OK) { //manager = new SQLiteManager(); GetSubjectsInAlphabeticOrder(); listBoxSubjects.SelectedItem = subjectForm.Subject; dataGridView1.Visible = true; labelNumberOfSubjects.Text = $"alanyok: {subjects.Count()}"; } }
private void NewSubjectStateToolStripMenuItem_Click(object sender, EventArgs e) { if (listBoxSubjects.SelectedItem == null) { return; } Subject selected = (Subject)listBoxSubjects.SelectedItem; dataGridView1.Visible = true; Alanyok_kezelese subjectfrm = new Alanyok_kezelese(selected); subjectfrm.ShowDialog(); GetSubjectsInAlphabeticOrder(); listBoxSubjects.SelectedItem = subjectfrm.Subject; labelNumberOfSubjects.Text = $"alanyok: {subjects.Count()}"; }