/// <summary>
/// Adds click event handler
/// </summary>
/// <param name="mapper">The checkbox mapper</param>
public void AddClickEventHandler(CheckBoxMapper mapper)
{
var checkBox = mapper.GetControl() as CheckBox;
if (checkBox == null) return;
checkBox.CheckedChanged += delegate
{
try
{
mapper.ApplyChangesToBusinessObject();
mapper.UpdateControlValueFromBusinessObject();
}
catch (Exception ex)
{
GlobalRegistry.UIExceptionNotifier.Notify(ex, "", "Error ");
}
};
}