Exemplo n.º 1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(mskStudentId.Text) || string.IsNullOrWhiteSpace(mskStudentId.Text))
            {
                MessageBox.Show("Please Enter valid student Id.");
                return;
            }
            StudentModel student = studentTable.GetStudent(int.Parse(mskStudentId.Text));

            var list = new List <StudentModel>();

            list.Add(student);

            gridStudents.DataSource = list;
            gridStudents.Refresh();
        }
Exemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());

            StudentTable studenti = new StudentTable();

            studenti.GetStudent();
        }