Habanero.Faces.Win.DefaultBOEditorFormWin.OkButtonHandler C# (CSharp) Method

OkButtonHandler() protected method

A handler to respond when the "OK" button has been pressed. All changes are committed to the database and the dialog is closed.
protected OkButtonHandler ( object sender, EventArgs e ) : void
sender object The object that notified of the event
e System.EventArgs Attached arguments regarding the event
return void
        protected virtual void OkButtonHandler(object sender, EventArgs e)
        {
            try
            {
                _panelInfo.ApplyChangesToBusinessObject();
                ITransactionCommitter committer = CreateSaveTransaction();
                committer.CommitTransaction();
                DialogResult = Base.DialogResult.OK;
                if (_postObjectEditAction != null)
                {
                    _postObjectEditAction(this._bo, false);
                }
                _panelInfo.BusinessObject = null;
                SafeCloseForm();
            }
            catch (Exception ex)
            {
                log.Error(ExceptionUtilities.GetExceptionString(ex, 0, true));
                GlobalRegistry.UIExceptionNotifier.Notify(ex,
                    "There was a problem saving for the following reason(s):",
                    "Saving Problem");
            }
        }