Administration des entités, (Web, Web Services, PDA, WidGet, Fat Client)
XAS.Services
  XML Kiosk  
Technologie XAS.Technology Version V 6.0.1
Dernière modification Jeudi 11 Mars 2010 Par Zaïr BEZGHICHE
Dernière vérification Mardi 16 Mars 2010 Par Support France
ThèmeAdministration des entités, (Web, Web Services, PDA, WidGet, Fat Client) Fonction FrmEntity.InsertToDRMTest

Prototype
Function InsertToDRMTest (sidClient As String) As Integer
Usage
Administration-des-entites.InsertToDRMTest(...)
HTTP (GET,POST)SOAP WSDLSOAP RESTXML-RPC
Format de sortie
XML HTML TEXT EXCEL(CSV)

Code Source - développement open source
Function InsertToDRMTest (sidClient As String) As Integer
Function InsertToDRMTest (sidClient As String) As Integer
Dim Ret%
Dim sData$
Dim s$
Dim screa$
Dim sa$

InsertToDRMTest = False
sData = "SELECT tpe_name,raisonsociale,identifiant,designation,matricule,type FROM client WHERE codeclient.xxkey=" + sidClient
Ret = pExecute(sData)
If Ret = True Then
    TabSQLValue(1, 0) = OnSQLGetItem(0)
    TabSQLValue(1, 1) = OnSQLGetItem(1)
    TabSQLValue(1, 2) = OnSQLGetItem(2)
    TabSQLValue(1, 3) = OnSQLGetItem(3)
    TabSQLValue(1, 4) = OnSQLGetItem(4)
    TabSQLValue(1, 9) = OnSQLGetItem(5)
    s = "xxx" + TabSQLValue(1, 0)
    sData = "SELECT codeclient FROM DRMTEST.dbo.client WHERE tpe_name.string='" + s + "'"
    Ret = pExecute(sData)
    If Ret = True Then
	XasTrace "Client Déja dans DRMTEST!"
	Exit Function
    End If
    sData = "SELECT codeenseigne,codeprogramme,codesite,codeclient FROM drmtest.dbo.client "
    sData = sData + "WHERE type.integer IN (1, 8, 10) AND tpe_name.string LIKE '*xxx*'"
    Ret = pExecute(sData)
    If Ret = True Then
	TabSQLValue(1, 5) = OnSQLGetItem(0)
	TabSQLValue(1, 6) = OnSQLGetItem(1)
	TabSQLValue(1, 7) = OnSQLGetItem(2)
	TabSQLValue(1, 8) = OnSQLGetItem(3)
	
	screa = Date$
	Ret = pExecute("CLEAR")
	sData = "INSERT INTO DRMTEST.dbo.client (codeenseigne,codeprogramme,codesite,creation,maj,type,raisonsociale,"
	sData = sData + "tpe_name,identifiant,designation,matricule,tpe_statut,enabled) VALUES( "
	sData = sData + "'" + TabSQLValue(1, 5) + "',"
	sData = sData + "'" + TabSQLValue(1, 6) + "',"
	sData = sData + "'" + TabSQLValue(1, 7) + "',"
	sData = sData + "'" + screa + "',"
	sData = sData + "'" + screa + "',"
	sData = sData + "'" + TabSQLValue(1, 9) + "',"
	sData = sData + "'" + TabSQLValue(1, 1) + "',"
	sData = sData + "'xxx" + TabSQLValue(1, 0) + "',"
	sData = sData + "'" + TabSQLValue(1, 2) + "',"
	sData = sData + "'" + TabSQLValue(1, 3) + "',"
	sData = sData + "'" + TabSQLValue(1, 4) + "',"
	sData = sData + "'6','1')"
	Ret = pExecute(sData)
	If Ret = True Then
	    sData = "SELECT codesite FROM DRMTEST.dbo.linksite WHERE codeclient.xxkey=" + TabSQLValue(1, 8)
	    Ret = pExecute(sData)
	    While (Ret = True)
		Ret = pTmpExecute("SELECT codeclient FROM DRMTEST.dbo.client WHERE tpe_name.string='xxx" + TabSQLValue(1, 0) + "'")
		If Ret = True Then
		    s = OnSQLGetItem(0)
		    sa = pTmpGetItem(0)
		    sData = "INSERT INTO DRMTEST.dbo.client.linksite (codeclient,codesite) VALUES ('" + sa + "','" + s + "')"
		    Ret = pTmpExecute(sData)
		End If
		Ret = pMoveNext(0)
	    Wend
	    Ret = pExecute("SELECT codesite FROM DRMTEST.dbo.site WHERE codesite.xxkey=" + TabSQLValue(1, 7))
	    If Ret = True Then
		If Val(TabSQLValue(1, 9)) = 1 Then
		    s = "6"
		Else
		    s = "7"
		End If
		sData = "INSERT INTO DRMTEST.dbo.site.hardware (type,creation,maj,name,onprog,onpv) VALUES ( "
		sData = sData + "'" + s + "',"
		sData = sData + "'" + screa + "',"
		sData = sData + "'" + screa + "',"
		sData = sData + "'xxx" + TabSQLValue(1, 0) + "',"
		sData = sData + "'" + TabSQLValue(1, 6) + "',"
		sData = sData + "'" + TabSQLValue(1, 7) + "')"
		Ret = pExecute(sData)
		InsertToDRMTest = Ret
	    End If
	End If
    End If


End If

End Function

Références XAS.Technology
XasTrace , Date , Val ,

Audience
Cette documentation est destinée aux personnes s'intéressant aux systèmes d'information collaboratifs.
Les Webservices, les architectures collabortives et distribuées, les moteurs transactionnelles et les concepts de programmation orientés objet.


XAS Services - Zaïr BEZGHICHE - Copyright 1991-2011 tous droits réservés- Powered by XAS.Technology