public void DeleteBusinessObject(IBusinessObject businessObject)
{
string message;
if (CustomConfirmationMessageDelegate != null)
{
message = CustomConfirmationMessageDelegate(businessObject);
}
else
{
message = string.Format("Are you certain you want to delete the object '{0}'", businessObject);
}
Confirmer.Confirm(message, delegate(bool confirmed)
{
if (!confirmed) return;
var defaultBODeletor = new DefaultBODeletor();
try
{
defaultBODeletor.DeleteBusinessObject(businessObject);
}
catch (Exception ex)
{
GlobalRegistry.UIExceptionNotifier.Notify(ex, "", "Error Deleting");
}
});
}
}