Ejemplo n.º 1
0
        public SQLCommandsReturnInfoClass ExecSql(string cmd, DBRegistrationClass DBReg, NotifiesClass localNotify)
        {
            var SQLcommand = new SQLCommandsClass(DBReg);

            SQLcommand.SetEncoding("NONE");
            var ri = SQLcommand.ExecuteCommand(cmd, true);

            if (!ri.commandDone)
            {
                string errorStr = AppStaticFunctionsClass.GetErrorCodeString(ri.lastError, DBReg);
                localNotify?.AddToERROR(AppStaticFunctionsClass.GetFormattedError($@"FieldForm->ExecuteCommand", $@"{cmd}->{errorStr}"));
            }
            else
            {
                localNotify?.AddToINFO(AppStaticFunctionsClass.GetFormattedInfo($@"Command done", cmd));
            }
            return(ri);
        }
Ejemplo n.º 2
0
        private void Notify_OnRaiseErrorHandler(object sender, MessageEventArgs k)
        {
            StringBuilder sb = new StringBuilder();

            error_count++;
            if (messages_count > 0)
            {
                sb.Append($@"Messages ({messages_count}) ");
            }
            if (error_count > 0)
            {
                sb.Append($@"Errors ({error_count})");
            }
            string errStr = AppStaticFunctionsClass.GetErrorCodeString(k.Meldung, _dbReg);

            fctMessages.AppendText($@"ERROR {errStr}");
            tabPageMessages.Text = sb.ToString();
            fctMessages.ScrollLeft();
        }