Visual Basic.NET - Problema con el error '<nombre>' no es un miembro de '<nombreClase>'

 
Vista:

Problema con el error '<nombre>' no es un miembro de '<nombreClase>'

Publicado por Christopher (1 intervención) el 04/10/2013 00:46:05
Saludos tengo el siguiente problema estoy elaborando una aplicacion en VB.NET pero al ejecutar la aplicacion me da el siguiente error: 'insertar_Persona' no es un miembro de 'CpDatos.ClsPersonas'.

este es mi codigo

Capa datos

ClsPersonas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Imports System.Data.SqlClient
Imports System.Data
Imports CpEntidad
 
Public Class ClsPersonas
    Inherits Conexiones
    Public Function insertar_Persona(ByVal dts As objPersonas) As Boolean
        Dim cmd As New SqlCommand
        Try
            conectado()
            cmd = New SqlCommand("insertar_Persona")
            cmd.CommandType = CommandType.StoredProcedure
            cmd.Connection = cnn
            cmd.Parameters.AddWithValue("@NombrePersona", dts.gNombrePersona)
            cmd.Parameters.AddWithValue("@Cedula", dts.gCedula)
            cmd.Parameters.AddWithValue("@Telefono", dts.gTelefono)
            cmd.Parameters.AddWithValue("@Email", dts.gEmail)
            cmd.Parameters.AddWithValue("@Provincia", dts.gProvincia)
            cmd.Parameters.AddWithValue("@Canton", dts.gCanton)
            cmd.Parameters.AddWithValue("@DireccionExacta", dts.gDireccionExacta)
 
            If cmd.ExecuteNonQuery Then
                Return True
            Else
                Return False
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
            Return False
        Finally
            desconectado()
        End Try
    End Function
End Class


Capa de Presentacion

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Imports CpEntidad
Imports CpDatos
 
Public Class wdwInsertarPersona
    Public dts As New objPersonas
    Dim persona As New ClsPersonas
 
 
    Private Sub btnInsertar_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button1.Click
        Try
 
 
 
            dts.gNombrePersona = txt_nombre
            dts.gCedula = txt_cedula
            dts.gTelefono = txt_telefono
            dts.gEmail = txt_email
            dts.gProvincia = txt_provincia
            dts.gCanton = txt_canton
            dts.gDireccionExacta = txt_direccion
            If persona.insertar_Persona(dts) Then
                MsgBox("Se ha registrado correctamente", MsgBoxStyle.Information)
 
 
            Else
                MsgBox("Error al registrar", MsgBoxStyle.Exclamation, "Información")
 
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class

Gracias
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder