常用方法
常用方法
常用方法
常用方法
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; }