private void Refresh()
        {
            StudentRegTxt.Clear();
            NameTxt.Clear();
            SurnameTxt.Clear();
            GenderCmb.ResetText();
            CellNTxt.Clear();
            EmailTxt.Clear();
            Postaltxt.ResetText();
            CourseCmb.ResetText();
            Statuscmb.ResetText();
            SemesterCmb.ResetText();
            dataGridView1.DataSource = DataAccess.GetStudents();

            dataGridView1.Columns["ID"].DisplayIndex            = 0;
            dataGridView1.Columns["Name"].DisplayIndex          = 1;
            dataGridView1.Columns["Surname"].DisplayIndex       = 2;
            dataGridView1.Columns["Gender"].DisplayIndex        = 3;
            dataGridView1.Columns["Cell"].DisplayIndex          = 4;
            dataGridView1.Columns["Email"].DisplayIndex         = 5;
            dataGridView1.Columns["PostalAddress"].DisplayIndex = 6;
            dataGridView1.Columns["CourseId"].DisplayIndex      = 7;
            dataGridView1.Columns["Semester"].DisplayIndex      = 8;
            dataGridView1.Columns["StatusId"].DisplayIndex      = 9;
        }
示例#2
0
 private void Refresh()
 {
     TeacherRegtxt.Clear();
     Nametxt.Clear();
     Surnametext.Clear();
     GenderCmb.ResetText();
     Celltxt.Clear();
     PINTxt.Clear();
     Emailtxt.Clear();
     Statuscmb.ResetText();
     dataGridView1.DataSource = DataAccess.GetTeachers();
 }