Example #1
0
        private void DodajStudenta_Click(object sender, RoutedEventArgs e)
        {
            StudentsTable ST = new StudentsTable();
            AddStudent    DodawanieStudenta = new AddStudent();
            bool?         result            = DodawanieStudenta.ShowDialog();

            if (result == true)
            {
                WyszykajTb_KeyUp(null, null);
                ListaStudentowDg_SelectionChanged(null, null);
            }
        }
Example #2
0
        private void btnNewStudent_Click(object sender, EventArgs e)
        {
            AddStudent nStudent = new AddStudent();

            if (nStudent.ShowDialog() == DialogResult.OK)
            {
                if (!studentExist(nStudent.Student.Index))
                {
                    lstStudents.Items.Add(nStudent.Student);
                }
                else
                {
                    MessageBox.Show("Студент со тој индекс веќе постои!", "Додади студент",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }