Example #1
0
        private void AddStudentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new StudentDialog();

            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                ZaladujDane();
            }
        }
Example #2
0
        private void EditStudentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var           studentID = (int)StudentsDataGridView.SelectedRows[0].Cells[0].Value;
            DeansOfficeDB db        = new DeansOfficeDB();

            //db.Students.ToList().Where(s=>s.IdStudent = student.Cells.)
            var form = new StudentDialog();

            form.EditStudent(db.Students.ToList().Where(s => s.IdStudent == studentID).ToList()[0]);
            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                ZaladujDane();
                ZaladujComboBox();
            }
        }
Example #3
0
        private void AddStudentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var form = new StudentDialog(this);

            form.ShowDialog();
        }