Beruflich Dokumente
Kultur Dokumente
Unidad 3 - Paso 5
The objective of this work is to appropriate, know and identify the basic
concepts and identify web application management for the creation and
management of databases in web desktop environments. The strategy to use
is Learning Problem Based (PBL). Where it will be designed a manual of the
creation of the applications and desktop with a database where it allows us to
enter data, to erase, to modify registries.
Manual
1. Abrimos Visual Studio y all damos clic en Archivo Nuevo Proyecto:
5. En la carpeta Models vamos a crear una clase llamada Context, la cual contendr
los mtodos de conexin, creacin, modificacin, eliminacin y consulta de la base de
datos, primero damos clic derecho en la carpeta Agregar Nuevo Elemento:
Luego damos clic en Cdigo y seleccionamos clase, le damos el nombre que
queremos y damos clic en aceptar.
6. En la clase creamos un mtodo llamado ConectarBaseDatos, la cual nos permitir
verificar si nos podemos conectar a la base de datos, es necesario importar la librera
System.Data.SqlClient:
Cdigo VB:
Tambin agregamos el cdigo necesario para consultar sobre la base de datos en el
evento Page_Load, primero instanciamos la clase Context, que fue creada
anteriormente, luego generamos la sentencia de consulta en Transact SQL y lo
guardamos en un String, el cual ser utilizado como parmetro del mtodo que
permite consultar la informacin en la base de datos. El objeto DataSet obtenido,
se asigna en la propiedad DataSource del GridView, y se carga con el evento
DataBind().
Resultado:
11. Creamos un formulario para crear los usuarios y los controles necesarios para obtener
los datos del usuario:
Cdigo HTML:
Arrastramos los TextBox (campos de texto) y el Calendar necesarios para crear
el formulario:
Cdigo VB:
Para hacer el cdigo de insercin del formulario, se debe instanciar primero la clase
Context, se debe tambin generar la sentencia de insercin, para esto utilizamos el
mtodo Format de la clase String.
We can conclude this work understanding the use and utility of designing and
obtaining a manual for the development of a web application and desktop with the
handling and use of databases are very significant in a company or company is large
medium or small , Since they allow us to create and store, delete records of data and
information in a very organized and orderly way allowing to take control and success
in an organization or business university among others efficiently, databases have
contributed significantly in The development of programming and analysis of
information systems (software) app.