How do I tell if a function has been called by another form?
For example:
On my form 1, I have a method that calls another form:
private void btnFormulario2_Click(object sender, EventArgs e)
{
frmFormulario2 frm2 = new frmFormulario2();
frm2.Show();
}
On my form 2, I have this method that writes to the database:
private void btnSalvar_Click(object sender, EventArgs e)
{
GravaNoBanco();
}
Is there a way for Form 1 to know if Form 2 called the function that writes to the bank?