Skip to content

Instantly share code, notes, and snippets.

@tdcbm
Created April 19, 2018 02:38
Show Gist options
  • Save tdcbm/a65a4f318403cf1f8b308e9dfc255df9 to your computer and use it in GitHub Desktop.
Save tdcbm/a65a4f318403cf1f8b308e9dfc255df9 to your computer and use it in GitHub Desktop.
private void oTrans_adapter_BeforeAdapterMethod(object sender, BeforeAdapterMethodArgs args)
{
// ** Argument Properties and Uses **
// ** args.MethodName **
// ** Add Event Handler Code **
// ** Use MessageBox to find adapter method name
// EpiMessageBox.Show(args.MethodName)
switch (args.MethodName)
{
case "Update":
// DialogResult dialogResult = EpiMessageBox.Show("Cancel Update?", "Cancel", MessageBoxButtons.YesNo);
// if ((dialogResult == DialogResult.Yes))
// {
// args.Cancel = true;
// } else
// {
// DoSomethingElse();
// }
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment