Exemplo n.º 1
0
        protected override void ExecuteCommand(ExecuteCmdDelegate proc)
        {
            try
            {
                proc.Invoke();
            }
            catch (DbException e)
            {
                if (MessagePrinter != null)
                {
                    MessagePrinter.PrintMessage(e.Message, ErrorsManager.Messages.DBErrorMsg, 1, 1);
                }

                _last_error = e.ErrorCode;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Обертка для выполнения DbCommand
 /// </summary>
 /// <param name="proc"></param>
 protected override void ExecuteCommand(ExecuteCmdDelegate proc)
 {
     try
     {
         _last_error = 0;
         proc.Invoke();
     }
     catch (SqlException e)
     {
         string msg = GetErrorMessage(e);
         if (MessagePrinter != null)
         {
             MessagePrinter.PrintMessage(msg, ErrorsManager.Messages.DBErrorMsg, 1, 1);
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Обертка для выполнения DbCommand
        /// </summary>
        /// <param name="proc"></param>
        protected override void ExecuteCommand(ExecuteCmdDelegate proc)
        {
            try
            {
                _last_error = 0;
                proc.Invoke();
            }
            catch (MySqlException e)
            {
                if (MessagePrinter != null)
                    MessagePrinter.PrintMessage(e.Message, ErrorsManager.Messages.DBErrorMsg, 1, 1);

                _last_error = e.ErrorCode;
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Обертка для выполнения DbCommand
 /// </summary>
 /// <param name="proc"></param>
 protected override void ExecuteCommand(ExecuteCmdDelegate proc)
 {
     try
     {
         _last_error = 0;
         proc.Invoke();
     }
     catch (SqlException e)
     {
         string msg = GetErrorMessage(e);
         if (MessagePrinter != null)
             MessagePrinter.PrintMessage(msg, ErrorsManager.Messages.DBErrorMsg, 1, 1);
     }
 }