Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2002
    Messaggi
    64

    oggetti personali classi

    codice:
    class singolo_met
    	private m_numerest
    	private m_naturest
    	private m_omoloest
    	private m_lordoest
    	private m_nettoest
    	private m_flapo
    	private m_requirednosmatter
    	private m_numerint
    	private m_naturint
    	private m_lordoint
    	private m_wst
    	private m_un
    	private m_grimba
    	private m_inqui
    	private m_ql
    	
    	public Property Get numerest
    		numerest = m_numerest
    	end property	
    	public Property Let numerest(cprat)
    		m_numerest = cprat
    	end property
    	
    	public Property Get naturest
    		naturest = m_naturest
    	end property	
    	public Property Let naturest(cprat)
    		m_naturest = cprat
    	end property
    	
    	public Property Get omoloest
    		omoloest = m_omoloest
    	end property		
    	public Property Let omoloest(cprat)
    		m_omoloest = cprat
    	end property
    	
    	public Property Get lordoest
    		lordoest = m_lordoest
    	end property	
    	public Property Let lordoest(cprat)
    		m_lordoest = cprat
    	end property
    	
    	public Property Get nettoest
    		nettoest = m_nettoest
    	end property	
    	public Property Let nettoest(cprat)
    		m_nettoest = cprat
    	end property
    	
    	public Property Get flapo
    		flapo = m_flapo
    	end property	
    	public Property Let flapo(cprat)
    		m_flapo = cprat
    	end property
    	
    	public Property Get requirednosmatter
    		requirednosmatter = m_requirednosmatter
    	end property	
    	public Property Let requirednosmatter(cprat)
    		m_requirednosmatter = cprat
    	end property
    	
    	public Property Get numerint
    		numerint = m_numerint
    	end property	
    	public Property Let numerint(cprat)
    		m_numerint = cprat
    	end property
    	
    	public Property Get naturint
    		naturint = m_naturint
    	end property	
    	public Property Let naturint(cprat)
    		m_naturint = cprat
    	end property
    	
    	public Property Get lordoint
    		lordoint = m_lordoint
    	end property	
    	public Property Let lordoint(cprat)
    		m_lordoint = cprat
    	end property
    	
    	public Property Get wst
    		wst = m_wst
    	end property	
    	public Property Let wst(cprat)
    		m_wst = cprat
    	end property
    	
    	public Property Get un
    		un = m_un
    	end property	
    	public Property Let un(cprat)
    		m_un = cprat
    	end property
    	
    	public Property Get grimba
    		grimba = m_grimba
    	end property	
    	public Property Let grimba(cprat)
    		m_grimba = cprat
    	end property
    	
    	public Property Get inqui
    		inqui = m_inqui
    	end property	
    	public Property Let inqui(cprat)
    		m_inqui = cprat
    	end property
    	
    	public Property Get ql
    		ql = m_ql
    	end property	
    	public Property Let ql(cprat)
    		m_ql = cprat
    	end property
    	
    end class
    
    
    dim prod
    set prod = new singolo_met
    for i = 1 to cur_carrel.num
    	prod.numerest = Request.Form("sdff"&i)
    	prod.naturest = Request.Form("nsd"&i)
    	prod.omoloest = Request.Form("odst"&i)
    	prod.lordoest = Request.Form("loddst"&i)
    	prod.nettoest = Request.Form("netdst"&i)
    	prod.flapo = Request.Form("fdo"&i)
    	prod.requirednosmatter = Request.Form("rdsatter"&i)
    	prod.numerint = Request.Form("nsfdnt"&i)
    	prod.naturint = Request.Form("nafdsnt"&i)
    	prod.lordoint = Request.Form("losdfnt"&i)
    	prod.wst = Request.Form("wst"&i)
    	prod.un = Request.Form("un"&i)
    	prod.grimba = Request.Form("grsdba"&i)
    	prod.inqui = Request.Form("infsd"&i)
    	prod.ql = Request.Form("ql"&i)			
    	cur_carrel.reg_prod(prod)		
    next
    
    
    class carrello
     ....
            public function reg_prod(single_met)
    		if not ctrl_con() then
    			err.raise 8
    		end if
    		dim prodotto
    		set prodotto = new record_met
    		set prodotto.conne = m_conne
    		prodotto.cod_prat = m_cod_prat
    		set prodotto.rec_form = single_met
    		prodotto.registra
    		reg_prod = true
    		
              end function
    ....
    end class
    
    class record_met
    ....
    
    
    public sub registra
     ...
    'salva i dati sul db controllando i valori qui mi arriva 
    '''purtroppo sempre vuoto... l'oggeto da registrare che è gia tra le 
    'proprieta 
    
    'Praticamente l'errore arriva qui quando controllo se ricevo un
    ' oggetto
     ...
    end sub
    
    ....
    end class
    appena passo il prod a cur_carrel.reg_prod(prod) che è un metodo che registra i dati su db, mi dice che non è un oggetto quello che ricevo ... Vi prego sapete vedere dove è l'errore?
    "Non è tutto oro quel che luccica" vuol dire che non è lucidato...

  2. #2
    Utente bannato
    Registrato dal
    Oct 2003
    Messaggi
    372
    hai settato

    cur_carrel come new carrello?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.