I would like to know the regular code for confirming data change on a form before they are saved. As an example, I need to let the user to confirm the change if he change statement method to "Shift" from the default value "Date and time", If he hit Yes, continue the change, otherwise, revert the change. My code snippet shows like this:
public void modified()
{
//[kl]
if (statementTable.closingMethod != RetailClosingMethodType::DateTime)
{
if (box::yesNo("WARNING: you are attempting to calculate this statement using the 'Shift' closing method. Do you wish to proceed?", dialogButton::Yes, "Confirm changes")
== dialogButton::No)
{
statementTable.closingMethod = statementTable.orig().closingMethod;
return;
}
}
super();
statementTable_ds.refresh();
}
Can you comment on, or correct?