Вы находитесь на странице: 1из 29

Materia:

Programacin II (PROG2-V01)
Seccin: 01
Profesor:
Ingeniero Jos Guillermo Rivera Pleitez
Alumnos:

Alumno Carnet
1 Evert Fernando Rivas Castillo 29-5588-2015

2 Juan Carlos Chavez Escobar 29-4385-2015

3 Erick Antonio Figueroa Gonzalez 29-4038-2013

Actividad Grupal Evaluada Para la Nota 2.

Fecha: Domingo 07 de Mayo de 2017.


ndice.

Portada..Pgina 1

ndice.....Pgina 2

Objetivos..Pgina 3

Introduccin........Pagina 3

Descripcin de aplicacin......Pgina 4-6

Cdigo HTML y C#............................Pgina 6-24

Capturas de pantalla.Pagina 24-28

ConclusionesPagina 28

Recomendaciones...Pagina 29

Bibliografa....Pagina 29
Objetivos.

Objetivo General:
Desarrollo de una aplicacin de ventas para una tienda de electrodomsticos haciendo uso de los temas impartidos
as como tambin de las prcticas realizadas tratando de Explicar los componentes y el modelo de acceso a datos
ADO.net. describiendo las diferentes clases de Framework .NET utilizadas para el acceso a datos en ASP.NET y
su forma de uso , identificando las aplicaciones con acceso a datos y el repositorio general de datos que permite la
administracin de los mismos creando aplicaciones utilizando controles de origen de datos.

Objetivos especficos:
2.1. Modelo de objetos con ADO.NET
2.2. Clases del Framework .NET para el acceso a datos en ASP .NET.
2.3. Contenedores de datos.
2.4. Orgenes de datos.

Introduccin
En el presente proyecto se tiene como objetivo la creacin de un sistema para una tienda de ventas de
electrodomsticos, la aplicacin ha sido creada y configurada con el software Visual Studio y se ha utilizado el
motor de bases de datos SQL para el almacenaje de los datos ingresados. Apoyndonos en las practicas
realizadas y haciendo usos de los temas impartidos por el docente para la unidad II:

2.1. Modelo de objetos con ADO.NET


2.2. Clases del Framework .NET para el acceso a datos en ASP .NET.
2.3. Contenedores de datos.
2.4. Orgenes de datos.
Descripcin de la aplicacin.
Se ha diseado un sitio web default de la empresa Electrodomsticos Salvadoreos S.A. de C.V. desde donde
podemos ingresar a los diferentes mdulos o pginas que han sido nombrados como:

1. Pgina de Inicio
2. Ingresos de Inventario
3. Consulta de Inventario
4. Pgina de Ventas
5. Administracin de Inventario.

Pgina de Inicio: como su nombre lo dice esta pgina es la primera que visualizaremos y desde esta podremos
hacer el login al sistema y navegar entre los diferentes mdulos.

Ingresos de inventario: como su nombre lo detalla es la pgina para realizar las altas del sistema en ella
ingresamos los productos que tendremos en stock.

Consulta de inventario: esta pgina fue creada para realizar consultas en el stock existente ya sea por producto,
tipo, precio, etc.

Pgina de Ventas: este es el modulo donde se hacen las ventas o descargos del inventario y en donde se imprimen
los comprobantes para respaldar las ventas realizadas.

Administracin de inventario: desde este mdulo podemos realizar los ajustes manualmente en un dado caso sea
necesario eliminando o modificando los registros existentes en el momento de realizar las modificaciones
pertinentes.

Manual de Aplicacin.
1. El usuario debe de abrir la aplicacin la cual lo llevara a la pgina de inicio en donde el usuario debe de
ingresar con su login autorizado.

2. Dependiendo de la operacin el usuario debe de seleccionar y navegar en las distintas pginas para las
diferentes operaciones.
a. Pgina de ingresos al inventario.

b. Pgina de consultas de inventario

c. Pgina de administracin del inventario

d. Pgina de ventas
e. Pgina de inicio

f. Pgina de login.

3. Desde las pginas antes mencionadas el usuario podr realizar la administracin correcta y eficiente del
inventario.

Cdigo HTML y C#.


Default

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.nuevoEstilo1 {
background-image: url('electro.jpg');
}
.auto-style1 {
width: 777px;
height: 729px;
}
.auto-style2 {
text-align: center;
height: 19px;
}
.auto-style3 {
text-align: center;
font-size: xx-large;
height: 72px;
}
.auto-style4 {
height: 46px;
text-align: justify;
}
.auto-style11 {
text-align: center;
width: 383px;
height: 42px;
}
.auto-style12 {
text-align: center;
width: 384px;
height: 42px;
}
.auto-style14 {
text-align: center;
height: 437px;
}
.auto-style18 {
text-align: center;
font-size: xx-large;
height: 72px;
width: 321px;
}
.auto-style19 {
height: 46px;
text-align: justify;
width: 321px;
}
.auto-style20 {
text-align: center;
width: 321px;
height: 42px;
}
.auto-style21 {
text-align: center;
height: 437px;
width: 321px;
}
.auto-style22 {
text-align: center;
height: 19px;
width: 321px;
}
.auto-style23 {
text-align: center;
height: 42px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style18">&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td class="auto-style3" colspan="2">ELECTRODOMESTICOS SALVADOREOS S.A. DE C.V.</td>
</tr>
<tr>
<td class="auto-style4"></td>
<td class="auto-style4"></td>
<td class="auto-style4"></td>
<td class="auto-style4"></td>
<td class="auto-style4"></td>
<td class="auto-style4"></td>
<td class="auto-style4"></td>
<td class="auto-style4">&nbsp;</td>
<td class="auto-style4">&nbsp;</td>
<td class="auto-style4">&nbsp;</td>
<td class="auto-style4">&nbsp;</td>
<td class="auto-style4"></td>
<td class="auto-style19"></td>
<td class="auto-style4"></td>
<td class="auto-style4" colspan="2">Electrodomesticos Salvadoreos S.A. de C.V. se
enorgullece de tener mas de 100 aos de experiencia en la venta y distribucion de una variedad de
electrodomesticos con el respaldo de nuestra garantia y sobre todo a precios accesibles.</td>
</tr>
<tr>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style20">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/agregar .aspx">Ingreso
de Inventario</asp:HyperLink>
</td>
<td class="auto-style12">
<asp:HyperLink ID="HyperLink3" runat="server"
NavigateUrl="~/consultar.aspx">Consulta de Inventario</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style20">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style23" colspan="2">
<asp:HyperLink ID="HyperLink6" runat="server"
NavigateUrl="~/empleados.aspx">Registrar nuevo empleado</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style20">&nbsp;</td>
<td class="auto-style11">&nbsp;</td>
<td class="auto-style11">
<asp:HyperLink ID="HyperLink4" runat="server" NavigateUrl="~/ventas.aspx">Pagina de
Ventas</asp:HyperLink>
</td>
<td class="auto-style12">
<asp:HyperLink ID="HyperLink5" runat="server"
NavigateUrl="~/administracion.aspx">Administracion de Inventario</asp:HyperLink>
</td>
</tr>
<tr>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<td class="auto-style14">&nbsp;</td>
<tdclass="auto-style14">&nbsp;</td>
<tdclass="auto-style21">&nbsp;</td>
<tdclass="auto-style14">&nbsp;</td>
<tdclass="auto-style14" colspan="2">
<br />
<br />
<asp:Image ID="Image1" runat="server" Height="428px"
ImageUrl="~/imagenes/electro.jpg" Width="887px" />
</td>
</tr>
<tr>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style22">&nbsp;</td>
<td class="auto-style2">&nbsp;</td>
<td class="auto-style2" colspan="2">TAREA GRUPAL II PROGRAMACION II CICLO O1/2017 GRUPO
#8</td>
</tr>
</table>

</div>
</form>
</body>
</html>

Consultar

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class consultar : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="consultar.aspx.cs" Inherits="consultar" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.nuevoEstilo1 {
background-image: url('electro.jpg');
}
.auto-style1 {
width: 100%;
}
.auto-style2 {
text-align: center;
}
.auto-style3 {
text-align: center;
font-size: xx-large;
}
</style>
</head>
<body style="background-image: url(http://localhost:59721/imagenes/electro3.jpg)">
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td class="auto-style3" colspan="2">PAGINA DE CONSULTA DE INVENTARIO</td>
</tr>
<tr>
<td colspan="2">
<br />
<br />
</td>
</tr>
<tr>
<td>
<br />
Codigo de producto
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Consultar" />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<br />
<br />
<br />
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style2" colspan="2">&nbsp;</td>
</tr>
</table>

</div>
</form>
</body>
</html>

Ventas

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ventas : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ventas.aspx.cs" Inherits="ventas" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.nuevoEstilo1 {
background-image: url('electro.jpg');
}
.auto-style1 {
width: 100%;
}
.auto-style2 {
text-align: center;
font-size: x-large;
}
.auto-style3 {
text-align: center;
font-size: xx-large;
}
</style>
</head>
<body style="background-image: url(http://localhost:59721/imagenes/electro3.jpg)">
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td class="auto-style3" colspan="2">Pagina de Ventas de Tienda de
Electrodomesticos</td>
</tr>
<tr>
<td colspan="2">
&nbsp;</td>
</tr>
<tr>
<td>
Nombre del cliente
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<br />
Usuario que realiza la venta <asp:TextBox ID="TextBox1"
runat="server"></asp:TextBox>
<br />
Codigo de producto <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
Cantidad
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<br />
precio final
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" Text="Procesar Venta" />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<br />
<br />
<br />
<br />
<br />
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style2" colspan="2"><strong>TAREA GRUPAL II PROGRAMACION II CICLO
O1/2017 GRUPO #8</strong></td>
</tr>
</table>
</div>
</form>
</body>
</html>

LogIn

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ingresos : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)


{

}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="ingresos" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.auto-style1 {
text-align: left;
}
.auto-style2 {
width: 100%;
}
.auto-style3 {
text-align: center;
}
</style>
</head>
<body style="background-image: url(http://localhost:59721/imagenes/electro3.jpg)">
<form id="form1" runat="server">
<div class="auto-style1">
<table class="auto-style2">
<tr>
<td>&nbsp;</td>
<td class="auto-style3">REGISTRAR NUEVO EMPLEADO</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>ingrese el nombre del nuevo empleado:<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style1">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>Ingrese el apellido:<br />
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style1">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>sexo:<br />
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style1">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-
style1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp; </td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>fecha de nacimiento:<br />
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>numero de documento:<br />
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>direccion:<br />
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>numero de telefono:<br />
<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>ingrese el numero de ID del nuevo trabajador:<br />
<asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>ingrese su nuevo paswword:<br />
<asp:TextBox ID="TextBox9" runat="server" TextMode="Password"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:Button ID="Button1" runat="server" Text="registrar" />
&nbsp;
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:LinkButton ID="LinkButton1" runat="server"
PostBackUrl="~/Default.aspx">regresar</asp:LinkButton>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data
Source=ROBERTO-PC\SQLEXPRESS;Initial Catalog=ELECTRONICS;Integrated Security=True"
OnSelecting="SqlDataSource1_Selecting" ProviderName="System.Data.SqlClient"></asp:SqlDataSource>
</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</div>
</form>
</body>
</html>

Agregar

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class agregar_ : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="agregar .aspx.cs" Inherits="agregar_" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.nuevoEstilo1 {
background-image: url('electro.jpg');
}
.auto-style1 {
width: 100%;
}
.auto-style2 {
text-align: center;
}
.auto-style3 {
text-align: center;
font-size: xx-large;
color: #000000;
}
.auto-style4 {
color: #000099;
}
.auto-style5 {
color: #000000;
}
</style>
</head>
<body style="background-image: url(http://localhost:59721/imagenes/electro3.jpg)">
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td class="auto-style3" colspan="2"><strong>SITIO DE INGRESO AL INVENTARIO</td>
</tr>
<tr>
<td class="auto-style5">
<span class="auto-style5">Usuario </span>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br class="auto-style5" />
<span class="auto-style5">ID del producto</span><asp:CheckBoxList
ID="CheckBoxList1" runat="server" BorderColor="#666666" BorderStyle="Double" Width="395px">
<asp:ListItem>Television</asp:ListItem>
<asp:ListItem>DVD</asp:ListItem>
<asp:ListItem>Equipo de sonido</asp:ListItem>
<asp:ListItem>Refrigeradora</asp:ListItem>
<asp:ListItem>Microondas</asp:ListItem>
<asp:ListItem>Cocinas</asp:ListItem>
<asp:ListItem>Horno Tostador</asp:ListItem>
<asp:ListItem>Batidora</asp:ListItem>
<asp:ListItem>Licuadora</asp:ListItem>
<asp:ListItem>Tostadora</asp:ListItem>
<asp:ListItem>Procesador de Alimentos</asp:ListItem>
<asp:ListItem>Audifinos</asp:ListItem>
<asp:ListItem>BlueRay</asp:ListItem>
</asp:CheckBoxList>
<br class="auto-style5" />
<br class="auto-style5" />
<span class="auto-style5">Precio de Compra </span>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br class="auto-style5" />
<span class="auto-style5">Precio de Venta&nbsp; </span>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<br class="auto-style5" />
<br class="auto-style5" />
<asp:Button ID="Button1" runat="server" Text="Procesar" />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
<td>
<span class="auto-style5">Password </span><span class="auto-style4">
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
</span>
<br class="auto-style5" />
<span class="auto-style4"><span class="auto-
style5">Marca</span></span><asp:CheckBoxList ID="CheckBoxList2" runat="server" BorderColor="#666666"
BorderStyle="Double">
<asp:ListItem>LG</asp:ListItem>
<asp:ListItem>Sony</asp:ListItem>
<asp:ListItem>TLC</asp:ListItem>
<asp:ListItem>Apple</asp:ListItem>
<asp:ListItem>HP</asp:ListItem>
<asp:ListItem>Frigidaire</asp:ListItem>
<asp:ListItem>Mabe</asp:ListItem>
<asp:ListItem>Cetron</asp:ListItem>
<asp:ListItem>Samsung</asp:ListItem>
<asp:ListItem>Compaq</asp:ListItem>
<asp:ListItem>Vaio</asp:ListItem>
<asp:ListItem>Hawei</asp:ListItem>
</asp:CheckBoxList>
<br class="auto-style5" />
<br class="auto-style5" />
<br class="auto-style5" />
<br class="auto-style5" />
<span class="auto-style5">Stock Inicial </span>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<br class="auto-style5" />
<span class="auto-style5">Stock Final </span>
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<br />
<br />
</td>
</tr>
<tr>
<td class="auto-style2" colspan="2">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style2" colspan="2">TAREA GRUPAL II PROGRAMACION II CICLO O1/2017 GRUPO
#8</strong></td>
</tr>
</table>

</div>
</form>
</body>
</html>

Administracion

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class administracion : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="administracion.aspx.cs"


Inherits="administracion" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.nuevoEstilo1 {
background-image: url('electro.jpg');
}
.auto-style1 {
width: 100%;
}
.auto-style2 {
text-align: center;
}
.auto-style3 {
text-align: center;
font-size: xx-large;
}
</style>
</head>
<body style="background-image: url(http://localhost:59721/imagenes/electro3.jpg)">
<form id="form1" runat="server">
<div>
<table class="auto-style1">
<tr>
<td class="auto-style3" colspan="2">Pagina de Administracion de Inventarios</td>
</tr>
<tr>
<td colspan="2">
&nbsp;</td>
</tr>
<tr>
<td>
<br />
Codigo del producto<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<br />
Stock Inicial
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<br />
<br />
Stock Final
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Modificar" />
<br />
<br />
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<br />
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style2" colspan="2">&nbsp;</td>
</tr>
</table>

</div>
</form>
</body>
</html>

Empleados

using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Data.Sql;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class empleados : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

protected void Button1_Click(object sender, EventArgs e)


{
SqlDataSource1.SelectParameters["id_trabajador"].DefaultValue = TextBox1.Text;
SqlDataSource1.SelectParameters["pasword"].DefaultValue = TextBox2.Text;
SqlDataSource1.DataSourceMode = SqlDataSourceMode.DataReader;
SqlDataReader datos;
datos = (SqlDataReader)SqlDataSource1.Select(DataSourceSelectArguments.Empty);
if (datos.Read())
{
Label1.Text = "nombre:" + datos["nombre"] + "<br> el empleado tiene acceso para ingresar";

}
else
Label1.Text = "No existe un usuario con dicho id de trabajador o password revise la
informacion";
}

protected void LinkButton1_Click(object sender, EventArgs e)


{

}
}

HTML

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="empleados.aspx.cs" Inherits="empleados" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
}
.auto-style2 {
height: 23px;
}
.auto-style3 {
width: 423px;
}
.auto-style4 {
height: 23px;
width: 423px;
}
</style>
</head>
<body style="background-image: url(http://localhost:59721/imagenes/electro3.jpg)">
<form id="form1" runat="server">
<table class="auto-style1">
<tr>
<td class="auto-style3">&nbsp;</td>
<td>INGRESO DE EMPLEADO</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">ID de empleado:<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">Password:<br />
<asp:TextBox ID="TextBox2" runat="server" TextMode="Password"></asp:TextBox>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="ingresar" />
&nbsp;&nbsp;&nbsp;
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style3">&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td class="auto-style4">
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"
PostBackUrl="~/Default.aspx">regresar</asp:LinkButton>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </td>
<td class="auto-style2">
<asp:HyperLink ID="HyperLink1" runat="server">continuar</asp:HyperLink>
</td>
<td class="auto-style2"></td>
</tr>
<tr>
<td class="auto-style3">
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConflictDetection="CompareAllValues" ConnectionString="Data Source=ROBERTO-PC\sqlexpress;Initial
Catalog=ELECTRONICS;Integrated Security=True" ProviderName="System.Data.SqlClient"
SelectCommand="select idtrabajador from trabajador where id_trabajador=@id_trabajador ,
pasword=@pasword">
<SelectParameters>
<asp:Parameter Name="id_trabajador" />
<asp:Parameter Name="pasword" />
</SelectParameters>
</asp:SqlDataSource>
</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>

Captura de pantallas de ejecucin.


Default

Ingreso de inventario
Pgina de ventas

Pgina de consultas
Pgina de administracin de inventario

Empleados
Base de datos
Conclusiones.
Haciendo uso del software visual estudio, SQL server y de los temas impartidos por el docente se ha logrado de una manera
rpida y eficaz de disear la aplicacin de ventas para una tienda de electrodomsticos que el docente solicito, de tal manera
que en el futuro podremos realizar diseos de pginas o aplicaciones web durante nuestra vida profesional.
Recomendaciones
La creacin de pginas web puede ser fcil, sin embargo, que est sea un sitio interesante para los visitantes
puede ser todo un reto. A continuacin se mencionan algunas recomendaciones:

Compatibilidad de Navegadores (Browsers):

Toda pgina web tiene que poder ser visualizada con las ms recientes versiones de Netscape, Internet Explorer y
Opera. Y con lo de ms recientes versiones no me refiero a que hay que cargarlas de efectos de los ltimos
navegadores.

Facilidad de Navegacin:

Toda pgina web debe contar con un men de navegacin o estructura bien elaborado para que el visitante no se
pierda. Es recomendable incluir en todas las paginas links hacia la pgina principal y hacia las principales
secciones del sitio. De ser posible tambin un link hacia el email para enviar comentarios y un link para ir al inicio
de pgina. Una recomendacin es incluir un Mapa del Sitio para sitios muy extensos.

Rapidez al cargar pginas y grficas:

Lastimosamente Internet aun no ofrece gran velocidad a la mayora de usuarios. Debemos ayudar al visitante
reduciendo los contenidos de las pginas, evitando usar muchas grficas y de ser posible reducir a lo mximo el
tamao de las grficas.

Bibliografa.
1. https://es.wikipedia.org/wiki/Microsoft_Visual_Studio
2. https://es.wikipedia.org/wiki/Microsoft_SQL_Server
3. http://www.tutorialesprogramacionya.com/sqlserverya/
4. https://msdn.microsoft.com/es-es/library/s4yys16a(v=vs.90).asp

Вам также может понравиться