Hi I have 2 Form Form1 and Form2
Form1 have a table and there is my records and there is a Void for refresh the table in the Form1.
Form2 is my insert form I
Adjust the construct for Form2 so it takes an extra parameter, like this:
...
private Form1 mainWindow;
public Form2(Form1 mainWindow)
{
this.mainWindow = mainWindow;
}
...
public void HaveSavedSql()
{
this.mainWindow.RefreshAll();
}
You should consider however looking up on Interfaces so you can seperate concerns. Interfaces are useful for many things!