using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WindowsApplication1
{
    public partial class Form13 : Form
    {
        public Form13()
        {
            InitializeComponent();
        }
        DataBase mydatabase = new DataBase();
        private void Form13_Load(object sender, EventArgs e)
        {
            /*第一种方式：DataSet
            DataSet ds = mydatabase.GetDataSet("select * from student");
            dataGridView1.DataSource = ds.Tables[0];*/
            //第一种方式：DataTable
            DataTable dt = mydatabase.GetDataTable("select * from student");
            dataGridView1.DataSource = dt;
        }
    }
}