0
How to know if a function has been called by another form?
For example:
In 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();
}
In my Form 2, I have this method that records in the bank:
private void btnSalvar_Click(object sender, EventArgs e)
{
GravaNoBanco();
}
There is a way for Form 1 to know if Form 2 called the function that writes to the bank?
Yes, you need to create an event for this and notify interested parties. In case the form one would have to sign the event to be notified. http://msdn.microsoft.com/en-us/library/awbftdfh.aspx e
– Maniero