예제 #1
0
        private void LoadTeacher()
        {
            TeacherDAO cd  = new TeacherDAO();
            DataSet    set = cd.GetAllTeacher();

            foreach (DataRow r in set.Tables[0].Rows)
            {
                DataRow newRow = tabTeacher.NewRow();
                newRow["Id"]          = r["Id"];
                newRow["StaffNumber"] = r["StaffNumber"];
                newRow["Name"]        = r["Name"];
                newRow["Status"]      = "Added";
                tabTeacher.Rows.Add(newRow);
            }

            gridCtrlTeacher.DataSource = tabTeacher;
        }