You are on page 1of 4

Buenos dias le le llama por el anuncio que requiere practicantes para

admisin de hotel soy estudiante de administracin de la unt estoy


interesado exactamente cuales son las ufunciones que requiere

Donde exactamente queda su local?


949472804

Imports CAPAENTIDIDAD
Imports CAPAACCESODEDATOS

Public Class Form1

Dim EP As New ENTIDADPEDIDOS


Dim MP As New METODOPEDIDO

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click


EP.PRODUCTONRO = Txtproductonro.Text
EP.CLIENTENRO = Txtclientenro.Text
EP.UNIDADES = TxtUnidades.Text
EP.FECHAPEDIDO = Txtfechapedido.Text

MP.REGISTRAR_PEDIDO(EP)
End Sub
End Class
Public Class ENTIDADPEDIDOS
Private _PRODUCTONRO As Integer
Private _CLIENTENRO As Integer
Private _UNIDADES As Integer
Private _FECHAPEDIDO As Date

Public Property PRODUCTONRO As Integer


Get
Return _PRODUCTONRO
End Get
Set(value As Integer)
_PRODUCTONRO = value
End Set
End Property

Public Property CLIENTENRO As Integer


Get
Return _CLIENTENRO
End Get
Set(value As Integer)
_CLIENTENRO = value
End Set
End Property

Public Property UNIDADES As Integer


Get
Return _UNIDADES
End Get
Set(value As Integer)
_UNIDADES = value
End Set
End Property

Public Property FECHAPEDIDO As Date


Get
Return _FECHAPEDIDO
End Get
Set(value As Date)
_FECHAPEDIDO = value
End Set
End Property

End Class

Imports System.Data.SqlClient

Public Class METODOPEDIDO

Dim BD As New SqlConnection(My.Settings.BASEDATOVENTAS)


Dim RG As New SqlCommand

Public Sub REGISTRAR_PEDIDO(ByVal ENPEDIDOS As


CAPAENTIDIDAD.ENTIDADPEDIDOS)
BD.Open()
RG = New SqlCommand("REGISTRARPEDIDO", BD)
RG.CommandType = CommandType.StoredProcedure
With RG.Parameters

.AddWithValue("@Pn", ENPEDIDOS.PRODUCTONRO)
.AddWithValue("@Cn", ENPEDIDOS.CLIENTENRO)
.AddWithValue("@Un", ENPEDIDOS.UNIDADES)
.AddWithValue("@Fp", ENPEDIDOS.FECHAPEDIDO)

End With

RG.ExecuteNonQuery()
BD.Close()
End Sub

End Class

You might also like