01.
using
System;
02.
using
System.Collections.Generic;
03.
using
System.ComponentModel;
04.
using
System.Data;
05.
using
System.Drawing;
06.
using
System.Linq;
07.
using
System.Text;
08.
using
System.Windows.Forms;
09.
10.
namespace
WindowsFormsApplication1
11.
{
12.
public
partial
class
Form1 : Form
13.
{
14.
public
Form1()
15.
{
16.
InitializeComponent();
17.
}
18.
19.
public
string
sendVar;
20.
private
void
Button1_Click(
object
sender, EventArgs e)
21.
{
22.
DataRow selectRow ;
23.
Form2 f =
new
Form2();
24.
f.ShowDialog();
25.
selectRow = f.selectRow;
26.
27.
this
.TextBox2.Text = selectRow[0].ToString();
28.
////column แรก
29.
this
.TextBox3.Text = selectRow[1].ToString();
30.
this
.TextBox4.Text = selectRow[2].ToString();
31.
this
.TextBox5.Text = selectRow[4].ToString();
32.
}
33.
}
34.
}