namespace Test
{
public partial class FrmMain : Form
{
public FrmMain()
{
InitializeComponent();
}
public DataTable DT;
private void button1_Click(object sender, EventArgs e)
{
FrmChild fm = new FrmOptime(this);
fm.Show();
}
public void BindData(){}
}
}
主窗体
namespace Test
{
public partial class FrmChild : Form
{
public FrmChild ()
{
InitializeComponent();
}
FrmMain frmMain;
public FrmChild (FrmMain fm)
{
InitializeComponent();
frmMain = fm;
}
private void button1_Click(object sender, EventArgs e)
{
frmMain.RemnantDT;
frmMain.BindData();
}
}
}
子窗体