Ir al contenido principal

Entradas

Mostrando entradas de 2013

SISE 4to LENG-PROG.II - EJEMPLOS DE PROYECTOS.

Jovenes buenas tardes tal y como les dije subo a continuacion proyectos de modulos anteriores de dos tipos. Ejemplos que trabajan solo con colecciones (mas sencillos y faciles no hay BD) https://docs.google.com/file/d/0B2--0q462jp_ZGthSHVINHlaS2M/edit?usp=sharing https://docs.google.com/file/d/0B2--0q462jp_N2RxWFNjWVlSVEU/edit?usp=sharing Ejemplos con BD

SISE 6to DES.APP.MOVILES. WINDOWS PHONE VIDEOS COMO USAR LINQ

Jovenes a continuacion les pongo 3 videos realizados con windows phone 7.5 pero aplica tambien para el 8, no obstante les hago recordar que el trabajo es individual y se presenta el dia viernes de esta semana. Desacargar de los links siguientes parte 1 parte 2 parte 3  (corregido) Saludos. Prof. Heriberto Vásquez.

NOTAS FINALES LENGUAJE DE PROGRAMACION III, SECCION 5S

Señores buenas noches hay problemas para subir sus notas a la intranet de sise con la seccion 5S pongo a continuación las notas. Codigo Promedio Final 220101161 13 220101018 17 220101114 16 720102010 17 620102001 13 220110002 17 220082171 15 220110005 11 220082039 13 620101045 14 Disculpas por los inconvenientes. NOTA: SI ALGUIEN TIENE ALGUNA DUDA CON SU NOTA PROMEDIO ME BUSCA MAÑANA MARTES 16 DE 8:50 A 10:30 LAB 6 Saludos. Prof. Heriberto Paúl Vásquez Ruíz

Ejemplo JPA

Creamos una BD con el siguiente modelo E - R. O ejecutan los siguientes scripts en su motor de SGBD Sql Server

Lenguaje de Programacion II, Callable Statement

Ejecutar el siguiente script /****** Object:  Database [BD_EjemploJDBC]    Script Date: 04/01/2013 20:08:04 ******/ CREATE DATABASE [BD_EjemploJDBC] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[TComentario]( [Id] [numeric](18, 0) IDENTITY(1,1) NOT NULL, [Nombres] [varchar](100) NULL, [email] [varchar](50) NULL, [dni] [char](8) NULL, [observacion] [varchar](500) NULL,  CONSTRAINT [PK_TComentario] PRIMARY KEY CLUSTERED ( [Id] ASC )WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY] ) ON [PRIMARY] GO SET ANSI_PADDING OFF GO

Activities and Itents

Clase Adapter package com . example . visorimagenes ; import android . content . Context ; import android . graphics . Color ; import android . view . View ; import android . view . ViewGroup ; import android . widget . BaseAdapter ; import android . widget . Button ; import android . widget . EditText ; import android . widget . GridView ; import android . widget . ImageView ; public class ImagenAdapter extends BaseAdapter { private Context mContext ; private Integer [ ] mThumbIds = null ; public ImagenAdapter ( Context c , Integer [ ] imagenes ) { mContext = c ; mThumbIds = imagenes ; } public int getCount ( ) { return mThumbIds . length ; } public Object getItem ( int position ) { return null ; } public long getItemId ( int position ) { return 0 ; } /* * getView se llama automaticamente recuperando cada uno de l

GridView en Android

--------------------- Adapter --------------------- package com.example.visorimagenes; import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; public class ImagenAdapter extends BaseAdapter {  private Context mContext;  public ImagenAdapter(Context c) {   mContext = c;  }  public int getCount() {   return mThumbIds.length;  }  public Object getItem(int position) {   return null;  }  public long getItemId(int position) {   return 0;  }  // create a new ImageView for each item referenced by the Adapter  @Override  public View getView(int position, View convertView, ViewGroup parent) {   ImageView imageView;   if (convertView == null) { // if it's not recycled, initialize some          // attributes    imageView = new ImageView(mContext);    imageView.setLayoutParams(new GridView.LayoutParams(85, 85));    imageView.setScaleType(ImageView.ScaleTy

LP IV Custom Views en Android

Descargar la siguiente imagen. Icono Celular Creamos un archivo colors.xml dentro de la carpeta values <?xml version="1.0" encoding="utf-8"?> <resources>     <color name="red">#ff0000</color> <color name="green">#00ff00</color> <color name="blue">#0000ff</color> <color name="orange">#ff6000</color> <color name="white">#ffffff</color> <color name="black">#000000</color> <color name="light_gray">#dddddd</color> </resources> Nuevo layout de nombre "master_layout" en la carpeta layout <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:orientation="

03/01/2013 SISE PUEDE DAM

Metodos de eliminacion Private Sub eliminarclienteBD ( ByVal pnombres As String , ByVal papellidos As String , _ ByVal pDireccion As String , ByVal pdni As String ) Dim myStoreBD As New StoreBD ( ) Try Dim queryCliente As IQueryable ( Of Cliente ) = From c In myStoreBD . Cliente Where c . Dni = pdni Select c Dim updateCliente As Cliente = queryCliente . FirstOrDefault 'actualizamos el registro updateCliente . Nombre = pnombres updateCliente . Apellidos = papellidos updateCliente . Direccion = pDireccion myStoreBD . SubmitChanges ( ) Catch ex As Exception Finally End Try End Sub Private Sub eliminarclienteBD ( ByVal pdni As String ) Dim myStoreBD As New StoreBD ( ) Try Dim queryCliente As IQueryable ( Of Cliente ) = From

03/01/2013 DAM

Clase Entidad en Linq Imports System . Data . Linq Imports System Imports System . Collections . Generic Imports System . ComponentModel Imports System . Data Imports System . Data . Linq . Mapping Imports System . Linq < Table ( Name : = "TContactenos" ) > _ Public Class CContactenos Private _Id As Long Private _Nombres As String Private _Dni As String Private _Email As String Public Sub New ( ) MyBase . New ( ) End Sub < Column ( Storage : = "_Id" , DbType : = "BigInt NOT NULL" , IsPrimaryKey : = True ) > _ Public Property Id ( ) As Long Get Return Me . _Id End Get Set ( value As Long ) If ( String . Equals ( Me . _Nombres , value ) = False ) Then Me . _Id = value End If End Set End Property < Column ( Storage : = &qu

DAM 02/01/2013 SQL CE con LinQ en WP 7

Clase Ejemplo de como Enlazar a una BD y una Tabla Con System.Data.LinQ Option Strict On Option Explicit On Imports System Imports System . Collections . Generic Imports System . ComponentModel Imports System . Data Imports System . Data . Linq Imports System . Data . Linq . Mapping Imports System . Linq Imports System . Linq . Expressions Imports System . Reflection Namespace PhoneAppLinQ Partial Public Class MyBD Inherits System . Data . Linq . DataContext Private Shared mappingSource As System . Data . Linq . Mapping . MappingSource = New AttributeMappingSource Public Sub New ( ByVal connection As String ) MyBase . New ( connection , mappingSource ) End Sub Public Sub New ( ByVal connection As String , ByVal mappingSource As System . Data . Linq . Mapping . MappingSource ) MyBase . New ( connection , mappingSource ) End Sub