Beispiel #1
0
        void button1_Click(object sender, EventArgs e)
        {
            Student obj = new Student();
            obj.ID = int.Parse(textBox1.Text);
            obj.StudentName = textBox2.Text;

            StudentDataAccess da = new StudentDataAccess();
            da.InsertData(obj);
        }
Beispiel #2
0
 void StudentListForm_Load(object sender, EventArgs e)
 {
     StudentDataAccess da = new StudentDataAccess();
     dataGridView1.DataSource = da.GetData();
 }