Commit 230a925a012d37709fc0d6607e5cd54275392589

Authored by Eric Menezes Noronha
1 parent b69536c6
Exists in master

-Correção de bugs.

MapaTesteProj/MapaTeste.dcu
No preview for this file type
MapaTesteProj/MapaTeste.pas
... ... @@ -292,7 +292,8 @@ end;
292 292 //------------------------------------------------------------------------------
293 293  
294 294 function TfrmMapaCacic.getConfigs : String;
295   -
  295 +var
  296 + teste : string;
296 297 Begin
297 298 btCombosUpdate.Enabled := false;
298 299  
... ... @@ -411,8 +412,7 @@ if edTeInfoPatrimonio5.text <> '' then
411 412 Finalizar(true);
412 413 end
413 414 else
414   - ShowMessage(#13#10+'Atenção!'+ #13#10 + 'É necessário digitar seu nome.'
415   - + #13#10);
  415 + Application.messagebox(Pchar('Por favor, é necessário digitar seu nome!'), 'Atenção!',MB_ICONEXCLAMATION + mb_ok);
416 416 end;
417 417  
418 418  
... ...
gercols/gercols.dpr
... ... @@ -245,6 +245,9 @@ Begin
245 245 objCacic.setValueToFile('Configs','ConexaoOK','S', strGerColsInfFileName);
246 246 if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then
247 247 Begin
  248 + objCacic.setValueToFile('Configs','forca_coleta',
  249 + objCacic.getValueFromTags('ForcaColeta', strRetorno, '<>'),
  250 + strGerColsInfFileName);
248 251 objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName);
249 252 objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName);
250 253 objCacic.setWebManagerAddress(objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>'));
... ... @@ -333,6 +336,7 @@ Begin
333 336 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
334 337 //Gravação no DatFileName dos valores de REDE, COMPUTADOR e EXECUÇÃO obtidos, para consulta pelos outros módulos...
335 338 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  339 + objCacic.setValueToFile('Configs' ,'modulo_patr' ,objCacic.getValueFromTags('modPatrimonio' , strRetorno, '<>'), strGerColsInfFileName);
336 340 objCacic.setValueToFile('Configs' ,'CollectsDefinitions' ,objCacic.getValueFromTags('CollectsDefinitions' , strRetorno, '<>'), strGerColsInfFileName);
337 341 objCacic.setValueToFile('Configs' ,'TeServUpdates' ,objCacic.getValueFromTags('te_serv_updates' , strRetorno, '<>'), strChkSisInfFileName);
338 342 objCacic.setValueToFile('Configs' ,'NuPortaServUpdates' ,objCacic.getValueFromTags('nu_porta_serv_updates' , strRetorno, '<>'), strChkSisInfFileName);
... ... @@ -367,10 +371,7 @@ Begin
367 371 end;
368 372  
369 373 procedure getTest();
370   -var strRetorno,
371   - v_mensagem_log,
372   - strKeyWord : string;
373   - textfileKeyWord : TextFile;
  374 +var strRetorno: string;
374 375 Begin
375 376 Try
376 377 // Verifico comunicação com o Módulo Gerente WEB.
... ... @@ -391,7 +392,7 @@ Begin
391 392 if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then
392 393 Begin
393 394 objCacic.setValueToFile('Configs','forca_coleta',
394   - objCacic.getValueFromTags('forca_coleta', strRetorno),
  395 + objCacic.getValueFromTags('ForcaColeta', strRetorno, '<>'),
395 396 strGerColsInfFileName);
396 397 objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName);
397 398 objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName);
... ...
main.pas
... ... @@ -1225,8 +1225,10 @@ end;
1225 1225  
1226 1226 procedure TFormularioGeral.InvocaMapa1Click(Sender: TObject);
1227 1227 begin
1228   - if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'ativo') then
1229   - Invoca_MapaCacic;
  1228 + if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'N') then
  1229 + Invoca_MapaCacic
  1230 + else
  1231 + MessageDlg(#13#13+'Módulo desabilitado!',mtError, [mbOK], 0);
1230 1232 end;
1231 1233  
1232 1234 ////////////////////////////////////////////////////////////////////////////////
... ... @@ -1296,7 +1298,7 @@ begin
1296 1298 ////////////////////////////////////////////////////////////////////////////////
1297 1299 if (trim(objCACIC.getValueFromFile('Configs','col_patr_exe', strGerColsInfFileName))<>'s')
1298 1300 and (ActualActivity<>4)
1299   - and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'ativo') then begin
  1301 + and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'N') then begin
1300 1302 objCACIC.writeDebugLog('ExecutaCACIC: Executa chamada ao Mapa Cacic...');
1301 1303 Invoca_MapaCacic;
1302 1304 end;
... ... @@ -1336,8 +1338,7 @@ begin
1336 1338 // Serão 4 tentativas por minuto
1337 1339 // Serão 30 minutos no máximo de tentativas, totalizando 120
1338 1340 intTentativas := 0;
1339   - while (not Pode_Coletar and (intTentativas < 121)) and
1340   - (objCACIC.getValueFromFile('Configs', 'forca_coleta',strGercolsInfFileName) <> 'S') do
  1341 + while (not Pode_Coletar and (intTentativas < 121)) do
1341 1342 Begin
1342 1343 objCACIC.writeDebugLog('ExecutaCACIC: Aguardando 15 segundos...');
1343 1344 Application.ProcessMessages;
... ...