PUBLIC  oUser

oUser = CREATEOBJECT ('ClassUser')

DEFINE CLASS ClassUser AS CUSTOM 

id = "" 
cname = "" 
login = ""
password = ""
idbodega = ""
idsalesman = ""
idcc = ""
iddepartuser = ""
idemploy = ""
emailuser = ""
seriepv = "" 

FUNCTION init
	LOCAL o as "adodb.recordset"
	LOCAL cmd
	
	cmd = "select * from usuario where id+0="+oJson.cIdu

	
	o = oJson.jexec(cmd)
	
	IF o.count>0	
		this.id 		= allt(o.item(1).item("id"))
		this.cname 		= allt(o.item(1).item("name"))
		this.login 		= allt(o.item(1).item("login"))
		this.password 	= allt(o.item(1).item("password"))
		this.idbodega 	= allt(o.item(1).item("idbodega"))
		this.idsalesman = allt(o.item(1).item("idsalesman"))
		this.idcc 		= allt(o.item(1).item("idcc"))
		this.iddepartuser = allt(o.item(1).item("iddepartuser"))
		this.idemploy 	= allt(o.item(1).item("idemploy"))
		this.emailuser 	= allt(o.item(1).item("emailuser"))
		this.seriepv 	= allt(o.item(1).item("seriepv"))
		oJson.cIds		= this.idsalesman
		*WAIT WINDOW oJson.cIds
	ENDIF

ENDFUNC

ENDDEFINE