Login
...or Sign up
Home
Search
Search Code Snippets
Search People
Search
Code Snippets
People
3 Code Snippets found matching clases
<% Class Clientes '--------------------------------------------------------------------------------------- ' This Class Encapsulates a Clientes object and its methods '--------------------------------------------------------------------------------------- Dim glngID, gstrNOMBRE, gstrAPELLIDOS, gmemDIRECCION, gstrLOCALIDAD, gstrCP, gstrPROVINCIA, gstrPAIS, gstrTELEFONO, glngANHO_NACIMIENTO Public Property Get ID ID=glngID End Property Public Property Let ID(valor) glngID=valor End Property Public Property Get NOMBRE NOMBRE=gstrNOMBRE End Property Public Property Let NOMBRE(valor) gstrNOMBRE=valor End Property Public Property Get APELLIDOS APELLIDOS=gstrAPELLIDOS End Property Public Property Let APELLIDOS(valor) gstrAPELLIDOS=valor End Property Public Property Get DIRECCION DIRECCION=gmemDIRECCION End Property Public Property Let DIRECCION(valor) gmemDIRECCION=valor End Property Public Property Get LOCALIDAD LOCALIDAD=gstrLOCALIDAD End Property Public Property Let LOCALIDAD(valor) gstrLOCALIDAD=valor End Property Public Property Get CP CP=gstrCP End Property Public Property Let CP(valor) gstrCP=valor End Property Public Property Get PROVINCIA PROVINCIA=gstrPROVINCIA End Property Public Property Let PROVINCIA(valor) gstrPROVINCIA=valor End Property Public Property Get PAIS PAIS=gstrPAIS End Property Public Property Let PAIS(valor) gstrPAIS=valor End Property Public Property Get TELEFONO TELEFONO=gstrTELEFONO End Property Public Property Let TELEFONO(valor) gstrTELEFONO=valor End Property Public Property Get ANHO_NACIMIENTO ANHO_NACIMIENTO=glngANHO_NACIMIENTO End Property Public Property Let ANHO_NACIMIENTO(valor) glngANHO_NACIMIENTO=valor End Property '*************************************************************************************** ' Load '*************************************************************************************** Public Sub Load(lngID) Dim strSQL, objRS, objData strSQL = "SELECT * FROM usuarios WHERE ID = "& lngID Set objData = New DALayer objData.ConnectionString = Trim("clientes") Set objRS = objData.RetrieveRS(strSQL) With objRS If Not .EOF Then .MoveFirst With Me .ID = objRS("ID") .NOMBRE = objRS("NOMBRE") .APELLIDOS = objRS("APELLIDOS") .DIRECCION = objRS("DIRECCION") .LOCALIDAD = objRS("LOCALIDAD") .CP = objRS("CP") .PROVINCIA = objRS("PROVINCIA") .PAIS = objRS("PAIS") .TELEFONO = objRS("TELEFONO") .ANHO_NACIMIENTO = objRS("ANHO_NACIMIENTO") End With End If End With If IsObject(objData) Then Set objData = Nothing If IsObject(objRS) Then Set objRS = Nothing End Sub '*************************************************************************************** ' Save '*************************************************************************************** Public Sub Save() Dim strSQL, objRS, objData Set objRS = Server.CreateObject("adodb.recordset") ConnectionString = Trim("clientes") objRS.Open "usuarios", ConnectionString, 2, 3 objRS.AddNew 'objRs("ID").value = Me.ID objRs("NOMBRE").value = Me.NOMBRE objRs("APELLIDOS").value = Me.APELLIDOS objRs("DIRECCION").value = Me.DIRECCION objRs("LOCALIDAD").value = Me.LOCALIDAD objRs("CP").value = Me.CP objRs("PROVINCIA").value = Me.PROVINCIA objRs("PAIS").value = Me.PAIS objRs("TELEFONO").value = Me.TELEFONO objRs("ANHO_NACIMIENTO").value = Me.ANHO_NACIMIENTO objRS.Update If IsObject(objData) Then Set objData = Nothing If IsObject(objRS) Then Set objRS = Nothing End Sub End Class %>
Generador de clases en ASP
Uploaded on
3/14/2008 4:41:40 AM
Programming Language:
ASP
By:
retebenito
See more code snippets of
retebenito
asp
clase asp
clases
generador clases
generador de código
<!-- begin of generated class --> <?php /* * * ------------------------------------------------------- * CLASSNAME: cMensajes * GENERATION DATE: 29.10.2007 * FOR MYSQL TABLE: mensajes * ------------------------------------------------------- * CODE GENERATED BY: * MY PHP-MYSQL-CLASS GENERATOR * from: >> www.voegeli.li >> (download for free!) * ------------------------------------------------------- * */ include_once("resources/class.database.php"); // ********************** // CLASS DECLARATION // ********************** class cMensajes { // class : begin // ********************** // ATTRIBUTE DECLARATION // ********************** var $ID; // KEY ATTR. WITH AUTOINCREMENT var $de; // (normal Attribute) var $para; // (normal Attribute) var $asunto; // (normal Attribute) var $mensaje; // (normal Attribute) var $leido; // (normal Attribute) var $fecha_creacion; // (normal Attribute) var $fecha_modificacion; // (normal Attribute) var $IP; // (normal Attribute) var $database; // Instance of class database // ********************** // CONSTRUCTOR METHOD // ********************** function cMensajes() { $this->database = new Database(); } // ********************** // GETTER METHODS // ********************** function getID() { return $this->ID; } function getde() { return $this->de; } function getpara() { return $this->para; } function getasunto() { return $this->asunto; } function getmensaje() { return $this->mensaje; } function getleido() { return $this->leido; } function getfecha_creacion() { return $this->fecha_creacion; } function getfecha_modificacion() { return $this->fecha_modificacion; } function getIP() { return $this->IP; } // ********************** // SETTER METHODS // ********************** function setID($val) { $this->ID = $val; } function setde($val) { $this->de = $val; } function setpara($val) { $this->para = $val; } function setasunto($val) { $this->asunto = $val; } function setmensaje($val) { $this->mensaje = $val; } function setleido($val) { $this->leido = $val; } function setfecha_creacion($val) { $this->fecha_creacion = $val; } function setfecha_modificacion($val) { $this->fecha_modificacion = $val; } function setIP($val) { $this->IP = $val; } // ********************** // SELECT METHOD / LOAD // ********************** function select($id) { $sql = "SELECT * FROM mensajes WHERE ID = $id;"; $result = $this->database->query($sql); $result = $this->database->result; $row = mysql_fetch_object($result); $this->ID = $row->ID; $this->de = $row->de; $this->para = $row->para; $this->asunto = $row->asunto; $this->mensaje = $row->mensaje; $this->leido = $row->leido; $this->fecha_creacion = $row->fecha_creacion; $this->fecha_modificacion = $row->fecha_modificacion; $this->IP = $row->IP; } // ********************** // DELETE // ********************** function delete($id) { $sql = "DELETE FROM mensajes WHERE ID = $id;"; $result = $this->database->query($sql); } // ********************** // INSERT // ********************** function insert() { $this->ID = ""; // clear key for autoincrement $sql = "INSERT INTO mensajes ( de,para,asunto,mensaje,leido,fecha_creacion,fecha_modificacion,IP ) VALUES ( '$this->de','$this->para','$this->asunto','$this->mensaje','$this->leido','$this->fecha_creacion','$this->fecha_modificacion','$this->IP' )"; $result = $this->database->query($sql); $this->ID = mysql_insert_id($this->database->link); } // ********************** // UPDATE // ********************** function update($id) { $sql = " UPDATE mensajes SET de = '$this->de',para = '$this->para',asunto = '$this->asunto',mensaje = '$this->mensaje',leido = '$this->leido',fecha_creacion = '$this->fecha_creacion',fecha_modificacion = '$this->fecha_modificacion',IP = '$this->IP' WHERE ID = $id "; $result = $this->database->query($sql); } } // class : end ?> <!-- end of generated class -->
Generador de clases en PHP
Uploaded on
3/14/2008 4:57:16 AM
Programming Language:
PHP
By:
retebenito
See more code snippets of
retebenito
clases php
generador de clases
mysql
mysql class
php
#Region "Soporte para que se pueda acceder a este formulario desde otro" Private Shared m_vb6FormDefInstance As CLASEGLOBAL Private Shared m_InitializingDefInstance As Boolean Public Shared Property DefInstance() As CLASEGLOBAL Get If m_vb6FormDefInstance Is Nothing Then m_InitializingDefInstance = True m_vb6FormDefInstance = New CLASEGLOBAL m_InitializingDefInstance = False End If DefInstance = m_vb6FormDefInstance End Get Set(ByVal Value As CLASEGLOBAL) m_vb6FormDefInstance = Value End Set End Property #End Region
Soporte para acceder a un formulario desde otro
Uploaded on
7/4/2008 1:16:44 PM
Programming Language:
visualbasic.net
By:
Brujit0
See more code snippets of
Brujit0
clases
formularios
propiedad
1
Help
Help by email
What is Naslu?
|
About Naslu
|
Contact
|
Terms of Use
|
Downloads
|
Webprogramacion.com
|
Blog
|
Top
Links
Select language:
Español
|
English
© 2009 naslu.com