Académique Documents
Professionnel Documents
Culture Documents
Programación
El sitio web debe permitir la venta por internet y estar habilitado para
• Registrar a cada cliente
• Validar al cliente
• Mostrar un catalogo de los productos en venta
• Generar un carrito de compras y permitir su administración
• Disponer de una pasarela de pago
• Disponer de un módulo de administración y mantenimiento del sitio
Logotipo Imagen
Categorías Contenido
</head>
<frameset rows="110,*" frameborder="1" framespacing="0">
<frameset cols="195,*">
<frame name="Logotipo" src="logotipo.htm" scrolling="no">
<frame name="Imagen" src="ImagenLema.htm" scrolling="no">
</frameset>
<frameset cols="95,*">
<frame name="categorias" src="categorias.aspx">
<frame name="contenido" src="presentacion.htm">
</frameset>
</html>
<body>
<img src="imagenes/Neptuno.jpg" alt="Produtos gourmet para el mundo" height=100>
</body>
Añada un nuevo, elemento al proyecto web, html page ponga como nombre ImagenLema.htm
<body>
<img src="imagenes/Comunicandonos.jpg" width=580 >
</body>
<body>
</body>
USE Nwind
go
Use NWIND
Go
<head runat="server">
<title>Página sin título</title>
<base target="contenido">
</head>
20 Cambiar al modo diseño y hacer doble clic sobre un área libre para agregar el siguiente
código
Imports System.Data.SqlClient
Partial Public Class categorias
Inherits System.Web.UI.Page
Imports System.Data.SqlClient
Partial Public Class CatalogoProductos
Inherits System.Web.UI.Page
categoria = UCase(Request.QueryString("Categoria"))
cn = New SqlConnection("Integrated Security=SSPI;Persist Security Info=False;Initial
Catalog=Nwind;Data Source=PCSERVER")
ds = New DataSet
da.Fill(ds, "Productos")
dlProductos.DataSource = ds.Tables("Productos").DefaultView
dlProductos.DataBind()
End Sub
End Class
body {
background-color:#FFDAB9;
font-family:Verdana, arial;
font-size:11;
}
table, td {
font-size:8pt;
font-family:Verdana;
}
.titulo {
text-align :center ;
font-size:11pt;
font-weight :bold ;
}
.subtitulo {
text-align :center ;
font-size :8pt;
font-weight:bold;
}
.tituloIzquierdo {
text-align:left ;
font-size :11pt;
font-weight :bold ;
}
.tituloDerecho {
text-align :right ;
font-size:11pt;
font-weight :bold ;
}
.tituloMenor
{
text-align:center;
font-size :8pt;
font-weight :bold ;
}
.tituloIzqMenor {
text-align :left;
font-size :8;
font-weight :bold;
}
.tituloDerMenor
{
text-align:right ;
font-size :8pt;
font-weight :bold;
}
A:link {
color:Blue ;
text-decoration :none;
}
A:visited {
color:Red;
text-decoration :none;
}
A:hover {
color:Maroon;
text-decoration :underline;
}
input
{
font-size:9pt;
font-family:Verdana ;
}
.boton {
font-size :9pt;
font-family :Verdana ;
font-weight :bold;
}
<head>
<title>Desarrollado por Julio Larico</title>
<link href ="neptuno.css" rel="Stylesheet" type ="text/css" >
</head>
Para continuar con el presente proyecto, es necesario modificar la base de datos, tabla clientes.
Para ello siga las instrucciones del docente.
30 Situar el cursor dentro del área div e insertar una tabla con la siguiente configuración (21 col)
31 Diseñar lo siguiente
33 Para agregar el botón, haga clic en dicha celda, cambie a la vista código y escribir lo
siguiente
36 Cambie a la vista diseño, haga doble clic sobre el formulario web para abrir la vista código
en el archivo NuevoCliente.aspx.vb
39 Defina el procedimiento RegistrarCliente_Click que sera invocado por el boton Aceptar del
formulario
End If
comandoSQL.Parameters.Add(New SqlParameter("@NomEmp",
SqlDbType.NVarChar, 40))
comandoSQL.Parameters("@NomEmp").Value = txtNomEmp.Text
comandoSQL.Connection.Open()
Try
comandoSQL.ExecuteNonQuery()
Mensaje.Text = "Registro añadido"
Catch ex As Exception
Mensaje.Text = "Error" & ex.Message
Mensaje.ForeColor = Drawing.Color.Red
End Try
comandoSQL.Connection.Close()
End If
End Sub
Congratulaciones….
Ahora nos queda implementar el Carrito de Compras.