Показать сообщение отдельно
Старый 17.12.2003, 16:16   #1  
xshaman is offline
xshaman
Участник
 
36 / 11 (1) +
Регистрация: 17.12.2003
Адрес: Санкт-Петербург
сделал вот так
PHP код:
// No SYS code must exist in this method
// If you need the startup command, look in the class SysStartupCmd
void startupPost()
{
    
xSession    session;
    
int         counter;
    
str         warning;
    
//--- CRM start
    
if (!appl.isConfigMode())
    {
        
//--- Prevent call to smmInit during installation of Axapta
        //--- If not, code in the method below is run that uses a table that has not yet been created
        
for (counter 1counter <= xSession::maxSessionId(); counter++)
        {
            
session = new xSession(countertrue);
            if (
session)
            {
                if (
session.sessionId() != sessionid())
                {
                    if (
curuserid() == session.userId())
                    {
                        
warning strfmt("User %1 is already logged in!"session.userId());
                        
Box::warning(warning"Login problem!");
                        
InfoLog.shutDown(true);
                    }
                }
            }
        }
        
SmmInit::construct();
    }
    
//--- CRM end