Пример #1
0
        private void about_mentor_Click(object sender, EventArgs e)
        {
            AboutMentorForm abtmnt = new AboutMentorForm();

            abtmnt.dataGridAboutMentor.Rows.Clear();
            int           i        = 0;
            List <Mentor> mnt_list = db.Mentors.ToList();

            foreach (Mentor item in mnt_list)
            {
                abtmnt.dataGridAboutMentor.Rows.Add();
                abtmnt.dataGridAboutMentor.Rows[i].Cells[0].Value = item.id;
                abtmnt.dataGridAboutMentor.Rows[i].Cells[1].Value = item.mentor_name;
                abtmnt.dataGridAboutMentor.Rows[i].Cells[2].Value = item.mentor_surname;
                abtmnt.dataGridAboutMentor.Rows[i].Cells[3].Value = item.Gender.gender_name;
                abtmnt.dataGridAboutMentor.Rows[i].Cells[4].Value = item.mentor_phone;
                abtmnt.dataGridAboutMentor.Rows[i].Cells[5].Value = item.mentor_email;
                abtmnt.dataGridAboutMentor.Rows[i].Cells[6].Value = item.mentor_info;
                i++;
            }
            abtmnt.ShowDialog();
        }
Пример #2
0
        private void about_mentor_Click(object sender, EventArgs e)
        {
            AboutMentorForm abtmntfrm = new AboutMentorForm();

            abtmntfrm.ShowDialog();
        }