PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → DB_ConfigInsert
DB_ConfigInsert
Débuté par adrianoboller, 24 nov. 2014 12:10 - 1 réponse
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 24 novembre 2014 - 12:10
Procedure DB_ConfigInsert(LOCAL P01,LOCAL P02,LOCAL P03,LOCAL P04,LOCAL P05)

retorno is boolean = False

T000Config.CodConfig000 = P01
T000Config.Sigla000 = P02
T000Config.Valor000 = P03
T000Config.Descricao000 = P04
T000Config.IndAtivo000 = P05

retorno = HAdd(T000Config)

RESULT(retorno)
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 24 novembre 2014 - 12:10
Procedure DB_GeraConfig()

//Gerar Nova Base de Dados
Resultado is boolean = False

sValores is string = ""

QRY_INI is Data Source

HExecuteQuery(QRY_Count_Config)

HExecuteQuery(QRY_Max_CodigoConfig)

IF QRY_Max_CodigoConfig.maximum_CodConfig000 = 0 OR QRY_Max_CodigoConfig.maximum_CodConfig000 = Null THEN
Resultado = HExecuteSQLQuery(QRY_INI,"Delete from T000Config")
IF Resultado = False THEN
Error("Erro ao Excluir os Dados!...")
END
END

IF HNbRec(T000Config, hStateAll) = 0 OR HNbRec(T000Config, hStateAll) < 28 OR QRY_Count_Config.Count_Registros = 0 OR QRY_Count_Config.Count_Registros < 28 OR QRY_Count_Config.Count_Registros = Null THEN

Resultado = HExecuteSQLQuery(QRY_INI,"Delete from T000Config")
IF Resultado = False THEN
Error("Erro ao Excluir os Dados!...")
END

Resultado=DB_ConfigInsert("1","WS-Producao","http://brandsupply.com.br/motolink","http://brandsupply.com.br/motolink","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("2","WS-Teste","http://brandos.esferadev.com.br","WS-Producao: http://brandos.esferadev.com.br","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("3","WS-Padrao","1","1","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("4","Versão","Powered by Esfera 30/07/2013 v1","Powered by Esfera 30/07/2013 v1","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("5","Login-Padrão","","","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("6","Senha-Padrão","","","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("7","Empresa-Padrão","1","","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("8","WS_Autenticacao","/ws/wsBrand.asmx/Autenticacao?chave=string01","/ws/wsBrand.asmx/Autenticacao?chave=string01","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("9","WS_ConfigConsultar","/ws/wsBrand.asmx/ConfigConsultar?autenticacao=string01&sigla=string02","/ws/wsBrand.asmx/ConfigConsultar?autenticacao=string01&sigla=string02","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("10","WS_ConfigConsultarTodos","/ws/wsBrand.asmx/ConfigConsultarTodos?autenticacao=string01","/ws/wsBrand.asmx/ConfigConsultarTodos?autenticacao=string01","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("11","WS_OsGravar","/ws/wsBrand.asmx/OsGravar?autenticacao=string01&codTipoOcorrencia=string02&latitude=string03&longitude=string04&observacao=string05","/ws/wsBrand.asmx/OsGravar?autenticacao=string01&codTipoOcorrencia=string02&latitude=string03&longitude=string04&observacao=string05","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("12","WS_OsConsultar","/ws/wsBrand.asmx/OsConsultar?autenticacao=string01&codOs=string02","/ws/wsBrand.asmx/OsConsultar?autenticacao=string01&codOs=string02","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END



Resultado=DB_ConfigInsert("13","WS_OsStatusConsultar","/ws/wsBrand.asmx/OsStatusConsultar?autenticacao=string01&codOs=string02","/ws/wsBrand.asmx/OsStatusConsultar?autenticacao=string01&codOs=string02","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("14","WS_TipoOcorrenciaConsultar","/ws/wsBrand.asmx/TipoOcorrenciaConsultar?autenticacao=string01","/ws/wsBrand.asmx/TipoOcorrenciaConsultar?autenticacao=string01","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END

xmlvalor is string = [
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ArquivoGravar xmlns="http://tempuri.org/">
<autenticacao>string</autenticacao>
<codOrdemServicoStatus>int</codOrdemServicoStatus>
<Arquivo>base64Binary</Arquivo>
<descricao>string</descricao>
</ArquivoGravar>
</soap:Body>
</soap:Envelope>
]



Resultado=DB_ConfigInsert("15","WS_ArquivoGravar",xmlvalor,xmlvalor,"X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("16","WS_Reservado01","","","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("17","WS_Reservado02","","","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("18","WS_Reservado03","","","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("19","DebugSN","S","S","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("20","Excluir-Configuração","SIM","SIM","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("21","Msg-SemAtividade","Não existe nenhuma atividade agendada.","Não existe nenhuma atividade agendada.","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("22","Msg-NaoSelecionou","Não foi definido nenhum registro! Por favor, selecione um registro para iniciar a tarefa.","Não foi definido nenhum registro! Por favor, selecione um registro para iniciar a tarefa.","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("23","Msg-ErroInclusão","Erro ao tentar incluir registro.","Erro ao tentar incluir registro.","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("24","Msg-ErroAlteraçã0","Erro ao tentar excluir registro.","Erro ao tentar excluir registro.","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("25","Msg-ErroExclusão","Erro ao tentar excluir registro.","Erro ao tentar excluir registro.","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("26","Rotaciona Imagem Automaticamente","SIM","Rotaciona Imagem Automaticamente - SIM","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("27","Resolução da Imagem em Pixels","640X480","640X480","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


Resultado=DB_ConfigInsert("28","Redimensionar a Imagem","SIM","Redimensionar a Imagem SIM","X")
IF Resultado = False THEN
Error(ErrorInfo(),1)
END


END