Пример #1
0
        private DataTable SetUpListTeacher()
        {
            List <object[]> list = SqlRequestFunction.GetListTeacherHadNotAccount();

            DataTable table = new DataTable();

            DataColumn[] columns = new DataColumn[]
            {
                new DataColumn("MAGV"),
                new DataColumn("HOTEN")
            };

            table.Columns.AddRange(columns);

            list.ForEach((item) =>
            {
                DataRow row = table.NewRow();

                row.ItemArray = item;

                table.Rows.Add(item);
            });

            return(table);
        }