I have a windows form with a data grid bound to a datatable. On a button click, the data table is passed to a static class.
private void btnSave_ItemClick(object sender, EventArgs e)
{
MyStaticClass.SaveData(DataTable dt);
}
internal static class MyStaticClass
{
internal static void SaveData(DataTable dt)
{
foreach(DataRow dr in dt.rows)
{
// do something
}
}
}
I need to pass back status information from the SaveData method back to my form so that I can inform the user how record is being processed.
say for example - I want to send back a message every 100 records - "processing record #...." so that it is displayed on the form.
is it possible to raise an event from a static class?