Example #1
0
        private void OnEnterControl(object sender, System.EventArgs e)
        {
            const string METHOD_NAME = THIS + ". OnEnterControl()";

            try
            {
                FormControlComponents.OnEnterControl(sender, e);
            }
            catch (Exception ex)
            {
                // displays the error message.
                PCSMessageBox.Show(ErrorCode.OTHER_ERROR, MessageBoxButtons.OK, MessageBoxIcon.Error);
                // log message.
                try
                {
                    Logger.LogMessage(ex, METHOD_NAME, Level.ERROR);
                }
                catch
                {
                    PCSMessageBox.Show(ErrorCode.LOG_EXCEPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }