Manual Del Programmador
description
Transcript of Manual Del Programmador
1 SOFBATEC 1.0DERECHOS RESERVADOS
1
2 SOFBATEC 1.0DERECHOS RESERVADOS
“SISTEMA GESTOR DE MATRICULAS Y CALIFICACION DEL
BACHILLERATO TECNICO AUTODITIGIDO”
Roy Tejedor MedinaAlfredo Corpas Salcedo
Ian Sevilla Ramirez
Proyecto para Aplicaciones Comerciales como Requisito de Grado
Ingeniero Asesor Audis Munive
BarranquillaCentro Inca
Análisis y Programación de ComputadoresAsesoria en aplicaciones Comerciales
Febrero de 2009
2
3 SOFBATEC 1.0DERECHOS RESERVADOS
INDICE Páginas
Especificacion funcional…………………………………………………….4
Modelo entidad relación base de datos…………………………………….8
Diccionario de datos ………………………………………………………...9
Código formulario presentación…………………………………………..17
Código control de acceso…………………………………………………...20
Codigo de usuarios…………………………………………………………28
Codigo de perfil de usuario………………………………………………..46
Codigo menú principal……………………………………………………66
Codigo registrar matriculas………………………………………………71
Codigo Consultar estudiantes…………………………………………….93
Codigo registros de asignaciones de asignaturas por grados………......162
Codigo registro para la descripción de los logros……………………….176
Codigo registro de docentes………………………………………………193
Codigo registro de asignación de materias de docentes………………..209
Codigo registro de nivelación de asignaturas…………………………...227
Codigo registrar graduandos…………………………………………….285
Codigo registrar ciudades……………………………………………….288
Codigo registrar departamentos………………………………………..306
3
4 SOFBATEC 1.0DERECHOS RESERVADOS
Codigo registrar países………………………………………………….325
Codigo imprimir boletines………………………………………………340
Codigo impresión de certificados……………………………………….377
Codigo ayuda softbatec…………………………………………………383
Codigo registro de asignación materias a docentes…………………..387
Codigo Reportes boletines……………………………………………..391
Codigo reportes calificaciones…………………………………………395
Codigo reportes certificados matriculas……………………………...399
Codigo reportes certificados de notas………………………………...403
Codigo certificados descripción logros……………………………….406
Codigo reportes docentes……………………………………………...410
Codigo reportes graduandos………………………………………….413
Codigo reportes de nivelacion de asignaturas………………………417
Codigo de botones de navegaccion
“SISTEMA GESTOR DE MATRICULAS Y CALIFICACIONES DEL BACHILLERATO AUTODIRIGIDO”
“SOFTBATEC”
Especificación Funcional
Se quiere automatizar el sistema de matriculas del bachillerato técnico autodirigido.
Que se requiere: Permita matricular los estudiantes de bachillerato técnico autodirigido con los
siguientes requisitos:
Datos personales del estudiante: Nombres
4
5 SOFBATEC 1.0DERECHOS RESERVADOS
Apellidos identificación lugar de expedición Lugar de nacimiento Edad Teléfono Dirección residencial barrio Ciudad Ultimo colegio donde estudio Año (curso anterior) Fecha ingreso Fecha de egreso Observaciones
Datos personales del acudiente: Nombres apellidos identificación lugar de expedición dirección residencial teléfono parentesco actividad a que se dedica
Matricula Tipo de matricula
Normal Condicional repitente
Forma de pago Normal Descuento especial becado
recibo matricula N0. Grado (a matricular) Numero interno Grupo (a, b, c…
Imprima certificados de matricula donde muestre: nombre de la institución nombre del estudiante apellidos del estudiante identificación lugar de expedición grado (que esta cursando) año lectivo horarios de clases.
5
6 SOFBATEC 1.0DERECHOS RESERVADOS
Necesidad: Los grados y asignaturas manejadas en el bachillerato técnico son las siguientes:
6 y 7º (matemáticas, español, artes, tecnología y sistemas, sociales, religión, ingles, naturales).
8 y 9º (matemáticas, artísticas, tecnología, español, naturales, religión, ingles, sociales)
10 (filosofía, religión, artes graficas, química, física, español, tecnología, ingles, matemáticas
11º(filosofía, religión, artes graficas, química, física, español, tecnología, ingles, matemáticas
El horario de clases del bachillerato técnico, los días sábados empieza a las 7:00am Hasta las 4:00pm
Las clases son desarrolladas en la sede 2 Los grados manejados son de 6º hasta 11º Los grupos manejados son de A hasta D Los periodos son 2
Ingreso de logros de cada una de la asignaturas [enumerados del 1 al 15]
Imprima planilla de calificaciones y logros en blanco donde muestre de cada uno de los estudiantes donde: Nombre de la institución Grado Asignatura Fecha de proceso Periodo Nombre del docente Numero de lista Numero interno Nombre de los estudiantes Apellidos de los estudiantes
Imprima un listado de todos los graduandos del bachillerato técnico con sus
respectivos: nombres Apellidos identificación lugar de expedición fecha de grado Nº de acta de grado Folio
consulta general de cada alumno donde muestre: nombres apellidos identificación lugar de expedición aprobó o reprobó el grado cursado Nombres de asignatura
6
7 SOFBATEC 1.0DERECHOS RESERVADOS
Su respectiva calificación Numero lista
crear y modificar la clave del usuario, como seguridad para acceder al sistema.
Imprima boletines donde muestre: nombre de la institución año lectivo grado nombre del estudiante apellidos del estudiantes identificación lugar de expedición indicadores de logros notas de cada estudiante de manera cualitativa donde :
E = excelente S = sobresaliente A = aceptable I = insuficiente
imprimir nivelación de asignaturas de los estudiantes donde muestre: nombre del alumno apellidos no. acta nivelación fecha nivelación resultado
Imprima certificados de notas donde muestre: nombre del estudiante apellidos identificación grado fecha del año lectivo intensidad horaria materias y notas.
Ingreso de notas de manera cualitativa, Nombre del estudiante Identificación Numero de listas. Es decir con su respetiva variable Ej. E: excelente S: sobresaliente A: aceptable I: insuficiente
7
8 SOFBATEC 1.0DERECHOS RESERVADOS
8
9 SOFBATEC 1.0DERECHOS RESERVADOS
El anterior esquema muestra las relaciones entre las tablas de la base de datos de “SOFTBATEC”, aquí están ubicadas todas y cada una de las tablas que se utilizan para la funcionalidad de “SOFTBATEC”
DICCIONARIO DE DATOS
9
10 SOFBATEC 1.0DERECHOS RESERVADOS
Tbl_Estudiantes: Con los datos de esta tabla podemos tener información necesaria acerca de cada uno de los estudiantes.
Nombre Tipo longitud Restricción Validación Descripción
fld_identificacion_estudiante texto 15 Primary key solo números
Identificación del estudiante
fld_lugarexp_id Texto 30 texto Solo letras Lugar de expedición donde fue solicitado el documento
fld_lugar_nacimiento Texto 30 Not null Solo letras Nombre de la ciudad o municipio donde nació el estudiante
fld_fecha_nac Texto 10 Texto Texto Mes, día y año en que nació el estudiante
fld_nombres_estudiante Texto 30 Not nul Solo letras Nombres completos del estudiante
fld_apellidos_estudiante Texto 30 Not null Solo letras Apellidos completos del estudiante
fld_edad_estudiante Texto 25 Numero Numeros Edad del estudiante fld_telefono_estudiante texto 10 Not null Solo
números Teléfono fijo o celular del estudiante
fld_direccion_estudiante Texto 15 Texto Alfanumérico
Dirección residencial del estudiante
fld_barrio_residenciaestd Texto 30 Texto Texto Nombre del barrio donde reside
fld_ciudad texto 20 Not null Solo letras Nombre de la ciudad donde reside
fld_ult_colegio Texto 30 Tex Texto Nombre del ultimo colegio donde estudio
fld_ult_año_cursado Texto 10 Texto Texto Ultimo año cursado en numero
fld_fecha_ingreso Texto 10 Texto Texto Fecha de ingreso ala institución del estudiante
fld_fecha_egreso Texto 10 Texto Texto Fecha de egreso de la institución del estudiante
10
11 SOFBATEC 1.0DERECHOS RESERVADOS
fld_observaciones Texto 100 Texto Texto Observaciones para el estudiante
Tbl_asignaturas: En esta tabla obtendremos información acerca de las asignaturas y las horas de intensidad de cada una de ellas.
Nombre Tipo Longitud Restricción Validación Descripción
fld_cod_asignatura Numero 3 Primary key Solo numeros
Código asignatura el cual nos ayudara a saber que profesor da la asignatura
fld_asignaturas Texto 30 Not null Solo letras Nombre de la asignatura
fld_int_horaria Texto 15 Numero Numero Intensidad horaria indica cada las horas de cada asignatura
Tbl_docentes: en esta tabla mostraremos información de los profesores con sus respectivas materias
Nombre Tipo longitud Restricción Validación Descripción
fld_id_docente Numero 15 Primary key Solo numeros Identificación del docente o Nº documento de identidad
fld_nom_asignatura Texto 20 Not null Solo letras Nombre de la asignatura que darán los docentes
fld_nom_docente Texto 30 Not null Solo letras Nombres completos del docente
fld_apell_docente Texto 30 Not null Solo letras Apellidos completos del docente
fld_grado Texto 15 Texto Texto Grado donde le corresponde cada asignatura
Tbl_matriculas: en esta tabla veremos a todos los estudiantes matriculados en la institución.
11
12 SOFBATEC 1.0DERECHOS RESERVADOS
Nombre Tipo longitud Restricción Validación Descripción
fld_id_estudiante Numero 15 Foreign key Solo letras Identificación del estudiante para la matricula
fld_tipo_matricula Texto 30 Not null Solo letras Tipo de matricula descuento, becado
fld_tipo_pago Texto 30 Not null Solo letras Tipo de pago de contado, por cuotas
fld_numero_matricula Numero 3 Numero Numero Número de matriculas
fld_grado_matricula Texto 15 Texto Texto Grado actual el cual fue matriculado el estudiante
fld_numero_interno Numero 3 Numero Numero Numero interno dado por el usuario como identificación
fld_fecha_matricula Texto 10 Texto Texto Fecha de matriculación del estudiante
Tbl_calificacion estudiantes: en esta tabla veremos especificado al estudiante con sus Respectivas calificaciones
Nombre Tipo Longitud Restricción Validación Descripción
fld_id_estudiante Numero 15 Foreign key Solo numeros
Identificación del estudiante para dar su calificaciones correspondientes
fld_nom_estudiante Texto 30 Not null Solo letras Nombres del estudiante completo
fld_ape_estudiante Texto 30 Not null Solo letras Apellidos completos del estudiante
fld_grado Texto 15 Texto Texto Grado en que se encuentra el estudiante
12
13 SOFBATEC 1.0DERECHOS RESERVADOS
fld_periodo Numero 3 Numero Solo numero
Periodo actual
Tbl_asignacion docentes materias: en esta tabla veremos a los docentes que darán respectivas materias
Nombre Tipo Longitud Restricción Validación Descripción
fld_grado_estudiante Texto 15 Texto Texto Grado actual del estudiante
fld_id_docente Numero 15 Foreign key Solo numeros
Identificación del docente
fld_asignatura Texto 25 Foreign key Solo letras Nombre de la (s) asignaturas
Tbl_acudientes: en esta tabla veremos información de los acudientes de cada uno de los estudiantes.
Nombre Tipo longuitud Retriccion Validacion Descripción
fld_id_estudiante Numero 15 Foreign key
Solo numeros
Nº identificación del estudiante
fld_nombresyapellido_acudiente Texto 60 Not null Solo letras Nombre y apellidos de los acudientes del estudiante
fld_identificacion_acudiente Numero 15 Primery key
Solo numeros
Identificación del acudiente
fld_fecha_exp_id Texto 10 Texto Texto La fecha de expedición del documento de identidad
fld_lugar_exp_id Texto 20 Not null Solo letras Lugar de expedición del documento
fld_direccion_acudiente Texto 10 Texto Texto Dirección residencial del acudiente
fld_telefono_acudiente Numero 10 Numero Solo numeros
Nº de teléfono del
13
14 SOFBATEC 1.0DERECHOS RESERVADOS
acudiente fld_parentesco Texto 30 Not null Solo letras Parentesco
fld_actividad_dedicacion Texto 30 Not null Solo letas dedicación de la acudiente
Tbl_descripcion_logro: en este campo el usuario podrá digitar los logros alcanzados por el estudiante dependiendo de sus calificaciones
Nombre Tipo longuitud Retriccion Validacion Descripción
fld_codigologro Numero 2 Primary key
Solo números
Código del logro de la signatura
fld_descripcion_logro Texto 200 Not null Solo letras Descripción del logra de la asignatura
fld_grado Texto 15 Texto Texto Grado correspondiente a cada estudiante
fld_cod_asignatura Numero 2 Foreign key Solo Números
Código de la asignatura el cual debe ser numérico
Tbl_Graduados: en esta tabla veremos a los estudiantes que han sido graduados o egresado de la institución.
Nombre Tipo longitud Restricción Validación Descripción
fld_id_graduando Numero 15 Foreign key Solo números
Nº identificaron del estudiante graduado en la institución
fld_lugar_expedicion_id_graduando Texto 30 Not null Solo letras Lugar donde fue expedido el documento de identificación
fld_apellidos Texto 40 Not null Solo letras Apellidos completos del graduado
fld_nombres Texto 40 Not null Solo letras Nombres completos del graduado
fld_fecha_grado Texto 10 Texto Letras Fecha en que
14
15 SOFBATEC 1.0DERECHOS RESERVADOS
se graduófld_numero_acta Numero 5 números Solo
números Numero de acta de grado (numérico)
fld_folioTexto 15 numero Numero Numero de
folio (numérico)
Tbl_dptos: en esta atabla veremos el departamento donde se encuentra instalada institución o si en algunos casos si cuenta con otros establecimientos en otro departamento del país
Nombre Tipo Longitud Restricción Validación Descripción
fld_coddpto Texto 3 Primary key Solo números
Código del departamento (numérico)
fld_nombre Texto 20 Not null Solo letras Nombre del departamento
fld_codpais Numero 3 Foreign key Números Codigo del país
Tbl_paises: en esta tabla veremos en que país se encuentra la institución.
Nombre Tipo Longitud Restricción Validación Descripción
fld_codpais Numero 3 Primary key Numero Código del país
fld_nombre Texto 20 Not null Solo letras Nombre del país
Tbl_usuarios: tabla en que veremos cada usuario que tiene un acceso a la aplicación.
Nombre Tipo Longitud Restricción Validación Descripción
fld_codusuario Numero 10 numero Solo números
Código con que se registrara el usuario
fld_nombre Texto 25 Not null Solo letras Nombre con que se identificara el usuario
fld_clave Numero 10 Numero Solo Calve de
15
16 SOFBATEC 1.0DERECHOS RESERVADOS
números usuario este debe ser números
fld_codnivel Numero 10 Foreign key Solo números
Código de nivel de usuario
Tbl asignatura docente materia: esta tabla es para saber las materias que dan cada docente
Nombre Tipo Longitud Restricción Validación Descripción
fld_grado_estudiante Texto 20 Texto Solo letras Grado actual del estudiante
fld_id_docente Numero 15 Foreign key Solo números
N’identificacion del docente
fld_asignatura Texto 20 Foreign key Solo texto Asignaturas del estudiante
Tbll_datos alum_boletines:
Nombre Tipo Longitud Restricción Validación Descripción
fld_id_estudiante Numero 15 Foreign key Solo números
Documento reidentificación del estudiante
fld_ape_estudiante Texto 40 Not null Solo letras Apellidos de estudiante
fld_nom_estudiante Texto 40 Not null Solo letras Nombres del estudiante
fld_año Texto 10 Texto Solo letras Fecha. día mes y año
fld_semestre Texto Solo letras Semestre en que esta realizando el estudiante
fld_grado Texto Solo letras Grado actual
Tbl_ciudad: tabla donde veremos la ciudad donde se encuentra la institución.
Nombre Tipo Longitud Restricción Validación Descripción
16
17 SOFBATEC 1.0DERECHOS RESERVADOS
fld_codciudad Numero 3 Primary key Solo números
Código de la ciudad con que se identifica valor numérico
fld_nombre Texto 20 Not null Solo letras Nombre de la ciudad correspondiente
fld_coddpto Numero 3 Foreign key Solo números
Código del departamento con que pertenece la ciudad
Tbl_perfiles: Esta tabla sirve para grabar, modificar, eliminar y consultar un usuario
Nombre Tipo Longitud Restricción Validación Descripción
fld_cod_prefil Numero 3 Primary key Solo números
Descripción de el logro alcanzado por el estudiante
Fld_nombre Texto 30 Not null Solo letras Nombre de la signatura que ven los estudiantes
CODIGOS
Presentacion inicial
17
18 SOFBATEC 1.0DERECHOS RESERVADOS
Public Class Presentacion Inherits System.Windows.Forms.Form 'Private escri As frm_remisiones#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents pb_presen As System.Windows.Forms.ProgressBar
18
19 SOFBATEC 1.0DERECHOS RESERVADOS
Friend WithEvents Timer1 As System.Windows.Forms.Timer Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Me.pb_presen = New System.Windows.Forms.ProgressBar Me.Timer1 = New System.Windows.Forms.Timer(Me.components) Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.SuspendLayout() ' 'pb_presen ' Me.pb_presen.Location = New System.Drawing.Point(0, 312) Me.pb_presen.Maximum = 13000 Me.pb_presen.Name = "pb_presen" Me.pb_presen.Size = New System.Drawing.Size(552, 9) Me.pb_presen.TabIndex = 0 ' 'Timer1 ' Me.Timer1.Interval = 1000 ' 'Presentacion ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15) Me.ClientSize = New System.Drawing.Size(552, 336) Me.Controls.Add(Me.pb_presen) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.Name = "Presentacion" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Presentacion" Me.TopMost = True Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Presentacion_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.BackgroundImage = Image.FromFile(Application.StartupPath & "\IMAGENES\presentacion.png") Me.pb_presen.Value = 0 Me.pb_presen.Visible = False 'Me.BackgroundImage = Image.FromFile(Application.StartupPath & "\PRESENTACION.png") End Sub
Private Sub Presentacion_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
19
20 SOFBATEC 1.0DERECHOS RESERVADOS
Timer1.Enabled = True End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Me.pb_presen.Visible = True Dim i As Integer For i = 0 To Me.pb_presen.Maximum - 1 Me.pb_presen.Value = Me.pb_presen.Value + 1 If Me.pb_presen.Value = Me.pb_presen.Maximum Then Me.Timer1.Enabled = False Me.pb_presen.Value = 0 Me.Close() End If Next End Sub
Private Sub Presentacion_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing Sigue = True End SubEnd Class
1. Control de acceso
20
21 SOFBATEC 1.0DERECHOS RESERVADOS
Public Class frm_controldeacceso Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms.
21
22 SOFBATEC 1.0DERECHOS RESERVADOS
'No lo modifique con el editor de código. Friend WithEvents LBL_CODIGO As System.Windows.Forms.Label Friend WithEvents LBL_NOMBRE As System.Windows.Forms.Label Friend WithEvents LBL_CONTRASEÑA As System.Windows.Forms.Label Friend WithEvents BTN_ACEPTAR As System.Windows.Forms.Button Friend WithEvents BTN_CANCELAR As System.Windows.Forms.Button Friend WithEvents TXT_CODIGO As System.Windows.Forms.TextBox Friend WithEvents TXT_NOMBRE As System.Windows.Forms.TextBox Friend WithEvents TXT_CONTRASEÑA As System.Windows.Forms.TextBox Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox Friend WithEvents Label1 As System.Windows.Forms.Label <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frm_controldeacceso)) Me.LBL_CODIGO = New System.Windows.Forms.Label Me.LBL_NOMBRE = New System.Windows.Forms.Label Me.LBL_CONTRASEÑA = New System.Windows.Forms.Label Me.BTN_ACEPTAR = New System.Windows.Forms.Button Me.BTN_CANCELAR = New System.Windows.Forms.Button Me.TXT_CODIGO = New System.Windows.Forms.TextBox Me.TXT_NOMBRE = New System.Windows.Forms.TextBox Me.TXT_CONTRASEÑA = New System.Windows.Forms.TextBox Me.PictureBox1 = New System.Windows.Forms.PictureBox Me.Label1 = New System.Windows.Forms.Label Me.SuspendLayout() ' 'LBL_CODIGO ' Me.LBL_CODIGO.AutoSize = True Me.LBL_CODIGO.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_CODIGO.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_CODIGO.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LBL_CODIGO.ForeColor = System.Drawing.Color.Blue Me.LBL_CODIGO.Location = New System.Drawing.Point(48, 88) Me.LBL_CODIGO.Name = "LBL_CODIGO" Me.LBL_CODIGO.Size = New System.Drawing.Size(53, 19) Me.LBL_CODIGO.TabIndex = 0 Me.LBL_CODIGO.Text = "CODIGO" ' 'LBL_NOMBRE ' Me.LBL_NOMBRE.AutoSize = True Me.LBL_NOMBRE.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_NOMBRE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_NOMBRE.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LBL_NOMBRE.ForeColor = System.Drawing.Color.Blue
22
23 SOFBATEC 1.0DERECHOS RESERVADOS
Me.LBL_NOMBRE.Location = New System.Drawing.Point(40, 120) Me.LBL_NOMBRE.Name = "LBL_NOMBRE" Me.LBL_NOMBRE.Size = New System.Drawing.Size(57, 19) Me.LBL_NOMBRE.TabIndex = 1 Me.LBL_NOMBRE.Text = "NOMBRE" ' 'LBL_CONTRASEÑA ' Me.LBL_CONTRASEÑA.AutoSize = True Me.LBL_CONTRASEÑA.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_CONTRASEÑA.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_CONTRASEÑA.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LBL_CONTRASEÑA.ForeColor = System.Drawing.Color.Blue Me.LBL_CONTRASEÑA.Location = New System.Drawing.Point(16, 152) Me.LBL_CONTRASEÑA.Name = "LBL_CONTRASEÑA" Me.LBL_CONTRASEÑA.Size = New System.Drawing.Size(87, 19) Me.LBL_CONTRASEÑA.TabIndex = 2 Me.LBL_CONTRASEÑA.Text = "CONTRASEÑA" ' 'BTN_ACEPTAR ' Me.BTN_ACEPTAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ACEPTAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ACEPTAR.ForeColor = System.Drawing.Color.Black Me.BTN_ACEPTAR.Location = New System.Drawing.Point(96, 201) Me.BTN_ACEPTAR.Name = "BTN_ACEPTAR" Me.BTN_ACEPTAR.Size = New System.Drawing.Size(75, 32) Me.BTN_ACEPTAR.TabIndex = 3 Me.BTN_ACEPTAR.Text = "ACEPTAR" ' 'BTN_CANCELAR ' Me.BTN_CANCELAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_CANCELAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_CANCELAR.ForeColor = System.Drawing.Color.Black Me.BTN_CANCELAR.Location = New System.Drawing.Point(192, 201) Me.BTN_CANCELAR.Name = "BTN_CANCELAR" Me.BTN_CANCELAR.Size = New System.Drawing.Size(80, 32) Me.BTN_CANCELAR.TabIndex = 4 Me.BTN_CANCELAR.Text = "&CANCELAR" ' 'TXT_CODIGO '
23
24 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TXT_CODIGO.Location = New System.Drawing.Point(112, 88) Me.TXT_CODIGO.MaxLength = 10 Me.TXT_CODIGO.Name = "TXT_CODIGO" Me.TXT_CODIGO.Size = New System.Drawing.Size(64, 20) Me.TXT_CODIGO.TabIndex = 5 Me.TXT_CODIGO.Text = "" ' 'TXT_NOMBRE ' Me.TXT_NOMBRE.BackColor = System.Drawing.Color.RoyalBlue Me.TXT_NOMBRE.Location = New System.Drawing.Point(112, 120) Me.TXT_NOMBRE.MaxLength = 60 Me.TXT_NOMBRE.Name = "TXT_NOMBRE" Me.TXT_NOMBRE.ReadOnly = True Me.TXT_NOMBRE.Size = New System.Drawing.Size(120, 20) Me.TXT_NOMBRE.TabIndex = 6 Me.TXT_NOMBRE.Text = "" ' 'TXT_CONTRASEÑA ' Me.TXT_CONTRASEÑA.Location = New System.Drawing.Point(112, 152) Me.TXT_CONTRASEÑA.MaxLength = 50 Me.TXT_CONTRASEÑA.Name = "TXT_CONTRASEÑA" Me.TXT_CONTRASEÑA.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.TXT_CONTRASEÑA.Size = New System.Drawing.Size(96, 20) Me.TXT_CONTRASEÑA.TabIndex = 7 Me.TXT_CONTRASEÑA.Text = "" ' 'PictureBox1 ' Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image) Me.PictureBox1.Location = New System.Drawing.Point(288, 111) Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(64, 62) Me.PictureBox1.TabIndex = 8 Me.PictureBox1.TabStop = False ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(64, 7) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(280, 40) Me.Label1.TabIndex = 9 Me.Label1.Text = "ACCESO A SOFTBATEC"
24
25 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'frm_controldeacceso ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(394, 262) Me.ControlBox = False Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.TXT_CONTRASEÑA) Me.Controls.Add(Me.TXT_NOMBRE) Me.Controls.Add(Me.TXT_CODIGO) Me.Controls.Add(Me.BTN_CANCELAR) Me.Controls.Add(Me.BTN_ACEPTAR) Me.Controls.Add(Me.LBL_CONTRASEÑA) Me.Controls.Add(Me.LBL_NOMBRE) Me.Controls.Add(Me.LBL_CODIGO) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.Name = "frm_controldeacceso" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "ACCESO A SOFTBATEC" Me.ResumeLayout(False)
End Sub
#End Region
Private Sub frm_controldeacceso_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TXT_CODIGO.Clear() Me.TXT_NOMBRE.Clear() Me.TXT_CONTRASEÑA.Clear()
End Sub
Private Sub TXT_CODIGO_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TXT_CODIGO.Leave If Me.TXT_CODIGO.Text.Length <= 0 Then Exit Sub CONEXION.Close() Try
CMDCONSULTAR.Connection = CONEXION CMDCONSULTAR.CommandText = "select * from tbl_usuarios where fld_codusuario='" & Me.TXT_CODIGO.Text & "'" CONEXION.Open() DR_USUARIOS = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_USUARIOS.Read = True Then
25
26 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TXT_NOMBRE.Text = DR_USUARIOS.Item("fld_nombre") CLAVEUSUARIO = DR_USUARIOS.Item("fld_clave") nivel = DR_USUARIOS.Item("fld_CODnivel") USUARIO = Me.TXT_CODIGO.Text NOMUSUARIO = Me.TXT_NOMBRE.Text CONEXION.Close() Me.TXT_CONTRASEÑA.Focus() Else If MessageBox.Show("EL CODIGO DIGITADO NO CORRESPONDE A NINGUN USUARIO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Then Me.TXT_CODIGO.Clear() Me.TXT_CODIGO.Focus() End If End If Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If End Try End Sub
Private Sub BTN_ACEPTAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_ACEPTAR.Click If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("DIGITE UN CODIGO DE USUARIO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) Me.TXT_CODIGO.Focus() Else If RTrim(ENCRIP(Me.TXT_CONTRASEÑA.Text)) <> RTrim(CLAVEUSUARIO) Then MessageBox.Show("DIGITE LA CLAVE CORRESPONDIENTE AL USUARIO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_CONTRASEÑA.Clear() Me.TXT_CONTRASEÑA.Focus() Else SWaceptado = 1 swentro = 1 Me.Close() End If End If End Sub
26
27 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub BTN_CANCELAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_CANCELAR.Click swentro = 1 SWaceptado = 0 End End Sub
Private Sub BTN_ACEPTAR_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_ACEPTAR.MouseMove Me.BTN_ACEPTAR.FlatStyle = FlatStyle.Popup End Sub
Private Sub frm_controldeacceso_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated Me.TXT_CODIGO.Focus() End Sub
Private Sub BTN_CANCELAR_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_CANCELAR.MouseMove Me.BTN_CANCELAR.FlatStyle = FlatStyle.Popup End Sub
Private Sub TXT_CODIGO_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_CODIGO.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_CODIGO_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_CODIGO.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_NOMBRE_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_NOMBRE.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
27
28 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub TXT_NOMBRE_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_NOMBRE.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_CONTRASEÑA_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_CONTRASEÑA.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_CONTRASEÑA_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_CONTRASEÑA.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End SubEnd Class
Codigo de usuarios
28
29 SOFBATEC 1.0DERECHOS RESERVADOS
Imports System.DataImports System.Data.OleDbPublic Class FRM_USUARIOS Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing)
29
30 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents LBL_CODUSUARIO As System.Windows.Forms.Label Friend WithEvents LBL_NOMBRE As System.Windows.Forms.Label Friend WithEvents LBL_CLAVE As System.Windows.Forms.Label Friend WithEvents LBL_CONFIRMARCLAVE As System.Windows.Forms.Label Friend WithEvents LBL_NIVEL As System.Windows.Forms.Label Friend WithEvents TXT_CODUSUARIO As System.Windows.Forms.TextBox Friend WithEvents TXT_NOMBRE As System.Windows.Forms.TextBox Friend WithEvents TXT_CLAVE As System.Windows.Forms.TextBox Friend WithEvents TXT_CONFIRMARCLAVE As System.Windows.Forms.TextBox Friend WithEvents BTN_NUEVO As System.Windows.Forms.Button Friend WithEvents BTN_GRABAR As System.Windows.Forms.Button Friend WithEvents BTN_MODIFICAR As System.Windows.Forms.Button Friend WithEvents BTN_CANCELAR As System.Windows.Forms.Button Friend WithEvents BTN_SALIR As System.Windows.Forms.Button Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents CMB_NIVEL As System.Windows.Forms.ComboBox Friend WithEvents BTN_PRIMERO As System.Windows.Forms.Button Friend WithEvents BTN_ANTERIOR As System.Windows.Forms.Button Friend WithEvents BTN_SIGUIENTE As System.Windows.Forms.Button Friend WithEvents BTN_ULTIMO As System.Windows.Forms.Button Friend WithEvents BTN_ELIMINAR As System.Windows.Forms.Button Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Me.LBL_CODUSUARIO = New System.Windows.Forms.Label Me.LBL_NOMBRE = New System.Windows.Forms.Label Me.LBL_CLAVE = New System.Windows.Forms.Label Me.LBL_CONFIRMARCLAVE = New System.Windows.Forms.Label Me.LBL_NIVEL = New System.Windows.Forms.Label Me.TXT_CODUSUARIO = New System.Windows.Forms.TextBox Me.TXT_NOMBRE = New System.Windows.Forms.TextBox Me.TXT_CLAVE = New System.Windows.Forms.TextBox Me.TXT_CONFIRMARCLAVE = New System.Windows.Forms.TextBox Me.BTN_NUEVO = New System.Windows.Forms.Button Me.BTN_GRABAR = New System.Windows.Forms.Button Me.BTN_MODIFICAR = New System.Windows.Forms.Button Me.BTN_CANCELAR = New System.Windows.Forms.Button Me.BTN_SALIR = New System.Windows.Forms.Button Me.Label1 = New System.Windows.Forms.Label Me.CMB_NIVEL = New System.Windows.Forms.ComboBox Me.BTN_PRIMERO = New System.Windows.Forms.Button
30
31 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_ANTERIOR = New System.Windows.Forms.Button Me.BTN_SIGUIENTE = New System.Windows.Forms.Button Me.BTN_ULTIMO = New System.Windows.Forms.Button Me.BTN_ELIMINAR = New System.Windows.Forms.Button Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.SuspendLayout() ' 'LBL_CODUSUARIO ' Me.LBL_CODUSUARIO.AutoSize = True Me.LBL_CODUSUARIO.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_CODUSUARIO.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_CODUSUARIO.ForeColor = System.Drawing.Color.Blue Me.LBL_CODUSUARIO.Location = New System.Drawing.Point(112, 138) Me.LBL_CODUSUARIO.Name = "LBL_CODUSUARIO" Me.LBL_CODUSUARIO.Size = New System.Drawing.Size(121, 21) Me.LBL_CODUSUARIO.TabIndex = 0 Me.LBL_CODUSUARIO.Text = "CODIGO DEL USUARIO" ' 'LBL_NOMBRE ' Me.LBL_NOMBRE.AutoSize = True Me.LBL_NOMBRE.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_NOMBRE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_NOMBRE.ForeColor = System.Drawing.Color.Blue Me.LBL_NOMBRE.Location = New System.Drawing.Point(160, 175) Me.LBL_NOMBRE.Name = "LBL_NOMBRE" Me.LBL_NOMBRE.Size = New System.Drawing.Size(52, 21) Me.LBL_NOMBRE.TabIndex = 1 Me.LBL_NOMBRE.Text = "NOMBRE" ' 'LBL_CLAVE ' Me.LBL_CLAVE.AutoSize = True Me.LBL_CLAVE.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_CLAVE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_CLAVE.ForeColor = System.Drawing.Color.Blue Me.LBL_CLAVE.Location = New System.Drawing.Point(168, 222) Me.LBL_CLAVE.Name = "LBL_CLAVE" Me.LBL_CLAVE.Size = New System.Drawing.Size(39, 21) Me.LBL_CLAVE.TabIndex = 2 Me.LBL_CLAVE.Text = "CLAVE" ' 'LBL_CONFIRMARCLAVE ' Me.LBL_CONFIRMARCLAVE.AutoSize = True Me.LBL_CONFIRMARCLAVE.BackColor = System.Drawing.Color.LightSkyBlue
31
32 SOFBATEC 1.0DERECHOS RESERVADOS
Me.LBL_CONFIRMARCLAVE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_CONFIRMARCLAVE.ForeColor = System.Drawing.Color.Blue Me.LBL_CONFIRMARCLAVE.Location = New System.Drawing.Point(120, 258) Me.LBL_CONFIRMARCLAVE.Name = "LBL_CONFIRMARCLAVE" Me.LBL_CONFIRMARCLAVE.Size = New System.Drawing.Size(105, 21) Me.LBL_CONFIRMARCLAVE.TabIndex = 3 Me.LBL_CONFIRMARCLAVE.Text = "CONFIRMAR CLAVE" ' 'LBL_NIVEL ' Me.LBL_NIVEL.AutoSize = True Me.LBL_NIVEL.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_NIVEL.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_NIVEL.ForeColor = System.Drawing.Color.Blue Me.LBL_NIVEL.Location = New System.Drawing.Point(168, 295) Me.LBL_NIVEL.Name = "LBL_NIVEL" Me.LBL_NIVEL.Size = New System.Drawing.Size(36, 21) Me.LBL_NIVEL.TabIndex = 4 Me.LBL_NIVEL.Text = "NIVEL" ' 'TXT_CODUSUARIO ' Me.TXT_CODUSUARIO.Location = New System.Drawing.Point(256, 138) Me.TXT_CODUSUARIO.MaxLength = 4 Me.TXT_CODUSUARIO.Name = "TXT_CODUSUARIO" Me.TXT_CODUSUARIO.TabIndex = 5 Me.TXT_CODUSUARIO.Text = "" ' 'TXT_NOMBRE ' Me.TXT_NOMBRE.Location = New System.Drawing.Point(256, 175) Me.TXT_NOMBRE.MaxLength = 60 Me.TXT_NOMBRE.Name = "TXT_NOMBRE" Me.TXT_NOMBRE.TabIndex = 6 Me.TXT_NOMBRE.Text = "" ' 'TXT_CLAVE ' Me.TXT_CLAVE.Location = New System.Drawing.Point(256, 212) Me.TXT_CLAVE.MaxLength = 12 Me.TXT_CLAVE.Name = "TXT_CLAVE" Me.TXT_CLAVE.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.TXT_CLAVE.TabIndex = 7 Me.TXT_CLAVE.Text = "" ' 'TXT_CONFIRMARCLAVE '
32
33 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TXT_CONFIRMARCLAVE.Location = New System.Drawing.Point(256, 258) Me.TXT_CONFIRMARCLAVE.MaxLength = 12 Me.TXT_CONFIRMARCLAVE.Name = "TXT_CONFIRMARCLAVE" Me.TXT_CONFIRMARCLAVE.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.TXT_CONFIRMARCLAVE.TabIndex = 8 Me.TXT_CONFIRMARCLAVE.Text = "" ' 'BTN_NUEVO ' Me.BTN_NUEVO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_NUEVO.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_NUEVO.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.BTN_NUEVO.Location = New System.Drawing.Point(72, 368) Me.BTN_NUEVO.Name = "BTN_NUEVO" Me.BTN_NUEVO.Size = New System.Drawing.Size(64, 56) Me.BTN_NUEVO.TabIndex = 10 Me.ToolTip1.SetToolTip(Me.BTN_NUEVO, "crear nuevo usuario") ' 'BTN_GRABAR ' Me.BTN_GRABAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_GRABAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_GRABAR.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.BTN_GRABAR.Location = New System.Drawing.Point(200, 368) Me.BTN_GRABAR.Name = "BTN_GRABAR" Me.BTN_GRABAR.Size = New System.Drawing.Size(64, 56) Me.BTN_GRABAR.TabIndex = 11 Me.ToolTip1.SetToolTip(Me.BTN_GRABAR, "garbar usuario") ' 'BTN_MODIFICAR ' Me.BTN_MODIFICAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_MODIFICAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_MODIFICAR.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.BTN_MODIFICAR.Location = New System.Drawing.Point(136, 368) Me.BTN_MODIFICAR.Name = "BTN_MODIFICAR" Me.BTN_MODIFICAR.Size = New System.Drawing.Size(64, 56) Me.BTN_MODIFICAR.TabIndex = 12 Me.ToolTip1.SetToolTip(Me.BTN_MODIFICAR, "modifiacr usuario actual") '
33
34 SOFBATEC 1.0DERECHOS RESERVADOS
'BTN_CANCELAR ' Me.BTN_CANCELAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_CANCELAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_CANCELAR.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.BTN_CANCELAR.Location = New System.Drawing.Point(328, 368) Me.BTN_CANCELAR.Name = "BTN_CANCELAR" Me.BTN_CANCELAR.Size = New System.Drawing.Size(64, 56) Me.BTN_CANCELAR.TabIndex = 14 Me.ToolTip1.SetToolTip(Me.BTN_CANCELAR, "cancelar operacion actual") ' 'BTN_SALIR ' Me.BTN_SALIR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SALIR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_SALIR.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.BTN_SALIR.Location = New System.Drawing.Point(392, 368) Me.BTN_SALIR.Name = "BTN_SALIR" Me.BTN_SALIR.Size = New System.Drawing.Size(64, 56) Me.BTN_SALIR.TabIndex = 15 Me.ToolTip1.SetToolTip(Me.BTN_SALIR, "salir del contenedor") ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(136, 18) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(256, 56) Me.Label1.TabIndex = 17 Me.Label1.Text = "USUARIOS" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'CMB_NIVEL ' Me.CMB_NIVEL.Location = New System.Drawing.Point(256, 295) Me.CMB_NIVEL.Name = "CMB_NIVEL" Me.CMB_NIVEL.Size = New System.Drawing.Size(121, 21) Me.CMB_NIVEL.TabIndex = 19 ' 'BTN_PRIMERO '
34
35 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_PRIMERO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_PRIMERO.Location = New System.Drawing.Point(448, 138) Me.BTN_PRIMERO.Name = "BTN_PRIMERO" Me.BTN_PRIMERO.Size = New System.Drawing.Size(40, 47) Me.BTN_PRIMERO.TabIndex = 20 Me.ToolTip1.SetToolTip(Me.BTN_PRIMERO, "primero") ' 'BTN_ANTERIOR ' Me.BTN_ANTERIOR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ANTERIOR.Location = New System.Drawing.Point(448, 185) Me.BTN_ANTERIOR.Name = "BTN_ANTERIOR" Me.BTN_ANTERIOR.Size = New System.Drawing.Size(40, 46) Me.BTN_ANTERIOR.TabIndex = 21 Me.ToolTip1.SetToolTip(Me.BTN_ANTERIOR, "anterior") ' 'BTN_SIGUIENTE ' Me.BTN_SIGUIENTE.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SIGUIENTE.Location = New System.Drawing.Point(448, 231) Me.BTN_SIGUIENTE.Name = "BTN_SIGUIENTE" Me.BTN_SIGUIENTE.Size = New System.Drawing.Size(40, 46) Me.BTN_SIGUIENTE.TabIndex = 22 Me.ToolTip1.SetToolTip(Me.BTN_SIGUIENTE, "siguiente") ' 'BTN_ULTIMO ' Me.BTN_ULTIMO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ULTIMO.Location = New System.Drawing.Point(448, 277) Me.BTN_ULTIMO.Name = "BTN_ULTIMO" Me.BTN_ULTIMO.Size = New System.Drawing.Size(40, 46) Me.BTN_ULTIMO.TabIndex = 23 Me.ToolTip1.SetToolTip(Me.BTN_ULTIMO, "ultimo") ' 'BTN_ELIMINAR ' Me.BTN_ELIMINAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ELIMINAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ELIMINAR.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.BTN_ELIMINAR.Location = New System.Drawing.Point(264, 368) Me.BTN_ELIMINAR.Name = "BTN_ELIMINAR" Me.BTN_ELIMINAR.Size = New System.Drawing.Size(64, 56) Me.BTN_ELIMINAR.TabIndex = 13 Me.ToolTip1.SetToolTip(Me.BTN_ELIMINAR, "eliminar usuario") ' 'FRM_USUARIOS '
35
36 SOFBATEC 1.0DERECHOS RESERVADOS
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(538, 452) Me.Controls.Add(Me.BTN_ULTIMO) Me.Controls.Add(Me.BTN_SIGUIENTE) Me.Controls.Add(Me.BTN_ANTERIOR) Me.Controls.Add(Me.BTN_PRIMERO) Me.Controls.Add(Me.CMB_NIVEL) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.BTN_SALIR) Me.Controls.Add(Me.BTN_CANCELAR) Me.Controls.Add(Me.BTN_ELIMINAR) Me.Controls.Add(Me.BTN_MODIFICAR) Me.Controls.Add(Me.BTN_GRABAR) Me.Controls.Add(Me.BTN_NUEVO) Me.Controls.Add(Me.TXT_CONFIRMARCLAVE) Me.Controls.Add(Me.TXT_CLAVE) Me.Controls.Add(Me.TXT_NOMBRE) Me.Controls.Add(Me.TXT_CODUSUARIO) Me.Controls.Add(Me.LBL_NIVEL) Me.Controls.Add(Me.LBL_CONFIRMARCLAVE) Me.Controls.Add(Me.LBL_CLAVE) Me.Controls.Add(Me.LBL_NOMBRE) Me.Controls.Add(Me.LBL_CODUSUARIO) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "FRM_USUARIOS" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.ResumeLayout(False)
End Sub
#End Region
Private Sub FRM_USUARIOS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.BTN_PRIMERO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.BTN_ANTERIOR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.BTN_SIGUIENTE.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.BTN_ULTIMO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.BTN_NUEVO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.BTN_NUEVO.ImageAlign = ContentAlignment.MiddleRight
36
37 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_MODIFICAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.BTN_MODIFICAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_GRABAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.BTN_GRABAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_ELIMINAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.BTN_ELIMINAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_CANCELAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.BTN_CANCELAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_SALIR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.BTN_SALIR.ImageAlign = ContentAlignment.MiddleRight
Me.TXT_CODUSUARIO.Clear() Me.TXT_NOMBRE.Clear() Me.TXT_CLAVE.Clear() Me.TXT_CONFIRMARCLAVE.Clear() Me.CMB_NIVEL.Text = "" Me.TXT_CODUSUARIO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = True Me.TXT_CLAVE.ReadOnly = True Me.TXT_CONFIRMARCLAVE.ReadOnly = True Me.CMB_NIVEL.Enabled = False ' Try DA_USUARIOS = New OleDbDataAdapter CMDselect = New OleDbCommand CMDselect.Connection = CONEXION DS_Datos = New DataSet CONEXION.Open() CMDselect.CommandText = "SELECT * FROM TBL_USUARIOS ORDER BY FLD_NOMBRE" DA_USUARIOS.SelectCommand = CMDselect DA_USUARIOS.Fill(DS_Datos, "TBL_USUARIOS")
CMDselect.CommandText = "SELECT * FROM TBL_PERFILES ORDER BY FLD_NOMBRE" DA_perfiles.SelectCommand = CMDselect DA_perfiles.Fill(DS_Datos, "TBL_PERFILES") CONEXION.Close()
Me.CMB_NIVEL.DataSource = DS_Datos.Tables("TBL_PERFILES") Me.CMB_NIVEL.ValueMember = DS_Datos.Tables("TBL_PERFILES").Columns(0).ToString Me.CMB_NIVEL.DisplayMember = DS_Datos.Tables("TBL_PERFILES").Columns(1).ToString
Dim ENLACE As Binding
37
38 SOFBATEC 1.0DERECHOS RESERVADOS
ENLACE = New Binding("TEXT", DS_Datos, "TBL_USUARIOS.FLD_CODUSUARIO") Me.TXT_CODUSUARIO.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_USUARIOS.FLD_NOMBRE") Me.TXT_NOMBRE.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_USUARIOS.FLD_CLAVE") Me.TXT_CLAVE.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("SELECTEDVALUE", DS_Datos, "TBL_USUARIOS.FLD_CODNIVEL") Me.CMB_NIVEL.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "tbl_USUARIOS") Me.BTN_NUEVO.Enabled = True Me.BTN_SALIR.Enabled = True Me.BTN_MODIFICAR.Enabled = True Me.BTN_ELIMINAR.Enabled = True Me.BTN_GRABAR.Enabled = False Me.BTN_CANCELAR.Enabled = False 'Catch excepcion As Exception 'MsgBox(excepcion.Message.ToUpper, MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "sistema hotelero 1.0") 'MessageBox.Show(excepcion.Message.ToUpper, "sistema hotelero 1.0", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) ' End Try End Sub
Private Sub BTN_NUEVO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_NUEVO.Click EnlaceBASE.SuspendBinding() Me.TXT_CODUSUARIO.Clear() Me.TXT_NOMBRE.Clear() Me.TXT_CLAVE.Clear() Me.TXT_CONFIRMARCLAVE.Clear() Me.CMB_NIVEL.Text = "" Me.TXT_CODUSUARIO.ReadOnly = False Me.TXT_NOMBRE.ReadOnly = False Me.TXT_CLAVE.ReadOnly = False Me.TXT_CONFIRMARCLAVE.ReadOnly = False Me.CMB_NIVEL.Enabled = True Me.TXT_CODUSUARIO.Focus() SWGrabar = 0 Me.BTN_NUEVO.Enabled = False Me.BTN_SALIR.Enabled = False Me.BTN_MODIFICAR.Enabled = False
38
39 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_ELIMINAR.Enabled = False Me.BTN_GRABAR.Enabled = True Me.BTN_CANCELAR.Enabled = True End Sub
Private Sub BTN_MODIFICAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_MODIFICAR.Click If Me.TXT_CODUSUARIO.TextLength = 0 Then Exit Sub EnlaceBASE.SuspendBinding() SWGrabar = 1 Me.TXT_CODUSUARIO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = False Me.TXT_CLAVE.ReadOnly = False Me.TXT_CONFIRMARCLAVE.ReadOnly = False Me.CMB_NIVEL.Enabled = True Me.TXT_NOMBRE.Focus() Me.BTN_NUEVO.Enabled = False Me.BTN_SALIR.Enabled = False Me.BTN_MODIFICAR.Enabled = False Me.BTN_ELIMINAR.Enabled = False Me.BTN_GRABAR.Enabled = True Me.BTN_CANCELAR.Enabled = True
End Sub
Private Sub BTN_ELIMINAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_ELIMINAR.Click If Me.TXT_CODUSUARIO.TextLength = 0 Then Exit Sub If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar = New OleDbCommand CMDBorrar.CommandText = "delete from tbl_USUARIOS where fld_codUSUARIO='" & Me.TXT_CODUSUARIO.Text & " ' " CMDBorrar.Connection = CONEXION DA_USUARIOS.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() CMDselect.CommandText = "select * from tbl_USUARIOS order by fld_nombre" DS_Datos.Tables("tbl_USUARIOS").Clear() DA_USUARIOS.Fill(DS_Datos, "tbl_USUARIOS") CONEXION.Close() MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch excepcion As Exception MsgBox(excepcion.Message.ToUpper, MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "sistema hotelero 1.0")
39
40 SOFBATEC 1.0DERECHOS RESERVADOS
End Try End If End Sub
Private Sub BTN_CANCELAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_CANCELAR.Click EnlaceBASE.SuspendBinding() Me.TXT_CODUSUARIO.Clear() Me.TXT_NOMBRE.Clear() Me.TXT_CLAVE.Clear() Me.TXT_CONFIRMARCLAVE.Clear() Me.CMB_NIVEL.Text = "" Me.TXT_CODUSUARIO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = True Me.TXT_CLAVE.ReadOnly = True Me.TXT_CONFIRMARCLAVE.ReadOnly = True Me.CMB_NIVEL.Enabled = False Me.BTN_NUEVO.Focus() Me.BTN_CANCELAR.Enabled = False Me.BTN_NUEVO.Enabled = True Me.BTN_SALIR.Enabled = True Me.BTN_MODIFICAR.Enabled = True Me.BTN_ELIMINAR.Enabled = True Me.BTN_GRABAR.Enabled = False EnlaceBASE.ResumeBinding() End Sub
Private Sub BTN_SALIR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_SALIR.Click DS_Datos.Tables("TBL_USUARIOS").Clear() Me.Close() End Sub
Private Sub BTN_GRABAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_GRABAR.Click If SWGrabar = -1 Then MsgBox("selecione nuevo o grabar", MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "sistema hotelero 1.0") : Exit Sub If Me.TXT_CODUSUARIO.TextLength = 0 Then MsgBox("falta el codigo", MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "sistema hotelero 1.0") : Me.TXT_CODUSUARIO.Focus() : Exit Sub If Me.TXT_NOMBRE.TextLength = 0 Then MsgBox("falta un nombre", MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "sistema hotelero 1.0") : Me.TXT_NOMBRE.Focus() : Exit Sub If Me.TXT_CLAVE.TextLength = 0 Then MsgBox("falta el codigo", MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "sistema hotelero 1.0") : Me.TXT_CLAVE.Focus() : Exit Sub If Me.CMB_NIVEL.Text.Length = 0 Then MsgBox("falta el codigo", MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "sistema hotelero 1.0") : Me.CMB_NIVEL.Focus() : Exit Sub
40
41 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.TXT_CLAVE.Text <> Me.TXT_CONFIRMARCLAVE.Text Then MessageBox.Show("LA CLAVE DIGITADA ES DIFERENTE A LA CONFIRMADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Me.TXT_CLAVE.Focus() : Exit Sub Dim sql, MENSAJE As String Try CONEXION.Open() If SWGrabar = 0 Then sql = "insert into tbl_USUARIOS(fld_codUSUARIO,fld_nombre,fld_CLAVE,FLD_CODNIVEL)values(" sql = sql & "'" & Me.TXT_CODUSUARIO.Text & "'" sql = sql & ",'" & Me.TXT_NOMBRE.Text & "'" sql = sql & ",'" & ENCRIP(Me.TXT_CLAVE.Text) & "'" sql = sql & ",'" & Me.CMB_NIVEL.SelectedValue & "')" CMDInsertar = New OleDbCommand CMDInsertar.CommandText = sql CMDInsertar.Connection = CONEXION DA_USUARIOS.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else sql = "update tbl_USUARIOS set " sql = sql & "fld_nombre='" & Me.TXT_NOMBRE.Text & "'" sql = sql & "fld_CLAVE='" & ENCRIP(Me.TXT_CLAVE.Text) & "'" sql = sql & ",fld_CODNIVEL='" & Me.CMB_NIVEL.SelectedValue & "'" sql = sql & " where fld_codUSUARIO='" & Me.TXT_CODUSUARIO.Text & "'" CMDActualizar = New OleDbCommand CMDActualizar.CommandText = sql CMDActualizar.Connection = CONEXION DA_USUARIOS.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If DS_Datos.Tables("tbl_USUARIOS").Clear() DA_USUARIOS.Fill(DS_Datos, "tbl_USUARIOS") CONEXION.Close() MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) EnlaceBASE.ResumeBinding() Me.BTN_NUEVO.Enabled = True Me.BTN_SALIR.Enabled = True Me.BTN_MODIFICAR.Enabled = True Me.BTN_ELIMINAR.Enabled = True Me.BTN_GRABAR.Enabled = False Me.BTN_CANCELAR.Enabled = False Catch EXCEPCION As Exception MsgBox(EXCEPCION.Message.ToUpper, MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "SOFTBATEC")
41
42 SOFBATEC 1.0DERECHOS RESERVADOS
If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub TXT_CODUSUARIO_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_CODUSUARIO.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_CODUSUARIO_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_CODUSUARIO.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_NOMBRE_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_NOMBRE.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_NOMBRE_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_NOMBRE.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_CLAVE_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_CLAVE.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
42
43 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub TXT_CLAVE_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_CLAVE.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_CONFIRMARCLAVE_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_CONFIRMARCLAVE.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_CONFIRMARCLAVE_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_CONFIRMARCLAVE.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub BTN_PRIMERO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_PRIMERO.Click Try EnlaceBASE.Position = 0 Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ANTERIOR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_ANTERIOR.Click Try
EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False End If
43
44 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True
Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub BTN_SIGUIENTE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_SIGUIENTE.Click Try
EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False End If Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ULTIMO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_ULTIMO.Click Try
EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True
Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_primero_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_PRIMERO.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Flat
44
45 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End Sub
Private Sub frm_usuarios_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End Sub
Private Sub btn_anterior_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_ANTERIOR.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Flat Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End Sub
Private Sub btn_siguiente_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_SIGUIENTE.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Flat Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End Sub
Private Sub btn_ultimo_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_ULTIMO.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard
45
46 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Flat Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End Sub
Private Sub BTN_NUEVO_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_NUEVO.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard Me.BTN_NUEVO.FlatStyle = FlatStyle.Flat Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End Sub
Private Sub btn_eliminar_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_ELIMINAR.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Flat Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End Sub
Private Sub btn_salir_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_SALIR.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Standard Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Flat End Sub
Private Sub btn_modificar_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles BTN_MODIFICAR.MouseMove Me.BTN_PRIMERO.FlatStyle = FlatStyle.Standard Me.BTN_ANTERIOR.FlatStyle = FlatStyle.Standard Me.BTN_SIGUIENTE.FlatStyle = FlatStyle.Standard Me.BTN_ULTIMO.FlatStyle = FlatStyle.Standard
46
47 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_NUEVO.FlatStyle = FlatStyle.Standard Me.BTN_MODIFICAR.FlatStyle = FlatStyle.Flat Me.BTN_ELIMINAR.FlatStyle = FlatStyle.Standard Me.BTN_SALIR.FlatStyle = FlatStyle.Standard End SubEnd Class
Codigo de perfil de usuario
Public Class FRM_PERFIL Inherits System.Windows.Forms.Form Private MOUSEISDOWN As Boolean = False#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
47
48 SOFBATEC 1.0DERECHOS RESERVADOS
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents CHK_ADMINISTRADOR As System.Windows.Forms.CheckBox Friend WithEvents CHK_CONSULTAR As System.Windows.Forms.CheckBox Friend WithEvents CHK_GRABAR As System.Windows.Forms.CheckBox Friend WithEvents CHK_ELIMINAR As System.Windows.Forms.CheckBox Friend WithEvents CHK_MODIFICAR As System.Windows.Forms.CheckBox Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox Friend WithEvents LBL_NOMBRE As System.Windows.Forms.Label Friend WithEvents lbl_CODIGO As System.Windows.Forms.Label Friend WithEvents BTN_GRABAR As System.Windows.Forms.Button Friend WithEvents BTN_MODIFICAR As System.Windows.Forms.Button Friend WithEvents BTN_ELIMINAR As System.Windows.Forms.Button Friend WithEvents BTN_CANCELAR As System.Windows.Forms.Button Friend WithEvents BTN_SALIR As System.Windows.Forms.Button Friend WithEvents BTN_NUEVO As System.Windows.Forms.Button Friend WithEvents BTN_ULTIMO As System.Windows.Forms.Button Friend WithEvents BTN_ANTERIOR As System.Windows.Forms.Button Friend WithEvents BTN_SIGUIENTE As System.Windows.Forms.Button Friend WithEvents BTN_PRIMERO As System.Windows.Forms.Button Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip Friend WithEvents TXT_CODIGO As System.Windows.Forms.TextBox Friend WithEvents TXT_NOMBRE As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(FRM_PERFIL)) Me.Label2 = New System.Windows.Forms.Label Me.CHK_ADMINISTRADOR = New System.Windows.Forms.CheckBox Me.CHK_CONSULTAR = New System.Windows.Forms.CheckBox Me.CHK_GRABAR = New System.Windows.Forms.CheckBox Me.CHK_ELIMINAR = New System.Windows.Forms.CheckBox Me.CHK_MODIFICAR = New System.Windows.Forms.CheckBox
48
49 SOFBATEC 1.0DERECHOS RESERVADOS
Me.PictureBox1 = New System.Windows.Forms.PictureBox Me.LBL_NOMBRE = New System.Windows.Forms.Label Me.lbl_CODIGO = New System.Windows.Forms.Label Me.BTN_GRABAR = New System.Windows.Forms.Button Me.BTN_MODIFICAR = New System.Windows.Forms.Button Me.BTN_ELIMINAR = New System.Windows.Forms.Button Me.BTN_CANCELAR = New System.Windows.Forms.Button Me.BTN_SALIR = New System.Windows.Forms.Button Me.BTN_NUEVO = New System.Windows.Forms.Button Me.BTN_ULTIMO = New System.Windows.Forms.Button Me.BTN_ANTERIOR = New System.Windows.Forms.Button Me.BTN_SIGUIENTE = New System.Windows.Forms.Button Me.BTN_PRIMERO = New System.Windows.Forms.Button Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.TXT_CODIGO = New System.Windows.Forms.TextBox Me.TXT_NOMBRE = New System.Windows.Forms.TextBox Me.Label1 = New System.Windows.Forms.Label Me.SuspendLayout() ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.BackColor = System.Drawing.Color.White Me.Label2.Location = New System.Drawing.Point(216, 212) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(130, 18) Me.Label2.TabIndex = 126 Me.Label2.Text = "ACCIONES DEL USUARIO" ' 'CHK_ADMINISTRADOR ' Me.CHK_ADMINISTRADOR.BackColor = System.Drawing.Color.LightSkyBlue Me.CHK_ADMINISTRADOR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.CHK_ADMINISTRADOR.ForeColor = System.Drawing.Color.Blue Me.CHK_ADMINISTRADOR.Location = New System.Drawing.Point(232, 397) Me.CHK_ADMINISTRADOR.Name = "CHK_ADMINISTRADOR" Me.CHK_ADMINISTRADOR.Size = New System.Drawing.Size(96, 37) Me.CHK_ADMINISTRADOR.TabIndex = 125 Me.CHK_ADMINISTRADOR.Text = "Administrador" ' 'CHK_CONSULTAR ' Me.CHK_CONSULTAR.BackColor = System.Drawing.Color.LightSkyBlue Me.CHK_CONSULTAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.CHK_CONSULTAR.ForeColor = System.Drawing.Color.Blue Me.CHK_CONSULTAR.Location = New System.Drawing.Point(320, 332)
49
50 SOFBATEC 1.0DERECHOS RESERVADOS
Me.CHK_CONSULTAR.Name = "CHK_CONSULTAR" Me.CHK_CONSULTAR.Size = New System.Drawing.Size(72, 37) Me.CHK_CONSULTAR.TabIndex = 124 Me.CHK_CONSULTAR.Text = "Consulta Registro" ' 'CHK_GRABAR ' Me.CHK_GRABAR.BackColor = System.Drawing.Color.LightSkyBlue Me.CHK_GRABAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.CHK_GRABAR.ForeColor = System.Drawing.Color.Blue Me.CHK_GRABAR.Location = New System.Drawing.Point(160, 258) Me.CHK_GRABAR.Name = "CHK_GRABAR" Me.CHK_GRABAR.Size = New System.Drawing.Size(88, 37) Me.CHK_GRABAR.TabIndex = 121 Me.CHK_GRABAR.Text = "Crea Nuevo Registro" ' 'CHK_ELIMINAR ' Me.CHK_ELIMINAR.BackColor = System.Drawing.Color.LightSkyBlue Me.CHK_ELIMINAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.CHK_ELIMINAR.ForeColor = System.Drawing.Color.Blue Me.CHK_ELIMINAR.Location = New System.Drawing.Point(312, 258) Me.CHK_ELIMINAR.Name = "CHK_ELIMINAR" Me.CHK_ELIMINAR.Size = New System.Drawing.Size(80, 37) Me.CHK_ELIMINAR.TabIndex = 123 Me.CHK_ELIMINAR.Text = "Elimina Registro" ' 'CHK_MODIFICAR ' Me.CHK_MODIFICAR.BackColor = System.Drawing.Color.LightSkyBlue Me.CHK_MODIFICAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.CHK_MODIFICAR.ForeColor = System.Drawing.Color.Blue Me.CHK_MODIFICAR.Location = New System.Drawing.Point(160, 332) Me.CHK_MODIFICAR.Name = "CHK_MODIFICAR" Me.CHK_MODIFICAR.Size = New System.Drawing.Size(72, 37) Me.CHK_MODIFICAR.TabIndex = 122 Me.CHK_MODIFICAR.Text = "Modifica Registro" ' 'PictureBox1 ' Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image) Me.PictureBox1.Location = New System.Drawing.Point(112, 203)
50
51 SOFBATEC 1.0DERECHOS RESERVADOS
Me.PictureBox1.Name = "PictureBox1" Me.PictureBox1.Size = New System.Drawing.Size(344, 268) Me.PictureBox1.TabIndex = 120 Me.PictureBox1.TabStop = False ' 'LBL_NOMBRE ' Me.LBL_NOMBRE.AutoSize = True Me.LBL_NOMBRE.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_NOMBRE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_NOMBRE.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LBL_NOMBRE.ForeColor = System.Drawing.Color.Blue Me.LBL_NOMBRE.Location = New System.Drawing.Point(128, 166) Me.LBL_NOMBRE.Name = "LBL_NOMBRE" Me.LBL_NOMBRE.Size = New System.Drawing.Size(54, 21) Me.LBL_NOMBRE.TabIndex = 118 Me.LBL_NOMBRE.Text = "Nombre" ' 'lbl_CODIGO ' Me.lbl_CODIGO.AutoSize = True Me.lbl_CODIGO.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_CODIGO.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.lbl_CODIGO.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lbl_CODIGO.ForeColor = System.Drawing.Color.Blue Me.lbl_CODIGO.Location = New System.Drawing.Point(136, 111) Me.lbl_CODIGO.Name = "lbl_CODIGO" Me.lbl_CODIGO.Size = New System.Drawing.Size(49, 21) Me.lbl_CODIGO.TabIndex = 116 Me.lbl_CODIGO.Text = "Codigo" ' 'BTN_GRABAR ' Me.BTN_GRABAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_GRABAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_GRABAR.ForeColor = System.Drawing.Color.White Me.BTN_GRABAR.Location = New System.Drawing.Point(224, 498) Me.BTN_GRABAR.Name = "BTN_GRABAR" Me.BTN_GRABAR.Size = New System.Drawing.Size(64, 46) Me.BTN_GRABAR.TabIndex = 112 Me.ToolTip1.SetToolTip(Me.BTN_GRABAR, "adicionar perfil a la BD") ' 'BTN_MODIFICAR '
51
52 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_MODIFICAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_MODIFICAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_MODIFICAR.ForeColor = System.Drawing.Color.White Me.BTN_MODIFICAR.Location = New System.Drawing.Point(160, 498) Me.BTN_MODIFICAR.Name = "BTN_MODIFICAR" Me.BTN_MODIFICAR.Size = New System.Drawing.Size(64, 46) Me.BTN_MODIFICAR.TabIndex = 111 Me.ToolTip1.SetToolTip(Me.BTN_MODIFICAR, "modificar perfil") ' 'BTN_ELIMINAR ' Me.BTN_ELIMINAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ELIMINAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ELIMINAR.ForeColor = System.Drawing.Color.White Me.BTN_ELIMINAR.Location = New System.Drawing.Point(280, 498) Me.BTN_ELIMINAR.Name = "BTN_ELIMINAR" Me.BTN_ELIMINAR.Size = New System.Drawing.Size(72, 46) Me.BTN_ELIMINAR.TabIndex = 113 Me.ToolTip1.SetToolTip(Me.BTN_ELIMINAR, "eliminar perfil") ' 'BTN_CANCELAR ' Me.BTN_CANCELAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_CANCELAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_CANCELAR.ForeColor = System.Drawing.Color.White Me.BTN_CANCELAR.Location = New System.Drawing.Point(352, 498) Me.BTN_CANCELAR.Name = "BTN_CANCELAR" Me.BTN_CANCELAR.Size = New System.Drawing.Size(64, 46) Me.BTN_CANCELAR.TabIndex = 114 Me.ToolTip1.SetToolTip(Me.BTN_CANCELAR, "cancelar operacion actual") ' 'BTN_SALIR ' Me.BTN_SALIR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SALIR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_SALIR.ForeColor = System.Drawing.Color.White Me.BTN_SALIR.Location = New System.Drawing.Point(416, 498) Me.BTN_SALIR.Name = "BTN_SALIR" Me.BTN_SALIR.Size = New System.Drawing.Size(64, 46) Me.BTN_SALIR.TabIndex = 115 Me.ToolTip1.SetToolTip(Me.BTN_SALIR, "salir del contenedor") ' 'BTN_NUEVO
52
53 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.BTN_NUEVO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_NUEVO.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_NUEVO.ForeColor = System.Drawing.Color.White Me.BTN_NUEVO.Location = New System.Drawing.Point(96, 498) Me.BTN_NUEVO.Name = "BTN_NUEVO" Me.BTN_NUEVO.Size = New System.Drawing.Size(64, 46) Me.BTN_NUEVO.TabIndex = 110 Me.ToolTip1.SetToolTip(Me.BTN_NUEVO, "crear nuevo perfil") ' 'BTN_ULTIMO ' Me.BTN_ULTIMO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ULTIMO.Font = New System.Drawing.Font("Comic Sans MS", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ULTIMO.ForeColor = System.Drawing.Color.Blue Me.BTN_ULTIMO.Location = New System.Drawing.Point(480, 378) Me.BTN_ULTIMO.Name = "BTN_ULTIMO" Me.BTN_ULTIMO.Size = New System.Drawing.Size(40, 47) Me.BTN_ULTIMO.TabIndex = 109 Me.ToolTip1.SetToolTip(Me.BTN_ULTIMO, "ultimo") ' 'BTN_ANTERIOR ' Me.BTN_ANTERIOR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ANTERIOR.Font = New System.Drawing.Font("Comic Sans MS", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ANTERIOR.ForeColor = System.Drawing.Color.Blue Me.BTN_ANTERIOR.Location = New System.Drawing.Point(480, 286) Me.BTN_ANTERIOR.Name = "BTN_ANTERIOR" Me.BTN_ANTERIOR.Size = New System.Drawing.Size(40, 46) Me.BTN_ANTERIOR.TabIndex = 107 Me.ToolTip1.SetToolTip(Me.BTN_ANTERIOR, "anterior") ' 'BTN_SIGUIENTE ' Me.BTN_SIGUIENTE.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SIGUIENTE.Font = New System.Drawing.Font("Comic Sans MS", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_SIGUIENTE.ForeColor = System.Drawing.Color.Blue Me.BTN_SIGUIENTE.Location = New System.Drawing.Point(480, 332) Me.BTN_SIGUIENTE.Name = "BTN_SIGUIENTE" Me.BTN_SIGUIENTE.Size = New System.Drawing.Size(40, 46) Me.BTN_SIGUIENTE.TabIndex = 108 Me.ToolTip1.SetToolTip(Me.BTN_SIGUIENTE, "siguiente")
53
54 SOFBATEC 1.0DERECHOS RESERVADOS
' 'BTN_PRIMERO ' Me.BTN_PRIMERO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_PRIMERO.Font = New System.Drawing.Font("Comic Sans MS", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_PRIMERO.ForeColor = System.Drawing.Color.Blue Me.BTN_PRIMERO.Location = New System.Drawing.Point(480, 240) Me.BTN_PRIMERO.Name = "BTN_PRIMERO" Me.BTN_PRIMERO.Size = New System.Drawing.Size(40, 46) Me.BTN_PRIMERO.TabIndex = 106 Me.ToolTip1.SetToolTip(Me.BTN_PRIMERO, "primero") ' 'TXT_CODIGO ' Me.TXT_CODIGO.ForeColor = System.Drawing.Color.Blue Me.TXT_CODIGO.Location = New System.Drawing.Point(192, 111) Me.TXT_CODIGO.MaxLength = 2 Me.TXT_CODIGO.Name = "TXT_CODIGO" Me.TXT_CODIGO.Size = New System.Drawing.Size(48, 22) Me.TXT_CODIGO.TabIndex = 130 Me.TXT_CODIGO.Text = "" ' 'TXT_NOMBRE ' Me.TXT_NOMBRE.ForeColor = System.Drawing.Color.Blue Me.TXT_NOMBRE.Location = New System.Drawing.Point(184, 166) Me.TXT_NOMBRE.MaxLength = 60 Me.TXT_NOMBRE.Name = "TXT_NOMBRE" Me.TXT_NOMBRE.Size = New System.Drawing.Size(280, 22) Me.TXT_NOMBRE.TabIndex = 131 Me.TXT_NOMBRE.Text = "" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(144, 18) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(312, 65) Me.Label1.TabIndex = 133 Me.Label1.Text = "PERFILES" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'FRM_PERFIL
54
55 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(602, 609) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.TXT_NOMBRE) Me.Controls.Add(Me.TXT_CODIGO) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.CHK_ADMINISTRADOR) Me.Controls.Add(Me.CHK_CONSULTAR) Me.Controls.Add(Me.CHK_GRABAR) Me.Controls.Add(Me.CHK_ELIMINAR) Me.Controls.Add(Me.CHK_MODIFICAR) Me.Controls.Add(Me.PictureBox1) Me.Controls.Add(Me.LBL_NOMBRE) Me.Controls.Add(Me.lbl_CODIGO) Me.Controls.Add(Me.BTN_GRABAR) Me.Controls.Add(Me.BTN_MODIFICAR) Me.Controls.Add(Me.BTN_ELIMINAR) Me.Controls.Add(Me.BTN_CANCELAR) Me.Controls.Add(Me.BTN_SALIR) Me.Controls.Add(Me.BTN_NUEVO) Me.Controls.Add(Me.BTN_ULTIMO) Me.Controls.Add(Me.BTN_ANTERIOR) Me.Controls.Add(Me.BTN_SIGUIENTE) Me.Controls.Add(Me.BTN_PRIMERO) Me.ForeColor = System.Drawing.Color.Black Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "FRM_PERFIL" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
Private Sub ENLACES() If Me.TXT_CODIGO.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_PERFILES.CODIGO") Me.TXT_CODIGO.DataBindings.Add(ENLACE) ENLACE = Nothing
ENLACE = New Binding("TEXT", DS_Datos, "TBL_PERFILES.NOMBRE") Me.TXT_NOMBRE.DataBindings.Add(ENLACE)
55
56 SOFBATEC 1.0DERECHOS RESERVADOS
ENLACE = Nothing
ENLACE = New Binding("CHECKED", DS_Datos, "TBL_PERFILES.GRABAR") Me.CHK_GRABAR.DataBindings.Add(ENLACE) ENLACE = Nothing
ENLACE = New Binding("CHECKED", DS_Datos, "TBL_PERFILES.MODIFICAR") Me.CHK_MODIFICAR.DataBindings.Add(ENLACE) ENLACE = Nothing
ENLACE = New Binding("CHECKED", DS_Datos, "TBL_PERFILES.ELIMINAR") Me.CHK_ELIMINAR.DataBindings.Add(ENLACE) ENLACE = Nothing
ENLACE = New Binding("CHECKED", DS_Datos, "TBL_PERFILES.CONSULTAR") Me.CHK_CONSULTAR.DataBindings.Add(ENLACE) ENLACE = Nothing
ENLACE = New Binding("CHECKED", DS_Datos, "TBL_PERFILES.ADMINISTRADOR") Me.CHK_ADMINISTRADOR.DataBindings.Add(ENLACE) ENLACE = Nothing
EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_PERFILES")
End If End Sub
Private Sub CARGARIMAGENES() Me.BTN_PRIMERO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.BTN_ANTERIOR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.BTN_SIGUIENTE.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.BTN_ULTIMO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.BTN_NUEVO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.BTN_NUEVO.ImageAlign = ContentAlignment.MiddleRight Me.BTN_MODIFICAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.BTN_MODIFICAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_GRABAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png")
56
57 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_GRABAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_ELIMINAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.BTN_ELIMINAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_CANCELAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.BTN_CANCELAR.ImageAlign = ContentAlignment.MiddleRight End Sub
Private Sub LIMPIAROBJETOS() Me.TXT_CODIGO.Clear() Me.TXT_NOMBRE.Clear() Me.CHK_GRABAR.Checked = False Me.CHK_MODIFICAR.Checked = False Me.CHK_ELIMINAR.Checked = False Me.CHK_CONSULTAR.Checked = False Me.CHK_ADMINISTRADOR.Checked = False
End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = True Me.CHK_GRABAR.Enabled = False Me.CHK_MODIFICAR.Enabled = False Me.CHK_ELIMINAR.Enabled = False Me.CHK_CONSULTAR.Enabled = False Me.CHK_ADMINISTRADOR.Enabled = False Else Me.TXT_CODIGO.ReadOnly = False Me.TXT_NOMBRE.ReadOnly = False Me.CHK_GRABAR.Enabled = True Me.CHK_MODIFICAR.Enabled = True Me.CHK_ELIMINAR.Enabled = True Me.CHK_CONSULTAR.Enabled = True Me.CHK_ADMINISTRADOR.Enabled = True End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.BTN_NUEVO.Enabled = True Me.BTN_MODIFICAR.Enabled = True Me.BTN_GRABAR.Enabled = False Me.BTN_CANCELAR.Enabled = False Me.BTN_PRIMERO.Enabled = True Me.BTN_ANTERIOR.Enabled = True Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Me.BTN_ELIMINAR.Enabled = True
57
58 SOFBATEC 1.0DERECHOS RESERVADOS
Else Me.BTN_NUEVO.Enabled = False Me.BTN_MODIFICAR.Enabled = False Me.BTN_GRABAR.Enabled = True Me.BTN_CANCELAR.Enabled = True Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_ELIMINAR.Enabled = False
End If End Sub
Private Function Validar() As Boolean If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Falta el codigo del perfil", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_CODIGO.Focus() Validar = False Exit Function End If If Me.TXT_NOMBRE.TextLength = 0 Then MessageBox.Show("Falta el nombre del perfil", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_NOMBRE.Focus() Validar = False Exit Function End If
If Me.CHK_ADMINISTRADOR.Checked = False And Me.CHK_CONSULTAR.Checked = False And Me.CHK_ELIMINAR.Checked = False And Me.CHK_GRABAR.Checked = False And Me.CHK_MODIFICAR.Checked = False Then MessageBox.Show("Debe asignar minimo una tarea para el perfil de usuario", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.CHK_ADMINISTRADOR.Focus() Validar = False Exit Function End If
Validar = True End Function#End Region
Private Sub FRM_PERFILES_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL As String
58
59 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Cursor = System.Windows.Forms.Cursors.Default Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0)
Me.BTN_PRIMERO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.BTN_ANTERIOR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.BTN_SIGUIENTE.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.BTN_ULTIMO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.BTN_NUEVO.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.BTN_NUEVO.ImageAlign = ContentAlignment.MiddleRight Me.BTN_MODIFICAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.BTN_MODIFICAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_GRABAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.BTN_GRABAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_ELIMINAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.BTN_ELIMINAR.ImageAlign = ContentAlignment.MiddleRight Me.BTN_CANCELAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.BTN_CANCELAR.ImageAlign = ContentAlignment.MiddleRight
Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open()
SQL = "SELECT A.fld_cod_perfil AS CODIGO, A.fld_nombre AS NOMBRE, A.FLD_GRABAR AS GRABAR,A.FLD_MODIFICAR AS MODIFICAR,A.FLD_ELIMINAR AS ELIMINAR,A.FLD_CONSULTAR AS CONSULTAR, A.FLD_ADMINISTRADOR AS ADMINISTRADOR" SQL = SQL & " FROM TBL_PERFILES A" SQL = SQL & " ORDER BY A.FLD_NOMBRE" CMDselect.CommandText = SQL
DA_perfiles.SelectCommand = CMDselect DA_perfiles.Fill(DS_Datos, "TBL_PERFILES") CMDselect.CommandText = "SELECT * FROM TBL_PERFILES ORDER BY FLD_NOMBRE" CONEXION.Close()
Me.Cursor = System.Windows.Forms.Cursors.Default
59
60 SOFBATEC 1.0DERECHOS RESERVADOS
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub BTN_CANCELAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_CANCELAR.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 End Sub
Private Sub BTN_PRIMERO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_PRIMERO.Click Try Call ENLACES() EnlaceBASE.Position = 0 Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ANTERIOR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_ANTERIOR.Click Try Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False End If Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
60
61 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub BTN_SIGUIENTE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_SIGUIENTE.Click Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False End If Me.BTN_PRIMERO.Enabled = True Me.BTN_ANTERIOR.Enabled = True Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ULTIMO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_ULTIMO.Click Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_PRIMERO.Enabled = True Me.BTN_ANTERIOR.Enabled = True Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub TXT_CODIGO_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Try If Me.TXT_CODIGO.TextLength = 0 Then Exit Sub CMDselect.CommandText = "SELECT * FROM TBL_PERFILES WHERE FLD_CODPERFIL='" & Me.TXT_CODIGO.Text & "'" If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() DR_buscar = CMDselect.ExecuteReader(CommandBehavior.SingleRow) If DR_buscar.Read() = True Then Me.TXT_NOMBRE.Text = DR_buscar.Item("FLD_NOMBRE") Me.CHK_GRABAR.Checked = DR_buscar.Item("FLD_GRABAR") Me.CHK_MODIFICAR.Checked = DR_buscar.Item("FLD_MODIFICAR") Me.CHK_ELIMINAR.Checked = DR_buscar.Item("FLD_ELIMINAR") Me.CHK_CONSULTAR.Checked = DR_buscar.Item("FLD_CONSULTAR")
61
62 SOFBATEC 1.0DERECHOS RESERVADOS
Me.CHK_ADMINISTRADOR.Checked = DR_buscar.Item("FLD_ADMINISTRADOR") Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.Focus() SWGrabar = 1 End If CONEXION.Close() Catch EXCEPCION As Exception MsgBox(EXCEPCION.Message.ToUpper) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub CHK_GRABAR_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub CHK_GRABAR_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim KEYASCII As Short = Asc(e.KeyChar) Select Case KEYASCII Case 48 To 57 KEYASCII = 0 End Select End Sub
Private Sub CHK_MODIFICAR_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub CHK_MODIFICAR_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim KEYASCII As Short = Asc(e.KeyChar) Select Case KEYASCII Case 48 To 57 KEYASCII = 0 End Select End Sub
Private Sub CHK_ELIMINAR_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
62
63 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub CHK_ELIMINAR_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim KEYASCII As Short = Asc(e.KeyChar) Select Case KEYASCII Case 48 To 57 KEYASCII = 0 End Select End Sub
Private Sub CHK_CONSULTAR_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub CHK_CONSULTAR_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim KEYASCII As Short = Asc(e.KeyChar) Select Case KEYASCII Case 48 To 57 KEYASCII = 0 End Select End Sub
Private Sub CKB_ADMINISTRADOR_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub CKB_ADMINISTRADOR_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim KEYASCII As Short = Asc(e.KeyChar) Select Case KEYASCII Case 48 To 57 KEYASCII = 0 End Select End Sub
Private Sub TXT_CODIGO_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_CODIGO.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) Select Case KEYASCII
63
64 SOFBATEC 1.0DERECHOS RESERVADOS
Case 48 To 57 KEYASCII = 0 End Select End Sub
Private Sub TXT_CODIGO_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_CODIGO.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_NOMBRE_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_NOMBRE.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) Select Case KEYASCII Case 48 To 57 KEYASCII = 0 End Select End Sub
Private Sub TXT_NOMBRE_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_NOMBRE.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub BTN_NUEVO_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_NUEVO.Click Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.TXT_CODIGO.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1) End Sub
Private Sub BTN_SALIR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_SALIR.Click DS_Datos.Tables("TBL_PERFILES").Clear() Me.Close() End Sub
Private Sub BTN_MODIFICAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_MODIFICAR.Click If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Debe seleccionar un registro para modificar", "Sistema De Elecciones 1.0", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) : Exit Sub Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = False Me.CHK_GRABAR.Enabled = True Me.CHK_MODIFICAR.Enabled = True
64
65 SOFBATEC 1.0DERECHOS RESERVADOS
Me.CHK_ELIMINAR.Enabled = True Me.CHK_CONSULTAR.Enabled = True Me.CHK_ADMINISTRADOR.Enabled = True Me.TXT_NOMBRE.Focus() Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub BTN_GRABAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_GRABAR.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE As String Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO TBL_PERFILES (FLD_COD_PERFIL,FLD_NOMBRE,FLD_GRABAR,FLD_ELIMINAR,FLD_MODIFICAR,FLD_CONSULTAR,FLD_ADMINISTRADOR" SQL = SQL & ")VALUES(" SQL = SQL & "'" & Me.TXT_CODIGO.Text & "'" SQL = SQL & ",'" & Me.TXT_NOMBRE.Text & "'" SQL = SQL & "," & Me.CHK_GRABAR.Checked & "" SQL = SQL & "," & Me.CHK_ELIMINAR.Checked & "" SQL = SQL & "," & Me.CHK_MODIFICAR.Checked & "" SQL = SQL & "," & Me.CHK_CONSULTAR.Checked & "" SQL = SQL & "," & Me.CHK_ADMINISTRADOR.Checked & ")" CMDInsertar.CommandText = SQL CMDInsertar.ExecuteNonQuery() MENSAJE = "Registro adicionado" Else SQL = "UPDATE TBL_PERFILES SET " SQL = SQL & "FLD_NOMBRE='" & Me.TXT_NOMBRE.Text & "'" SQL = SQL & ",FLD_GRABAR=" & Me.CHK_GRABAR.Checked & "" SQL = SQL & ",FLD_ELIMINAR=" & Me.CHK_ELIMINAR.Checked & "" SQL = SQL & ",FLD_MODIFICAR=" & Me.CHK_MODIFICAR.Checked & "" SQL = SQL & ",FLD_CONSULTAR=" & Me.CHK_CONSULTAR.Checked & "" SQL = SQL & ",FLD_ADMINISTRADOR=" & Me.CHK_ADMINISTRADOR.Checked & "" SQL = SQL & " WHERE FLD_COD_PERFIL ='" & Me.TXT_CODIGO.Text & "'" CMDActualizar.CommandText = SQL CMDActualizar.ExecuteNonQuery() MENSAJE = "Registro Modificado" End If SQL = "SELECT A.FLD_COD_PERFIL AS CODIGO, A.FLD_NOMBRE AS NOMBRE, A.FLD_GRABAR AS GRABAR,A.FLD_MODIFICAR AS MODIFICAR,A.FLD_ELIMINAR AS ELIMINAR,A.FLD_CONSULTAR AS CONSULTAR, A.FLD_ADMINISTRADOR AS ADMINISTRADOR"
65
66 SOFBATEC 1.0DERECHOS RESERVADOS
SQL = SQL & " FROM TBL_PERFILES A" SQL = SQL & " ORDER BY A.FLD_NOMBRE" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_PERFILES").Clear() DA_perfiles.Fill(DS_Datos, "TBL_PERFILES") CONEXION.Close() Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch EXCEPCION As Exception MsgBox(EXCEPCION.Message.ToUpper) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ELIMINAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_ELIMINAR.Click Dim SQL As String If MessageBox.Show("Desea Borrar El Registro Actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() CMDBorrar.CommandText = "DELETE FROM TBL_PERFILES WHERE FLD_CODPERFIL='" & Me.TXT_CODIGO.Text & "'" CMDBorrar.ExecuteNonQuery() If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "SELECT A.FLD_CODPERFIL AS CODIGO, A.FLD_NOMBRE AS NOMBRE, A.FLD_GRABAR AS GRABAR,A.FLD_MODIFICAR AS MODIFICAR,A.FLD_ELIMINAR AS ELIMINAR,A.FLD_CONSULTAR AS CONSULTAR, A.FLD_ADMINISTRADOR AS ASMINISTRADOR" SQL = SQL & " FROM TBL_PERFILES A" SQL = SQL & " ORDER BY A.FLD_NOMBRE" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_PERFILES").Clear() DA_perfiles.SelectCommand = CMDselect DA_perfiles.Fill(DS_Datos, "TBL_PERFILES") CONEXION.Close() MessageBox.Show("Registro Eliminado", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End SubEnd Class
66
67 SOFBATEC 1.0DERECHOS RESERVADOS
Codigo menú principal
Imports System.DataImports System.Data.OleDb
Module Mdo_principal
#Region "OBJETOS DE ADO" '-------------------------------------------------------------------------- 'Se inicializan los principales objetos para la conexion a la base de datos '--------------------------------------------------------------------------
Public CONEXION As OleDbConnection = New OleDbConnection Public EnlaceBASE As BindingManagerBase Public CMDselect As OleDbCommand = New OleDbCommand Public CMDActualizar As OleDbCommand = New OleDbCommand Public CMDInsertar As OleDbCommand = New OleDbCommand Public CMDBorrar As OleDbCommand = New OleDbCommand Public CMDCONSULTAR As OleDbCommand = New OleDbCommand Public DS_Datos As DataSet = New DataSet Public DA_MATRICULA As OleDbDataAdapter = New OleDbDataAdapter Public DA_ESTUDIANTES As OleDbDataAdapter = New OleDbDataAdapter Public DA_ACUDIENTE As OleDbDataAdapter = New OleDbDataAdapter Public DA_CIUDADES As OleDbDataAdapter = New OleDbDataAdapter Public DA_DPTOS As OleDbDataAdapter = New OleDbDataAdapter
67
68 SOFBATEC 1.0DERECHOS RESERVADOS
Public DA_PAISES As OleDbDataAdapter = New OleDbDataAdapter Public DA_buscar As OleDbDataAdapter = New OleDbDataAdapter Public DA_perfiles As OleDbDataAdapter = New OleDbDataAdapter Public DA_CALIFICACION As OleDbDataAdapter = New OleDbDataAdapter Public DA_GRIDCALIFICACION As OleDbDataAdapter = New OleDbDataAdapter Public DA_DESCRIPCION_LOGRO As OleDbDataAdapter = New OleDbDataAdapter Public DA_ASIGNATURA As OleDbDataAdapter = New OleDbDataAdapter Public DA_NOTAS As OleDbDataAdapter = New OleDbDataAdapter Public DA_USUARIOS As OleDbDataAdapter = New OleDbDataAdapter Public DA_DOCENTES As OleDbDataAdapter = New OleDbDataAdapter Public DA_GRADUANDO As OleDbDataAdapter = New OleDbDataAdapter Public DA_ASIGDOCENTES As OleDbDataAdapter = New OleDbDataAdapter Public DA_GRADO As OleDbDataAdapter = New OleDbDataAdapter Public DA_LOGROS As OleDbDataAdapter = New OleDbDataAdapter Public DR_CONSULTA As OleDbDataReader Public DR_USUARIOS As OleDbDataReader
Public DR_buscar As OleDbDataReader 'Public dr_estudiante As OleDbDataReader#End Region
'---------------------------------------- 'Se inicializan 4 variables para busqueda '---------------------------------------- Public NombreTabla As String Public id As Integer Public idmatr As Double Public grado As String Public gradomtr As String Public NOMBRETABLA2 As String Public Campograd As String Public CampoTxt As String Public CampoTxt2 As String Public CAMPOFECHA As String Public CAMPODISP As String Public CAMPOCONS As String Public CAMPOST As String Public CAMPOSR As String Public CAMPOCAM As String Public CodigoBuscado As String Public logrmat, logresp, logrart, logrtec, logrsoc, logrrel, logring, logrnat, logrfil, logrqui, logrfis As String Public mat, esp, art, tec, soc, rel, ing, nat, fil, qui, fis As Boolean
'******************************************** 'swiche para el boton grabar
68
69 SOFBATEC 1.0DERECHOS RESERVADOS
Public SWGrabar As Integer = -1
'------------------------------ 'VARIABLES PARA EL GRID '------------------------------ Public CENTR, CSAL As String
'------------------------------ 'Se inicializan otras variables '------------------------------ Public SWaceptado As Byte Public swentro As Byte Public sigue As Boolean Public codusu, nombreusu As String Public RutaReal As String Public p21 As Integer Public USUARIO As String Public NOMUSUARIO As String Public CLAVEUSUARIO As String Public nivel As String
Dim filenumber As Integer
Public Sub main() '-------------------------------------------------------------------------- 'Se abre un archivo .ini que contiene la ruta intranet de la base de datos '-------------------------------------------------------------------------- filenumber = FreeFile() FileOpen(filenumber, "ruta.ini", OpenMode.Input) Input(filenumber, RutaReal) FileClose(filenumber) '---------------------------------------------------------- 'Se inicializa la cadena de conexion '---------------------------------------------------------- CONEXION.ConnectionString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & RutaReal & "\bd_softbatec.MDB"
'---------------------------------------------------------- 'Se enlazan los objetos command con la conexion a la BD '---------------------------------------------------------- CMDselect.Connection = CONEXION CMDInsertar.Connection = CONEXION CMDActualizar.Connection = CONEXION CMDBorrar.Connection = CONEXION
'----------------------------------------------------------
69
70 SOFBATEC 1.0DERECHOS RESERVADOS
'Arranca el formulario de escritorio o formulario principal '----------------------------------------------------------
sigue = False Dim Prs As New Presentacion Prs.ShowDialog() 'Mostramos el formulario de presentacion
If sigue = True Then Dim fRMESCRITORIO As New frm_escritorio fRMESCRITORIO.ShowDialog() End If End Sub
Public SWGRABA, SWMODIFICA, SWBORRA, SWCONSULTA, SWADMINISTRADOR As Boolean
Public Sub PERMISO(ByRef BotonG As Control, ByRef BotonM As Control, ByRef BotonE As Control, ByRef BotonC As Control) If SWADMINISTRADOR Then BotonG.Enabled = True BotonM.Enabled = True BotonE.Enabled = True BotonC.Enabled = True Else Try If SWGRABA Then BotonG.Enabled = True Else BotonG.Enabled = False End If
If SWMODIFICA Then BotonM.Enabled = True Else BotonM.Enabled = False End If
If SWBORRA Then BotonE.Enabled = True Else BotonE.Enabled = False End If If SWCONSULTA Then BotonC.Enabled = True Else BotonC.Enabled = False End If
Catch EXCEPCION As Exception
70
71 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show(EXCEPCION.Message.ToUpper, "Sistema De Elecciones 1.0", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Public Function ENCRIP(ByVal TEXT As String) Dim A, B, C, I, MEN For I = 1 To Len(TEXT) A = Asc(Mid(TEXT, I, 1)) B = 127 + A C = ChrW(B) MEN = MEN & C Next I ENCRIP = MEN
End Function
Public Function SALTAR(ByVal Tecla As Integer) As Boolean Select Case Tecla Case Keys.Enter System.Windows.Forms.SendKeys.Send("{Tab}") SALTAR = True Case Keys.Down System.Windows.Forms.SendKeys.Send("{Tab}") SALTAR = True Case Keys.Up System.Windows.Forms.SendKeys.Send("+{Tab}") SALTAR = True End Select End Function
End Module
Codigo registrar matriculas
71
72 SOFBATEC 1.0DERECHOS RESERVADOS
Imports System.DataImports System.Data.OleDb
Module Mdo_principal
#Region "OBJETOS DE ADO" '-------------------------------------------------------------------------- 'Se inicializan los principales objetos para la conexion a la base de datos '--------------------------------------------------------------------------
Public CONEXION As OleDbConnection = New OleDbConnection Public EnlaceBASE As BindingManagerBase Public CMDselect As OleDbCommand = New OleDbCommand Public CMDActualizar As OleDbCommand = New OleDbCommand Public CMDInsertar As OleDbCommand = New OleDbCommand Public CMDBorrar As OleDbCommand = New OleDbCommand Public CMDCONSULTAR As OleDbCommand = New OleDbCommand Public DS_Datos As DataSet = New DataSet Public DA_MATRICULA As OleDbDataAdapter = New OleDbDataAdapter
72
73 SOFBATEC 1.0DERECHOS RESERVADOS
Public DA_ESTUDIANTES As OleDbDataAdapter = New OleDbDataAdapter Public DA_ACUDIENTE As OleDbDataAdapter = New OleDbDataAdapter Public DA_CIUDADES As OleDbDataAdapter = New OleDbDataAdapter Public DA_DPTOS As OleDbDataAdapter = New OleDbDataAdapter Public DA_PAISES As OleDbDataAdapter = New OleDbDataAdapter Public DA_buscar As OleDbDataAdapter = New OleDbDataAdapter Public DA_perfiles As OleDbDataAdapter = New OleDbDataAdapter Public DA_CALIFICACION As OleDbDataAdapter = New OleDbDataAdapter Public DA_GRIDCALIFICACION As OleDbDataAdapter = New OleDbDataAdapter Public DA_DESCRIPCION_LOGRO As OleDbDataAdapter = New OleDbDataAdapter Public DA_ASIGNATURA As OleDbDataAdapter = New OleDbDataAdapter Public DA_NOTAS As OleDbDataAdapter = New OleDbDataAdapter Public DA_USUARIOS As OleDbDataAdapter = New OleDbDataAdapter Public DA_DOCENTES As OleDbDataAdapter = New OleDbDataAdapter Public DA_GRADUANDO As OleDbDataAdapter = New OleDbDataAdapter Public DA_ASIGDOCENTES As OleDbDataAdapter = New OleDbDataAdapter Public DA_GRADO As OleDbDataAdapter = New OleDbDataAdapter Public DA_LOGROS As OleDbDataAdapter = New OleDbDataAdapter Public DR_CONSULTA As OleDbDataReader Public DR_USUARIOS As OleDbDataReader
Public DR_buscar As OleDbDataReader 'Public dr_estudiante As OleDbDataReader#End Region
'---------------------------------------- 'Se inicializan 4 variables para busqueda '---------------------------------------- Public NombreTabla As String Public id As Integer Public idmatr As Double Public grado As String Public gradomtr As String Public NOMBRETABLA2 As String Public Campograd As String Public CampoTxt As String Public CampoTxt2 As String Public CAMPOFECHA As String Public CAMPODISP As String Public CAMPOCONS As String Public CAMPOST As String Public CAMPOSR As String Public CAMPOCAM As String Public CodigoBuscado As String Public logrmat, logresp, logrart, logrtec, logrsoc, logrrel, logring, logrnat, logrfil, logrqui, logrfis As String
73
74 SOFBATEC 1.0DERECHOS RESERVADOS
Public mat, esp, art, tec, soc, rel, ing, nat, fil, qui, fis As Boolean
'******************************************** 'swiche para el boton grabar Public SWGrabar As Integer = -1
'------------------------------ 'VARIABLES PARA EL GRID '------------------------------ Public CENTR, CSAL As String
'------------------------------ 'Se inicializan otras variables '------------------------------ Public SWaceptado As Byte Public swentro As Byte Public sigue As Boolean Public codusu, nombreusu As String Public RutaReal As String Public p21 As Integer Public USUARIO As String Public NOMUSUARIO As String Public CLAVEUSUARIO As String Public nivel As String
Dim filenumber As Integer
Public Sub main() '-------------------------------------------------------------------------- 'Se abre un archivo .ini que contiene la ruta intranet de la base de datos '-------------------------------------------------------------------------- filenumber = FreeFile() FileOpen(filenumber, "ruta.ini", OpenMode.Input) Input(filenumber, RutaReal) FileClose(filenumber) '---------------------------------------------------------- 'Se inicializa la cadena de conexion '---------------------------------------------------------- CONEXION.ConnectionString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & RutaReal & "\bd_softbatec.MDB"
'---------------------------------------------------------- 'Se enlazan los objetos command con la conexion a la BD '---------------------------------------------------------- CMDselect.Connection = CONEXION CMDInsertar.Connection = CONEXION CMDActualizar.Connection = CONEXION CMDBorrar.Connection = CONEXION
74
75 SOFBATEC 1.0DERECHOS RESERVADOS
'---------------------------------------------------------- 'Arranca el formulario de escritorio o formulario principal '----------------------------------------------------------
sigue = False Dim Prs As New Presentacion Prs.ShowDialog() 'Mostramos el formulario de presentacion
If sigue = True Then Dim fRMESCRITORIO As New frm_escritorio fRMESCRITORIO.ShowDialog() End If End Sub
Public SWGRABA, SWMODIFICA, SWBORRA, SWCONSULTA, SWADMINISTRADOR As Boolean
Public Sub PERMISO(ByRef BotonG As Control, ByRef BotonM As Control, ByRef BotonE As Control, ByRef BotonC As Control) If SWADMINISTRADOR Then BotonG.Enabled = True BotonM.Enabled = True BotonE.Enabled = True BotonC.Enabled = True Else Try If SWGRABA Then BotonG.Enabled = True Else BotonG.Enabled = False End If
If SWMODIFICA Then BotonM.Enabled = True Else BotonM.Enabled = False End If
If SWBORRA Then BotonE.Enabled = True Else BotonE.Enabled = False End If If SWCONSULTA Then BotonC.Enabled = True Else
75
76 SOFBATEC 1.0DERECHOS RESERVADOS
BotonC.Enabled = False End If
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "Sistema De Elecciones 1.0", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Public Function ENCRIP(ByVal TEXT As String) Dim A, B, C, I, MEN For I = 1 To Len(TEXT) A = Asc(Mid(TEXT, I, 1)) B = 127 + A C = ChrW(B) MEN = MEN & C Next I ENCRIP = MEN
End Function
Public Function SALTAR(ByVal Tecla As Integer) As Boolean Select Case Tecla Case Keys.Enter System.Windows.Forms.SendKeys.Send("{Tab}") SALTAR = True Case Keys.Down System.Windows.Forms.SendKeys.Send("{Tab}") SALTAR = True Case Keys.Up System.Windows.Forms.SendKeys.Send("+{Tab}") SALTAR = True End Select End FunctionEnd Module
Me.txt_fecha_ingreso.Text = Me.dtp_fecha_ingreso.Value End Sub
Private Sub btn_grabar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_grabar.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1, SQL2, SQL3, SQL4 As String
Try If SWGrabar = 0 Then
76
77 SOFBATEC 1.0DERECHOS RESERVADOS
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open()
SQL = "INSERT INTO TBL_ESTUDIANTES(fld_identificacion_estudiante,fld_lugarexp_id,fld_lugar_nacimiento,fld_fecha_nac,fld_nombres_estudiante,fld_apellidos_estudiante,fld_edad_estudiante,fld_telefono_estudiante,fld_direccion_estudiante,fld_barrio_residenciaestd,fld_ciudad,fld_ult_colegio,fld_ult_año_cursado,fld_fecha_ingreso,fld_fecha_egreso,fld_observaciones)VALUES(" SQL = SQL & Me.txt_identificacion_estudiante.Text & "" SQL = SQL & ",'" & Me.txt_lugar_expedicion.Text & "'" SQL = SQL & ",'" & Me.txt_fecha_lugar_nacimiento.Text & "'" SQL = SQL & ",'" & Me.txt_fecha_nac.Text & "'" SQL = SQL & ",'" & Me.txt_nombre_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_apellido_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_edad.Text & "'" SQL = SQL & ",'" & Me.txt_telefono_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_direccion_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_barrio.Text & "'" SQL = SQL & ",'" & Me.cmb_ciudad.SelectedValue & "'" SQL = SQL & ",'" & Me.txt_nom_ult_colegio.Text & "'" SQL = SQL & ",'" & Me.txt_años_cursados.Text & "'" SQL = SQL & ",'" & Me.txt_fecha_ingreso.Text & "'" SQL = SQL & ",'" & Me.txt_fecha_egreso.Text & "'" SQL = SQL & ",'" & Me.txt_observaciones.Text & "')"
CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_MATRICULA.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery(
SQL1 = "INSERT INTO TBL_ACUDIENTES(fld_id_estudiante,fld_nombres_acudiente,fld_apellidos_acudientes,fld_identificacion_acudiente,fld_direccion_acudiente,fld_telefono_acudiente,fld_parentesco,fld_actividad_dedicacion,fld_fecha_exp_id,fld_lugar_exp_id)VALUES(" SQL1 = SQL1 & Me.txt_identificacion_estudiante.Text & "" SQL1 = SQL1 & ",'" & Me.txt_nom_acudiente.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_apellidos_acudientes.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_identificacion_acudiente.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_direccion_acudiente.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_telefono_acudiente.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_parentesco.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_actividad_dedica.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_fecha_exp_id.Text & "'" SQL1 = SQL1 & ",'" & Me.txt_lugar_exp_id.Text & "')"
CMDInsertar.CommandText = SQL1 CMDInsertar.Connection = CONEXION DA_MATRICULA.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery()
77
78 SOFBATEC 1.0DERECHOS RESERVADOS
SQL2 = "INSERT INTO TBL_MATRICULAS(fld_id_estudiante,fld_tipo_matricula,fld_tipo_pago,fld_numero_matricula,fld_grado_matricula,fld_numero_interno,fld_fecha_matricula)VALUES(" SQL2 = SQL2 & Me.txt_identificacion_estudiante.Text & "" SQL2 = SQL2 & ",'" & Me.cmb_tipo_matricula.Text & "'" SQL2 = SQL2 & ",'" & Me.cmb_tipo_pago.Text & "'" SQL2 = SQL2 & ",'" & Me.txt_matricula_No.Text & "'" SQL2 = SQL2 & ",'" & Me.cmb_grado_a_matricular.Text & Me.cmb_grupo_grado.Text & "'" SQL2 = SQL2 & ",'" & Me.txt_num_interno.Text & "'" SQL2 = SQL2 & ",'" & Me.txt_fecha_matr.Text & "')"
CMDInsertar.CommandText = SQL2 CMDInsertar.Connection = CONEXION DA_MATRICULA.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO"
Else
SQL = "UPDATE TBL_ESTUDIANTES SET " SQL = SQL & "fld_lugarexp_id='" & Me.txt_lugar_expedicion.Text & "'" SQL = SQL & ",fld_lugar_nacimiento='" & Me.txt_fecha_lugar_nacimiento.Text & "'" SQL = SQL & ",fld_fecha_nac='" & Me.txt_fecha_nac.Text & "'" SQL = SQL & ",fld_nombres_estudiante='" & Me.txt_nombre_estudiante.Text & "'" SQL = SQL & ",fld_apellidos_estudiante='" & Me.txt_apellido_estudiante.Text & "'" SQL = SQL & ",fld_edad_estudiante='" & Me.txt_edad.Text & "'" SQL = SQL & ",fld_telefono_estudiante='" & Me.txt_telefono_estudiante.Text & "'" SQL = SQL & ",fld_direccion_estudiante='" & Me.txt_direccion_estudiante.Text & "'" SQL = SQL & ",fld_barrio_residenciaestd='" & Me.txt_barrio.Text & "'" SQL = SQL & ",fld_ciudad='" & Me.cmb_ciudad.SelectedValue & "'" SQL = SQL & ",fld_ult_colegio='" & Me.txt_nom_ult_colegio.Text & "'" SQL = SQL & ",fld_ult_año_cursado='" & Me.txt_años_cursados.Text & "'" SQL = SQL & ",fld_fecha_ingreso='" & Me.txt_fecha_ingreso.Text & "'" SQL = SQL & ",fld_fecha_egreso='" & Me.txt_fecha_egreso.Text & "'" SQL = SQL & ",fld_observaciones='" & Me.txt_observaciones.Text & "'" SQL = SQL & " WHERE fld_identificacion_estudiante=" & Me.txt_identificacion_estudiante.Text & ""
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open()
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_MATRICULA.UpdateCommand = CMDActualizar
78
79 SOFBATEC 1.0DERECHOS RESERVADOS
CMDActualizar.ExecuteNonQuery()
SQL1 = "UPDATE TBL_ACUDIENTES SET " SQL1 = SQL1 & "fld_nombres_acudiente='" & Me.txt_nom_acudiente.Text & "'" SQL1 = SQL1 & ",fld_apellidos_acudientes='" & Me.txt_apellidos_acudientes.Text & "'" SQL1 = SQL1 & ",fld_direccion_acudiente='" & Me.txt_direccion_acudiente.Text & "'" SQL1 = SQL1 & ",fld_telefono_acudiente='" & Me.txt_telefono_acudiente.Text & "'" SQL1 = SQL1 & ",fld_parentesco='" & Me.txt_parentesco.Text & "'"
SQL1 = SQL1 & ",fld_actividad_dedicacion='" & Me.txt_actividad_dedica.Text & "'"
SQL1 = SQL1 & ",fld_fecha_exp_id='" & Me.txt_fecha_exp_id.Text & "'" SQL1 = SQL1 & ",fld_lugar_exp_id='" & Me.txt_lugar_exp_id.Text & "'" SQL1 = SQL1 & " WHERE fld_id_estudiante=" & Me.txt_identificacion_estudiante.Text & ""
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() CMDActualizar.CommandText = SQL1 CMDActualizar.Connection = CONEXION DA_MATRICULA.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery()
SQL2 = "UPDATE TBL_MATRICULAS SET " SQL2 = SQL2 & "fld_tipo_matricula='" & Me.cmb_tipo_matricula.Text & "'" SQL2 = SQL2 & ",fld_tipo_pago='" & Me.cmb_tipo_pago.Text & "'" SQL2 = SQL2 & ",fld_numero_matricula='" & Me.txt_matricula_No.Text & "'" SQL2 = SQL2 & ",fld_grado_matricula='" & Me.cmb_grado_a_matricular.Text & Me.cmb_grupo_grado.Text & "'" SQL2 = SQL2 & ",fld_numero_interno='" & Me.txt_num_interno.Text & "'" SQL2 = SQL2 & ",fld_fecha_matricula='" & Me.txt_fecha_matr.Text & "'" SQL2 = SQL2 & " WHERE fld_id_estudiante=" & Me.txt_identificacion_estudiante.Text & ""
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() CMDActualizar.CommandText = SQL2 CMDActualizar.Connection = CONEXION DA_MATRICULA.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO"
End If SQL4 = "select A.fld_identificacion_estudiante AS [ID DEL ESTUDIANTE],A.fld_nombres_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_apellidos_estudiante AS [APELLIDOS DEL
79
80 SOFBATEC 1.0DERECHOS RESERVADOS
ESTUDIANTE],A.fld_lugar_nacimiento AS [LUGAR DE NACIMIENTO],A.fld_fecha_nac AS [FECHA DE NACIMIENTO],A.fld_lugarexp_id AS [LUGAR DE EXPEDICION],A.fld_edad_estudiante AS EDAD,A.fld_telefono_estudiante AS [TELEFONO ESTUDIANTE],A.fld_direccion_estudiante AS [DIRECCION ESTUDIANTE],A.fld_barrio_residenciaestd AS BARRIO,A.fld_ciudad AS CIUDAD,A.fld_ult_colegio AS [NOMBRE DEL ULTIMO COLEGIO DONDE ESTUDIO],A.fld_ult_año_cursado AS [ULTIMO AÑO CURSADO],A.fld_fecha_ingreso AS [FECHA DE INGRESO],A.fld_fecha_egreso AS [FECHA DE EGRESO],A.fld_observaciones AS OBSERVACIONES,B.fld_tipo_matricula AS [TIPO DE MATRICULA],B.fld_tipo_pago AS [TIPO DE PAGO],B.fld_numero_matricula AS [MATRICULA No],B.fld_grado_matricula AS [GRADO A MATRICULAR],B.fld_numero_interno AS [NUMERO INTERNO],B.fld_fecha_matricula AS [FECHA DE MATRICULA],C.fld_nombres_acudiente AS [NOMBRES DEL ACUDIENTE],C.fld_apellidos_acudientes AS [APELLIDOS DEL ACUDIENTE],C.fld_identificacion_acudiente AS [IDENTIFICACION DEL ACUDIENTE],C.fld_direccion_acudiente AS [DIRECCION DEL ACUDIENTE],C.fld_telefono_acudiente AS [TELEFONO DEL ACUDIENTE],C.fld_parentesco AS PARENTESCO,C.fld_actividad_dedicacion AS [ACTIVIDAD DEL ACUDIENTE],C.fld_fecha_exp_id AS [FECHA DE EXPEDICION ID],C.fld_lugar_exp_id AS [LUGAR DE EXPEDICION ID]" SQL4 = SQL4 & " from TBL_ESTUDIANTES A,tbl_MATRICULAS B,tbl_acudientes C" SQL4 = SQL4 & " WHERE A.fld_identificacion_estudiante=B.fld_id_estudiante AND B.fld_id_estudiante=C.fld_id_estudiante" SQL4 = SQL4 & " order by A.fld_apellidos_estudiante" CMDselect.CommandText = SQL4 DS_Datos.Tables("TBL_ESTUDIANTES").Clear() DA_ESTUDIANTES.SelectCommand = CMDselect DA_ESTUDIANTES.Fill(DS_Datos, "TBL_ESTUDIANTES")
CONEXION.Close() Call ENLACES() Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
80
81 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub btn_primero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_primero.Click Try Call ENLACES() EnlaceBASE.Position = 0 Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_anterior_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_anterior.Click Try Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False End If Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_siguiente_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_siguiente.Click Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False End If Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True
81
82 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_ultimo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ultimo.Click Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_eliminar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_eliminar.Click Dim SQL As String If Me.txt_nombre_estudiante.Text.Length = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE * FROM tbl_estudiantes WHERE fld_identificacion_estudiante=" & Me.txt_identificacion_estudiante.Text & "" CMDBorrar.Connection = CONEXION DA_MATRICULA.DeleteCommand = CMDBorrar If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "select A.fld_identificacion_estudiante AS [ID DEL ESTUDIANTE],A.fld_nombres_estudiante AS [NOMBRES DEL
82
83 SOFBATEC 1.0DERECHOS RESERVADOS
ESTUDIANTE],A.fld_apellidos_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_lugar_nacimiento AS [LUGAR DE NACIMIENTO],A.fld_fecha_nac AS [FECHA DE NACIMIENTO],A.fld_lugarexp_id AS [LUGAR DE EXPEDICION],A.fld_edad_estudiante AS EDAD,A.fld_telefono_estudiante AS [TELEFONO ESTUDIANTE],A.fld_direccion_estudiante AS [DIRECCION ESTUDIANTE],A.fld_barrio_residenciaestd AS BARRIO,A.fld_ciudad AS CIUDAD,A.fld_ult_colegio AS [NOMBRE DEL ULTIMO COLEGIO DONDE ESTUDIO],A.fld_ult_año_cursado AS [ULTIMO AÑO CURSADO],A.fld_fecha_ingreso AS [FECHA DE INGRESO],A.fld_fecha_egreso AS [FECHA DE EGRESO],A.fld_observaciones AS OBSERVACIONES,B.fld_tipo_matricula AS [TIPO DE MATRICULA],B.fld_tipo_pago AS [TIPO DE PAGO],B.fld_numero_matricula AS [MATRICULA No],B.fld_grado_matricula AS [GRADO A MATRICULAR],B.fld_numero_interno AS [NUMERO INTERNO],B.fld_fecha_matricula AS [FECHA DE MATRICULA],C.fld_nombres_acudiente AS [NOMBRES DEL ACUDIENTE],C.fld_apellidos_acudientes AS [APELLIDOS DEL ACUDIENTE],C.fld_identificacion_acudiente AS [IDENTIFICACION DEL ACUDIENTE],C.fld_direccion_acudiente AS [DIRECCION DEL ACUDIENTE],C.fld_telefono_acudiente AS [TELEFONO DEL ACUDIENTE],C.fld_parentesco AS PARENTESCO,C.fld_actividad_dedicacion AS [ACTIVIDAD DEL ACUDIENTE],C.fld_fecha_exp_id AS [FECHA DE EXPEDICION ID],C.fld_lugar_exp_id AS [LUGAR DE EXPEDICION ID]" SQL = SQL & " from TBL_ESTUDIANTES A,tbl_MATRICULAS B,tbl_acudientes C" SQL = SQL & " WHERE A.fld_identificacion_estudiante=B.fld_id_estudiante AND B.fld_id_estudiante=C.fld_id_estudiante" SQL = SQL & " order by A.fld_apellidos_estudiante" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_ESTUDIANTES").Clear() DA_ESTUDIANTES.SelectCommand = CMDselect DA_ESTUDIANTES.Fill(DS_Datos, "TBL_ESTUDIANTES")
MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub dtp_fecha_exp_id_acu_CloseUp(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtp_fecha_exp_id_acu.CloseUp Me.txt_fecha_exp_id.Text = Me.dtp_fecha_exp_id_acu.Value End Sub
83
84 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub dtp_fecha_matr_CloseUp(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtp_fecha_matr.CloseUp Me.txt_fecha_matr.Text = Me.dtp_fecha_matr.Value End Sub
Private Sub dtp_fecha_nac_CloseUp(ByVal sender As Object, ByVal e As System.EventArgs) Handles dtp_fecha_nac.CloseUp Me.txt_fecha_nac.Text = Me.dtp_fecha_nac.Value End Sub
Private Sub frm_matriculas_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing DS_Datos.Tables("TBL_ESTUDIANTES").Clear() DS_Datos.Tables("TBL_CIUDAD").Clear() End Sub
Private Sub txt_fecha_matr_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_fecha_matr.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_fecha_matr_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_fecha_matr.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_apellido_estudiante_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_apellido_estudiante.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_apellido_estudiante_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_apellido_estudiante.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
84
85 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_nombre_estudiante_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_nombre_estudiante.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_nombre_estudiante_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_nombre_estudiante.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_identificacion_estudiante_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_identificacion_estudiante.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_identificacion_estudiante_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_identificacion_estudiante.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_lugar_expedicion_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_lugar_expedicion.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_lugar_expedicion_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_lugar_expedicion.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
85
86 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_fecha_lugar_nacimiento_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_fecha_lugar_nacimiento.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_fecha_lugar_nacimiento_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_fecha_lugar_nacimiento.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_fecha_nac_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_fecha_nac.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_fecha_nac_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_fecha_nac.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_edad_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_edad.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_edad_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_edad.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_telefono_estudiante_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_telefono_estudiante.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False
86
87 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
Private Sub txt_telefono_estudiante_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_telefono_estudiante.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_direccion_estudiante_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_direccion_estudiante.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_direccion_estudiante_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_direccion_estudiante.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_barrio_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_barrio.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_barrio_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_barrio.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub cmb_ciudad_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_ciudad.KeyDown If e.KeyCode = Keys.Enter Then If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End If
87
88 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
Private Sub cmb_ciudad_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_ciudad.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub txt_nom_ult_colegio_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_nom_ult_colegio.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_nom_ult_colegio_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_nom_ult_colegio.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_años_cursados_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_años_cursados.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_años_cursados_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_años_cursados.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_fecha_ingreso_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_fecha_ingreso.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_fecha_ingreso_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_fecha_ingreso.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select
88
89 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
Private Sub txt_fecha_egreso_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_fecha_egreso.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_fecha_egreso_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_fecha_egreso.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_observaciones_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_observaciones.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_observaciones_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_observaciones.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_nom_acudiente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_nom_acudiente.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_nom_acudiente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_nom_acudiente.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_apellidos_acudientes_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_apellidos_acudientes.KeyDown
89
90 SOFBATEC 1.0DERECHOS RESERVADOS
If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_apellidos_acudientes_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_apellidos_acudientes.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_identificacion_acudiente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_identificacion_acudiente.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_identificacion_acudiente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_identificacion_acudiente.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57
Case Else keyascii = 0 End Select End Sub
Private Sub txt_lugar_exp_id_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_lugar_exp_id.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_lugar_exp_id_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_lugar_exp_id.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_direccion_acudiente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_direccion_acudiente.KeyDown
90
91 SOFBATEC 1.0DERECHOS RESERVADOS
If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_direccion_acudiente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_direccion_acudiente.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_telefono_acudiente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_telefono_acudiente.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_telefono_acudiente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_telefono_acudiente.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_parentesco_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_parentesco.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_parentesco_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_parentesco.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_actividad_dedica_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_actividad_dedica.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
91
92 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_actividad_dedica_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_actividad_dedica.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_matricula_No_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_matricula_No.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_matricula_No_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_matricula_No.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub Private Sub cmb_grado_a_matricular_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_grado_a_matricular.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub cmb_grado_a_matricular_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_grado_a_matricular.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub cmb_grupo_grado_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_grupo_grado.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub cmb_grupo_grado_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_grupo_grado.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub cmb_tipo_matricula_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_tipo_matricula.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
92
93 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub cmb_tipo_matricula_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_tipo_matricula.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub cmb_tipo_pago_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_tipo_pago.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub cmb_tipo_pago_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_tipo_pago.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub txt_num_interno_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_num_interno.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_num_interno_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_num_interno.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_fecha_exp_id_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_fecha_exp_id.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_fecha_exp_id_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_fecha_exp_id.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub btn_salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_salir.Click Me.Close() End Sub
93
94 SOFBATEC 1.0DERECHOS RESERVADOS
End Class
Codigo Consultar estudiantes
Public Class frm_estudiante Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
94
95 SOFBATEC 1.0DERECHOS RESERVADOS
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents btn_consulta As System.Windows.Forms.Button Friend WithEvents TabControl1 As System.Windows.Forms.TabControl Friend WithEvents TabPage1 As System.Windows.Forms.TabPage Friend WithEvents TabPage2 As System.Windows.Forms.TabPage Friend WithEvents grb_aprobo As System.Windows.Forms.GroupBox Friend WithEvents rbt_no_apro_mater As System.Windows.Forms.RadioButton Friend WithEvents rbt_si_apro_mater As System.Windows.Forms.RadioButton Friend WithEvents txt_ih_fis As System.Windows.Forms.TextBox Friend WithEvents txt_ih_qui As System.Windows.Forms.TextBox Friend WithEvents txt_ih_fil As System.Windows.Forms.TextBox Friend WithEvents txt_ih_nat As System.Windows.Forms.TextBox Friend WithEvents txt_ih_ing As System.Windows.Forms.TextBox Friend WithEvents txt_ih_rel As System.Windows.Forms.TextBox Friend WithEvents txt_ih_soc As System.Windows.Forms.TextBox Friend WithEvents txt_ih_tec As System.Windows.Forms.TextBox Friend WithEvents txt_ih_art As System.Windows.Forms.TextBox Friend WithEvents txt_ih_esp As System.Windows.Forms.TextBox Friend WithEvents txt_ih_mat As System.Windows.Forms.TextBox Friend WithEvents txt_cual_ing As System.Windows.Forms.TextBox Friend WithEvents txt_cual_rel As System.Windows.Forms.TextBox Friend WithEvents txt_cual_nat As System.Windows.Forms.TextBox Friend WithEvents txt_cual_fil As System.Windows.Forms.TextBox Friend WithEvents txt_cual_qui As System.Windows.Forms.TextBox Friend WithEvents txt_cual_soc As System.Windows.Forms.TextBox Friend WithEvents txt_cual_tec As System.Windows.Forms.TextBox Friend WithEvents txt_cual_art As System.Windows.Forms.TextBox Friend WithEvents txt_cual_esp As System.Windows.Forms.TextBox Friend WithEvents txt_cual_mat As System.Windows.Forms.TextBox Friend WithEvents txt_cual_fis As System.Windows.Forms.TextBox Friend WithEvents txt_cal_fis As System.Windows.Forms.TextBox Friend WithEvents txt_cal_qui As System.Windows.Forms.TextBox Friend WithEvents txt_cal_fil As System.Windows.Forms.TextBox Friend WithEvents txt_cal_nat As System.Windows.Forms.TextBox Friend WithEvents txt_cal_ing As System.Windows.Forms.TextBox Friend WithEvents txt_cal_rel As System.Windows.Forms.TextBox Friend WithEvents txt_cal_soc As System.Windows.Forms.TextBox Friend WithEvents txt_cal_tec As System.Windows.Forms.TextBox Friend WithEvents txt_cal_art As System.Windows.Forms.TextBox Friend WithEvents txt_cal_esp As System.Windows.Forms.TextBox Friend WithEvents txt_cal_mat As System.Windows.Forms.TextBox Friend WithEvents lbl_id_estudiante As System.Windows.Forms.Label Friend WithEvents txt_id_estudiante As System.Windows.Forms.TextBox Friend WithEvents lbl_apellidos_estudiante As System.Windows.Forms.Label Friend WithEvents cmb_periodo As System.Windows.Forms.ComboBox Friend WithEvents lbl_periodo As System.Windows.Forms.Label Friend WithEvents lbl_calificacion As System.Windows.Forms.Label Friend WithEvents lbl_asignaturas As System.Windows.Forms.Label
95
96 SOFBATEC 1.0DERECHOS RESERVADOS
Friend WithEvents chk_fisica As System.Windows.Forms.CheckBox Friend WithEvents chk_quimica As System.Windows.Forms.CheckBox Friend WithEvents chk_filosofia As System.Windows.Forms.CheckBox Friend WithEvents chk_naturales As System.Windows.Forms.CheckBox Friend WithEvents chk_ingles As System.Windows.Forms.CheckBox Friend WithEvents chk_religion As System.Windows.Forms.CheckBox Friend WithEvents chk_sociales As System.Windows.Forms.CheckBox Friend WithEvents chk_tecnologia As System.Windows.Forms.CheckBox Friend WithEvents chk_artes As System.Windows.Forms.CheckBox Friend WithEvents chk_español As System.Windows.Forms.CheckBox Friend WithEvents chk_matematicas As System.Windows.Forms.CheckBox Friend WithEvents lbl_grado As System.Windows.Forms.Label Friend WithEvents lbl_nom_estudiante As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lbl_estado_periodo As System.Windows.Forms.Label Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_ultimo As System.Windows.Forms.Button Friend WithEvents btn_siguiente As System.Windows.Forms.Button Friend WithEvents btn_anterior As System.Windows.Forms.Button Friend WithEvents btn_primero As System.Windows.Forms.Button Friend WithEvents btn_cancelar As System.Windows.Forms.Button Friend WithEvents btn_eliminar As System.Windows.Forms.Button Friend WithEvents btn_grabar As System.Windows.Forms.Button Friend WithEvents btn_nuevo As System.Windows.Forms.Button Friend WithEvents btn_digitar As System.Windows.Forms.Button Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents dtg_consulta As System.Windows.Forms.DataGrid Friend WithEvents lbl_inhoraria As System.Windows.Forms.Label Friend WithEvents btn_modificar As System.Windows.Forms.Button Friend WithEvents txt_estudiante As System.Windows.Forms.TextBox Friend WithEvents txt_apellidos_estudiante As System.Windows.Forms.TextBox Friend WithEvents txt_grado As System.Windows.Forms.TextBox Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frm_estudiante)) Me.btn_consulta = New System.Windows.Forms.Button Me.TabControl1 = New System.Windows.Forms.TabControl Me.TabPage1 = New System.Windows.Forms.TabPage Me.txt_grado = New System.Windows.Forms.TextBox Me.txt_apellidos_estudiante = New System.Windows.Forms.TextBox Me.txt_estudiante = New System.Windows.Forms.TextBox Me.lbl_inhoraria = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.lblposicion = New System.Windows.Forms.Label Me.btn_ultimo = New System.Windows.Forms.Button Me.btn_siguiente = New System.Windows.Forms.Button Me.btn_anterior = New System.Windows.Forms.Button Me.btn_primero = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button
96
97 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_cancelar = New System.Windows.Forms.Button Me.btn_eliminar = New System.Windows.Forms.Button Me.btn_grabar = New System.Windows.Forms.Button Me.btn_modificar = New System.Windows.Forms.Button Me.btn_nuevo = New System.Windows.Forms.Button Me.btn_digitar = New System.Windows.Forms.Button Me.grb_aprobo = New System.Windows.Forms.GroupBox Me.rbt_no_apro_mater = New System.Windows.Forms.RadioButton Me.rbt_si_apro_mater = New System.Windows.Forms.RadioButton Me.txt_ih_fis = New System.Windows.Forms.TextBox Me.txt_ih_qui = New System.Windows.Forms.TextBox Me.txt_ih_fil = New System.Windows.Forms.TextBox Me.txt_ih_nat = New System.Windows.Forms.TextBox Me.txt_ih_ing = New System.Windows.Forms.TextBox Me.txt_ih_rel = New System.Windows.Forms.TextBox Me.txt_ih_soc = New System.Windows.Forms.TextBox Me.txt_ih_tec = New System.Windows.Forms.TextBox Me.txt_ih_art = New System.Windows.Forms.TextBox Me.txt_ih_esp = New System.Windows.Forms.TextBox Me.txt_ih_mat = New System.Windows.Forms.TextBox Me.txt_cual_ing = New System.Windows.Forms.TextBox Me.txt_cual_rel = New System.Windows.Forms.TextBox Me.txt_cual_nat = New System.Windows.Forms.TextBox Me.txt_cual_fil = New System.Windows.Forms.TextBox Me.txt_cual_qui = New System.Windows.Forms.TextBox Me.txt_cual_soc = New System.Windows.Forms.TextBox Me.txt_cual_tec = New System.Windows.Forms.TextBox Me.txt_cual_art = New System.Windows.Forms.TextBox Me.txt_cual_esp = New System.Windows.Forms.TextBox Me.txt_cual_mat = New System.Windows.Forms.TextBox Me.txt_cual_fis = New System.Windows.Forms.TextBox Me.txt_cal_fis = New System.Windows.Forms.TextBox Me.txt_cal_qui = New System.Windows.Forms.TextBox Me.txt_cal_fil = New System.Windows.Forms.TextBox Me.txt_cal_nat = New System.Windows.Forms.TextBox Me.txt_cal_ing = New System.Windows.Forms.TextBox Me.txt_cal_rel = New System.Windows.Forms.TextBox Me.txt_cal_soc = New System.Windows.Forms.TextBox Me.txt_cal_tec = New System.Windows.Forms.TextBox Me.txt_cal_art = New System.Windows.Forms.TextBox Me.txt_cal_esp = New System.Windows.Forms.TextBox Me.txt_cal_mat = New System.Windows.Forms.TextBox Me.lbl_id_estudiante = New System.Windows.Forms.Label Me.txt_id_estudiante = New System.Windows.Forms.TextBox Me.lbl_apellidos_estudiante = New System.Windows.Forms.Label Me.cmb_periodo = New System.Windows.Forms.ComboBox Me.lbl_periodo = New System.Windows.Forms.Label Me.lbl_calificacion = New System.Windows.Forms.Label Me.lbl_asignaturas = New System.Windows.Forms.Label Me.chk_fisica = New System.Windows.Forms.CheckBox
97
98 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_quimica = New System.Windows.Forms.CheckBox Me.chk_filosofia = New System.Windows.Forms.CheckBox Me.chk_naturales = New System.Windows.Forms.CheckBox Me.chk_ingles = New System.Windows.Forms.CheckBox Me.chk_religion = New System.Windows.Forms.CheckBox Me.chk_sociales = New System.Windows.Forms.CheckBox Me.chk_tecnologia = New System.Windows.Forms.CheckBox Me.chk_artes = New System.Windows.Forms.CheckBox Me.chk_español = New System.Windows.Forms.CheckBox Me.chk_matematicas = New System.Windows.Forms.CheckBox Me.lbl_grado = New System.Windows.Forms.Label Me.lbl_nom_estudiante = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.lbl_estado_periodo = New System.Windows.Forms.Label Me.TabPage2 = New System.Windows.Forms.TabPage Me.dtg_consulta = New System.Windows.Forms.DataGrid Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() Me.grb_aprobo.SuspendLayout() Me.TabPage2.SuspendLayout() CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'btn_consulta ' Me.btn_consulta.BackgroundImage = CType(resources.GetObject("btn_consulta.BackgroundImage"), System.Drawing.Image) Me.btn_consulta.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btn_consulta.Location = New System.Drawing.Point(576, 83) Me.btn_consulta.Name = "btn_consulta" Me.btn_consulta.Size = New System.Drawing.Size(33, 29) Me.btn_consulta.TabIndex = 252 ' 'TabControl1 ' Me.TabControl1.Controls.Add(Me.TabPage1) Me.TabControl1.Controls.Add(Me.TabPage2) Me.TabControl1.Location = New System.Drawing.Point(0, 0) Me.TabControl1.Name = "TabControl1" Me.TabControl1.SelectedIndex = 0 Me.TabControl1.Size = New System.Drawing.Size(784, 603) Me.TabControl1.TabIndex = 253 ' 'TabPage1 ' Me.TabPage1.BackColor = System.Drawing.Color.Blue Me.TabPage1.Controls.Add(Me.txt_grado) Me.TabPage1.Controls.Add(Me.txt_apellidos_estudiante) Me.TabPage1.Controls.Add(Me.txt_estudiante)
98
99 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TabPage1.Controls.Add(Me.lbl_inhoraria) Me.TabPage1.Controls.Add(Me.Label2) Me.TabPage1.Controls.Add(Me.lblposicion) Me.TabPage1.Controls.Add(Me.btn_ultimo) Me.TabPage1.Controls.Add(Me.btn_siguiente) Me.TabPage1.Controls.Add(Me.btn_anterior) Me.TabPage1.Controls.Add(Me.btn_primero) Me.TabPage1.Controls.Add(Me.btn_salir) Me.TabPage1.Controls.Add(Me.btn_cancelar) Me.TabPage1.Controls.Add(Me.btn_eliminar) Me.TabPage1.Controls.Add(Me.btn_grabar) Me.TabPage1.Controls.Add(Me.btn_modificar) Me.TabPage1.Controls.Add(Me.btn_nuevo) Me.TabPage1.Controls.Add(Me.btn_digitar) Me.TabPage1.Controls.Add(Me.grb_aprobo) Me.TabPage1.Controls.Add(Me.txt_ih_fis) Me.TabPage1.Controls.Add(Me.txt_ih_qui) Me.TabPage1.Controls.Add(Me.txt_ih_fil) Me.TabPage1.Controls.Add(Me.txt_ih_nat) Me.TabPage1.Controls.Add(Me.txt_ih_ing) Me.TabPage1.Controls.Add(Me.txt_ih_rel) Me.TabPage1.Controls.Add(Me.txt_ih_soc) Me.TabPage1.Controls.Add(Me.txt_ih_tec) Me.TabPage1.Controls.Add(Me.txt_ih_art) Me.TabPage1.Controls.Add(Me.txt_ih_esp) Me.TabPage1.Controls.Add(Me.txt_ih_mat) Me.TabPage1.Controls.Add(Me.txt_cual_ing) Me.TabPage1.Controls.Add(Me.txt_cual_rel) Me.TabPage1.Controls.Add(Me.txt_cual_nat) Me.TabPage1.Controls.Add(Me.txt_cual_fil) Me.TabPage1.Controls.Add(Me.txt_cual_qui) Me.TabPage1.Controls.Add(Me.txt_cual_soc) Me.TabPage1.Controls.Add(Me.txt_cual_tec) Me.TabPage1.Controls.Add(Me.txt_cual_art) Me.TabPage1.Controls.Add(Me.txt_cual_esp) Me.TabPage1.Controls.Add(Me.txt_cual_mat) Me.TabPage1.Controls.Add(Me.txt_cual_fis) Me.TabPage1.Controls.Add(Me.txt_cal_fis) Me.TabPage1.Controls.Add(Me.txt_cal_qui) Me.TabPage1.Controls.Add(Me.txt_cal_fil) Me.TabPage1.Controls.Add(Me.txt_cal_nat) Me.TabPage1.Controls.Add(Me.txt_cal_ing) Me.TabPage1.Controls.Add(Me.txt_cal_rel) Me.TabPage1.Controls.Add(Me.txt_cal_soc) Me.TabPage1.Controls.Add(Me.txt_cal_tec) Me.TabPage1.Controls.Add(Me.txt_cal_art) Me.TabPage1.Controls.Add(Me.txt_cal_esp) Me.TabPage1.Controls.Add(Me.txt_cal_mat) Me.TabPage1.Controls.Add(Me.lbl_id_estudiante) Me.TabPage1.Controls.Add(Me.txt_id_estudiante)
99
100 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TabPage1.Controls.Add(Me.lbl_apellidos_estudiante) Me.TabPage1.Controls.Add(Me.cmb_periodo) Me.TabPage1.Controls.Add(Me.lbl_periodo) Me.TabPage1.Controls.Add(Me.lbl_calificacion) Me.TabPage1.Controls.Add(Me.lbl_asignaturas) Me.TabPage1.Controls.Add(Me.chk_fisica) Me.TabPage1.Controls.Add(Me.chk_quimica) Me.TabPage1.Controls.Add(Me.chk_filosofia) Me.TabPage1.Controls.Add(Me.chk_naturales) Me.TabPage1.Controls.Add(Me.chk_ingles) Me.TabPage1.Controls.Add(Me.chk_religion) Me.TabPage1.Controls.Add(Me.chk_sociales) Me.TabPage1.Controls.Add(Me.chk_tecnologia) Me.TabPage1.Controls.Add(Me.chk_artes) Me.TabPage1.Controls.Add(Me.chk_español) Me.TabPage1.Controls.Add(Me.chk_matematicas) Me.TabPage1.Controls.Add(Me.lbl_grado) Me.TabPage1.Controls.Add(Me.lbl_nom_estudiante) Me.TabPage1.Controls.Add(Me.Label1) Me.TabPage1.Controls.Add(Me.lbl_estado_periodo) Me.TabPage1.Controls.Add(Me.btn_consulta) Me.TabPage1.Location = New System.Drawing.Point(4, 22) Me.TabPage1.Name = "TabPage1" Me.TabPage1.Size = New System.Drawing.Size(776, 577) Me.TabPage1.TabIndex = 0 Me.TabPage1.Text = "DATOS" ' 'txt_grado ' Me.txt_grado.BackColor = System.Drawing.Color.RoyalBlue Me.txt_grado.Location = New System.Drawing.Point(560, 55) Me.txt_grado.Name = "txt_grado" Me.txt_grado.ReadOnly = True Me.txt_grado.Size = New System.Drawing.Size(56, 20) Me.txt_grado.TabIndex = 369 Me.txt_grado.Text = "" ' 'txt_apellidos_estudiante ' Me.txt_apellidos_estudiante.BackColor = System.Drawing.Color.RoyalBlue Me.txt_apellidos_estudiante.Location = New System.Drawing.Point(232, 118) Me.txt_apellidos_estudiante.Name = "txt_apellidos_estudiante" Me.txt_apellidos_estudiante.ReadOnly = True Me.txt_apellidos_estudiante.Size = New System.Drawing.Size(272, 20) Me.txt_apellidos_estudiante.TabIndex = 368 Me.txt_apellidos_estudiante.Text = "" ' 'txt_estudiante ' Me.txt_estudiante.BackColor = System.Drawing.Color.RoyalBlue
100
101 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_estudiante.Location = New System.Drawing.Point(232, 83) Me.txt_estudiante.Name = "txt_estudiante" Me.txt_estudiante.ReadOnly = True Me.txt_estudiante.Size = New System.Drawing.Size(264, 20) Me.txt_estudiante.TabIndex = 367 Me.txt_estudiante.Text = "" ' 'lbl_inhoraria ' Me.lbl_inhoraria.AutoSize = True Me.lbl_inhoraria.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_inhoraria.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_inhoraria.ForeColor = System.Drawing.Color.Blue Me.lbl_inhoraria.Location = New System.Drawing.Point(264, 153) Me.lbl_inhoraria.Name = "lbl_inhoraria" Me.lbl_inhoraria.Size = New System.Drawing.Size(97, 19) Me.lbl_inhoraria.TabIndex = 366 Me.lbl_inhoraria.Text = "Intensidad horaria" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.LightSkyBlue Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label2.ForeColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(264, 423) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(152, 28) Me.Label2.TabIndex = 365 Me.Label2.Text = "EL ESTADO DEL PERIODO ES:" Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.Label2.Visible = False ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.Blue Me.lblposicion.Location = New System.Drawing.Point(360, 499) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(80, 32) Me.lblposicion.TabIndex = 364 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btn_ultimo ' Me.btn_ultimo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_ultimo.Location = New System.Drawing.Point(488, 499) Me.btn_ultimo.Name = "btn_ultimo"
101
102 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_ultimo.Size = New System.Drawing.Size(48, 32) Me.btn_ultimo.TabIndex = 363 ' 'btn_siguiente ' Me.btn_siguiente.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_siguiente.Location = New System.Drawing.Point(440, 499) Me.btn_siguiente.Name = "btn_siguiente" Me.btn_siguiente.Size = New System.Drawing.Size(48, 32) Me.btn_siguiente.TabIndex = 362 ' 'btn_anterior ' Me.btn_anterior.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_anterior.Location = New System.Drawing.Point(312, 499) Me.btn_anterior.Name = "btn_anterior" Me.btn_anterior.Size = New System.Drawing.Size(48, 32) Me.btn_anterior.TabIndex = 361 ' 'btn_primero ' Me.btn_primero.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_primero.Location = New System.Drawing.Point(264, 499) Me.btn_primero.Name = "btn_primero" Me.btn_primero.Size = New System.Drawing.Size(48, 32) Me.btn_primero.TabIndex = 360 ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.ForeColor = System.Drawing.Color.Transparent Me.btn_salir.Location = New System.Drawing.Point(544, 465) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(72, 32) Me.btn_salir.TabIndex = 365 Me.btn_salir.Text = "&Salir" Me.btn_salir.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_cancelar ' Me.btn_cancelar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_cancelar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_cancelar.ForeColor = System.Drawing.Color.Transparent Me.btn_cancelar.Location = New System.Drawing.Point(472, 465) Me.btn_cancelar.Name = "btn_cancelar" Me.btn_cancelar.Size = New System.Drawing.Size(72, 32) Me.btn_cancelar.TabIndex = 364
102
103 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_cancelar.Text = "&Cancelar" Me.btn_cancelar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_eliminar ' Me.btn_eliminar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_eliminar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_eliminar.ForeColor = System.Drawing.Color.Transparent Me.btn_eliminar.Location = New System.Drawing.Point(400, 465) Me.btn_eliminar.Name = "btn_eliminar" Me.btn_eliminar.Size = New System.Drawing.Size(72, 32) Me.btn_eliminar.TabIndex = 363 Me.btn_eliminar.Text = "&Eliminiar" Me.btn_eliminar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_grabar ' Me.btn_grabar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_grabar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_grabar.ForeColor = System.Drawing.Color.Transparent Me.btn_grabar.Location = New System.Drawing.Point(328, 465) Me.btn_grabar.Name = "btn_grabar" Me.btn_grabar.Size = New System.Drawing.Size(72, 32) Me.btn_grabar.TabIndex = 362 Me.btn_grabar.Text = "&Grabar" Me.btn_grabar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_modificar ' Me.btn_modificar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_modificar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_modificar.ForeColor = System.Drawing.Color.Transparent Me.btn_modificar.Location = New System.Drawing.Point(256, 465) Me.btn_modificar.Name = "btn_modificar" Me.btn_modificar.Size = New System.Drawing.Size(72, 32) Me.btn_modificar.TabIndex = 361 Me.btn_modificar.Text = "&Modificar" Me.btn_modificar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_nuevo ' Me.btn_nuevo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_nuevo.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_nuevo.ForeColor = System.Drawing.Color.Transparent Me.btn_nuevo.Location = New System.Drawing.Point(184, 465) Me.btn_nuevo.Name = "btn_nuevo"
103
104 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_nuevo.Size = New System.Drawing.Size(72, 32) Me.btn_nuevo.TabIndex = 360 Me.btn_nuevo.Text = "&Nuevo" Me.btn_nuevo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_digitar ' Me.btn_digitar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_digitar.ForeColor = System.Drawing.Color.Blue Me.btn_digitar.Location = New System.Drawing.Point(344, 534) Me.btn_digitar.Name = "btn_digitar" Me.btn_digitar.Size = New System.Drawing.Size(104, 21) Me.btn_digitar.TabIndex = 353 Me.btn_digitar.Text = "Digitar calificacion" ' 'grb_aprobo ' Me.grb_aprobo.BackColor = System.Drawing.Color.LightSkyBlue Me.grb_aprobo.Controls.Add(Me.rbt_no_apro_mater) Me.grb_aprobo.Controls.Add(Me.rbt_si_apro_mater) Me.grb_aprobo.ForeColor = System.Drawing.Color.Blue Me.grb_aprobo.Location = New System.Drawing.Point(264, 423) Me.grb_aprobo.Name = "grb_aprobo" Me.grb_aprobo.Size = New System.Drawing.Size(296, 35) Me.grb_aprobo.TabIndex = 352 Me.grb_aprobo.TabStop = False Me.grb_aprobo.Text = "¿Aprobo el estudiante el semestre?" ' 'rbt_no_apro_mater ' Me.rbt_no_apro_mater.BackColor = System.Drawing.Color.LightSkyBlue Me.rbt_no_apro_mater.ForeColor = System.Drawing.Color.Blue Me.rbt_no_apro_mater.Location = New System.Drawing.Point(168, 14) Me.rbt_no_apro_mater.Name = "rbt_no_apro_mater" Me.rbt_no_apro_mater.Size = New System.Drawing.Size(72, 14) Me.rbt_no_apro_mater.TabIndex = 1 Me.rbt_no_apro_mater.Text = "No" ' 'rbt_si_apro_mater ' Me.rbt_si_apro_mater.Location = New System.Drawing.Point(88, 14) Me.rbt_si_apro_mater.Name = "rbt_si_apro_mater" Me.rbt_si_apro_mater.Size = New System.Drawing.Size(72, 14) Me.rbt_si_apro_mater.TabIndex = 0 Me.rbt_si_apro_mater.Text = "Si" ' 'txt_ih_fis ' Me.txt_ih_fis.Location = New System.Drawing.Point(264, 388) Me.txt_ih_fis.Name = "txt_ih_fis"
104
105 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_ih_fis.Size = New System.Drawing.Size(96, 20) Me.txt_ih_fis.TabIndex = 326 Me.txt_ih_fis.Text = "" ' 'txt_ih_qui ' Me.txt_ih_qui.Location = New System.Drawing.Point(264, 367) Me.txt_ih_qui.Name = "txt_ih_qui" Me.txt_ih_qui.Size = New System.Drawing.Size(96, 20) Me.txt_ih_qui.TabIndex = 325 Me.txt_ih_qui.Text = "" ' 'txt_ih_fil ' Me.txt_ih_fil.Location = New System.Drawing.Point(264, 347) Me.txt_ih_fil.Name = "txt_ih_fil" Me.txt_ih_fil.Size = New System.Drawing.Size(96, 20) Me.txt_ih_fil.TabIndex = 324 Me.txt_ih_fil.Text = "" ' 'txt_ih_nat ' Me.txt_ih_nat.Location = New System.Drawing.Point(264, 326) Me.txt_ih_nat.Name = "txt_ih_nat" Me.txt_ih_nat.Size = New System.Drawing.Size(96, 20) Me.txt_ih_nat.TabIndex = 323 Me.txt_ih_nat.Text = "" ' 'txt_ih_ing ' Me.txt_ih_ing.Location = New System.Drawing.Point(264, 305) Me.txt_ih_ing.Name = "txt_ih_ing" Me.txt_ih_ing.Size = New System.Drawing.Size(96, 20) Me.txt_ih_ing.TabIndex = 322 Me.txt_ih_ing.Text = "" ' 'txt_ih_rel ' Me.txt_ih_rel.Location = New System.Drawing.Point(264, 284) Me.txt_ih_rel.Name = "txt_ih_rel" Me.txt_ih_rel.Size = New System.Drawing.Size(96, 20) Me.txt_ih_rel.TabIndex = 321 Me.txt_ih_rel.Text = "" ' 'txt_ih_soc ' Me.txt_ih_soc.Location = New System.Drawing.Point(264, 263) Me.txt_ih_soc.Name = "txt_ih_soc" Me.txt_ih_soc.Size = New System.Drawing.Size(96, 20) Me.txt_ih_soc.TabIndex = 320
105
106 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_ih_soc.Text = "" ' 'txt_ih_tec ' Me.txt_ih_tec.Location = New System.Drawing.Point(264, 243) Me.txt_ih_tec.Name = "txt_ih_tec" Me.txt_ih_tec.Size = New System.Drawing.Size(96, 20) Me.txt_ih_tec.TabIndex = 319 Me.txt_ih_tec.Text = "" ' 'txt_ih_art ' Me.txt_ih_art.Location = New System.Drawing.Point(264, 222) Me.txt_ih_art.Name = "txt_ih_art" Me.txt_ih_art.Size = New System.Drawing.Size(96, 20) Me.txt_ih_art.TabIndex = 318 Me.txt_ih_art.Text = "" ' 'txt_ih_esp ' Me.txt_ih_esp.Location = New System.Drawing.Point(264, 201) Me.txt_ih_esp.Name = "txt_ih_esp" Me.txt_ih_esp.Size = New System.Drawing.Size(96, 20) Me.txt_ih_esp.TabIndex = 317 Me.txt_ih_esp.Text = "" ' 'txt_ih_mat ' Me.txt_ih_mat.Location = New System.Drawing.Point(264, 180) Me.txt_ih_mat.Name = "txt_ih_mat" Me.txt_ih_mat.Size = New System.Drawing.Size(96, 20) Me.txt_ih_mat.TabIndex = 316 Me.txt_ih_mat.Text = "" ' 'txt_cual_ing ' Me.txt_cual_ing.Location = New System.Drawing.Point(504, 305) Me.txt_cual_ing.Name = "txt_cual_ing" Me.txt_cual_ing.Size = New System.Drawing.Size(120, 20) Me.txt_cual_ing.TabIndex = 357 Me.txt_cual_ing.Text = "" ' 'txt_cual_rel ' Me.txt_cual_rel.Location = New System.Drawing.Point(504, 284) Me.txt_cual_rel.Name = "txt_cual_rel" Me.txt_cual_rel.Size = New System.Drawing.Size(120, 20) Me.txt_cual_rel.TabIndex = 356 Me.txt_cual_rel.Text = "" '
106
107 SOFBATEC 1.0DERECHOS RESERVADOS
'txt_cual_nat ' Me.txt_cual_nat.Location = New System.Drawing.Point(504, 326) Me.txt_cual_nat.Name = "txt_cual_nat" Me.txt_cual_nat.Size = New System.Drawing.Size(120, 20) Me.txt_cual_nat.TabIndex = 358 Me.txt_cual_nat.Text = "" ' 'txt_cual_fil ' Me.txt_cual_fil.Location = New System.Drawing.Point(504, 347) Me.txt_cual_fil.Name = "txt_cual_fil" Me.txt_cual_fil.Size = New System.Drawing.Size(120, 20) Me.txt_cual_fil.TabIndex = 359 Me.txt_cual_fil.Text = "" ' 'txt_cual_qui ' Me.txt_cual_qui.Location = New System.Drawing.Point(504, 367) Me.txt_cual_qui.Name = "txt_cual_qui" Me.txt_cual_qui.Size = New System.Drawing.Size(120, 20) Me.txt_cual_qui.TabIndex = 360 Me.txt_cual_qui.Text = "" ' 'txt_cual_soc ' Me.txt_cual_soc.Location = New System.Drawing.Point(504, 263) Me.txt_cual_soc.Name = "txt_cual_soc" Me.txt_cual_soc.Size = New System.Drawing.Size(120, 20) Me.txt_cual_soc.TabIndex = 355 Me.txt_cual_soc.Text = "" ' 'txt_cual_tec ' Me.txt_cual_tec.Location = New System.Drawing.Point(504, 243) Me.txt_cual_tec.Name = "txt_cual_tec" Me.txt_cual_tec.Size = New System.Drawing.Size(120, 20) Me.txt_cual_tec.TabIndex = 354 Me.txt_cual_tec.Text = "" ' 'txt_cual_art ' Me.txt_cual_art.Location = New System.Drawing.Point(504, 222) Me.txt_cual_art.Name = "txt_cual_art" Me.txt_cual_art.Size = New System.Drawing.Size(120, 20) Me.txt_cual_art.TabIndex = 353 Me.txt_cual_art.Text = "" ' 'txt_cual_esp '
107
108 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cual_esp.Location = New System.Drawing.Point(504, 201) Me.txt_cual_esp.Name = "txt_cual_esp" Me.txt_cual_esp.Size = New System.Drawing.Size(120, 20) Me.txt_cual_esp.TabIndex = 352 Me.txt_cual_esp.Text = "" ' 'txt_cual_mat ' Me.txt_cual_mat.Location = New System.Drawing.Point(504, 180) Me.txt_cual_mat.Name = "txt_cual_mat" Me.txt_cual_mat.Size = New System.Drawing.Size(120, 20) Me.txt_cual_mat.TabIndex = 351 Me.txt_cual_mat.Text = "" ' 'txt_cual_fis ' Me.txt_cual_fis.Location = New System.Drawing.Point(504, 388) Me.txt_cual_fis.Name = "txt_cual_fis" Me.txt_cual_fis.Size = New System.Drawing.Size(120, 20) Me.txt_cual_fis.TabIndex = 361 Me.txt_cual_fis.Text = "" ' 'txt_cal_fis ' Me.txt_cal_fis.Location = New System.Drawing.Point(384, 388) Me.txt_cal_fis.Name = "txt_cal_fis" Me.txt_cal_fis.Size = New System.Drawing.Size(80, 20) Me.txt_cal_fis.TabIndex = 350 Me.txt_cal_fis.Text = "" ' 'txt_cal_qui ' Me.txt_cal_qui.Location = New System.Drawing.Point(384, 367) Me.txt_cal_qui.Name = "txt_cal_qui" Me.txt_cal_qui.Size = New System.Drawing.Size(80, 20) Me.txt_cal_qui.TabIndex = 349 Me.txt_cal_qui.Text = "" ' 'txt_cal_fil ' Me.txt_cal_fil.Location = New System.Drawing.Point(384, 347) Me.txt_cal_fil.Name = "txt_cal_fil" Me.txt_cal_fil.Size = New System.Drawing.Size(80, 20) Me.txt_cal_fil.TabIndex = 348 Me.txt_cal_fil.Text = "" ' 'txt_cal_nat ' Me.txt_cal_nat.Location = New System.Drawing.Point(384, 326) Me.txt_cal_nat.Name = "txt_cal_nat"
108
109 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_nat.Size = New System.Drawing.Size(80, 20) Me.txt_cal_nat.TabIndex = 347 Me.txt_cal_nat.Text = "" ' 'txt_cal_ing ' Me.txt_cal_ing.Location = New System.Drawing.Point(384, 305) Me.txt_cal_ing.Name = "txt_cal_ing" Me.txt_cal_ing.Size = New System.Drawing.Size(80, 20) Me.txt_cal_ing.TabIndex = 346 Me.txt_cal_ing.Text = "" ' 'txt_cal_rel ' Me.txt_cal_rel.Location = New System.Drawing.Point(384, 284) Me.txt_cal_rel.Name = "txt_cal_rel" Me.txt_cal_rel.Size = New System.Drawing.Size(80, 20) Me.txt_cal_rel.TabIndex = 345 Me.txt_cal_rel.Text = "" ' 'txt_cal_soc ' Me.txt_cal_soc.Location = New System.Drawing.Point(384, 263) Me.txt_cal_soc.Name = "txt_cal_soc" Me.txt_cal_soc.Size = New System.Drawing.Size(80, 20) Me.txt_cal_soc.TabIndex = 344 Me.txt_cal_soc.Text = "" ' 'txt_cal_tec ' Me.txt_cal_tec.Location = New System.Drawing.Point(384, 243) Me.txt_cal_tec.Name = "txt_cal_tec" Me.txt_cal_tec.Size = New System.Drawing.Size(80, 20) Me.txt_cal_tec.TabIndex = 343 Me.txt_cal_tec.Text = "" ' 'txt_cal_art ' Me.txt_cal_art.Location = New System.Drawing.Point(384, 222) Me.txt_cal_art.Name = "txt_cal_art" Me.txt_cal_art.Size = New System.Drawing.Size(80, 20) Me.txt_cal_art.TabIndex = 342 Me.txt_cal_art.Text = "" ' 'txt_cal_esp ' Me.txt_cal_esp.Location = New System.Drawing.Point(384, 201) Me.txt_cal_esp.Name = "txt_cal_esp" Me.txt_cal_esp.Size = New System.Drawing.Size(80, 20) Me.txt_cal_esp.TabIndex = 341
109
110 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_esp.Text = "" ' 'txt_cal_mat ' Me.txt_cal_mat.Location = New System.Drawing.Point(384, 180) Me.txt_cal_mat.Name = "txt_cal_mat" Me.txt_cal_mat.Size = New System.Drawing.Size(80, 20) Me.txt_cal_mat.TabIndex = 340 Me.txt_cal_mat.Text = "" ' 'lbl_id_estudiante ' Me.lbl_id_estudiante.AutoSize = True Me.lbl_id_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_id_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_id_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_id_estudiante.Location = New System.Drawing.Point(56, 55) Me.lbl_id_estudiante.Name = "lbl_id_estudiante" Me.lbl_id_estudiante.Size = New System.Drawing.Size(197, 19) Me.lbl_id_estudiante.TabIndex = 316 Me.lbl_id_estudiante.Text = "IDENTIFICACION DEL ESTUDIANTE" ' 'txt_id_estudiante ' Me.txt_id_estudiante.Location = New System.Drawing.Point(256, 55) Me.txt_id_estudiante.Name = "txt_id_estudiante" Me.txt_id_estudiante.Size = New System.Drawing.Size(168, 20) Me.txt_id_estudiante.TabIndex = 315 Me.txt_id_estudiante.Text = "" ' 'lbl_apellidos_estudiante ' Me.lbl_apellidos_estudiante.AutoSize = True Me.lbl_apellidos_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_apellidos_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_apellidos_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_apellidos_estudiante.Location = New System.Drawing.Point(56, 118) Me.lbl_apellidos_estudiante.Name = "lbl_apellidos_estudiante" Me.lbl_apellidos_estudiante.Size = New System.Drawing.Size(169, 19) Me.lbl_apellidos_estudiante.TabIndex = 313 Me.lbl_apellidos_estudiante.Text = "APELLIDOS DEL ESTUDIANTE" ' 'cmb_periodo ' Me.cmb_periodo.Location = New System.Drawing.Point(552, 118) Me.cmb_periodo.Name = "cmb_periodo" Me.cmb_periodo.Size = New System.Drawing.Size(80, 21) Me.cmb_periodo.TabIndex = 312
110
111 SOFBATEC 1.0DERECHOS RESERVADOS
Me.cmb_periodo.Visible = False ' 'lbl_periodo ' Me.lbl_periodo.AutoSize = True Me.lbl_periodo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_periodo.Location = New System.Drawing.Point(568, 118) Me.lbl_periodo.Name = "lbl_periodo" Me.lbl_periodo.Size = New System.Drawing.Size(45, 19) Me.lbl_periodo.TabIndex = 311 Me.lbl_periodo.Text = "Periodo" Me.lbl_periodo.Visible = False ' 'lbl_calificacion ' Me.lbl_calificacion.AutoSize = True Me.lbl_calificacion.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_calificacion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_calificacion.ForeColor = System.Drawing.Color.Blue Me.lbl_calificacion.Location = New System.Drawing.Point(392, 153) Me.lbl_calificacion.Name = "lbl_calificacion" Me.lbl_calificacion.Size = New System.Drawing.Size(64, 19) Me.lbl_calificacion.TabIndex = 310 Me.lbl_calificacion.Text = "Calificacion" ' 'lbl_asignaturas ' Me.lbl_asignaturas.AutoSize = True Me.lbl_asignaturas.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_asignaturas.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_asignaturas.ForeColor = System.Drawing.Color.Blue Me.lbl_asignaturas.Location = New System.Drawing.Point(112, 153) Me.lbl_asignaturas.Name = "lbl_asignaturas" Me.lbl_asignaturas.Size = New System.Drawing.Size(130, 19) Me.lbl_asignaturas.TabIndex = 309 Me.lbl_asignaturas.Text = "Asignatura programadas" ' 'chk_fisica ' Me.chk_fisica.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_fisica.ForeColor = System.Drawing.Color.Blue Me.chk_fisica.Location = New System.Drawing.Point(160, 388) Me.chk_fisica.Name = "chk_fisica" Me.chk_fisica.Size = New System.Drawing.Size(72, 21) Me.chk_fisica.TabIndex = 308 Me.chk_fisica.Text = "Fisica" Me.chk_fisica.TextAlign = System.Drawing.ContentAlignment.MiddleRight '
111
112 SOFBATEC 1.0DERECHOS RESERVADOS
'chk_quimica ' Me.chk_quimica.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_quimica.ForeColor = System.Drawing.Color.Blue Me.chk_quimica.Location = New System.Drawing.Point(160, 367) Me.chk_quimica.Name = "chk_quimica" Me.chk_quimica.Size = New System.Drawing.Size(72, 21) Me.chk_quimica.TabIndex = 307 Me.chk_quimica.Text = "Quimica" Me.chk_quimica.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_filosofia ' Me.chk_filosofia.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_filosofia.ForeColor = System.Drawing.Color.Blue Me.chk_filosofia.Location = New System.Drawing.Point(160, 347) Me.chk_filosofia.Name = "chk_filosofia" Me.chk_filosofia.Size = New System.Drawing.Size(72, 20) Me.chk_filosofia.TabIndex = 306 Me.chk_filosofia.Text = "Filosofia" Me.chk_filosofia.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_naturales ' Me.chk_naturales.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_naturales.ForeColor = System.Drawing.Color.Blue Me.chk_naturales.Location = New System.Drawing.Point(160, 326) Me.chk_naturales.Name = "chk_naturales" Me.chk_naturales.Size = New System.Drawing.Size(72, 21) Me.chk_naturales.TabIndex = 305 Me.chk_naturales.Text = "Naturales" Me.chk_naturales.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_ingles ' Me.chk_ingles.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_ingles.ForeColor = System.Drawing.Color.Blue Me.chk_ingles.Location = New System.Drawing.Point(160, 305) Me.chk_ingles.Name = "chk_ingles" Me.chk_ingles.Size = New System.Drawing.Size(72, 22) Me.chk_ingles.TabIndex = 304 Me.chk_ingles.Text = "Ingles " Me.chk_ingles.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_religion ' Me.chk_religion.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_religion.ForeColor = System.Drawing.Color.Blue Me.chk_religion.Location = New System.Drawing.Point(160, 284) Me.chk_religion.Name = "chk_religion"
112
113 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_religion.Size = New System.Drawing.Size(72, 21) Me.chk_religion.TabIndex = 303 Me.chk_religion.Text = "Religion" Me.chk_religion.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_sociales ' Me.chk_sociales.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_sociales.ForeColor = System.Drawing.Color.Blue Me.chk_sociales.Location = New System.Drawing.Point(160, 263) Me.chk_sociales.Name = "chk_sociales" Me.chk_sociales.Size = New System.Drawing.Size(72, 21) Me.chk_sociales.TabIndex = 302 Me.chk_sociales.Text = "Sociales" Me.chk_sociales.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_tecnologia ' Me.chk_tecnologia.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_tecnologia.ForeColor = System.Drawing.Color.Blue Me.chk_tecnologia.Location = New System.Drawing.Point(96, 236) Me.chk_tecnologia.Name = "chk_tecnologia" Me.chk_tecnologia.Size = New System.Drawing.Size(136, 30) Me.chk_tecnologia.TabIndex = 301 Me.chk_tecnologia.Text = "Tecnologia y Sistemas" Me.chk_tecnologia.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_artes ' Me.chk_artes.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_artes.ForeColor = System.Drawing.Color.Blue Me.chk_artes.Location = New System.Drawing.Point(120, 222) Me.chk_artes.Name = "chk_artes" Me.chk_artes.Size = New System.Drawing.Size(112, 21) Me.chk_artes.TabIndex = 300 Me.chk_artes.Text = "Artes" Me.chk_artes.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_español ' Me.chk_español.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_español.ForeColor = System.Drawing.Color.Blue Me.chk_español.Location = New System.Drawing.Point(144, 201) Me.chk_español.Name = "chk_español" Me.chk_español.Size = New System.Drawing.Size(88, 21) Me.chk_español.TabIndex = 299 Me.chk_español.Text = "Español" Me.chk_español.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_matematicas
113
114 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.chk_matematicas.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_matematicas.ForeColor = System.Drawing.Color.Blue Me.chk_matematicas.Location = New System.Drawing.Point(144, 173) Me.chk_matematicas.Name = "chk_matematicas" Me.chk_matematicas.Size = New System.Drawing.Size(88, 28) Me.chk_matematicas.TabIndex = 298 Me.chk_matematicas.Text = "Matematicas" Me.chk_matematicas.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'lbl_grado ' Me.lbl_grado.AutoSize = True Me.lbl_grado.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_grado.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_grado.ForeColor = System.Drawing.Color.Blue Me.lbl_grado.Location = New System.Drawing.Point(504, 55) Me.lbl_grado.Name = "lbl_grado" Me.lbl_grado.Size = New System.Drawing.Size(48, 19) Me.lbl_grado.TabIndex = 297 Me.lbl_grado.Text = "GRADO" ' 'lbl_nom_estudiante ' Me.lbl_nom_estudiante.AutoSize = True Me.lbl_nom_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_nom_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_nom_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_nom_estudiante.Location = New System.Drawing.Point(64, 83) Me.lbl_nom_estudiante.Name = "lbl_nom_estudiante" Me.lbl_nom_estudiante.Size = New System.Drawing.Size(163, 19) Me.lbl_nom_estudiante.TabIndex = 296 Me.lbl_nom_estudiante.Text = "NOMBRES DEL ESTUDIANTE" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(16, 14) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(736, 28) Me.Label1.TabIndex = 295 Me.Label1.Text = "REGISTRO DE MATERIAS ASIGNADAS PARA LOS GRADOS"
114
115 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'lbl_estado_periodo ' Me.lbl_estado_periodo.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_estado_periodo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_estado_periodo.ForeColor = System.Drawing.Color.Blue Me.lbl_estado_periodo.Location = New System.Drawing.Point(424, 423) Me.lbl_estado_periodo.Name = "lbl_estado_periodo" Me.lbl_estado_periodo.Size = New System.Drawing.Size(136, 28) Me.lbl_estado_periodo.TabIndex = 294 Me.lbl_estado_periodo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'TabPage2 ' Me.TabPage2.BackColor = System.Drawing.Color.LightSkyBlue Me.TabPage2.Controls.Add(Me.dtg_consulta) Me.TabPage2.Location = New System.Drawing.Point(4, 22) Me.TabPage2.Name = "TabPage2" Me.TabPage2.Size = New System.Drawing.Size(776, 577) Me.TabPage2.TabIndex = 1 Me.TabPage2.Text = "CONSULTA" ' 'dtg_consulta ' Me.dtg_consulta.DataMember = "" Me.dtg_consulta.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.dtg_consulta.Location = New System.Drawing.Point(8, 7) Me.dtg_consulta.Name = "dtg_consulta" Me.dtg_consulta.Size = New System.Drawing.Size(752, 319) Me.dtg_consulta.TabIndex = 0 ' 'frm_estudiante ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(778, 596) Me.Controls.Add(Me.TabControl1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_estudiante" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Listado de los estudiantes por grado - SOFTBATEC" Me.TabControl1.ResumeLayout(False) Me.TabPage1.ResumeLayout(False) Me.grb_aprobo.ResumeLayout(False) Me.TabPage2.ResumeLayout(False) CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
115
116 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
#End Region
Private SWCAL As Boolean = False Private notvisible As Boolean
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
Private Sub ENLACES() If Me.txt_estudiante.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.IDENTIFICACION DEL ESTUDIANTE") Me.txt_id_estudiante.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.NOMBRES DEL ESTUDIANTE") Me.txt_estudiante.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.APELLIDOS DEL ESTUDIANTE") Me.txt_apellidos_estudiante.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.GRADO") Me.txt_grado.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.PERIODO") Me.cmb_periodo.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION MATEMATICAS") Me.txt_cual_mat.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION ESPAÑOL") Me.txt_cual_esp.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION ARTES") Me.txt_cual_art.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION TECNOLOGIA") Me.txt_cual_tec.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION SOCIALES")
116
117 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cual_soc.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION RELIGION") Me.txt_cual_rel.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION NATURALES") Me.txt_cual_ing.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION NATURALES") Me.txt_cual_nat.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION FILOSOFIA") Me.txt_cual_fil.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION QUIMICA") Me.txt_cual_qui.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.DEFINICION FISICA") Me.txt_cual_fis.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA MATEMATICAS") Me.txt_ih_mat.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA ESPAÑOL") Me.txt_ih_esp.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA ARTES") Me.txt_ih_art.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA TECNOLOGIA") Me.txt_ih_tec.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA SOCIALES") Me.txt_ih_soc.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA RELIGION") Me.txt_ih_rel.DataBindings.Add(ENLACE) ENLACE = Nothing
117
118 SOFBATEC 1.0DERECHOS RESERVADOS
ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA INGLES") Me.txt_ih_ing.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA NATURALES") Me.txt_ih_nat.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA FILOSOFIA") Me.txt_ih_fil.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA QUIMICA") Me.txt_ih_qui.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.INTENSIDAD HORARIA FISICA") Me.txt_ih_fis.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CAL.ESTADO PERIODO") Me.lbl_estado_periodo.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.MATEMATICAS") Me.chk_matematicas.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.ESPAÑOL") Me.chk_español.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.ARTES") Me.chk_artes.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.TECNOLOGIA") Me.chk_tecnologia.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.SOCIALES") Me.chk_sociales.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.RELIGION") Me.chk_religion.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.INGLES") Me.chk_ingles.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.NATURALES") Me.chk_naturales.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.FILOSOFIA")
118
119 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_filosofia.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.QUIMICA") Me.chk_quimica.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_CAL.FISICA") Me.chk_fisica.DataBindings.Add(ENLACE) ENLACE = Nothing
EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_CAL")
End If End Sub
Private Sub CARGARIMAGENES() Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.btn_eliminar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.btn_eliminar.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.btn_cancelar.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight End Sub
Private Sub visibilidad() If notvisible = True Then Me.txt_cal_mat.Visible = False Me.txt_cal_esp.Visible = False Me.txt_cal_art.Visible = False Me.txt_cal_tec.Visible = False
119
120 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_soc.Visible = False Me.txt_cal_rel.Visible = False Me.txt_cal_ing.Visible = False Me.txt_cal_nat.Visible = False Me.txt_cal_fil.Visible = False Me.txt_cal_qui.Visible = False Me.txt_cal_fis.Visible = False Me.txt_cual_mat.Location = Me.txt_cal_mat.Location Me.txt_cual_esp.Location = Me.txt_cal_esp.Location Me.txt_cual_art.Location = Me.txt_cal_art.Location Me.txt_cual_tec.Location = Me.txt_cal_tec.Location Me.txt_cual_soc.Location = Me.txt_cal_soc.Location Me.txt_cual_rel.Location = Me.txt_cal_rel.Location Me.txt_cual_ing.Location = Me.txt_cal_ing.Location Me.txt_cual_nat.Location = Me.txt_cal_nat.Location Me.txt_cual_fil.Location = Me.txt_cal_fil.Location Me.txt_cual_qui.Location = Me.txt_cal_qui.Location Me.txt_cual_fis.Location = Me.txt_cal_fis.Location If Me.lbl_estado_periodo.Visible = False Then Me.lbl_estado_periodo.Visible = True If Me.Label2.Visible = False Then Me.Label2.Visible = True If Me.grb_aprobo.Visible = True Then Me.grb_aprobo.Visible = False
Else Me.txt_cal_mat.Visible = True Me.txt_cal_esp.Visible = True Me.txt_cal_art.Visible = True Me.txt_cal_tec.Visible = True Me.txt_cal_soc.Visible = True Me.txt_cal_rel.Visible = True Me.txt_cal_ing.Visible = True Me.txt_cal_nat.Visible = True Me.txt_cal_fil.Visible = True Me.txt_cal_qui.Visible = True Me.txt_cal_fis.Visible = True Me.txt_cual_mat.Location = New System.Drawing.Point(504, 180) Me.txt_cual_esp.Location = New System.Drawing.Point(504, 201) Me.txt_cual_art.Location = New System.Drawing.Point(504, 222) Me.txt_cual_tec.Location = New System.Drawing.Point(504, 243) Me.txt_cual_soc.Location = New System.Drawing.Point(504, 263) Me.txt_cual_rel.Location = New System.Drawing.Point(504, 284) Me.txt_cual_ing.Location = New System.Drawing.Point(504, 305) Me.txt_cual_nat.Location = New System.Drawing.Point(504, 326) Me.txt_cual_fil.Location = New System.Drawing.Point(504, 347) Me.txt_cual_qui.Location = New System.Drawing.Point(504, 367) Me.txt_cual_fis.Location = New System.Drawing.Point(504, 388) If Me.lbl_estado_periodo.Visible = True Then Me.lbl_estado_periodo.Visible = False If Me.Label2.Visible = True Then Me.Label2.Visible = False If Me.grb_aprobo.Visible = False Then Me.grb_aprobo.Visible = True
120
121 SOFBATEC 1.0DERECHOS RESERVADOS
End If End Sub
Private Sub digitarcal() If Me.txt_cual_mat.TextLength = 0 Then Me.btn_digitar.Enabled = True Else Me.btn_digitar.Enabled = False End If End Sub
Private Sub LIMPIAROBJETOS() Me.txt_cal_art.Clear() Me.txt_cal_esp.Clear() Me.txt_cal_fil.Clear() Me.txt_cal_fis.Clear() Me.txt_cal_ing.Clear() Me.txt_cal_mat.Clear() Me.txt_cal_nat.Clear() Me.txt_cal_qui.Clear() Me.txt_cal_rel.Clear() Me.txt_cal_soc.Clear() Me.txt_cal_tec.Clear() Me.txt_cual_art.Clear() Me.txt_cual_esp.Clear() Me.txt_cual_fil.Clear() Me.txt_cual_fis.Clear() Me.txt_cual_ing.Clear() Me.txt_cual_mat.Clear() Me.txt_cual_nat.Clear() Me.txt_cual_qui.Clear() Me.txt_cual_rel.Clear() Me.txt_cual_soc.Clear() Me.txt_id_estudiante.Clear() Me.txt_estudiante.Clear() Me.txt_apellidos_estudiante.Clear() Me.txt_cual_tec.Clear() Me.txt_grado.Text = "" Me.cmb_periodo.Text = "" Me.chk_matematicas.Checked = False Me.chk_español.Checked = False Me.chk_artes.Checked = False Me.chk_tecnologia.Checked = False Me.chk_sociales.Checked = False Me.chk_religion.Checked = False Me.chk_ingles.Checked = False Me.chk_naturales.Checked = False Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False
121
122 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_ih_mat.Clear() Me.txt_ih_esp.Clear() Me.txt_ih_art.Clear() Me.txt_ih_tec.Clear() Me.txt_ih_soc.Clear() Me.txt_ih_rel.Clear() Me.txt_ih_ing.Clear() Me.txt_ih_nat.Clear() Me.txt_ih_fil.Clear() Me.txt_ih_qui.Clear() Me.txt_ih_fis.Clear() End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.txt_cal_art.ReadOnly = True Me.txt_cal_esp.ReadOnly = True Me.txt_cal_fil.ReadOnly = True Me.txt_cal_fis.ReadOnly = True Me.txt_cal_ing.ReadOnly = True Me.txt_cal_mat.ReadOnly = True Me.txt_cal_nat.ReadOnly = True Me.txt_cal_qui.ReadOnly = True Me.txt_cal_rel.ReadOnly = True Me.txt_cal_soc.ReadOnly = True Me.txt_cal_tec.ReadOnly = True Me.txt_cual_art.ReadOnly = True Me.txt_cual_esp.ReadOnly = True Me.txt_cual_fil.ReadOnly = True Me.txt_cual_fis.ReadOnly = True Me.txt_cual_ing.ReadOnly = True Me.txt_cual_mat.ReadOnly = True Me.txt_cual_nat.ReadOnly = True Me.txt_cual_qui.ReadOnly = True Me.txt_cual_rel.ReadOnly = True Me.txt_cual_soc.ReadOnly = True Me.txt_id_estudiante.ReadOnly = True Me.txt_estudiante.ReadOnly = True Me.txt_apellidos_estudiante.ReadOnly = True Me.txt_cual_tec.ReadOnly = True Me.txt_grado.ReadOnly = True Me.cmb_periodo.Enabled = False Me.chk_matematicas.Enabled = False Me.chk_español.Enabled = False Me.chk_artes.Enabled = False Me.chk_tecnologia.Enabled = False Me.chk_sociales.Enabled = False Me.chk_naturales.Enabled = False Me.chk_ingles.Enabled = False Me.chk_religion.Enabled = False Me.chk_filosofia.Enabled = False
122
123 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_fisica.Enabled = False Me.chk_quimica.Enabled = False Me.txt_ih_mat.ReadOnly = True Me.txt_ih_esp.ReadOnly = True Me.txt_ih_art.ReadOnly = True Me.txt_ih_tec.ReadOnly = True Me.txt_ih_soc.ReadOnly = True Me.txt_ih_rel.ReadOnly = True Me.txt_ih_ing.ReadOnly = True Me.txt_ih_nat.ReadOnly = True Me.txt_ih_fil.ReadOnly = True Me.txt_ih_qui.ReadOnly = True Me.txt_ih_fis.ReadOnly = True Me.rbt_si_apro_mater.Enabled = False Me.rbt_no_apro_mater.Enabled = False Else Me.txt_cal_art.ReadOnly = True Me.txt_cal_esp.ReadOnly = True Me.txt_cal_fil.ReadOnly = True Me.txt_cal_fis.ReadOnly = True Me.txt_cal_ing.ReadOnly = True Me.txt_cal_mat.ReadOnly = True Me.txt_cal_nat.ReadOnly = True Me.txt_cal_qui.ReadOnly = True Me.txt_cal_rel.ReadOnly = True Me.txt_cal_soc.ReadOnly = True Me.txt_cal_tec.ReadOnly = True Me.txt_cual_art.ReadOnly = True Me.txt_cual_esp.ReadOnly = True Me.txt_cual_fil.ReadOnly = True Me.txt_cual_fis.ReadOnly = True Me.txt_cual_ing.ReadOnly = True Me.txt_cual_mat.ReadOnly = True Me.txt_cual_nat.ReadOnly = True Me.txt_cual_qui.ReadOnly = True Me.txt_cual_rel.ReadOnly = True Me.txt_cual_soc.ReadOnly = True Me.txt_id_estudiante.ReadOnly = False Me.txt_estudiante.ReadOnly = False Me.txt_apellidos_estudiante.ReadOnly = False Me.txt_cual_tec.ReadOnly = True Me.txt_grado.ReadOnly = False Me.cmb_periodo.Enabled = False Me.txt_ih_mat.ReadOnly = False Me.txt_ih_esp.ReadOnly = False Me.txt_ih_art.ReadOnly = False Me.txt_ih_tec.ReadOnly = False Me.txt_ih_soc.ReadOnly = False Me.txt_ih_rel.ReadOnly = False Me.txt_ih_ing.ReadOnly = False
123
124 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_ih_nat.ReadOnly = False Me.txt_ih_fil.ReadOnly = False Me.txt_ih_qui.ReadOnly = False Me.txt_ih_fis.ReadOnly = False Me.rbt_si_apro_mater.Enabled = False Me.rbt_no_apro_mater.Enabled = False
End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.btn_nuevo.Enabled = True Me.btn_modificar.Enabled = True Me.btn_grabar.Enabled = False Me.btn_cancelar.Enabled = False Me.btn_primero.Enabled = True Me.btn_anterior.Enabled = True Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.btn_eliminar.Enabled = True Me.btn_salir.Enabled = True
Else Me.btn_nuevo.Enabled = False Me.btn_modificar.Enabled = False Me.btn_grabar.Enabled = True Me.btn_cancelar.Enabled = True Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_eliminar.Enabled = False Me.btn_salir.Enabled = False
End If End Sub
Private Function Validar() As Boolean
If Me.txt_id_estudiante.Text.Length = 0 Then MessageBox.Show("DIGITE LA IDENTIFICACION DEL ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_id_estudiante.Focus() Validar = False Exit Function End If If Me.chk_matematicas.Checked = True Then If Me.txt_ih_mat.TextLength = 0 Then
124
125 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA MATEMATICAS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_mat.Focus() Validar = False Exit Function End If End If
If Me.chk_español.Checked = True Then If Me.txt_ih_esp.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA ESPAÑOL", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_esp.Focus() Validar = False Exit Function End If End If
If Me.chk_artes.Checked = True Then If Me.txt_ih_art.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA ARTES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_art.Focus() Validar = False Exit Function End If End If
If Me.chk_tecnologia.Checked = True Then If Me.txt_ih_tec.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA TECNOLOGIA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_tec.Focus() Validar = False Exit Function End If End If
If Me.chk_sociales.Checked = True Then If Me.txt_ih_soc.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA SOCIALES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_soc.Focus() Validar = False Exit Function
125
126 SOFBATEC 1.0DERECHOS RESERVADOS
End If End If
If Me.chk_religion.Checked = True Then If Me.txt_ih_rel.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA RELIGION", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_rel.Focus() Validar = False Exit Function End If End If
If Me.chk_ingles.Checked = True Then If Me.txt_ih_ing.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA INGLES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_ing.Focus() Validar = False Exit Function End If End If
If Me.chk_naturales.Checked = True Then If Me.txt_ih_nat.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA NATURALES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_nat.Focus() Validar = False Exit Function End If End If
If Me.chk_filosofia.Checked = True Then If Me.txt_ih_fil.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA FILOSOFIA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_fil.Focus() Validar = False Exit Function End If End If
If Me.chk_quimica.Checked = True Then If Me.txt_ih_qui.TextLength = 0 Then
126
127 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA QUIMICA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_qui.Focus() Validar = False Exit Function End If End If
If Me.chk_fisica.Checked = True Then If Me.txt_ih_fis.TextLength = 0 Then MessageBox.Show("DIGITE LA INTENSIDAD HORARIA PARA FISICA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ih_fis.Focus() Validar = False Exit Function End If End If
If SWCAL = True Then If Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Or Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Then If Me.txt_cal_mat.Enabled = True Then If Me.txt_cal_mat.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA MATEMATICAS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_mat.Focus() Validar = False Exit Function End If
End If
If Me.txt_cal_esp.Enabled = True Then If Me.txt_cal_esp.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA ESPAÑOL", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_esp.Focus() Validar = False Exit Function End If
End If
127
128 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_cal_art.Enabled = True Then If Me.txt_cal_art.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA ARTES", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_art.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_tec.Enabled = True Then If Me.txt_cal_tec.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA TECNOLOGIA", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_tec.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_rel.Enabled = True Then If Me.txt_cal_rel.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA RELIGION", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_rel.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_ing.Enabled = True Then If Me.txt_cal_ing.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA INGLES", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_ing.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_fil.Enabled = True Then If Me.txt_cal_fil.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA FILOSOFIA", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
128
129 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_fil.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_qui.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA QUIMICA", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_qui.Focus() Validar = False Exit Function End If
If Me.txt_cal_fis.Enabled = True Then If Me.txt_cal_fis.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA FISICA", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_fis.Focus() Validar = False Exit Function End If End If
Else If Me.txt_cal_mat.Enabled = True Then If Me.txt_cal_mat.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA MATEMATICAS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_mat.Focus() Validar = False Exit Function End If
End If
If Me.txt_cal_esp.Enabled = True Then If Me.txt_cal_esp.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA ESPAÑOL", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_esp.Focus() Validar = False Exit Function End If
129
130 SOFBATEC 1.0DERECHOS RESERVADOS
End If If Me.txt_cal_art.Enabled = True Then If Me.txt_cal_art.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA ARTES", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_art.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_tec.Enabled = True Then If Me.txt_cal_tec.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA TECNOLOGIA", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_tec.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_soc.Enabled = True Then If Me.txt_cal_soc.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA SOCIALES", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_soc.Focus() Validar = False Exit Function End If End If If Me.txt_cal_rel.Enabled = True Then If Me.txt_cal_rel.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA RELIGION", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_rel.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_ing.Enabled = True Then If Me.txt_cal_ing.TextLength = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA INGLES", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_ing.Focus()
130
131 SOFBATEC 1.0DERECHOS RESERVADOS
Validar = False Exit Function End If
End If If Me.txt_cal_nat.Enabled = True Then If Me.txt_cal_nat.Text.Length = 0 Then MessageBox.Show("DIGITE EL VALOR DE LA CALIFICACION PARA NATURALES", "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_nat.Focus() Validar = False Exit Function End If End If End If End If Validar = True End Function#End Region
Private Sub frm_estudiante_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL, SQL1 As String Me.Cursor = System.Windows.Forms.Cursors.Default Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_matematicas AS MATEMATICAS,A.fld_español AS ESPAÑOL,A.fld_artes AS ARTES,A.fld_tecnologia AS TECNOLOGIA,A.fld_sociales AS SOCIALES,A.fld_religion AS RELIGION,A.fld_ingles AS INGLES,A.fld_naturales AS NATURALES,A.fld_filosofia AS FILOSOFIA,A.fld_quimica AS QUIMICA,A.fld_fisica AS FISICA,A.fld_cual_matematicas AS [DEFINICION MATEMATICAS],A.fld_cual_español AS [DEFINICION ESPAÑOL],A.fld_cual_artes AS [DEFINICION ARTES],A.fld_cual_tecnologia AS [DEFINICION TECNOLOGIA],A.fld_cual_sociales AS [DEFINICION SOCIALES],A.fld_cual_religion AS [DEFINICION RELIGION],A.fld_cual_ingles AS [DEFINICION INGLES],A.fld_cual_naturales AS [DEFINICION NATURALES],A.fld_cual_filosofia AS [DEFINICION FILOSOFIA],A.fld_cual_quimica AS [DEFINICION QUIMICA],A.fld_cual_fisica AS [DEFINICION FISICA],A.fld_estado_periodo AS [ESTADO PERIODO],A.fld_ih_mat AS [INTENSIDAD HORARIA MATEMATICAS],A.fld_ih_esp AS [INTENSIDAD
131
132 SOFBATEC 1.0DERECHOS RESERVADOS
HORARIA ESPAÑOL],A.fld_ih_art AS [INTENSIDAD HORARIA ARTES],A.fld_ih_tec AS [INTENSIDAD HORARIA TECNOLOGIA],A.fld_ih_soc AS [INTENSIDAD HORARIA SOCIALES],A.fld_ih_rel AS [INTENSIDAD HORARIA RELIGION],A.fld_ih_ing AS [INTENSIDAD HORARIA INGLES],A.fld_ih_nat AS [INTENSIDAD HORARIA NATURALES],A.fld_ih_fil AS [INTENSIDAD HORARIA FILOSOFIA],A.fld_ih_qui AS [INTENSIDAD HORARIA QUIMICA],A.fld_ih_fis AS [INTENSIDAD HORARIA FISICA]" SQL = SQL & " from tbl_calificacion_estudiantes A" SQL = SQL & " order by A.fld_grado" CMDselect.CommandText = SQL DA_CALIFICACION.SelectCommand = CMDselect DA_CALIFICACION.Fill(DS_Datos, "TBL_CAL")
SQL1 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA,A.fld_estado_periodo AS [ESTADO PERIODO]" SQL1 = SQL1 & " from tbl_calificacion_estudiantes A" SQL1 = SQL1 & " order by A.fld_grado" CMDselect.CommandText = SQL1 DA_GRIDCALIFICACION.SelectCommand = CMDselect DA_GRIDCALIFICACION.Fill(DS_Datos, "TBL_GRIDCAL")
CONEXION.Close()
Me.dtg_consulta.CaptionText = "REGISTROS DE MATERIAS PARA LOS ESTUDIANTES" Me.dtg_consulta.DataSource = DS_Datos.Tables("TBL_GRIDCAL")
Me.cmb_periodo.Items.Add("1") Me.cmb_periodo.Items.Add("2") Me.cmb_periodo.Items.Add("3") Me.cmb_periodo.Items.Add("4") Me.cmb_periodo.Items.Add("5")
Me.lblposicion.Text = "Registro de materias por grados"
Call LIMPIAROBJETOS() Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception
132
133 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub frm_estudiante_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove If Me.btn_consulta.FlatStyle = FlatStyle.Standard Then Me.btn_consulta.FlatStyle = FlatStyle.Flat End Sub
Private Sub txt_cod_logro_mat_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) ' Try 'mat = Me.txt_cod_logro_mat.Text 'CMDCONSULTAR.Connection = CONEXION 'If CONEXION.State = ConnectionState.Open Then CONEXION.Close() 'CONEXION.Open() 'CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & mat & "'and fld_grado='" & Me.txt_grado.Text & "'" 'DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) 'If DR_CONSULTA.Read = True Then 'lomat = DR_CONSULTA.Item("fld_descripcion_logro") 'MessageBox.Show(lomat, "OK") 'CONEXION.Close() 'DR_CONSULTA.Close() 'Else 'MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) 'Me.txt_cod_logro_mat.Focus() 'DR_CONSULTA.Close() 'Exit Sub 'End If 'Catch EXCEPCION As Exception ' MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) 'If CONEXION.State = ConnectionState.Open Then 'CONEXION.Close() 'End If 'End Try End Sub
133
134 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub btn_nuevo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nuevo.Click Try If notvisible = True Then notvisible = False Call visibilidad()
Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.txt_id_estudiante.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1) If SWCAL = True Then SWCAL = False If Me.cmb_periodo.Visible = True Then Me.cmb_periodo.Visible = False If Me.lbl_periodo.Visible = True Then Me.lbl_periodo.Visible = False Catch excepcion As Exception If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_modificar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_modificar.Click Me.txt_cal_art.ReadOnly = True Me.txt_cal_esp.ReadOnly = True Me.txt_cal_fil.ReadOnly = True Me.txt_cal_fis.ReadOnly = True Me.txt_cal_ing.ReadOnly = True Me.txt_cal_mat.ReadOnly = True Me.txt_cual_nat.ReadOnly = True Me.txt_cal_qui.ReadOnly = True Me.txt_cal_rel.ReadOnly = True Me.txt_cal_soc.ReadOnly = True Me.txt_cal_tec.ReadOnly = True Me.txt_cual_art.ReadOnly = True Me.txt_cual_esp.ReadOnly = True Me.txt_cual_fil.ReadOnly = True Me.txt_cual_fis.ReadOnly = True Me.txt_cual_ing.ReadOnly = True Me.txt_cual_mat.ReadOnly = True Me.txt_cual_nat.ReadOnly = True Me.txt_cal_qui.ReadOnly = True Me.txt_cual_rel.ReadOnly = True Me.txt_cual_soc.ReadOnly = True Me.txt_id_estudiante.ReadOnly = True Me.txt_estudiante.ReadOnly = False Me.txt_apellidos_estudiante.ReadOnly = False Me.txt_cual_tec.ReadOnly = True Me.txt_grado.ReadOnly = True Me.cmb_periodo.Enabled = False
Call BLOQUEARBOTONES(1)
134
135 SOFBATEC 1.0DERECHOS RESERVADOS
SWGrabar = 1 End Sub
Private Sub btn_digitar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_digitar.Click If Me.txt_estudiante.Text = "" Then MessageBox.Show("SELECCIONE EL ESTUDIANTE AL CUAL DESEA REGISTRARLE LAS CALIFICACIONES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button1) If SWCAL = True Then SWCAL = False Exit Sub End If If Me.txt_cal_mat.TextLength <> 0 Then MessageBox.Show("LAS CALIFICACIONES DE ESTE ESTUDIANTE YA FUERON REGISTRADAS NO PUEDE MODIFICARLAS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button1) If SWCAL = True Then SWCAL = False Exit Sub End If
If notvisible = True Then notvisible = False Call visibilidad()
If Me.grb_aprobo.Visible = False Then Me.rbt_si_apro_mater.Visible = True If Me.rbt_si_apro_mater.Enabled = False Then Me.rbt_si_apro_mater.Enabled = True If Me.rbt_no_apro_mater.Enabled = False Then Me.rbt_no_apro_mater.Enabled = True
SWCAL = True
If Me.txt_grado.Text = "6ºA" Or Me.txt_grado.Text = "6ºB" Or Me.txt_grado.Text = "6ºC" Or Me.txt_grado.Text = "6ºD" Then If Me.txt_cual_soc.Enabled = False Then Me.txt_cual_soc.Enabled = True If Me.txt_cal_soc.Enabled = False Then Me.txt_cal_soc.Enabled = True If Me.txt_cual_nat.Enabled = False Then Me.txt_cual_nat.Enabled = True If Me.txt_cal_nat.Enabled = False Then Me.txt_cal_nat.Enabled = True If Me.txt_cal_qui.Enabled = True Then Me.txt_cal_qui.Enabled = False If Me.txt_cual_qui.Enabled = True Then Me.txt_cual_qui.Enabled = False If Me.txt_cal_fis.Enabled = True Then Me.txt_cal_fis.Enabled = False If Me.txt_cual_fis.Enabled = True Then Me.txt_cual_fis.Enabled = False If Me.txt_cal_fil.Enabled = True Then Me.txt_cal_fil.Enabled = False If Me.txt_cual_fil.Enabled = True Then Me.txt_cual_fil.Enabled = False If Me.chk_quimica.Enabled = True Then Me.chk_quimica.Enabled = False If Me.chk_fisica.Enabled = True Then Me.chk_fisica.Enabled = False If Me.chk_filosofia.Enabled = True Then Me.chk_filosofia.Enabled = False If Me.chk_sociales.Enabled = False Then Me.chk_sociales.Enabled = True If Me.chk_naturales.Enabled = False Then Me.chk_naturales.Enabled = True If Me.chk_matematicas.Enabled = False Then Me.chk_matematicas.Enabled = True
135
136 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.chk_español.Enabled = False Then Me.chk_español.Enabled = True If Me.chk_artes.Enabled = False Then Me.chk_artes.Enabled = True If Me.chk_tecnologia.Enabled = False Then Me.chk_tecnologia.Enabled = True If Me.chk_ingles.Enabled = False Then Me.chk_ingles.Enabled = True If Me.chk_religion.Enabled = False Then Me.chk_religion.Enabled = True End If
If Me.txt_grado.Text = "7ºA" Or Me.txt_grado.Text = "7ºB" Or Me.txt_grado.Text = "7ºC" Or Me.txt_grado.Text = "7ºD" Then If Me.txt_cual_soc.Enabled = False Then Me.txt_cual_soc.Enabled = True If Me.txt_cal_soc.Enabled = False Then Me.txt_cal_soc.Enabled = True If Me.txt_cual_nat.Enabled = False Then Me.txt_cual_nat.Enabled = True If Me.txt_cal_nat.Enabled = False Then Me.txt_cal_nat.Enabled = True If Me.txt_cal_qui.Enabled = True Then Me.txt_cal_qui.Enabled = False If Me.txt_cual_qui.Enabled = True Then Me.txt_cual_qui.Enabled = False If Me.txt_cal_fis.Enabled = True Then Me.txt_cal_fis.Enabled = False If Me.txt_cual_fis.Enabled = True Then Me.txt_cual_fis.Enabled = False If Me.txt_cal_fil.Enabled = True Then Me.txt_cal_fil.Enabled = False If Me.txt_cual_fil.Enabled = True Then Me.txt_cual_fil.Enabled = False If Me.chk_quimica.Enabled = True Then Me.chk_quimica.Enabled = False If Me.chk_fisica.Enabled = True Then Me.chk_fisica.Enabled = False If Me.chk_filosofia.Enabled = True Then Me.chk_filosofia.Enabled = False If Me.chk_sociales.Enabled = False Then Me.chk_sociales.Enabled = True If Me.chk_naturales.Enabled = False Then Me.chk_naturales.Enabled = True If Me.chk_matematicas.Enabled = False Then Me.chk_matematicas.Enabled = True If Me.chk_español.Enabled = False Then Me.chk_español.Enabled = True If Me.chk_artes.Enabled = False Then Me.chk_artes.Enabled = True If Me.chk_tecnologia.Enabled = False Then Me.chk_tecnologia.Enabled = True If Me.chk_ingles.Enabled = False Then Me.chk_ingles.Enabled = True If Me.chk_religion.Enabled = False Then Me.chk_religion.Enabled = True End If
If Me.txt_grado.Text = "8ºA" Or Me.txt_grado.Text = "8ºB" Or Me.txt_grado.Text = "8ºC" Or Me.txt_grado.Text = "8ºD" Then If Me.txt_cual_soc.Enabled = False Then Me.txt_cual_soc.Enabled = True If Me.txt_cal_soc.Enabled = False Then Me.txt_cal_soc.Enabled = True If Me.txt_cual_nat.Enabled = False Then Me.txt_cual_nat.Enabled = True If Me.txt_cal_nat.Enabled = False Then Me.txt_cal_nat.Enabled = True If Me.txt_cal_qui.Enabled = True Then Me.txt_cal_qui.Enabled = False If Me.txt_cual_qui.Enabled = True Then Me.txt_cual_qui.Enabled = False If Me.txt_cal_fis.Enabled = True Then Me.txt_cal_fis.Enabled = False If Me.txt_cual_fis.Enabled = True Then Me.txt_cual_fis.Enabled = False If Me.txt_cal_fil.Enabled = True Then Me.txt_cal_fil.Enabled = False If Me.txt_cual_fil.Enabled = True Then Me.txt_cual_fil.Enabled = False If Me.chk_quimica.Enabled = True Then Me.chk_quimica.Enabled = False If Me.chk_fisica.Enabled = True Then Me.chk_fisica.Enabled = False If Me.chk_filosofia.Enabled = True Then Me.chk_filosofia.Enabled = False If Me.chk_sociales.Enabled = False Then Me.chk_sociales.Enabled = True If Me.chk_naturales.Enabled = False Then Me.chk_naturales.Enabled = True
136
137 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.chk_matematicas.Enabled = False Then Me.chk_matematicas.Enabled = True If Me.chk_español.Enabled = False Then Me.chk_español.Enabled = True If Me.chk_artes.Enabled = False Then Me.chk_artes.Enabled = True If Me.chk_tecnologia.Enabled = False Then Me.chk_tecnologia.Enabled = True If Me.chk_ingles.Enabled = False Then Me.chk_ingles.Enabled = True If Me.chk_religion.Enabled = False Then Me.chk_religion.Enabled = True End If
If Me.txt_grado.Text = "9ºA" Or Me.txt_grado.Text = "9ºB" Or Me.txt_grado.Text = "9ºC" Or Me.txt_grado.Text = "9ºD" Then If Me.txt_cual_soc.Enabled = False Then Me.txt_cual_soc.Enabled = True If Me.txt_cal_soc.Enabled = False Then Me.txt_cal_soc.Enabled = True If Me.txt_cual_nat.Enabled = False Then Me.txt_cual_nat.Enabled = True If Me.txt_cal_nat.Enabled = False Then Me.txt_cal_nat.Enabled = True If Me.txt_cal_qui.Enabled = True Then Me.txt_cal_qui.Enabled = False If Me.txt_cual_qui.Enabled = True Then Me.txt_cual_qui.Enabled = False If Me.txt_cal_fis.Enabled = True Then Me.txt_cal_fis.Enabled = False If Me.txt_cual_fis.Enabled = True Then Me.txt_cual_fis.Enabled = False If Me.txt_cal_fil.Enabled = True Then Me.txt_cal_fil.Enabled = False If Me.txt_cual_fil.Enabled = True Then Me.txt_cual_fil.Enabled = False If Me.chk_quimica.Enabled = True Then Me.chk_quimica.Enabled = False If Me.chk_fisica.Enabled = True Then Me.chk_fisica.Enabled = False If Me.chk_filosofia.Enabled = True Then Me.chk_filosofia.Enabled = False If Me.chk_sociales.Enabled = False Then Me.chk_sociales.Enabled = True If Me.chk_naturales.Enabled = False Then Me.chk_naturales.Enabled = True If Me.chk_matematicas.Enabled = False Then Me.chk_matematicas.Enabled = True If Me.chk_español.Enabled = False Then Me.chk_español.Enabled = True If Me.chk_artes.Enabled = False Then Me.chk_artes.Enabled = True If Me.chk_tecnologia.Enabled = False Then Me.chk_tecnologia.Enabled = True If Me.chk_ingles.Enabled = False Then Me.chk_ingles.Enabled = True If Me.chk_religion.Enabled = False Then Me.chk_religion.Enabled = True End If
If Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then If Me.txt_cal_soc.Enabled = True Then Me.txt_cal_soc.Enabled = False If Me.txt_cual_soc.Enabled = True Then Me.txt_cual_soc.Enabled = False If Me.txt_cal_nat.Enabled = True Then Me.txt_cal_nat.Enabled = False If Me.txt_cual_nat.Enabled = True Then Me.txt_cual_nat.Enabled = False If Me.txt_cal_qui.Enabled = False Then Me.txt_cal_qui.Enabled = True If Me.txt_cual_qui.Enabled = False Then Me.txt_cual_qui.Enabled = True If Me.txt_cal_fis.Enabled = False Then Me.txt_cal_fis.Enabled = True If Me.txt_cual_fis.Enabled = False Then Me.txt_cual_fis.Enabled = True If Me.txt_cal_fil.Enabled = False Then Me.txt_cal_fil.Enabled = True If Me.txt_cual_fil.Enabled = False Then Me.txt_cual_fil.Enabled = True If Me.chk_sociales.Enabled = True Then Me.chk_sociales.Enabled = False If Me.chk_naturales.Enabled = True Then Me.chk_naturales.Enabled = False If Me.chk_quimica.Enabled = False Then Me.chk_quimica.Enabled = True
137
138 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.chk_fisica.Enabled = False Then Me.chk_fisica.Enabled = True If Me.chk_filosofia.Enabled = False Then Me.chk_filosofia.Enabled = True If Me.chk_matematicas.Enabled = False Then Me.chk_matematicas.Enabled = True If Me.chk_español.Enabled = False Then Me.chk_español.Enabled = True If Me.chk_artes.Enabled = False Then Me.chk_artes.Enabled = True If Me.chk_tecnologia.Enabled = False Then Me.chk_tecnologia.Enabled = True If Me.chk_ingles.Enabled = False Then Me.chk_ingles.Enabled = True If Me.chk_religion.Enabled = False Then Me.chk_religion.Enabled = True End If
If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Then If Me.txt_cal_soc.Enabled = True Then Me.txt_cal_soc.Enabled = False If Me.txt_cual_soc.Enabled = True Then Me.txt_cual_soc.Enabled = False If Me.txt_cal_nat.Enabled = True Then Me.txt_cal_nat.Enabled = False If Me.txt_cual_nat.Enabled = True Then Me.txt_cual_nat.Enabled = False If Me.txt_cal_qui.Enabled = False Then Me.txt_cal_qui.Enabled = True If Me.txt_cual_qui.Enabled = False Then Me.txt_cual_qui.Enabled = True If Me.txt_cal_fis.Enabled = False Then Me.txt_cal_fis.Enabled = True If Me.txt_cual_fis.Enabled = False Then Me.txt_cual_fis.Enabled = True If Me.txt_cal_fil.Enabled = False Then Me.txt_cal_fil.Enabled = True If Me.txt_cual_fil.Enabled = False Then Me.txt_cual_fil.Enabled = True If Me.chk_sociales.Enabled = True Then Me.chk_sociales.Enabled = False If Me.chk_naturales.Enabled = True Then Me.chk_naturales.Enabled = False If Me.chk_quimica.Enabled = False Then Me.chk_quimica.Enabled = True If Me.chk_fisica.Enabled = False Then Me.chk_fisica.Enabled = True If Me.chk_filosofia.Enabled = False Then Me.chk_filosofia.Enabled = True If Me.chk_matematicas.Enabled = False Then Me.chk_matematicas.Enabled = True If Me.chk_español.Enabled = False Then Me.chk_español.Enabled = True If Me.chk_artes.Enabled = False Then Me.chk_artes.Enabled = True If Me.chk_tecnologia.Enabled = False Then Me.chk_tecnologia.Enabled = True If Me.chk_ingles.Enabled = False Then Me.chk_ingles.Enabled = True If Me.chk_religion.Enabled = False Then Me.chk_religion.Enabled = True End If
Me.txt_estudiante.ReadOnly = True Me.txt_grado.ReadOnly = True Me.txt_cal_art.ReadOnly = False Me.txt_cal_esp.ReadOnly = False Me.txt_cal_fil.ReadOnly = False Me.txt_cal_fis.ReadOnly = False Me.txt_cal_ing.ReadOnly = False Me.txt_cal_mat.ReadOnly = False Me.txt_cal_nat.ReadOnly = False Me.txt_cal_qui.ReadOnly = False Me.txt_cal_rel.ReadOnly = False Me.txt_cal_soc.ReadOnly = False Me.txt_cal_tec.ReadOnly = False
138
139 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cual_art.ReadOnly = False Me.txt_cual_esp.ReadOnly = False Me.txt_cual_fil.ReadOnly = False Me.txt_cual_fis.ReadOnly = False Me.txt_cual_ing.ReadOnly = False Me.txt_cual_mat.ReadOnly = False Me.txt_cual_nat.ReadOnly = False Me.txt_cual_qui.ReadOnly = False Me.txt_cual_rel.ReadOnly = False Me.txt_cual_soc.ReadOnly = False Me.txt_cual_tec.ReadOnly = False Me.cmb_periodo.Enabled = True
If Me.lbl_periodo.Visible = False Then Me.lbl_periodo.Visible = True If Me.cmb_periodo.Visible = False Then Me.cmb_periodo.Visible = True
Call BLOQUEARBOTONES(1) SWGrabar = 1 Me.cmb_periodo.Focus() End Sub
Private Sub btn_cancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_cancelar.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call ENLACES() If Me.cmb_periodo.Visible = True Then Me.cmb_periodo.Visible = False If Me.lbl_periodo.Visible = True Then Me.lbl_periodo.Visible = False SWGrabar = -1
End Sub
Private Sub btn_grabar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_grabar.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1, SQL2 As String Try If Me.cmb_periodo.Text = "" Then Me.cmb_periodo.Text = "0" End If Dim Estadope As String If Me.rbt_si_apro_mater.Checked = True Then Estadope = "APROBADO" Else Estadope = "REPROBADO" End If If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO tbl_calificacion_estudiantes(fld_id_estudiante,fld_nom_estudiante,fld_ape_estudiante,fl
139
140 SOFBATEC 1.0DERECHOS RESERVADOS
d_grado,fld_matematicas,fld_español,fld_artes,fld_tecnologia,fld_sociales,fld_religion,fld_ingles,fld_naturales,fld_filosofia,fld_quimica,fld_fisica,fld_cual_matematicas,fld_cual_español,fld_cual_artes,fld_cual_tecnologia,fld_cual_sociales,fld_cual_religion,fld_cual_ingles,fld_cual_naturales,fld_cual_filosofia,fld_cual_quimica,fld_cual_fisica,fld_ih_mat,fld_ih_esp,fld_ih_art,fld_ih_tec,fld_ih_soc,fld_ih_rel,fld_ih_ing,fld_ih_nat,fld_ih_fil,fld_ih_qui,fld_ih_fis)VALUES(" SQL = SQL & Me.txt_id_estudiante.Text & "" SQL = SQL & ",'" & Me.txt_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_apellidos_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_grado.Text & "'" SQL = SQL & "," & Me.chk_matematicas.Checked & "" SQL = SQL & "," & Me.chk_español.Checked & "" SQL = SQL & "," & Me.chk_artes.Checked & "" SQL = SQL & "," & Me.chk_tecnologia.Checked & "" SQL = SQL & "," & Me.chk_sociales.Checked & "" SQL = SQL & "," & Me.chk_religion.Checked & "" SQL = SQL & "," & Me.chk_ingles.Checked & "" SQL = SQL & "," & Me.chk_naturales.Checked & "" SQL = SQL & "," & Me.chk_filosofia.Checked & "" SQL = SQL & "," & Me.chk_quimica.Checked & "" SQL = SQL & "," & Me.chk_fisica.Checked & "" SQL = SQL & ",'" & Me.txt_cual_mat.Text & "'" SQL = SQL & ",'" & Me.txt_cual_esp.Text & "'" SQL = SQL & ",'" & Me.txt_cual_art.Text & "'" SQL = SQL & ",'" & Me.txt_cual_tec.Text & "'" SQL = SQL & ",'" & Me.txt_cual_soc.Text & "'" SQL = SQL & ",'" & Me.txt_cual_rel.Text & "'" SQL = SQL & ",'" & Me.txt_cual_ing.Text & "'" SQL = SQL & ",'" & Me.txt_cual_nat.Text & "'" SQL = SQL & ",'" & Me.txt_cual_fil.Text & "'" SQL = SQL & ",'" & Me.txt_cual_qui.Text & "'" SQL = SQL & ",'" & Me.txt_cual_fis.Text & "'" SQL = SQL & ",'" & Me.txt_ih_mat.Text & "'" SQL = SQL & ",'" & Me.txt_ih_esp.Text & "'" SQL = SQL & ",'" & Me.txt_ih_art.Text & "'" SQL = SQL & ",'" & Me.txt_ih_tec.Text & "'" SQL = SQL & ",'" & Me.txt_ih_soc.Text & "'" SQL = SQL & ",'" & Me.txt_ih_rel.Text & "'" SQL = SQL & ",'" & Me.txt_ih_ing.Text & "'" SQL = SQL & ",'" & Me.txt_ih_nat.Text & "'" SQL = SQL & ",'" & Me.txt_ih_fil.Text & "'" SQL = SQL & ",'" & Me.txt_ih_qui.Text & "'" SQL = SQL & ",'" & Me.txt_ih_fis.Text & "')"
CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CALIFICACION.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO"
140
141 SOFBATEC 1.0DERECHOS RESERVADOS
Else If SWCAL = True Then If Me.cmb_periodo.Text = 0 Then MessageBox.Show("EL PERIODO NO PUEDE SER IGUAL A 0", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Stop, MessageBoxDefaultButton.Button1) Me.cmb_periodo.Focus() Exit Sub End If SQL = "UPDATE tbl_calificacion_estudiantes SET " SQL = SQL & "fld_periodo=" & Me.cmb_periodo.Text & "" SQL = SQL & ",fld_cual_matematicas='" & Me.txt_cual_mat.Text & "'" SQL = SQL & ",fld_cual_español='" & Me.txt_cual_esp.Text & "'" SQL = SQL & ",fld_cual_artes='" & Me.txt_cual_art.Text & "'" SQL = SQL & ",fld_cual_tecnologia='" & Me.txt_cual_tec.Text & "'" SQL = SQL & ",fld_cual_sociales='" & Me.txt_cual_soc.Text & "'" SQL = SQL & ",fld_cual_religion='" & Me.txt_cual_rel.Text & "'" SQL = SQL & ",fld_cual_ingles='" & Me.txt_cual_ing.Text & "'" SQL = SQL & ",fld_cual_naturales='" & Me.txt_cual_nat.Text & "'" SQL = SQL & ",fld_cual_filosofia='" & Me.txt_cual_fil.Text & "'" SQL = SQL & ",fld_cual_quimica='" & Me.txt_cual_qui.Text & "'" SQL = SQL & ",fld_cual_fisica='" & Me.txt_cual_fis.Text & "'" SQL = SQL & ",fld_estado_periodo='" & Estadope & "'" SQL = SQL & " WHERE fld_nom_estudiante='" & Me.txt_estudiante.Text & "'AND fld_ape_estudiante='" & Me.txt_apellidos_estudiante.Text & "'" If MessageBox.Show("RECUERDE QUE AL GRABAR LAS REPSECITVAS CALIFICACIONES NO PODRA EN UN FUTURO MODIFICARLAS DESEA CONTINUAR?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "CALIFICACIONES REGISTRADAS EXITOSAMENE" End If Else SQL = "UPDATE tbl_calificacion_estudiantes SET " SQL = SQL & "fld_nom_estudiante='" & Me.txt_estudiante.Text & "'" SQL = SQL & ",fld_ape_estudiante='" & Me.txt_apellidos_estudiante.Text & "'" SQL = SQL & " WHERE fld_periodo=" & Me.cmb_periodo.Text & "and fld_grado='" & Me.txt_grado.Text & "'" CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If
141
142 SOFBATEC 1.0DERECHOS RESERVADOS
End If SQL1 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_matematicas AS MATEMATICAS,A.fld_español AS ESPAÑOL,A.fld_artes AS ARTES,A.fld_tecnologia AS TECNOLOGIA,A.fld_sociales AS [SOCIALES],A.fld_religion AS RELIGION,A.fld_ingles AS INGLES,A.fld_naturales AS NATURALES,A.fld_filosofia AS FILOSOFIA,A.fld_quimica AS QUIMICA,A.fld_fisica AS FISICA,A.fld_cual_matematicas AS [DEFINICION MATEMATICAS],A.fld_cual_español AS [DEFINICION ESPAÑOL],A.fld_cual_artes AS [DEFINICION ARTES],A.fld_cual_tecnologia AS [DEFINICION TECNOLOGIA],A.fld_cual_sociales AS [DEFINICION SOCIALES],A.fld_cual_religion AS [DEFINICION RELIGION],A.fld_cual_ingles AS [DEFINICION INGLES],A.fld_cual_naturales AS [DEFINICION NATURALES],A.fld_cual_filosofia AS [DEFINICION FILOSOFIA],A.fld_cual_quimica AS [DEFINICION QUIMICA],A.fld_cual_fisica AS [DEFINICION FISICA],A.fld_estado_periodo AS [ESTADO PERIODO]" SQL1 = SQL1 & " from tbl_calificacion_estudiantes A" SQL1 = SQL1 & " order by A.fld_grado" CMDselect.CommandText = SQL1 DS_Datos.Tables("TBL_CAL").Clear() DA_CALIFICACION.SelectCommand = CMDselect DA_CALIFICACION.Fill(DS_Datos, "TBL_CAL")
SQL2 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA,A.fld_estado_periodo AS [ESTADO PERIODO]" SQL2 = SQL2 & " from tbl_calificacion_estudiantes A" SQL2 = SQL2 & " order by A.fld_grado" CMDselect.CommandText = SQL2 DS_Datos.Tables("tbl_gridcal").Clear() DA_GRIDCALIFICACION.SelectCommand = CMDselect DA_GRIDCALIFICACION.Fill(DS_Datos, "TBL_GRIDCAL")
CONEXION.Close() Call digitarcal() Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
142
143 SOFBATEC 1.0DERECHOS RESERVADOS
Call BLOQUEARBOTONES(0) Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_primero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_primero.Click Try If notvisible = False Then notvisible = True Call visibilidad() Call ENLACES() EnlaceBASE.Position = 0 Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True If Me.cmb_periodo.Visible = False Then Me.cmb_periodo.Visible = True If Me.lbl_periodo.Visible = False Then Me.lbl_periodo.Visible = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call digitarcal() Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_anterior_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_anterior.Click Try If notvisible = False Then notvisible = True Call visibilidad()
Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False End If Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True If Me.cmb_periodo.Visible = False Then Me.cmb_periodo.Visible = True If Me.lbl_periodo.Visible = False Then Me.lbl_periodo.Visible = True
143
144 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call digitarcal() Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_siguiente_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_siguiente.Click Try If notvisible = False Then notvisible = True Call visibilidad()
Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False End If Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True If Me.cmb_periodo.Visible = False Then Me.cmb_periodo.Visible = True If Me.lbl_periodo.Visible = False Then Me.lbl_periodo.Visible = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call digitarcal() Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_ultimo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ultimo.Click Try If notvisible = False Then notvisible = True Call visibilidad()
Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True If Me.cmb_periodo.Visible = False Then Me.cmb_periodo.Visible = True If Me.lbl_periodo.Visible = False Then Me.lbl_periodo.Visible = True
144
145 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call digitarcal() Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_eliminar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_eliminar.Click Dim SQL, SQL1 As String If Me.txt_estudiante.Text.Length = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE * FROM tbl_calificacion_estudiantes WHERE fld_nom_estudiante='" & Me.txt_estudiante.Text & "'" CMDBorrar.Connection = CONEXION DA_MATRICULA.DeleteCommand = CMDBorrar If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_matematicas AS MATEMATICAS,A.fld_español AS ESPAÑOL,A.fld_artes AS ARTES,A.fld_tecnologia AS TECNOLOGIA,A.fld_sociales AS [SOCIALES],A.fld_religion AS RELIGION,A.fld_ingles AS INGLES,A.fld_naturales AS NATURALES,A.fld_filosofia AS FILOSOFIA,A.fld_quimica AS QUIMICA,A.fld_fisica AS FISICA,A.fld_cual_matematicas AS [DEFINICION MATEMATICAS],A.fld_cual_español AS [DEFINICION ESPAÑOL],A.fld_cual_artes AS [DEFINICION ARTES],A.fld_cual_tecnologia AS [DEFINICION TECNOLOGIA],A.fld_cual_sociales AS [DEFINICION SOCIALES],A.fld_cual_religion AS [DEFINICION RELIGION],A.fld_cual_ingles AS [DEFINICION INGLES],A.fld_cual_naturales AS [DEFINICION NATURALES],A.fld_cual_filosofia AS [DEFINICION FILOSOFIA],A.fld_cual_quimica AS [DEFINICION QUIMICA],A.fld_cual_fisica AS [DEFINICION FISICA],A.fld_estado_periodo AS [ESTADO PERIODO]"
145
146 SOFBATEC 1.0DERECHOS RESERVADOS
SQL = SQL & " from tbl_calificacion_estudiantes A" SQL = SQL & " order by A.fld_grado" CMDselect.CommandText = SQL DS_Datos.Tables("tbl_cal").Clear() DA_CALIFICACION.SelectCommand = CMDselect DA_CALIFICACION.Fill(DS_Datos, "TBL_CAL")
SQL1 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA,A.fld_estado_periodo AS [ESTADO PERIODO]" SQL1 = SQL1 & " from tbl_calificacion_estudiantes A" SQL1 = SQL1 & " order by A.fld_grado" CMDselect.CommandText = SQL1 DS_Datos.Tables("tbl_gridcal").Clear() DA_GRIDCALIFICACION.SelectCommand = CMDselect DA_GRIDCALIFICACION.Fill(DS_Datos, "TBL_GRIDCAL") MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub btn_consulta_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_consulta.Click Dim SQL As String NombreTabla = "tbl_calificacion_estudiantes" Campograd = "fld_grado" CampoTxt = "fld_nom_estudiante" CampoTxt2 = "fld_ape_estudiante" CodigoBuscado = "" Dim CONSULTAR As New FRM_CONSULTA CONSULTAR.ShowDialog() If CodigoBuscado.Length > 0 Then Me.txt_estudiante.Text = CodigoBuscado End If SQL = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL
146
147 SOFBATEC 1.0DERECHOS RESERVADOS
ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_matematicas AS MATEMATICAS,A.fld_español AS ESPAÑOL,A.fld_artes AS ARTES,A.fld_tecnologia AS TECNOLOGIA,A.fld_sociales AS SOCIALES,A.fld_religion AS RELIGION,A.fld_ingles AS INGLES,A.fld_naturales AS NATURALES,A.fld_filosofia AS FILOSOFIA,A.fld_quimica AS QUIMICA,A.fld_fisica AS FISICA,A.fld_cual_matematicas AS [DEFINICION MATEMATICAS],A.fld_cual_español AS [DEFINICION ESPAÑOL],A.fld_cual_artes AS [DEFINICION ARTES],A.fld_cual_tecnologia AS [DEFINICION TECNOLOGIA],A.fld_cual_sociales AS [DEFINICION SOCIALES],A.fld_cual_religion AS [DEFINICION RELIGION],A.fld_cual_ingles AS [DEFINICION INGLES],A.fld_cual_naturales AS [DEFINICION NATURALES],A.fld_cual_filosofia AS [DEFINICION FILOSOFIA],A.fld_cual_quimica AS [DEFINICION QUIMICA],A.fld_cual_fisica AS [DEFINICION FISICA],A.fld_estado_periodo AS [ESTADO PERIODO],A.fld_ih_mat AS [INTENSIDAD HORARIA MATEMATICAS],A.fld_ih_esp AS [INTENSIDAD HORARIA ESPAÑOL],A.fld_ih_art AS [INTENSIDAD HORARIA ARTES],A.fld_ih_tec AS [INTENSIDAD HORARIA TECNOLOGIA],A.fld_ih_soc AS [INTENSIDAD HORARIA SOCIALES],A.fld_ih_rel AS [INTENSIDAD HORARIA RELIGION],A.fld_ih_ing AS [INTENSIDAD HORARIA INGLES],A.fld_ih_nat AS [INTENSIDAD HORARIA NATURALES],A.fld_ih_fil AS [INTENSIDAD HORARIA FILOSOFIA],A.fld_ih_qui AS [INTENSIDAD HORARIA QUIMICA],A.fld_ih_fis AS [INTENSIDAD HORARIA FISICA]" SQL = SQL & " from tbl_calificacion_estudiantes A" SQL = SQL & " order by A.fld_grado" CMDselect.CommandText = SQL DA_CALIFICACION.SelectCommand = CMDselect DA_CALIFICACION.Fill(DS_Datos, "TBL_CAL") End Sub
Private Sub txt_cal_ing_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_ing.Leave If Me.txt_cal_ing.Text = "e" Or Me.txt_cal_ing.Text = "E" Then Me.txt_cual_ing.Text = "EXCELENTE" If Me.txt_cal_ing.Text = "s" Or Me.txt_cal_ing.Text = "S" Then Me.txt_cual_ing.Text = "SOBRESALIENTE" If Me.txt_cal_ing.Text = "a" Or Me.txt_cal_ing.Text = "A" Then Me.txt_cual_ing.Text = "ACEPTABLE" If Me.txt_cal_ing.Text = "i" Or Me.txt_cal_ing.Text = "I" Then Me.txt_cual_ing.Text = "INSUFICIENTE" Me.txt_cual_ing.ReadOnly = True End Sub
Private Sub txt_cal_qui_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_qui.Leave
147
148 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_cal_qui.Text = "e" Or Me.txt_cal_qui.Text = "E" Then Me.txt_cual_qui.Text = "EXCELENTE" If Me.txt_cal_qui.Text = "s" Or Me.txt_cal_qui.Text = "S" Then Me.txt_cual_qui.Text = "SOBRESALIENTE" If Me.txt_cal_qui.Text = "a" Or Me.txt_cal_qui.Text = "A" Then Me.txt_cual_qui.Text = "ACEPTABLE" If Me.txt_cal_qui.Text = "i" Or Me.txt_cal_qui.Text = "I" Then Me.txt_cual_qui.Text = "INSUFICIENTE" Me.txt_cual_qui.ReadOnly = True End Sub
Private Sub txt_cal_mat_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_mat.Leave If Me.txt_cal_mat.Text = "e" Or Me.txt_cal_mat.Text = "E" Then Me.txt_cual_mat.Text = "EXCELENTE" If Me.txt_cal_mat.Text = "s" Or Me.txt_cal_mat.Text = "S" Then Me.txt_cual_mat.Text = "SOBRESALIENTE" If Me.txt_cal_mat.Text = "a" Or Me.txt_cal_mat.Text = "A" Then Me.txt_cual_mat.Text = "ACEPTABLE" If Me.txt_cal_mat.Text = "i" Or Me.txt_cal_mat.Text = "I" Then Me.txt_cual_mat.Text = "INSUFICIENTE" Me.txt_cual_mat.ReadOnly = True End Sub
Private Sub txt_cal_esp_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_esp.Leave If Me.txt_cal_esp.Text = "e" Or Me.txt_cal_esp.Text = "E" Then Me.txt_cual_esp.Text = "EXCELENTE" If Me.txt_cal_esp.Text = "s" Or Me.txt_cal_esp.Text = "S" Then Me.txt_cual_esp.Text = "SOBRESALIENTE" If Me.txt_cal_esp.Text = "a" Or Me.txt_cal_esp.Text = "A" Then Me.txt_cual_esp.Text = "ACEPTABLE" If Me.txt_cal_esp.Text = "i" Or Me.txt_cal_esp.Text = "I" Then Me.txt_cual_esp.Text = "INSUFICIENTE" Me.txt_cual_esp.ReadOnly = True End Sub
Private Sub txt_cal_fil_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_fil.Leave If Me.txt_cal_fil.Text = "e" Or Me.txt_cal_fil.Text = "E" Then Me.txt_cual_fil.Text = "EXCELENTE" If Me.txt_cal_fil.Text = "s" Or Me.txt_cal_fil.Text = "S" Then Me.txt_cual_fil.Text = "SOBRESALIENTE" If Me.txt_cal_fil.Text = "a" Or Me.txt_cal_fil.Text = "A" Then Me.txt_cual_fil.Text = "ACEPTABLE" If Me.txt_cal_fil.Text = "i" Or Me.txt_cal_fil.Text = "I" Then Me.txt_cual_fil.Text = "INSUFICIENTE" Me.txt_cual_fil.ReadOnly = True End Sub
148
149 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_cal_tec_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_tec.Leave If Me.txt_cal_tec.Text = "e" Or Me.txt_cal_tec.Text = "E" Then Me.txt_cual_tec.Text = "EXCELENTE" If Me.txt_cal_tec.Text = "s" Or Me.txt_cal_tec.Text = "S" Then Me.txt_cual_tec.Text = "SOBRESALIENTE" If Me.txt_cal_tec.Text = "a" Or Me.txt_cal_tec.Text = "A" Then Me.txt_cual_tec.Text = "ACEPTABLE" If Me.txt_cal_tec.Text = "i" Or Me.txt_cal_tec.Text = "I" Then Me.txt_cual_tec.Text = "INSUFICIENTE" Me.txt_cual_tec.ReadOnly = True End Sub
Private Sub txt_cal_soc_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_soc.Leave If Me.txt_cal_soc.Text = "e" Or Me.txt_cal_soc.Text = "E" Then Me.txt_cual_soc.Text = "EXCELENTE" If Me.txt_cal_soc.Text = "s" Or Me.txt_cal_soc.Text = "S" Then Me.txt_cual_soc.Text = "SOBRESALIENTE" If Me.txt_cal_soc.Text = "a" Or Me.txt_cal_soc.Text = "A" Then Me.txt_cual_soc.Text = "ACEPTABLE" If Me.txt_cal_soc.Text = "i" Or Me.txt_cal_soc.Text = "I" Then Me.txt_cual_soc.Text = "INSUFICIENTE" Me.txt_cual_soc.ReadOnly = True End Sub
Private Sub txt_cal_rel_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_rel.Leave If Me.txt_cal_rel.Text = "e" Or Me.txt_cal_rel.Text = "E" Then Me.txt_cual_rel.Text = "EXCELENTE" If Me.txt_cal_rel.Text = "s" Or Me.txt_cal_rel.Text = "S" Then Me.txt_cual_rel.Text = "SOBRESALIENTE" If Me.txt_cal_rel.Text = "a" Or Me.txt_cal_rel.Text = "A" Then Me.txt_cual_rel.Text = "ACEPTABLE" If Me.txt_cal_rel.Text = "i" Or Me.txt_cal_rel.Text = "I" Then Me.txt_cual_rel.Text = "INSUFICIENTE" Me.txt_cual_rel.ReadOnly = True End Sub
Private Sub txt_cal_art_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_art.Leave If Me.txt_cal_art.Text = "e" Or Me.txt_cal_art.Text = "E" Then Me.txt_cual_art.Text = "EXCELENTE" If Me.txt_cal_art.Text = "s" Or Me.txt_cal_art.Text = "S" Then Me.txt_cual_art.Text = "SOBRESALIENTE" If Me.txt_cal_art.Text = "a" Or Me.txt_cal_art.Text = "A" Then Me.txt_cual_art.Text = "ACEPTABLE" If Me.txt_cal_art.Text = "i" Or Me.txt_cal_art.Text = "I" Then Me.txt_cual_art.Text = "INSUFICIENTE" Me.txt_cual_art.ReadOnly = True
149
150 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
Private Sub txt_cal_fis_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_fis.Leave If Me.txt_cal_fis.Text = "e" Or Me.txt_cal_fis.Text = "E" Then Me.txt_cual_fis.Text = "EXCELENTE" If Me.txt_cal_fis.Text = "s" Or Me.txt_cal_fis.Text = "S" Then Me.txt_cual_fis.Text = "SOBRESALIENTE" If Me.txt_cal_fis.Text = "a" Or Me.txt_cal_fis.Text = "A" Then Me.txt_cual_fis.Text = "ACEPTABLE" If Me.txt_cal_fis.Text = "i" Or Me.txt_cal_fis.Text = "I" Then Me.txt_cual_fis.Text = "INSUFICIENTE" Me.txt_cual_fis.ReadOnly = True End Sub
Private Sub txt_cal_nat_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_nat.Leave If Me.txt_cal_nat.Text = "e" Or Me.txt_cal_nat.Text = "E" Then Me.txt_cual_nat.Text = "EXCELENTE" If Me.txt_cal_nat.Text = "s" Or Me.txt_cal_nat.Text = "S" Then Me.txt_cual_nat.Text = "SOBRESALIENTE" If Me.txt_cal_nat.Text = "a" Or Me.txt_cal_nat.Text = "A" Then Me.txt_cual_nat.Text = "ACEPTABLE" If Me.txt_cal_nat.Text = "i" Or Me.txt_cal_nat.Text = "I" Then Me.txt_cual_nat.Text = "INSUFICIENTE" Me.txt_cual_nat.ReadOnly = True End Sub
Private Sub txt_id_estudiante_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_id_estudiante.Leave If Me.txt_id_estudiante.TextLength = 0 Then Exit Sub Else Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select A.fld_nombres_estudiante,A.fld_apellidos_estudiante,B.fld_grado_matricula from tbl_estudiantes A,tbl_matriculas B where A.fld_identificacion_estudiante=" & Me.txt_id_estudiante.Text & "and B.fld_id_estudiante=" & Me.txt_id_estudiante.Text & "" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then Me.txt_apellidos_estudiante.Text = DR_CONSULTA.Item("fld_apellidos_estudiante") Me.txt_estudiante.Text = DR_CONSULTA.Item("Fld_nombres_estudiante") Me.txt_grado.Text = DR_CONSULTA.Item("fld_grado_matricula")
150
151 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_ih_mat.Focus() CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("LA IDENTIFICACION DIGITADA NO PERTENECE A NINGUN FORMATO DE MATRICULA POR FAVOR DILIGENCIE LA MATRICULA PARA ASIGNARLE EL GRADO AL ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_id_estudiante.Clear() Me.txt_id_estudiante.Focus() DR_CONSULTA.Close() Exit Sub End If
If Me.txt_grado.Text = "6ºA" Or Me.txt_grado.Text = "6ºB" Or Me.txt_grado.Text = "6ºC" Or Me.txt_grado.Text = "6ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False Me.txt_ih_fil.Enabled = False Me.txt_ih_qui.Enabled = False Me.txt_ih_fis.Enabled = False
If Me.chk_artes.Text = "artes graficas" Or Me.chk_artes.Text = "artisitcas" Then Me.chk_artes.Text = "artes" End If
If Me.chk_tecnologia.Text = "tecnologia" Then Me.chk_tecnologia.Text = "tecnologia y sistemas" End If
End If
If Me.txt_grado.Text = "7ºA" Or Me.txt_grado.Text = "7ºB" Or Me.txt_grado.Text = "7ºC" Or Me.txt_grado.Text = "7ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True
151
152 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.txt_ih_fil.Enabled = False Me.txt_ih_qui.Enabled = False Me.txt_ih_fis.Enabled = False
If Me.chk_artes.Text = "artes graficas" Or Me.chk_artes.Text = "artisitcas" Then Me.chk_artes.Text = "artes" End If
If Me.chk_tecnologia.Text = "tecnologia" Then Me.chk_tecnologia.Text = "tecnologia y sistemas" End If
End If
If Me.txt_grado.Text = "8ºA" Or Me.txt_grado.Text = "8ºB" Or Me.txt_grado.Text = "8ºC" Or Me.txt_grado.Text = "8ºD" Then If Me.txt_cual_soc.Enabled = False Then Me.txt_cual_soc.Enabled = True If Me.txt_cal_soc.Enabled = False Then Me.txt_cal_soc.Enabled = True If Me.txt_cual_nat.Enabled = False Then Me.txt_cual_nat.Enabled = True If Me.txt_cal_nat.Enabled = False Then Me.txt_cal_nat.Enabled = True If Me.txt_cal_qui.Enabled = True Then Me.txt_cual_qui.Enabled = False If Me.txt_cual_qui.Enabled = True Then Me.txt_cual_qui.Enabled = False If Me.txt_cal_fis.Enabled = True Then Me.txt_cual_fis.Enabled = False If Me.txt_cual_fis.Enabled = True Then Me.txt_cual_fis.Enabled = False If Me.txt_cal_fil.Enabled = True Then Me.txt_cual_fil.Enabled = False If Me.txt_cual_fil.Enabled = True Then Me.txt_cual_fil.Enabled = False Me.txt_ih_fil.Enabled = False Me.txt_ih_qui.Enabled = False Me.txt_ih_fis.Enabled = False
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False
152
153 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_artes.Text = "artisticas" Me.chk_tecnologia.Text = "tecnologia"
End If
If Me.txt_grado.Text = "9ºA" Or Me.txt_grado.Text = "9ºB" Or Me.txt_grado.Text = "9ºC" Or Me.txt_grado.Text = "9ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False Me.txt_ih_fil.Enabled = False Me.txt_ih_qui.Enabled = False Me.txt_ih_fis.Enabled = False
Me.chk_artes.Text = "artisticas" Me.chk_tecnologia.Text = "tecnologia"
End If
If Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = False Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = False Me.chk_filosofia.Checked = True Me.chk_quimica.Checked = True Me.chk_fisica.Checked = True Me.txt_ih_soc.Enabled = False Me.txt_ih_nat.Enabled = False
Me.chk_artes.Text = "artes graficas" Me.chk_tecnologia.Text = "tecnologia"
153
154 SOFBATEC 1.0DERECHOS RESERVADOS
End If
If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = False Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = False Me.chk_filosofia.Checked = True Me.chk_quimica.Checked = True Me.chk_fisica.Checked = True Me.txt_ih_soc.Enabled = False Me.txt_ih_nat.Enabled = False
Me.chk_artes.Text = "artes graficas" Me.chk_tecnologia.Text = "tecnologia" End If
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If End Try End If End Sub
Private Sub txt_ih_mat_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_mat.Leave Me.txt_ih_mat.Text = Me.txt_ih_mat.Text & " Hrs" End Sub
Private Sub txt_ih_esp_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_esp.Leave Me.txt_ih_esp.Text = Me.txt_ih_esp.Text & " Hrs" End Sub
Private Sub txt_ih_art_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_art.Leave Me.txt_ih_art.Text = Me.txt_ih_art.Text & " Hrs"
154
155 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
Private Sub txt_ih_tec_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_tec.Leave Me.txt_ih_tec.Text = Me.txt_ih_tec.Text & " Hrs" End Sub
Private Sub txt_ih_soc_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_soc.Leave Me.txt_ih_soc.Text = Me.txt_ih_soc.Text & " Hrs" End Sub
Private Sub txt_ih_rel_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_rel.Leave Me.txt_ih_rel.Text = Me.txt_ih_rel.Text & " Hrs" End Sub
Private Sub txt_ih_ing_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_ing.Leave Me.txt_ih_ing.Text = Me.txt_ih_ing.Text & " Hrs" End Sub
Private Sub txt_ih_nat_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_nat.Leave Me.txt_ih_nat.Text = Me.txt_ih_nat.Text & " Hrs" End Sub
Private Sub txt_ih_fil_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_fil.Leave Me.txt_ih_fil.Text = Me.txt_ih_fil.Text & " Hrs" End Sub
Private Sub txt_ih_qui_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_qui.Leave Me.txt_ih_qui.Text = Me.txt_ih_qui.Text & " Hrs" End Sub
Private Sub txt_ih_fis_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_ih_fis.Leave Me.txt_ih_fis.Text = Me.txt_ih_fis.Text & " Hrs" End Sub
Private Sub frm_estudiante_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing DS_Datos.Tables("TBL_CAL").Clear() DS_Datos.Tables("TBL_GRIDCAL").Clear() End Sub
Private Sub cmb_periodo_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb_periodo.SelectedIndexChanged
155
156 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.cmb_periodo.Text.Length > 0 Then Me.txt_cal_mat.Focus() End If End Sub
Private Sub txt_id_estudiante_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_id_estudiante.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_id_estudiante_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_id_estudiante.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_mat_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_mat.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_mat_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_mat.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_esp_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_esp.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_esp_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_esp.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
156
157 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_ih_art_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_art.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_art_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_art.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_tec_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_tec.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_tec_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_tec.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_soc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_soc.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_soc_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_soc.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_rel_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_rel.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
157
158 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_ih_rel_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_rel.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_ing_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_ing.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_ing_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_ing.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_nat_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_nat.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_nat_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_nat.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_fil_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_fil.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_fil_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_fil.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii
158
159 SOFBATEC 1.0DERECHOS RESERVADOS
Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_qui_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_qui.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_qui_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_qui.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ih_fis_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ih_fis.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ih_fis_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ih_fis.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_mat_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_mat.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_mat_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_mat.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
159
160 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_cal_esp_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_esp.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_esp_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_esp.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_art_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_art.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_art_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_art.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_tec_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_tec.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_tec_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_tec.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_soc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_soc.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
160
161 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_cal_soc_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_soc.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_rel_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_rel.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_rel_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_rel.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_ing_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_ing.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_ing_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_ing.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_nat_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_nat.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_nat_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_nat.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii
161
162 SOFBATEC 1.0DERECHOS RESERVADOS
Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_fil_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_fil.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_fil_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_fil.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_qui_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_qui.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_qui_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_qui.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_fis_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_fis.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_fis_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_fis.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
162
163 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub btn_salir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_salir.Click Me.Close() End SubEnd Class
Codigo registros de Asignaturas por grados
Public Class frm_asignaturas Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
163
164 SOFBATEC 1.0DERECHOS RESERVADOS
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lbl_asignatura As System.Windows.Forms.Label Friend WithEvents lbl_cod_asignatura As System.Windows.Forms.Label Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_ultimo As System.Windows.Forms.Button Friend WithEvents btn_siguiente As System.Windows.Forms.Button Friend WithEvents btn_anterior As System.Windows.Forms.Button Friend WithEvents btn_primero As System.Windows.Forms.Button Friend WithEvents btn_cancelar As System.Windows.Forms.Button Friend WithEvents btn_eliminar As System.Windows.Forms.Button Friend WithEvents btn_grabar As System.Windows.Forms.Button Friend WithEvents btn_modificar As System.Windows.Forms.Button Friend WithEvents btn_nuevo As System.Windows.Forms.Button Friend WithEvents dtg_consulta As System.Windows.Forms.DataGrid Friend WithEvents txt_cod_asig As System.Windows.Forms.TextBox Friend WithEvents txt_nom_asig As System.Windows.Forms.TextBox Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label Me.lbl_asignatura = New System.Windows.Forms.Label Me.lbl_cod_asignatura = New System.Windows.Forms.Label Me.dtg_consulta = New System.Windows.Forms.DataGrid Me.lblposicion = New System.Windows.Forms.Label Me.btn_ultimo = New System.Windows.Forms.Button Me.btn_siguiente = New System.Windows.Forms.Button Me.btn_anterior = New System.Windows.Forms.Button
164
165 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_primero = New System.Windows.Forms.Button Me.btn_cancelar = New System.Windows.Forms.Button Me.btn_eliminar = New System.Windows.Forms.Button Me.btn_grabar = New System.Windows.Forms.Button Me.btn_modificar = New System.Windows.Forms.Button Me.btn_nuevo = New System.Windows.Forms.Button Me.txt_cod_asig = New System.Windows.Forms.TextBox Me.txt_nom_asig = New System.Windows.Forms.TextBox Me.btn_salir = New System.Windows.Forms.Button CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(120, 21) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(376, 28) Me.Label1.TabIndex = 264 Me.Label1.Text = "REGISTRO DE ASIGNATURAS" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'lbl_asignatura ' Me.lbl_asignatura.AutoSize = True Me.lbl_asignatura.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_asignatura.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_asignatura.ForeColor = System.Drawing.Color.Blue Me.lbl_asignatura.Location = New System.Drawing.Point(328, 69) Me.lbl_asignatura.Name = "lbl_asignatura" Me.lbl_asignatura.Size = New System.Drawing.Size(168, 19) Me.lbl_asignatura.TabIndex = 269 Me.lbl_asignatura.Text = "NOMBRE DE LA ASIGNATURA" ' 'lbl_cod_asignatura ' Me.lbl_cod_asignatura.AutoSize = True Me.lbl_cod_asignatura.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_cod_asignatura.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_cod_asignatura.ForeColor = System.Drawing.Color.Blue Me.lbl_cod_asignatura.Location = New System.Drawing.Point(120, 69) Me.lbl_cod_asignatura.Name = "lbl_cod_asignatura" Me.lbl_cod_asignatura.Size = New System.Drawing.Size(164, 19) Me.lbl_cod_asignatura.TabIndex = 270
165
166 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lbl_cod_asignatura.Text = "CODIGO DE LA ASIGNATURA" ' 'dtg_consulta ' Me.dtg_consulta.DataMember = "" Me.dtg_consulta.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.dtg_consulta.Location = New System.Drawing.Point(24, 125) Me.dtg_consulta.Name = "dtg_consulta" Me.dtg_consulta.Size = New System.Drawing.Size(576, 132) Me.dtg_consulta.TabIndex = 275 ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.Blue Me.lblposicion.Location = New System.Drawing.Point(272, 312) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(80, 32) Me.lblposicion.TabIndex = 293 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btn_ultimo ' Me.btn_ultimo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_ultimo.Location = New System.Drawing.Point(400, 312) Me.btn_ultimo.Name = "btn_ultimo" Me.btn_ultimo.Size = New System.Drawing.Size(48, 32) Me.btn_ultimo.TabIndex = 292 ' 'btn_siguiente ' Me.btn_siguiente.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_siguiente.Location = New System.Drawing.Point(352, 312) Me.btn_siguiente.Name = "btn_siguiente" Me.btn_siguiente.Size = New System.Drawing.Size(48, 32) Me.btn_siguiente.TabIndex = 291 ' 'btn_anterior ' Me.btn_anterior.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_anterior.Location = New System.Drawing.Point(224, 312) Me.btn_anterior.Name = "btn_anterior" Me.btn_anterior.Size = New System.Drawing.Size(48, 32) Me.btn_anterior.TabIndex = 290 ' 'btn_primero '
166
167 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_primero.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_primero.Location = New System.Drawing.Point(176, 312) Me.btn_primero.Name = "btn_primero" Me.btn_primero.Size = New System.Drawing.Size(48, 32) Me.btn_primero.TabIndex = 289 ' 'btn_cancelar ' Me.btn_cancelar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_cancelar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_cancelar.ForeColor = System.Drawing.Color.Transparent Me.btn_cancelar.Location = New System.Drawing.Point(392, 280) Me.btn_cancelar.Name = "btn_cancelar" Me.btn_cancelar.Size = New System.Drawing.Size(72, 32) Me.btn_cancelar.TabIndex = 287 Me.btn_cancelar.Text = "&Cancelar" Me.btn_cancelar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_eliminar ' Me.btn_eliminar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_eliminar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_eliminar.ForeColor = System.Drawing.Color.Transparent Me.btn_eliminar.Location = New System.Drawing.Point(320, 280) Me.btn_eliminar.Name = "btn_eliminar" Me.btn_eliminar.Size = New System.Drawing.Size(72, 32) Me.btn_eliminar.TabIndex = 286 Me.btn_eliminar.Text = "&Eliminiar" Me.btn_eliminar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_grabar ' Me.btn_grabar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_grabar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_grabar.ForeColor = System.Drawing.Color.Transparent Me.btn_grabar.Location = New System.Drawing.Point(248, 280) Me.btn_grabar.Name = "btn_grabar" Me.btn_grabar.Size = New System.Drawing.Size(72, 32) Me.btn_grabar.TabIndex = 285 Me.btn_grabar.Text = "&Grabar" Me.btn_grabar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_modificar ' Me.btn_modificar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_modificar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
167
168 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_modificar.ForeColor = System.Drawing.Color.Transparent Me.btn_modificar.Location = New System.Drawing.Point(176, 280) Me.btn_modificar.Name = "btn_modificar" Me.btn_modificar.Size = New System.Drawing.Size(72, 32) Me.btn_modificar.TabIndex = 284 Me.btn_modificar.Text = "&Modificar" Me.btn_modificar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_nuevo ' Me.btn_nuevo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_nuevo.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_nuevo.ForeColor = System.Drawing.Color.Transparent Me.btn_nuevo.Location = New System.Drawing.Point(104, 280) Me.btn_nuevo.Name = "btn_nuevo" Me.btn_nuevo.Size = New System.Drawing.Size(72, 32) Me.btn_nuevo.TabIndex = 283 Me.btn_nuevo.Text = "&Nuevo" Me.btn_nuevo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'txt_cod_asig ' Me.txt_cod_asig.Location = New System.Drawing.Point(136, 90) Me.txt_cod_asig.Name = "txt_cod_asig" Me.txt_cod_asig.Size = New System.Drawing.Size(120, 20) Me.txt_cod_asig.TabIndex = 294 Me.txt_cod_asig.Text = "" ' 'txt_nom_asig ' Me.txt_nom_asig.Location = New System.Drawing.Point(312, 90) Me.txt_nom_asig.Name = "txt_nom_asig" Me.txt_nom_asig.Size = New System.Drawing.Size(200, 20) Me.txt_nom_asig.TabIndex = 295 Me.txt_nom_asig.Text = "" ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.ForeColor = System.Drawing.Color.Transparent Me.btn_salir.Location = New System.Drawing.Point(464, 280) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(72, 32) Me.btn_salir.TabIndex = 296 Me.btn_salir.Text = "&Salir" Me.btn_salir.TextAlign = System.Drawing.ContentAlignment.MiddleLeft '
168
169 SOFBATEC 1.0DERECHOS RESERVADOS
'frm_asignaturas ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(624, 367) Me.Controls.Add(Me.btn_salir) Me.Controls.Add(Me.txt_nom_asig) Me.Controls.Add(Me.txt_cod_asig) Me.Controls.Add(Me.lblposicion) Me.Controls.Add(Me.btn_ultimo) Me.Controls.Add(Me.btn_siguiente) Me.Controls.Add(Me.btn_anterior) Me.Controls.Add(Me.btn_primero) Me.Controls.Add(Me.btn_cancelar) Me.Controls.Add(Me.btn_eliminar) Me.Controls.Add(Me.btn_grabar) Me.Controls.Add(Me.btn_modificar) Me.Controls.Add(Me.btn_nuevo) Me.Controls.Add(Me.dtg_consulta) Me.Controls.Add(Me.lbl_cod_asignatura) Me.Controls.Add(Me.lbl_asignatura) Me.Controls.Add(Me.Label1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_asignaturas" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Registro de asignaturas - SOFTBATEC" CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
Private Sub ENLACES() If Me.txt_cod_asig.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_ASIGNATURA.CODIGO DE LA ASIGNATURA") Me.txt_cod_asig.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_ASIGNATURA.ASIGNATURA") Me.txt_nom_asig.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_ASIGNATURA")
169
170 SOFBATEC 1.0DERECHOS RESERVADOS
End If End Sub
Private Sub CARGARIMAGENES() Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.btn_eliminar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.btn_eliminar.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.btn_cancelar.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight End Sub
Private Sub LIMPIAROBJETOS() Me.txt_cod_asig.Clear() Me.txt_nom_asig.Clear() End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.txt_cod_asig.ReadOnly = True Me.txt_nom_asig.ReadOnly = True
Else Me.txt_cod_asig.ReadOnly = False Me.txt_nom_asig.ReadOnly = False
End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte)
170
171 SOFBATEC 1.0DERECHOS RESERVADOS
If SWOPERACION = 0 Then Me.btn_nuevo.Enabled = True Me.btn_modificar.Enabled = True Me.btn_grabar.Enabled = False Me.btn_cancelar.Enabled = False Me.btn_primero.Enabled = True Me.btn_anterior.Enabled = True Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.btn_eliminar.Enabled = True Me.btn_salir.Enabled = True
Else Me.btn_nuevo.Enabled = False Me.btn_modificar.Enabled = False Me.btn_grabar.Enabled = True Me.btn_cancelar.Enabled = True Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_eliminar.Enabled = False Me.btn_salir.Enabled = False End If End Sub
Private Function Validar() As Boolean
If Me.txt_cod_asig.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO DE LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod_asig.Focus() Validar = False Exit Function End If
If Me.txt_nom_asig.Text.Length = 0 Then MessageBox.Show("DIGITE EL NOMBRE DE LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_nom_asig.Focus() Validar = False Exit Function End If
Validar = True End Function
171
172 SOFBATEC 1.0DERECHOS RESERVADOS
#End Region
Private Sub frm_asignaturas_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL As String Me.Cursor = System.Windows.Forms.Cursors.Default Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "select A.fld_cod_asignatura AS [CODIGO DE LA ASIGNATURA],A.fld_asignaturas AS ASIGNATURA" SQL = SQL & " from tbl_ASIGNATURAS A" SQL = SQL & " order by A.fld_cod_asignatura" CMDselect.CommandText = SQL DA_ASIGNATURA.SelectCommand = CMDselect DA_ASIGNATURA.Fill(DS_Datos, "TBL_ASIGNATURA")
CONEXION.Close()
Me.dtg_consulta.DataSource = DS_Datos.Tables("tbl_asignatura") Me.dtg_consulta.CaptionText = "REGISTRO DE ASIGNATURAS"
Me.btn_nuevo.Focus() Me.lblposicion.Text = "Registro de descripcion de logros"
Call LIMPIAROBJETOS() Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_nuevo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nuevo.Click Try Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.txt_cod_asig.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1)
Catch excepcion As Exception If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
172
173 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub btn_modificar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_modificar.Click Me.txt_cod_asig.ReadOnly = True Me.txt_nom_asig.ReadOnly = False
Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub btn_cancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_cancelar.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 Call ENLACES() End Sub
Private Sub btn_grabar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_grabar.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1 As String Try CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO tbl_asignaturas(fld_cod_asignatura,fld_asignaturas)VALUES(" SQL = SQL & "'" & Me.txt_cod_asig.Text & "'" SQL = SQL & ",'" & Me.txt_nom_asig.Text & "')"
CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CIUDADES.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else SQL = "UPDATE TBL_ASIGNATURAS SET " SQL = SQL & "fld_asignaturas='" & Me.txt_nom_asig.Text & "'" SQL = SQL & " WHERE fld_cod_asignatura='" & Me.txt_cod_asig.Text & "'"
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CIUDADES.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If
SQL1 = "select A.fld_cod_asignatura AS [CODIGO DE LA ASIGNATURA],A.fld_asignaturas AS ASIGNATURA"
173
174 SOFBATEC 1.0DERECHOS RESERVADOS
SQL1 = SQL1 & " from tbl_ASIGNATURAS A" SQL1 = SQL1 & " order by A.fld_cod_asignatura" CMDselect.CommandText = SQL1 DS_Datos.Tables("tbl_asignatura").Clear() DA_ASIGNATURA.SelectCommand = CMDselect DA_ASIGNATURA.Fill(DS_Datos, "TBL_ASIGNATURA") CONEXION.Close() Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_eliminar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_eliminar.Click Dim SQL As String If Me.txt_cod_asig.Text.Length = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE FROM TBL_asignaturas WHERE fld_cod_asignatura='" & Me.txt_cod_asig.Text & "'" CMDBorrar.Connection = CONEXION DA_DESCRIPCION_LOGRO.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "select A.fld_cod_asignatura AS [CODIGO DE LA ASIGNATURA],A.fld_asignaturas AS ASIGNATURA" SQL = SQL & " from tbl_ASIGNATURAS A" SQL = SQL & " order by A.fld_cod_asignatura" CMDselect.CommandText = SQL DS_Datos.Tables("tbl_asignatura").Clear() DA_ASIGNATURA.SelectCommand = CMDselect DA_ASIGNATURA.Fill(DS_Datos, "TBL_ASIGNATURA") CONEXION.Close() MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch EXCEPCION As Exception
174
175 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub btn_primero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_primero.Click Try Call ENLACES() EnlaceBASE.Position = 0 Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_anterior_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_anterior.Click Try Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False End If Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_siguiente_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_siguiente.Click Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.btn_siguiente.Enabled = False
175
176 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_ultimo.Enabled = False End If Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_ultimo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ultimo.Click Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub frm_asignaturas_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing DS_Datos.Tables("TBL_ASIGNATURA").Clear() End Sub
Private Sub txt_cod_asig_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cod_asig.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cod_asig_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cod_asig.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub btn_salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_salir.Click Me.Close()
176
177 SOFBATEC 1.0DERECHOS RESERVADOS
End SubEnd Class
Codigo registro para la descripción de los logros
Public Class frm_descripcion_logros Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then
177
178 SOFBATEC 1.0DERECHOS RESERVADOS
components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lbl_grado As System.Windows.Forms.Label Friend WithEvents lbl_descp_logro As System.Windows.Forms.Label Friend WithEvents lbl_asignatura As System.Windows.Forms.Label Friend WithEvents lbl_cod_logro As System.Windows.Forms.Label Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_ultimo As System.Windows.Forms.Button Friend WithEvents btn_siguiente As System.Windows.Forms.Button Friend WithEvents btn_anterior As System.Windows.Forms.Button Friend WithEvents btn_primero As System.Windows.Forms.Button Friend WithEvents btn_cancelar As System.Windows.Forms.Button Friend WithEvents btn_eliminar As System.Windows.Forms.Button Friend WithEvents btn_grabar As System.Windows.Forms.Button Friend WithEvents btn_modificar As System.Windows.Forms.Button Friend WithEvents btn_nuevo As System.Windows.Forms.Button Friend WithEvents dtg_consulta As System.Windows.Forms.DataGrid Friend WithEvents cmb_grado As System.Windows.Forms.ComboBox Friend WithEvents cmb_asignatura As System.Windows.Forms.ComboBox Friend WithEvents txt_cod_logro As System.Windows.Forms.TextBox Friend WithEvents txt_descrip_logro As System.Windows.Forms.TextBox Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label Me.lbl_grado = New System.Windows.Forms.Label Me.lbl_descp_logro = New System.Windows.Forms.Label Me.lbl_asignatura = New System.Windows.Forms.Label Me.lbl_cod_logro = New System.Windows.Forms.Label Me.lblposicion = New System.Windows.Forms.Label Me.btn_ultimo = New System.Windows.Forms.Button Me.btn_siguiente = New System.Windows.Forms.Button Me.btn_anterior = New System.Windows.Forms.Button Me.btn_primero = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button Me.btn_cancelar = New System.Windows.Forms.Button Me.btn_eliminar = New System.Windows.Forms.Button Me.btn_grabar = New System.Windows.Forms.Button Me.btn_modificar = New System.Windows.Forms.Button Me.btn_nuevo = New System.Windows.Forms.Button
178
179 SOFBATEC 1.0DERECHOS RESERVADOS
Me.dtg_consulta = New System.Windows.Forms.DataGrid Me.cmb_grado = New System.Windows.Forms.ComboBox Me.cmb_asignatura = New System.Windows.Forms.ComboBox Me.txt_cod_logro = New System.Windows.Forms.TextBox Me.txt_descrip_logro = New System.Windows.Forms.TextBox CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(8, 14) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(600, 28) Me.Label1.TabIndex = 79 Me.Label1.Text = "REGISTRO PARA LA DESCRIPCION DE LOS LOGROS" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'lbl_grado ' Me.lbl_grado.AutoSize = True Me.lbl_grado.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_grado.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_grado.ForeColor = System.Drawing.Color.Blue Me.lbl_grado.Location = New System.Drawing.Point(32, 64) Me.lbl_grado.Name = "lbl_grado" Me.lbl_grado.Size = New System.Drawing.Size(48, 19) Me.lbl_grado.TabIndex = 85 Me.lbl_grado.Text = "GRADO" ' 'lbl_descp_logro ' Me.lbl_descp_logro.AutoSize = True Me.lbl_descp_logro.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_descp_logro.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_descp_logro.ForeColor = System.Drawing.Color.Blue Me.lbl_descp_logro.Location = New System.Drawing.Point(360, 104) Me.lbl_descp_logro.Name = "lbl_descp_logro" Me.lbl_descp_logro.Size = New System.Drawing.Size(154, 19) Me.lbl_descp_logro.TabIndex = 83 Me.lbl_descp_logro.Text = "DESCRIPCION DEL LOGRO" ' 'lbl_asignatura '
179
180 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lbl_asignatura.AutoSize = True Me.lbl_asignatura.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_asignatura.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_asignatura.ForeColor = System.Drawing.Color.Blue Me.lbl_asignatura.Location = New System.Drawing.Point(280, 64) Me.lbl_asignatura.Name = "lbl_asignatura" Me.lbl_asignatura.Size = New System.Drawing.Size(80, 19) Me.lbl_asignatura.TabIndex = 86 Me.lbl_asignatura.Text = "ASIGNATURA" ' 'lbl_cod_logro ' Me.lbl_cod_logro.AutoSize = True Me.lbl_cod_logro.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_cod_logro.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_cod_logro.ForeColor = System.Drawing.Color.Blue Me.lbl_cod_logro.Location = New System.Drawing.Point(24, 112) Me.lbl_cod_logro.Name = "lbl_cod_logro" Me.lbl_cod_logro.Size = New System.Drawing.Size(121, 19) Me.lbl_cod_logro.TabIndex = 88 Me.lbl_cod_logro.Text = "CODIGO DEL LOGRO" ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.Blue Me.lblposicion.Location = New System.Drawing.Point(264, 408) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(80, 33) Me.lblposicion.TabIndex = 262 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btn_ultimo ' Me.btn_ultimo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_ultimo.Location = New System.Drawing.Point(392, 408) Me.btn_ultimo.Name = "btn_ultimo" Me.btn_ultimo.Size = New System.Drawing.Size(48, 33) Me.btn_ultimo.TabIndex = 261 ' 'btn_siguiente ' Me.btn_siguiente.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_siguiente.Location = New System.Drawing.Point(344, 408) Me.btn_siguiente.Name = "btn_siguiente" Me.btn_siguiente.Size = New System.Drawing.Size(48, 33) Me.btn_siguiente.TabIndex = 260
180
181 SOFBATEC 1.0DERECHOS RESERVADOS
' 'btn_anterior ' Me.btn_anterior.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_anterior.Location = New System.Drawing.Point(216, 408) Me.btn_anterior.Name = "btn_anterior" Me.btn_anterior.Size = New System.Drawing.Size(48, 33) Me.btn_anterior.TabIndex = 259 ' 'btn_primero ' Me.btn_primero.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_primero.Location = New System.Drawing.Point(168, 408) Me.btn_primero.Name = "btn_primero" Me.btn_primero.Size = New System.Drawing.Size(48, 33) Me.btn_primero.TabIndex = 258 ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.ForeColor = System.Drawing.Color.Transparent Me.btn_salir.Location = New System.Drawing.Point(448, 376) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(72, 32) Me.btn_salir.TabIndex = 257 Me.btn_salir.Text = "&Salir" Me.btn_salir.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_cancelar ' Me.btn_cancelar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_cancelar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_cancelar.ForeColor = System.Drawing.Color.Transparent Me.btn_cancelar.Location = New System.Drawing.Point(376, 376) Me.btn_cancelar.Name = "btn_cancelar" Me.btn_cancelar.Size = New System.Drawing.Size(72, 32) Me.btn_cancelar.TabIndex = 256 Me.btn_cancelar.Text = "&Cancelar" Me.btn_cancelar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_eliminar ' Me.btn_eliminar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_eliminar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_eliminar.ForeColor = System.Drawing.Color.Transparent Me.btn_eliminar.Location = New System.Drawing.Point(304, 376)
181
182 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_eliminar.Name = "btn_eliminar" Me.btn_eliminar.Size = New System.Drawing.Size(72, 32) Me.btn_eliminar.TabIndex = 255 Me.btn_eliminar.Text = "&Eliminiar" Me.btn_eliminar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_grabar ' Me.btn_grabar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_grabar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_grabar.ForeColor = System.Drawing.Color.Transparent Me.btn_grabar.Location = New System.Drawing.Point(232, 376) Me.btn_grabar.Name = "btn_grabar" Me.btn_grabar.Size = New System.Drawing.Size(72, 32) Me.btn_grabar.TabIndex = 254 Me.btn_grabar.Text = "&Grabar" Me.btn_grabar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_modificar ' Me.btn_modificar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_modificar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_modificar.ForeColor = System.Drawing.Color.Transparent Me.btn_modificar.Location = New System.Drawing.Point(160, 376) Me.btn_modificar.Name = "btn_modificar" Me.btn_modificar.Size = New System.Drawing.Size(72, 32) Me.btn_modificar.TabIndex = 253 Me.btn_modificar.Text = "&Modificar" Me.btn_modificar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_nuevo ' Me.btn_nuevo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_nuevo.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_nuevo.ForeColor = System.Drawing.Color.Transparent Me.btn_nuevo.Location = New System.Drawing.Point(88, 376) Me.btn_nuevo.Name = "btn_nuevo" Me.btn_nuevo.Size = New System.Drawing.Size(72, 32) Me.btn_nuevo.TabIndex = 252 Me.btn_nuevo.Text = "&Nuevo" Me.btn_nuevo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'dtg_consulta ' Me.dtg_consulta.DataMember = "" Me.dtg_consulta.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.dtg_consulta.Location = New System.Drawing.Point(16, 192)
182
183 SOFBATEC 1.0DERECHOS RESERVADOS
Me.dtg_consulta.Name = "dtg_consulta" Me.dtg_consulta.Size = New System.Drawing.Size(584, 176) Me.dtg_consulta.TabIndex = 263 ' 'cmb_grado ' Me.cmb_grado.Location = New System.Drawing.Point(80, 62) Me.cmb_grado.Name = "cmb_grado" Me.cmb_grado.Size = New System.Drawing.Size(88, 21) Me.cmb_grado.TabIndex = 264 ' 'cmb_asignatura ' Me.cmb_asignatura.Location = New System.Drawing.Point(360, 62) Me.cmb_asignatura.Name = "cmb_asignatura" Me.cmb_asignatura.Size = New System.Drawing.Size(232, 21) Me.cmb_asignatura.TabIndex = 266 ' 'txt_cod_logro ' Me.txt_cod_logro.Location = New System.Drawing.Point(72, 132) Me.txt_cod_logro.Name = "txt_cod_logro" Me.txt_cod_logro.TabIndex = 267 Me.txt_cod_logro.Text = "" ' 'txt_descrip_logro ' Me.txt_descrip_logro.Location = New System.Drawing.Point(296, 125) Me.txt_descrip_logro.MaxLength = 255 Me.txt_descrip_logro.Multiline = True Me.txt_descrip_logro.Name = "txt_descrip_logro" Me.txt_descrip_logro.Size = New System.Drawing.Size(280, 47) Me.txt_descrip_logro.TabIndex = 268 Me.txt_descrip_logro.Text = "" ' 'frm_descripcion_logros ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(616, 453) Me.Controls.Add(Me.txt_descrip_logro) Me.Controls.Add(Me.txt_cod_logro) Me.Controls.Add(Me.cmb_asignatura) Me.Controls.Add(Me.cmb_grado) Me.Controls.Add(Me.dtg_consulta) Me.Controls.Add(Me.lblposicion) Me.Controls.Add(Me.btn_ultimo) Me.Controls.Add(Me.btn_siguiente) Me.Controls.Add(Me.btn_anterior) Me.Controls.Add(Me.btn_primero)
183
184 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Controls.Add(Me.btn_salir) Me.Controls.Add(Me.btn_cancelar) Me.Controls.Add(Me.btn_eliminar) Me.Controls.Add(Me.btn_grabar) Me.Controls.Add(Me.btn_modificar) Me.Controls.Add(Me.btn_nuevo) Me.Controls.Add(Me.lbl_cod_logro) Me.Controls.Add(Me.lbl_asignatura) Me.Controls.Add(Me.lbl_grado) Me.Controls.Add(Me.lbl_descp_logro) Me.Controls.Add(Me.Label1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_descripcion_logros" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Registro para la descripcion de los logros - SOFTBATEC" CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
Private Sub ENLACES() If Me.cmb_grado.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_LOGROS.GRADO") Me.cmb_grado.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("SELECTEDVALUE", DS_Datos, "TBL_LOGROS.ASIGNATURA") Me.cmb_asignatura.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_LOGROS.CODIGO DEL LOGRO") Me.txt_cod_logro.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_LOGROS.DESCRIPCION DEL LOGRO") Me.txt_descrip_logro.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_LOGROS")
End If End Sub
Private Sub CARGARIMAGENES()
184
185 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.btn_eliminar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.btn_eliminar.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.btn_cancelar.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight End Sub
Private Sub LIMPIAROBJETOS() Me.txt_descrip_logro.Clear() Me.txt_cod_logro.Clear() Me.cmb_grado.Text = "" Me.cmb_asignatura.Text = "" End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.txt_descrip_logro.ReadOnly = True Me.txt_cod_logro.ReadOnly = True Me.cmb_grado.Enabled = False Me.cmb_asignatura.Enabled = False
Else Me.txt_descrip_logro.ReadOnly = False Me.txt_cod_logro.ReadOnly = False Me.cmb_grado.Enabled = True Me.cmb_asignatura.Enabled = True End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte)
185
186 SOFBATEC 1.0DERECHOS RESERVADOS
If SWOPERACION = 0 Then Me.btn_nuevo.Enabled = True Me.btn_modificar.Enabled = True Me.btn_grabar.Enabled = False Me.btn_cancelar.Enabled = False Me.btn_primero.Enabled = True Me.btn_anterior.Enabled = True Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.btn_eliminar.Enabled = True Me.btn_salir.Enabled = True
Else Me.btn_nuevo.Enabled = False Me.btn_modificar.Enabled = False Me.btn_grabar.Enabled = True Me.btn_cancelar.Enabled = True Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_eliminar.Enabled = False Me.btn_salir.Enabled = False
End If End Sub
Private Function Validar() As Boolean
If Me.txt_descrip_logro.Text.Length = 0 Then MessageBox.Show("DIGITE LA DESCRIPCION DEL LOGRO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_descrip_logro.Focus() Validar = False Exit Function End If
If Me.txt_cod_logro.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO DEL LOGRO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod_logro.Focus() Validar = False Exit Function End If
If Me.cmb_grado.Text.Length = 0 Then MessageBox.Show("ESCOGA EL GRADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
186
187 SOFBATEC 1.0DERECHOS RESERVADOS
Me.cmb_grado.Focus() Validar = False Exit Function End If
If Me.cmb_asignatura.Text.Length = 0 Then MessageBox.Show("ESCOGA LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.cmb_asignatura.Focus() Validar = False Exit Function End If
Validar = True End Function#End Region
Private Sub frm_descripcion_logros_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL, SQL2 As String Me.Cursor = System.Windows.Forms.Cursors.Default Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "select A.fld_codigologro AS [CODIGO DEL LOGRO],A.fld_descripcion_logro AS [DESCRIPCION DEL LOGRO],A.fld_asignatura AS ASIGNATURA,A.fld_grado AS GRADO" SQL = SQL & " from tbl_descripcion_logro A" SQL = SQL & " order by A.fld_codigologro" CMDselect.CommandText = SQL DA_DESCRIPCION_LOGRO.SelectCommand = CMDselect DA_DESCRIPCION_LOGRO.Fill(DS_Datos, "TBL_LOGROS")
SQL2 = "select A.fld_asignaturas AS ASIGNATURA" SQL2 = SQL2 & " from tbl_asignaturas A" SQL2 = SQL2 & " order by A.fld_asignaturas" CMDselect.CommandText = SQL2 DA_ASIGNATURA.SelectCommand = CMDselect DA_ASIGNATURA.Fill(DS_Datos, "TBL_ASIG")
CONEXION.Close()
Me.btn_nuevo.Focus() Me.dtg_consulta.CaptionText = "REGISTRO DE LOGROS" Me.dtg_consulta.DataSource = DS_Datos.Tables("TBL_LOGROS")
187
188 SOFBATEC 1.0DERECHOS RESERVADOS
Me.cmb_grado.Items.Add("6ºA") Me.cmb_grado.Items.Add("6ºB") Me.cmb_grado.Items.Add("6ºC") Me.cmb_grado.Items.Add("6ºD") Me.cmb_grado.Items.Add("7ºA") Me.cmb_grado.Items.Add("7ºB") Me.cmb_grado.Items.Add("7ºC") Me.cmb_grado.Items.Add("7ºD") Me.cmb_grado.Items.Add("8ºA") Me.cmb_grado.Items.Add("8ºB") Me.cmb_grado.Items.Add("8ºC") Me.cmb_grado.Items.Add("8ºD") Me.cmb_grado.Items.Add("9ºA") Me.cmb_grado.Items.Add("9ºB") Me.cmb_grado.Items.Add("9ºC") Me.cmb_grado.Items.Add("9ºD") Me.cmb_grado.Items.Add("10ºA") Me.cmb_grado.Items.Add("10ºB") Me.cmb_grado.Items.Add("10ºC") Me.cmb_grado.Items.Add("10ºD") Me.cmb_grado.Items.Add("11ºA") Me.cmb_grado.Items.Add("11ºB") Me.cmb_grado.Items.Add("11ºC") Me.cmb_grado.Items.Add("11ºD")
Me.cmb_asignatura.DataSource = DS_Datos.Tables("TBL_ASIG") Me.cmb_asignatura.ValueMember = DS_Datos.Tables("TBL_ASIG").Columns(0).ToString Me.cmb_asignatura.DisplayMember = DS_Datos.Tables("TBL_ASIG").Columns(0).ToString
Me.lblposicion.Text = "Registro de descripcion de logros"
Call LIMPIAROBJETOS() Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_nuevo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nuevo.Click Try Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.cmb_grado.Focus()
188
189 SOFBATEC 1.0DERECHOS RESERVADOS
SWGrabar = 0 Call BLOQUEARBOTONES(1)
Catch excepcion As Exception If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_modificar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_modificar.Click Me.txt_cod_logro.ReadOnly = True Me.txt_descrip_logro.ReadOnly = False Me.cmb_grado.Enabled = False Me.cmb_asignatura.Enabled = True Me.cmb_asignatura.Focus()
Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub btn_cancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_cancelar.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 Call ENLACES() End Sub
Private Sub btn_grabar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_grabar.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1 As String Try CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO tbl_descripcion_logro(fld_grado,fld_asignatura,fld_codigologro,fld_descripcion_logro)VALUES(" SQL = SQL & "'" & Me.cmb_grado.Text & "'" SQL = SQL & ",'" & Me.cmb_asignatura.SelectedValue & "'" SQL = SQL & ",'" & Me.txt_cod_logro.Text & "'" SQL = SQL & ",'" & Me.txt_descrip_logro.Text & "')" CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CIUDADES.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else SQL = "UPDATE tbl_descripcion_logro SET " SQL = SQL & "fld_grado='" & Me.cmb_grado.Text & "'"
189
190 SOFBATEC 1.0DERECHOS RESERVADOS
SQL = SQL & ",fld_asignatura='" & Me.cmb_asignatura.SelectedValue & "'" SQL = SQL & ",fld_descripcion_logro='" & Me.txt_descrip_logro.Text & "'" SQL = SQL & " WHERE fld_codigologro='" & Me.txt_cod_logro.Text & "'"
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CIUDADES.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If
SQL1 = "select A.fld_codigologro AS [CODIGO DEL LOGRO],A.fld_descripcion_logro AS [DESCRIPCION DEL LOGRO],A.fld_asignatura AS ASIGNATURA,A.fld_grado AS GRADO" SQL1 = SQL1 & " from tbl_descripcion_logro A" SQL1 = SQL1 & " order by A.fld_codigologro" CMDselect.CommandText = SQL1 DS_Datos.Tables("tbl_logros").Clear() DA_DESCRIPCION_LOGRO.SelectCommand = CMDselect DA_DESCRIPCION_LOGRO.Fill(DS_Datos, "TBL_LOGROS") CONEXION.Close() Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_eliminar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_eliminar.Click Dim SQL As String If Me.cmb_grado.Text.Length = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE FROM tbl_descripcion_logro WHERE fld_codigologro='" & Me.txt_cod_logro.Text & "'" CMDBorrar.Connection = CONEXION DA_DESCRIPCION_LOGRO.DeleteCommand = CMDBorrar
190
191 SOFBATEC 1.0DERECHOS RESERVADOS
CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "select A.fld_codigologro AS [CODIGO DEL LOGRO],A.fld_descripcion_logro AS [DESCRIPCION DEL LOGRO],A.fld_asignatura AS ASIGNATURA,A.fld_grado AS GRADO" SQL = SQL & " from tbl_descripcion_logro A" SQL = SQL & " order by A.fld_codigologro" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_LOGROS").Clear() DA_DESCRIPCION_LOGRO.SelectCommand = CMDselect DA_DESCRIPCION_LOGRO.Fill(DS_Datos, "TBL_LOGROS") CONEXION.Close() MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub btn_primero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_primero.Click Try Call ENLACES() EnlaceBASE.Position = 0 Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_siguiente_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_siguiente.Click Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False End If
191
192 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_ultimo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ultimo.Click Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_anterior_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_anterior.Click Try Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False End If Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
192
193 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub frm_descripcion_logros_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing DS_Datos.Tables("TBL_LOGROS").Clear() DS_Datos.Tables("tbl_asig").Clear() End Sub
Private Sub txt_cod_logro_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cod_logro.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cod_logro_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cod_logro.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub cmb_asignatura_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_asignatura.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub cmb_asignatura_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_asignatura.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub cmb_grado_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_grado.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub cmb_grado_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_grado.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub txt_descrip_logro_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_descrip_logro.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_descrip_logro_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_descrip_logro.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii
193
194 SOFBATEC 1.0DERECHOS RESERVADOS
Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub btn_salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_salir.Click Me.Close() End SubEnd Class
Codigo registro de docentes
Public Class frm_docentes Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
194
195 SOFBATEC 1.0DERECHOS RESERVADOS
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_ultimo As System.Windows.Forms.Button Friend WithEvents btn_siguiente As System.Windows.Forms.Button Friend WithEvents btn_anterior As System.Windows.Forms.Button Friend WithEvents btn_primero As System.Windows.Forms.Button Friend WithEvents btn_cancelar As System.Windows.Forms.Button Friend WithEvents btn_eliminar As System.Windows.Forms.Button Friend WithEvents btn_grabar As System.Windows.Forms.Button Friend WithEvents btn_modificar As System.Windows.Forms.Button Friend WithEvents btn_nuevo As System.Windows.Forms.Button Friend WithEvents lbl_ape_docente As System.Windows.Forms.Label Friend WithEvents lbl_nom_docente As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents lbl_id_docente As System.Windows.Forms.Label Friend WithEvents DTG_CONSULTA As System.Windows.Forms.DataGrid Friend WithEvents txt_id_docente As System.Windows.Forms.TextBox Friend WithEvents txt_ape_docente As System.Windows.Forms.TextBox Friend WithEvents txt_nom_docente As System.Windows.Forms.TextBox Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.lblposicion = New System.Windows.Forms.Label Me.btn_ultimo = New System.Windows.Forms.Button Me.btn_siguiente = New System.Windows.Forms.Button Me.btn_anterior = New System.Windows.Forms.Button Me.btn_primero = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button Me.btn_cancelar = New System.Windows.Forms.Button Me.btn_eliminar = New System.Windows.Forms.Button Me.btn_grabar = New System.Windows.Forms.Button Me.btn_modificar = New System.Windows.Forms.Button
195
196 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_nuevo = New System.Windows.Forms.Button Me.lbl_ape_docente = New System.Windows.Forms.Label Me.lbl_nom_docente = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.lbl_id_docente = New System.Windows.Forms.Label Me.DTG_CONSULTA = New System.Windows.Forms.DataGrid Me.txt_id_docente = New System.Windows.Forms.TextBox Me.txt_ape_docente = New System.Windows.Forms.TextBox Me.txt_nom_docente = New System.Windows.Forms.TextBox CType(Me.DTG_CONSULTA, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.Blue Me.lblposicion.Location = New System.Drawing.Point(280, 368) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(80, 32) Me.lblposicion.TabIndex = 282 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btn_ultimo ' Me.btn_ultimo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_ultimo.Location = New System.Drawing.Point(408, 368) Me.btn_ultimo.Name = "btn_ultimo" Me.btn_ultimo.Size = New System.Drawing.Size(48, 32) Me.btn_ultimo.TabIndex = 281 ' 'btn_siguiente ' Me.btn_siguiente.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_siguiente.Location = New System.Drawing.Point(360, 368) Me.btn_siguiente.Name = "btn_siguiente" Me.btn_siguiente.Size = New System.Drawing.Size(48, 32) Me.btn_siguiente.TabIndex = 280 ' 'btn_anterior ' Me.btn_anterior.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_anterior.Location = New System.Drawing.Point(232, 368) Me.btn_anterior.Name = "btn_anterior" Me.btn_anterior.Size = New System.Drawing.Size(48, 32) Me.btn_anterior.TabIndex = 279 '
196
197 SOFBATEC 1.0DERECHOS RESERVADOS
'btn_primero ' Me.btn_primero.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_primero.Location = New System.Drawing.Point(184, 368) Me.btn_primero.Name = "btn_primero" Me.btn_primero.Size = New System.Drawing.Size(48, 32) Me.btn_primero.TabIndex = 278 ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.ForeColor = System.Drawing.Color.Transparent Me.btn_salir.Location = New System.Drawing.Point(464, 328) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(72, 32) Me.btn_salir.TabIndex = 277 Me.btn_salir.Text = "&Salir" Me.btn_salir.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_cancelar ' Me.btn_cancelar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_cancelar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_cancelar.ForeColor = System.Drawing.Color.Transparent Me.btn_cancelar.Location = New System.Drawing.Point(392, 328) Me.btn_cancelar.Name = "btn_cancelar" Me.btn_cancelar.Size = New System.Drawing.Size(72, 32) Me.btn_cancelar.TabIndex = 276 Me.btn_cancelar.Text = "&Cancelar" Me.btn_cancelar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_eliminar ' Me.btn_eliminar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_eliminar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_eliminar.ForeColor = System.Drawing.Color.Transparent Me.btn_eliminar.Location = New System.Drawing.Point(320, 328) Me.btn_eliminar.Name = "btn_eliminar" Me.btn_eliminar.Size = New System.Drawing.Size(72, 32) Me.btn_eliminar.TabIndex = 275 Me.btn_eliminar.Text = "&Eliminiar" Me.btn_eliminar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_grabar ' Me.btn_grabar.BackColor = System.Drawing.Color.LightSkyBlue
197
198 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_grabar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_grabar.ForeColor = System.Drawing.Color.Transparent Me.btn_grabar.Location = New System.Drawing.Point(248, 328) Me.btn_grabar.Name = "btn_grabar" Me.btn_grabar.Size = New System.Drawing.Size(72, 32) Me.btn_grabar.TabIndex = 274 Me.btn_grabar.Text = "&Grabar" Me.btn_grabar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_modificar ' Me.btn_modificar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_modificar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_modificar.ForeColor = System.Drawing.Color.Transparent Me.btn_modificar.Location = New System.Drawing.Point(176, 328) Me.btn_modificar.Name = "btn_modificar" Me.btn_modificar.Size = New System.Drawing.Size(72, 32) Me.btn_modificar.TabIndex = 273 Me.btn_modificar.Text = "&Modificar" Me.btn_modificar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_nuevo ' Me.btn_nuevo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_nuevo.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_nuevo.ForeColor = System.Drawing.Color.Transparent Me.btn_nuevo.Location = New System.Drawing.Point(104, 328) Me.btn_nuevo.Name = "btn_nuevo" Me.btn_nuevo.Size = New System.Drawing.Size(72, 32) Me.btn_nuevo.TabIndex = 272 Me.btn_nuevo.Text = "&Nuevo" Me.btn_nuevo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'lbl_ape_docente ' Me.lbl_ape_docente.AutoSize = True Me.lbl_ape_docente.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_ape_docente.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_ape_docente.ForeColor = System.Drawing.Color.Blue Me.lbl_ape_docente.Location = New System.Drawing.Point(96, 125) Me.lbl_ape_docente.Name = "lbl_ape_docente" Me.lbl_ape_docente.Size = New System.Drawing.Size(153, 19) Me.lbl_ape_docente.TabIndex = 269 Me.lbl_ape_docente.Text = "APELLIDOS DEL DOCENTE" ' 'lbl_nom_docente
198
199 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.lbl_nom_docente.AutoSize = True Me.lbl_nom_docente.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_nom_docente.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_nom_docente.ForeColor = System.Drawing.Color.Blue Me.lbl_nom_docente.Location = New System.Drawing.Point(392, 125) Me.lbl_nom_docente.Name = "lbl_nom_docente" Me.lbl_nom_docente.Size = New System.Drawing.Size(147, 19) Me.lbl_nom_docente.TabIndex = 264 Me.lbl_nom_docente.Text = "NOMBRES DEL DOCENTE" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(152, 21) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(344, 28) Me.Label1.TabIndex = 263 Me.Label1.Text = "REGISTRO DE DOCENTES" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'lbl_id_docente ' Me.lbl_id_docente.AutoSize = True Me.lbl_id_docente.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_id_docente.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_id_docente.ForeColor = System.Drawing.Color.Blue Me.lbl_id_docente.Location = New System.Drawing.Point(88, 69) Me.lbl_id_docente.Name = "lbl_id_docente" Me.lbl_id_docente.Size = New System.Drawing.Size(181, 19) Me.lbl_id_docente.TabIndex = 283 Me.lbl_id_docente.Text = "IDENTIFICACION DEL DOCENTE" ' 'DTG_CONSULTA ' Me.DTG_CONSULTA.DataMember = "" Me.DTG_CONSULTA.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.DTG_CONSULTA.Location = New System.Drawing.Point(8, 176) Me.DTG_CONSULTA.Name = "DTG_CONSULTA" Me.DTG_CONSULTA.Size = New System.Drawing.Size(632, 144) Me.DTG_CONSULTA.TabIndex = 285 '
199
200 SOFBATEC 1.0DERECHOS RESERVADOS
'txt_id_docente ' Me.txt_id_docente.Location = New System.Drawing.Point(96, 90) Me.txt_id_docente.MaxLength = 255 Me.txt_id_docente.Name = "txt_id_docente" Me.txt_id_docente.Size = New System.Drawing.Size(152, 20) Me.txt_id_docente.TabIndex = 286 Me.txt_id_docente.Text = "" ' 'txt_ape_docente ' Me.txt_ape_docente.Location = New System.Drawing.Point(56, 146) Me.txt_ape_docente.Name = "txt_ape_docente" Me.txt_ape_docente.Size = New System.Drawing.Size(216, 20) Me.txt_ape_docente.TabIndex = 287 Me.txt_ape_docente.Text = "" ' 'txt_nom_docente ' Me.txt_nom_docente.Location = New System.Drawing.Point(344, 146) Me.txt_nom_docente.MaxLength = 255 Me.txt_nom_docente.Name = "txt_nom_docente" Me.txt_nom_docente.Size = New System.Drawing.Size(232, 20) Me.txt_nom_docente.TabIndex = 288 Me.txt_nom_docente.Text = "" ' 'frm_docentes ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(650, 415) Me.Controls.Add(Me.txt_nom_docente) Me.Controls.Add(Me.txt_ape_docente) Me.Controls.Add(Me.txt_id_docente) Me.Controls.Add(Me.DTG_CONSULTA) Me.Controls.Add(Me.lbl_id_docente) Me.Controls.Add(Me.lblposicion) Me.Controls.Add(Me.btn_ultimo) Me.Controls.Add(Me.btn_siguiente) Me.Controls.Add(Me.btn_anterior) Me.Controls.Add(Me.btn_primero) Me.Controls.Add(Me.btn_salir) Me.Controls.Add(Me.btn_cancelar) Me.Controls.Add(Me.btn_eliminar) Me.Controls.Add(Me.btn_grabar) Me.Controls.Add(Me.btn_modificar) Me.Controls.Add(Me.btn_nuevo) Me.Controls.Add(Me.lbl_ape_docente) Me.Controls.Add(Me.lbl_nom_docente) Me.Controls.Add(Me.Label1)
200
201 SOFBATEC 1.0DERECHOS RESERVADOS
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_docentes" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Registro de docentes - SOFTBATEC" CType(Me.DTG_CONSULTA, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
Private Sub ENLACES() If Me.txt_id_docente.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_DOCENTES.ID DEL DOCENTE") Me.txt_id_docente.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_DOCENTES.APELLIDOS DEL DOCENTE") Me.txt_ape_docente.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_DOCENTES.NOMBRES DEL DOCENTE") Me.txt_nom_docente.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_DOCENTES")
End If End Sub
Private Sub CARGARIMAGENES() Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight
201
202 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.btn_eliminar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.btn_eliminar.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.btn_cancelar.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight End Sub
Private Sub LIMPIAROBJETOS() Me.txt_ape_docente.Clear() Me.txt_id_docente.Clear() Me.txt_nom_docente.Clear() End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.txt_ape_docente.ReadOnly = True Me.txt_id_docente.ReadOnly = True Me.txt_nom_docente.ReadOnly = True
Else Me.txt_ape_docente.ReadOnly = False Me.txt_id_docente.ReadOnly = False Me.txt_nom_docente.ReadOnly = False End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.btn_nuevo.Enabled = True Me.btn_modificar.Enabled = True Me.btn_grabar.Enabled = False Me.btn_cancelar.Enabled = False Me.btn_primero.Enabled = True Me.btn_anterior.Enabled = True Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.btn_eliminar.Enabled = True Me.btn_salir.Enabled = True
Else Me.btn_nuevo.Enabled = False Me.btn_modificar.Enabled = False
202
203 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_grabar.Enabled = True Me.btn_cancelar.Enabled = True Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_eliminar.Enabled = False Me.btn_salir.Enabled = False
End If End Sub
Private Function Validar() As Boolean
If Me.txt_id_docente.Text.Length = 0 Then MessageBox.Show("DIGITE LA IDENTIFICAION DEL DOCENTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_id_docente.Focus() Validar = False Exit Function End If
If Me.txt_ape_docente.Text.Length = 0 Then MessageBox.Show("DIGITE LOS APELLIDOS DEL DOCENTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ape_docente.Focus() Validar = False Exit Function End If
If Me.txt_nom_docente.Text.Length = 0 Then MessageBox.Show("DIGITE EL NOMBRE DEL DOCENTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_nom_docente.Focus() Validar = False Exit Function End If
Validar = True End Function#End Region
Private Sub frm_docentes_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim SQL As String
203
204 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Cursor = System.Windows.Forms.Cursors.Default Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "select A.fld_id_docente AS [ID DEL DOCENTE],A.fld_nom_docente AS [NOMBRES DEL DOCENTE],A.fld_apell_docente AS [APELLIDOS DEL DOCENTE]" SQL = SQL & " from tbl_docentes A" SQL = SQL & " order by A.fld_id_docente" CMDselect.CommandText = SQL DA_DOCENTES.SelectCommand = CMDselect DA_DOCENTES.Fill(DS_Datos, "TBL_DOCENTES")
CONEXION.Close() Me.DTG_CONSULTA.CaptionText = "REGISTRO DE DOCENTES" Me.DTG_CONSULTA.DataSource = DS_Datos.Tables("TBL_DOCENTES")
Me.btn_nuevo.Focus()
Me.lblposicion.Text = "Registro de descripcion de logros"
Call LIMPIAROBJETOS() Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_nuevo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nuevo.Click Try Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.txt_id_docente.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1)
Catch excepcion As Exception If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_modificar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_modificar.Click Me.txt_id_docente.ReadOnly = True
204
205 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_ape_docente.ReadOnly = False Me.txt_nom_docente.ReadOnly = False Me.txt_ape_docente.Focus()
Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub btn_cancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_cancelar.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 Call ENLACES() End Sub
Private Sub btn_grabar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_grabar.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1 As String Try CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO tbl_docentes(fld_id_docente,fld_apell_docente,fld_nom_docente)VALUES(" SQL = SQL & Me.txt_id_docente.Text & "" SQL = SQL & ",'" & Me.txt_ape_docente.Text & "'" SQL = SQL & ",'" & Me.txt_nom_docente.Text & "')"
CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CIUDADES.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else SQL = "UPDATE TBL_DOCENTES SET " SQL = SQL & "fld_apell_docente='" & Me.txt_ape_docente.Text & "'" SQL = SQL & ",fld_nom_docente='" & Me.txt_nom_docente.Text & "'" SQL = SQL & " WHERE fld_id_docente=" & Me.txt_id_docente.Text & ""
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CIUDADES.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If
SQL1 = "select A.fld_id_docente AS [ID DEL DOCENTE],A.fld_nom_docente AS [NOMBRES DEL DOCENTE],A.fld_apell_docente AS [APELLIDOS DEL DOCENTE]"
205
206 SOFBATEC 1.0DERECHOS RESERVADOS
SQL1 = SQL1 & " from tbl_docentes A" SQL1 = SQL1 & " order by A.fld_id_docente" CMDselect.CommandText = SQL1 DS_Datos.Tables("TBL_DOCENTES").Clear() DA_DOCENTES.SelectCommand = CMDselect DA_DOCENTES.Fill(DS_Datos, "TBL_DOCENTES") CONEXION.Close() Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_eliminar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_eliminar.Click Dim SQL As String If Me.txt_id_docente.Text.Length = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE FROM TBL_DOCENTES WHERE fld_id_docente=" & Me.txt_id_docente.Text & "" CMDBorrar.Connection = CONEXION DA_DESCRIPCION_LOGRO.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "select A.fld_id_docente AS [ID DEL DOCENTE],A.fld_nom_docente AS [NOMBRES DEL DOCENTE],A.fld_apell_docente AS [APELLIDOS DEL DOCENTE]" SQL = SQL & " from tbl_docentes A" SQL = SQL & " order by A.fld_id_docente" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_DOCENTES").Clear() DA_DOCENTES.SelectCommand = CMDselect DA_DOCENTES.Fill(DS_Datos, "TBL_DOCENTES") CONEXION.Close()
206
207 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub btn_primero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_primero.Click Try Call ENLACES() EnlaceBASE.Position = 0 Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_ultimo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ultimo.Click Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_anterior_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_anterior.Click Try
207
208 SOFBATEC 1.0DERECHOS RESERVADOS
Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False End If Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_siguiente_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_siguiente.Click Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False End If Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub frm_docentes_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing DS_Datos.Tables("TBL_DOCENTES").Clear() End Sub
Private Sub txt_id_docente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_id_docente.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_id_docente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_id_docente.KeyPress Dim keyascii As Short = Asc(e.KeyChar)
208
209 SOFBATEC 1.0DERECHOS RESERVADOS
Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_ape_docente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_ape_docente.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_ape_docente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_ape_docente.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_nom_docente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_nom_docente.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_nom_docente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_nom_docente.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub btn_salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_salir.Click Me.Close() End SubEnd Class
209
210 SOFBATEC 1.0DERECHOS RESERVADOS
Codigo registro de asignación de materias de docentes
Public Class frm_asignatura_docente Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose()
210
211 SOFBATEC 1.0DERECHOS RESERVADOS
End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents lbl_grado As System.Windows.Forms.Label Friend WithEvents lbl_id_docente As System.Windows.Forms.Label Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_ultimo As System.Windows.Forms.Button Friend WithEvents btn_siguiente As System.Windows.Forms.Button Friend WithEvents btn_anterior As System.Windows.Forms.Button Friend WithEvents btn_primero As System.Windows.Forms.Button Friend WithEvents btn_cancelar As System.Windows.Forms.Button Friend WithEvents btn_eliminar As System.Windows.Forms.Button Friend WithEvents btn_grabar As System.Windows.Forms.Button Friend WithEvents btn_modificar As System.Windows.Forms.Button Friend WithEvents btn_nuevo As System.Windows.Forms.Button Friend WithEvents txt_nom_docente As System.Windows.Forms.TextBox Friend WithEvents txt_ape_docente As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents dtg_consulta As System.Windows.Forms.DataGrid Friend WithEvents txt_id_docente As System.Windows.Forms.TextBox Friend WithEvents cmb_asignatura As System.Windows.Forms.ComboBox Friend WithEvents cmb_grado As System.Windows.Forms.ComboBox Friend WithEvents cmb_grupo_grado As System.Windows.Forms.ComboBox Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.lbl_grado = New System.Windows.Forms.Label Me.lbl_id_docente = New System.Windows.Forms.Label Me.lblposicion = New System.Windows.Forms.Label Me.btn_ultimo = New System.Windows.Forms.Button Me.btn_siguiente = New System.Windows.Forms.Button Me.btn_anterior = New System.Windows.Forms.Button Me.btn_primero = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button Me.btn_cancelar = New System.Windows.Forms.Button Me.btn_eliminar = New System.Windows.Forms.Button Me.btn_grabar = New System.Windows.Forms.Button Me.btn_modificar = New System.Windows.Forms.Button Me.btn_nuevo = New System.Windows.Forms.Button Me.txt_nom_docente = New System.Windows.Forms.TextBox Me.txt_ape_docente = New System.Windows.Forms.TextBox Me.Label1 = New System.Windows.Forms.Label
211
212 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Label2 = New System.Windows.Forms.Label Me.dtg_consulta = New System.Windows.Forms.DataGrid Me.txt_id_docente = New System.Windows.Forms.TextBox Me.cmb_asignatura = New System.Windows.Forms.ComboBox Me.cmb_grado = New System.Windows.Forms.ComboBox Me.cmb_grupo_grado = New System.Windows.Forms.ComboBox CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'lbl_grado ' Me.lbl_grado.AutoSize = True Me.lbl_grado.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_grado.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_grado.ForeColor = System.Drawing.Color.Blue Me.lbl_grado.Location = New System.Drawing.Point(312, 194) Me.lbl_grado.Name = "lbl_grado" Me.lbl_grado.Size = New System.Drawing.Size(48, 19) Me.lbl_grado.TabIndex = 306 Me.lbl_grado.Text = "GRADO" ' 'lbl_id_docente ' Me.lbl_id_docente.AutoSize = True Me.lbl_id_docente.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_id_docente.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_id_docente.ForeColor = System.Drawing.Color.Blue Me.lbl_id_docente.Location = New System.Drawing.Point(96, 90) Me.lbl_id_docente.Name = "lbl_id_docente" Me.lbl_id_docente.Size = New System.Drawing.Size(181, 19) Me.lbl_id_docente.TabIndex = 302 Me.lbl_id_docente.Text = "IDENTIFICACION DEL DOCENTE" ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.Blue Me.lblposicion.Location = New System.Drawing.Point(256, 478) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(80, 32) Me.lblposicion.TabIndex = 301 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btn_ultimo ' Me.btn_ultimo.BackColor = System.Drawing.Color.LightSkyBlue
212
213 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_ultimo.Location = New System.Drawing.Point(384, 478) Me.btn_ultimo.Name = "btn_ultimo" Me.btn_ultimo.Size = New System.Drawing.Size(48, 32) Me.btn_ultimo.TabIndex = 300 ' 'btn_siguiente ' Me.btn_siguiente.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_siguiente.Location = New System.Drawing.Point(336, 478) Me.btn_siguiente.Name = "btn_siguiente" Me.btn_siguiente.Size = New System.Drawing.Size(48, 32) Me.btn_siguiente.TabIndex = 299 ' 'btn_anterior ' Me.btn_anterior.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_anterior.Location = New System.Drawing.Point(208, 478) Me.btn_anterior.Name = "btn_anterior" Me.btn_anterior.Size = New System.Drawing.Size(48, 32) Me.btn_anterior.TabIndex = 298 ' 'btn_primero ' Me.btn_primero.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_primero.Location = New System.Drawing.Point(160, 478) Me.btn_primero.Name = "btn_primero" Me.btn_primero.Size = New System.Drawing.Size(48, 32) Me.btn_primero.TabIndex = 297 ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.ForeColor = System.Drawing.Color.Transparent Me.btn_salir.Location = New System.Drawing.Point(440, 444) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(72, 32) Me.btn_salir.TabIndex = 296 Me.btn_salir.Text = "&Salir" Me.btn_salir.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_cancelar ' Me.btn_cancelar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_cancelar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_cancelar.ForeColor = System.Drawing.Color.Transparent Me.btn_cancelar.Location = New System.Drawing.Point(368, 444) Me.btn_cancelar.Name = "btn_cancelar"
213
214 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_cancelar.Size = New System.Drawing.Size(72, 32) Me.btn_cancelar.TabIndex = 295 Me.btn_cancelar.Text = "&Cancelar" Me.btn_cancelar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_eliminar ' Me.btn_eliminar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_eliminar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_eliminar.ForeColor = System.Drawing.Color.Transparent Me.btn_eliminar.Location = New System.Drawing.Point(296, 444) Me.btn_eliminar.Name = "btn_eliminar" Me.btn_eliminar.Size = New System.Drawing.Size(72, 32) Me.btn_eliminar.TabIndex = 294 Me.btn_eliminar.Text = "&Eliminiar" Me.btn_eliminar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_grabar ' Me.btn_grabar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_grabar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_grabar.ForeColor = System.Drawing.Color.Transparent Me.btn_grabar.Location = New System.Drawing.Point(224, 444) Me.btn_grabar.Name = "btn_grabar" Me.btn_grabar.Size = New System.Drawing.Size(72, 32) Me.btn_grabar.TabIndex = 293 Me.btn_grabar.Text = "&Grabar" Me.btn_grabar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_modificar ' Me.btn_modificar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_modificar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_modificar.ForeColor = System.Drawing.Color.Transparent Me.btn_modificar.Location = New System.Drawing.Point(152, 444) Me.btn_modificar.Name = "btn_modificar" Me.btn_modificar.Size = New System.Drawing.Size(72, 32) Me.btn_modificar.TabIndex = 292 Me.btn_modificar.Text = "&Modificar" Me.btn_modificar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_nuevo ' Me.btn_nuevo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_nuevo.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_nuevo.ForeColor = System.Drawing.Color.Transparent
214
215 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_nuevo.Location = New System.Drawing.Point(80, 444) Me.btn_nuevo.Name = "btn_nuevo" Me.btn_nuevo.Size = New System.Drawing.Size(72, 32) Me.btn_nuevo.TabIndex = 291 Me.btn_nuevo.Text = "&Nuevo" Me.btn_nuevo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'txt_nom_docente ' Me.txt_nom_docente.BackColor = System.Drawing.Color.RoyalBlue Me.txt_nom_docente.Location = New System.Drawing.Point(312, 146) Me.txt_nom_docente.MaxLength = 255 Me.txt_nom_docente.Name = "txt_nom_docente" Me.txt_nom_docente.ReadOnly = True Me.txt_nom_docente.Size = New System.Drawing.Size(232, 20) Me.txt_nom_docente.TabIndex = 290 Me.txt_nom_docente.Text = "" ' 'txt_ape_docente ' Me.txt_ape_docente.BackColor = System.Drawing.Color.RoyalBlue Me.txt_ape_docente.Location = New System.Drawing.Point(88, 146) Me.txt_ape_docente.Name = "txt_ape_docente" Me.txt_ape_docente.ReadOnly = True Me.txt_ape_docente.Size = New System.Drawing.Size(200, 20) Me.txt_ape_docente.TabIndex = 289 Me.txt_ape_docente.Text = "" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(8, 7) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(616, 62) Me.Label1.TabIndex = 288 Me.Label1.Text = "REGISTRO DE ASIGNACION DE ASIGNATURAS PARA LOS DOCENTES" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.BackColor = System.Drawing.Color.LightSkyBlue Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label2.ForeColor = System.Drawing.Color.Blue
215
216 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Label2.Location = New System.Drawing.Point(120, 173) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(80, 19) Me.Label2.TabIndex = 308 Me.Label2.Text = "ASIGNATURA" ' 'dtg_consulta ' Me.dtg_consulta.DataMember = "" Me.dtg_consulta.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.dtg_consulta.Location = New System.Drawing.Point(8, 222) Me.dtg_consulta.Name = "dtg_consulta" Me.dtg_consulta.Size = New System.Drawing.Size(616, 215) Me.dtg_consulta.TabIndex = 309 ' 'txt_id_docente ' Me.txt_id_docente.Location = New System.Drawing.Point(88, 112) Me.txt_id_docente.MaxLength = 255 Me.txt_id_docente.Name = "txt_id_docente" Me.txt_id_docente.Size = New System.Drawing.Size(200, 20) Me.txt_id_docente.TabIndex = 311 Me.txt_id_docente.Text = "" ' 'cmb_asignatura ' Me.cmb_asignatura.Location = New System.Drawing.Point(48, 194) Me.cmb_asignatura.Name = "cmb_asignatura" Me.cmb_asignatura.Size = New System.Drawing.Size(240, 21) Me.cmb_asignatura.TabIndex = 312 ' 'cmb_grado ' Me.cmb_grado.Location = New System.Drawing.Point(360, 194) Me.cmb_grado.Name = "cmb_grado" Me.cmb_grado.Size = New System.Drawing.Size(103, 21) Me.cmb_grado.TabIndex = 313 ' 'cmb_grupo_grado ' Me.cmb_grupo_grado.Location = New System.Drawing.Point(472, 194) Me.cmb_grupo_grado.Name = "cmb_grupo_grado" Me.cmb_grupo_grado.Size = New System.Drawing.Size(71, 21) Me.cmb_grupo_grado.TabIndex = 314 ' 'frm_asignatura_docente ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(634, 520)
216
217 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Controls.Add(Me.cmb_grupo_grado) Me.Controls.Add(Me.cmb_grado) Me.Controls.Add(Me.cmb_asignatura) Me.Controls.Add(Me.txt_id_docente) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.lbl_grado) Me.Controls.Add(Me.lbl_id_docente) Me.Controls.Add(Me.txt_nom_docente) Me.Controls.Add(Me.txt_ape_docente) Me.Controls.Add(Me.dtg_consulta) Me.Controls.Add(Me.lblposicion) Me.Controls.Add(Me.btn_ultimo) Me.Controls.Add(Me.btn_siguiente) Me.Controls.Add(Me.btn_anterior) Me.Controls.Add(Me.btn_primero) Me.Controls.Add(Me.btn_salir) Me.Controls.Add(Me.btn_cancelar) Me.Controls.Add(Me.btn_eliminar) Me.Controls.Add(Me.btn_grabar) Me.Controls.Add(Me.btn_modificar) Me.Controls.Add(Me.btn_nuevo) Me.Controls.Add(Me.Label1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_asignatura_docente" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Registro de asignacion de materias para los docentes - SOFTBATEC" CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
Private Sub ENLACES() If Me.txt_id_docente.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_ASIG.ID DEL DOCENTE") Me.txt_id_docente.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_ASIG.APELLIDOS DEL DOCENTE") Me.txt_ape_docente.DataBindings.Add(ENLACE) ENLACE = Nothing
217
218 SOFBATEC 1.0DERECHOS RESERVADOS
ENLACE = New Binding("TEXT", DS_Datos, "TBL_ASIG.NOMBRES DEL DOCENTE") Me.txt_nom_docente.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("SELECTEDVALUE", DS_Datos, "TBL_ASIG.ASIGNATURA") Me.cmb_asignatura.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_ASIG.GRADO") Me.cmb_grado.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_ASIG")
End If End Sub
Private Sub CARGARIMAGENES() Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.btn_eliminar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.btn_eliminar.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.btn_cancelar.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight End Sub
Private Sub LIMPIAROBJETOS() Me.txt_ape_docente.Clear() Me.txt_id_docente.Clear() Me.txt_nom_docente.Clear()
218
219 SOFBATEC 1.0DERECHOS RESERVADOS
Me.cmb_grado.Text = "" Me.cmb_grupo_grado.Text = "" Me.cmb_asignatura.Text = "" End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.txt_ape_docente.ReadOnly = True Me.txt_id_docente.ReadOnly = True Me.txt_nom_docente.ReadOnly = True Me.cmb_grado.Enabled = False Me.cmb_asignatura.Enabled = False
Else Me.txt_ape_docente.ReadOnly = False Me.txt_id_docente.ReadOnly = False Me.txt_nom_docente.ReadOnly = False Me.cmb_grado.Enabled = True Me.cmb_asignatura.Enabled = True End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.btn_nuevo.Enabled = True Me.btn_modificar.Enabled = True Me.btn_grabar.Enabled = False Me.btn_cancelar.Enabled = False Me.btn_primero.Enabled = True Me.btn_anterior.Enabled = True Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.btn_eliminar.Enabled = True Me.btn_salir.Enabled = True
Else Me.btn_nuevo.Enabled = False Me.btn_modificar.Enabled = False Me.btn_grabar.Enabled = True Me.btn_cancelar.Enabled = True Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_eliminar.Enabled = False Me.btn_salir.Enabled = False
End If End Sub
Private Function Validar() As Boolean
219
220 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_id_docente.Text.Length = 0 Then MessageBox.Show("DIGITE LA IDENTIFICAION DEL DOCENTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_id_docente.Focus() Validar = False Exit Function End If
If Me.cmb_asignatura.Text.Length = 0 Then MessageBox.Show("ESCOGA LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.cmb_asignatura.Focus() Validar = False Exit Function End If
If Me.cmb_grado.Text.Length = 0 And Me.cmb_grupo_grado.Text.Length = 0 Then MessageBox.Show("ESCOGA TANTO EL GRADO COMO EL GRUPO HA ASIGNAR DEL DOCENTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.cmb_grado.Focus() Validar = False Exit Function End If Validar = True End Function#End Region
Private Sub frm_asignatura_docente_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim SQL, SQL2 As String Me.Cursor = System.Windows.Forms.Cursors.Default Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "select A.fld_id_docente AS [ID DEL DOCENTE],A.fld_asignatura AS ASIGNATURA,A.fld_grado_estudiante AS GRADO,B.fld_nom_docente AS [NOMBRES DEL DOCENTE],B.fld_apell_docente AS [APELLIDOS DEL DOCENTE]" SQL = SQL & " from tbl_asignacion_docentes_materia A,tbl_docentes B" SQL = SQL & " WHERE A.fld_id_docente=B.fld_id_docente" SQL = SQL & " order by A.fld_id_docente" CMDselect.CommandText = SQL DA_ASIGDOCENTES.SelectCommand = CMDselect DA_ASIGDOCENTES.Fill(DS_Datos, "TBL_ASIG")
220
221 SOFBATEC 1.0DERECHOS RESERVADOS
SQL2 = "select fld_asignaturas AS ASIGNATURA" SQL2 = SQL2 & " from tbl_asignaturas" SQL2 = SQL2 & " order by fld_asignaturas" CMDselect.CommandText = SQL2 DA_ASIGNATURA.SelectCommand = CMDselect DA_ASIGNATURA.Fill(DS_Datos, "TBL_ASIGNATURA")
CONEXION.Close()
Me.dtg_consulta.CaptionText = "REGISTRO DE ASIGNACION DE ASIGNATURA PARA LOS DOCENTES" Me.dtg_consulta.DataSource = DS_Datos.Tables("TBL_ASIG")
Me.btn_nuevo.Focus()
Me.cmb_grado.Items.Add("6º") Me.cmb_grado.Items.Add("7º") Me.cmb_grado.Items.Add("8º") Me.cmb_grado.Items.Add("9º") Me.cmb_grado.Items.Add("10º") Me.cmb_grado.Items.Add("11º") Me.cmb_grupo_grado.Items.Add("A") Me.cmb_grupo_grado.Items.Add("B") Me.cmb_grupo_grado.Items.Add("C") Me.cmb_grupo_grado.Items.Add("D")
Me.cmb_asignatura.DataSource = DS_Datos.Tables("TBL_ASIGNATURA") Me.cmb_asignatura.ValueMember = DS_Datos.Tables("TBL_ASIGNATURA").Columns(0).ToString Me.cmb_asignatura.DisplayMember = DS_Datos.Tables("TBL_ASIGNATURA").Columns(0).ToString
Me.lblposicion.Text = "Registro de descripcion de logros"
Call LIMPIAROBJETOS() Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_nuevo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nuevo.Click Try
221
222 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.cmb_grupo_grado.Visible = False Then Me.cmb_grupo_grado.Visible = True Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.txt_id_docente.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1)
Catch excepcion As Exception If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_modificar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_modificar.Click Me.txt_id_docente.ReadOnly = True Me.txt_ape_docente.ReadOnly = True Me.txt_nom_docente.ReadOnly = True Me.cmb_asignatura.Enabled = True Me.cmb_grado.Enabled = False If Me.cmb_grupo_grado.Visible = False Then Me.cmb_grupo_grado.Visible = True Me.cmb_grupo_grado.Enabled = True Me.txt_ape_docente.Focus()
Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub btn_cancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_cancelar.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 Call ENLACES() End Sub
Private Sub btn_grabar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_grabar.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1 As String Try CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO tbl_asignacion_docentes_materia(fld_id_docente,fld_grado_estudiante,fld_asignatura)VALUES(" SQL = SQL & Me.txt_id_docente.Text & "" SQL = SQL & ",'" & Me.cmb_grado.Text & Me.cmb_grupo_grado.Text & "'" SQL = SQL & ",'" & Me.cmb_asignatura.SelectedValue & "')"
222
223 SOFBATEC 1.0DERECHOS RESERVADOS
CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CIUDADES.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else SQL = "UPDATE tbl_asignacion_docentes_materia SET " SQL = SQL & "fld_grado_estudiante='" & Me.cmb_grado.Text & "'" SQL = SQL & ",fld_asignatura='" & Me.cmb_asignatura.SelectedValue & "'" SQL = SQL & " WHERE fld_id_docente=" & Me.txt_id_docente.Text & ""
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CIUDADES.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If
SQL1 = "select A.fld_id_docente AS [ID DEL DOCENTE],A.fld_asignatura AS ASIGNATURA,A.fld_grado_estudiante AS GRADO,B.fld_nom_docente AS [NOMBRES DEL DOCENTE],B.fld_apell_docente AS [APELLIDOS DEL DOCENTE]" SQL1 = SQL1 & " from tbl_asignacion_docentes_materia A,tbl_docentes B" SQL1 = SQL1 & " WHERE A.fld_id_docente=B.fld_id_docente" SQL1 = SQL1 & " order by A.fld_id_docente" CMDselect.CommandText = SQL1 DS_Datos.Tables("tbl_asig").Clear() DA_ASIGDOCENTES.SelectCommand = CMDselect DA_ASIGDOCENTES.Fill(DS_Datos, "TBL_ASIG") CONEXION.Close() Call BLOQUEAROBJETOS(0) Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_eliminar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_eliminar.Click Dim SQL As String If Me.txt_id_docente.Text.Length = 0 Then
223
224 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE FROM tbl_asignacion_docentes_materia WHERE fld_id_docente=" & Me.txt_id_docente.Text & "" CMDBorrar.Connection = CONEXION DA_ASIGDOCENTES.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "select A.fld_id_docente AS [ID DEL DOCENTE],A.fld_asignatura AS ASIGNATURA,A.fld_grado_estudiante AS GRADO,B.fld_nom_docente AS [NOMBRES DEL DOCENTE],B.fld_apell_docente AS [APELLIDOS DEL DOCENTE]" SQL = SQL & " from tbl_asignacion_docentes_materia A,tbl_docentes B" SQL = SQL & " WHERE A.fld_id_docente=B.fld_id_docente" SQL = SQL & " order by A.fld_id_docente" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_ASIG").Clear() DA_ASIGDOCENTES.SelectCommand = CMDselect DA_ASIGDOCENTES.Fill(DS_Datos, "TBL_ASIG") CONEXION.Close() MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub btn_primero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_primero.Click Try If Me.cmb_grupo_grado.Visible = True Then Me.cmb_grupo_grado.Visible = False Call ENLACES() EnlaceBASE.Position = 0 Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True
224
225 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_anterior_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_anterior.Click Try If Me.cmb_grupo_grado.Visible = True Then Me.cmb_grupo_grado.Visible = False Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False End If Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_siguiente_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_siguiente.Click Try If Me.cmb_grupo_grado.Visible = True Then Me.cmb_grupo_grado.Visible = False Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False End If Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close()
225
226 SOFBATEC 1.0DERECHOS RESERVADOS
End Try End Sub
Private Sub btn_ultimo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ultimo.Click Try If Me.cmb_grupo_grado.Visible = True Then Me.cmb_grupo_grado.Visible = False Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub frm_asignatura_docente_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing DS_Datos.Tables("TBL_ASIGNATURA").Clear() DS_Datos.Tables("TBL_ASIG").Clear() End Sub
Private Sub txt_id_docente_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_id_docente.Leave If Me.txt_id_docente.TextLength = 0 Then Exit Sub Else CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select A.fld_nom_docente,A.fld_apell_docente from tbl_docentes A where A.fld_id_docente=" & Me.txt_id_docente.Text & "" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then Me.txt_ape_docente.Text = DR_CONSULTA.Item("fld_apell_docente") Me.txt_nom_docente.Text = DR_CONSULTA.Item("Fld_nom_docente") CONEXION.Close() Else
226
227 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show("LA IDENTIFICACION DIGITADA NO PERTENECE A NINGUN DOCENTE POR FAVOR VERIFIQUE LA IDENTIDAD DIGITADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_id_docente.Clear() Me.txt_id_docente.Focus() Exit Sub End If DR_CONSULTA.Close() End If End Sub
Private Sub txt_id_docente_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_id_docente.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_id_docente_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_id_docente.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub cmb_asignatura_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_asignatura.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub cmb_asignatura_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_asignatura.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub cmb_grado_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cmb_grado.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub cmb_grado_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmb_grado.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) End Sub
Private Sub btn_salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_salir.Click Me.Close()
227
228 SOFBATEC 1.0DERECHOS RESERVADOS
End SubEnd Class
Codigo registro de nivelación de asignaturas
Public Class frm_nivelacion_asinaturas Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then
228
229 SOFBATEC 1.0DERECHOS RESERVADOS
components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents TabControl1 As System.Windows.Forms.TabControl Friend WithEvents TabPage1 As System.Windows.Forms.TabPage Friend WithEvents TabPage2 As System.Windows.Forms.TabPage Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_ultimo As System.Windows.Forms.Button Friend WithEvents btn_siguiente As System.Windows.Forms.Button Friend WithEvents btn_anterior As System.Windows.Forms.Button Friend WithEvents btn_primero As System.Windows.Forms.Button Friend WithEvents btn_cancelar As System.Windows.Forms.Button Friend WithEvents btn_grabar As System.Windows.Forms.Button Friend WithEvents btn_nuevo As System.Windows.Forms.Button Friend WithEvents txt_cual_rel As System.Windows.Forms.TextBox Friend WithEvents txt_cual_nat As System.Windows.Forms.TextBox Friend WithEvents txt_cual_fil As System.Windows.Forms.TextBox Friend WithEvents txt_cual_qui As System.Windows.Forms.TextBox Friend WithEvents txt_cual_soc As System.Windows.Forms.TextBox Friend WithEvents txt_cual_tec As System.Windows.Forms.TextBox Friend WithEvents txt_cual_art As System.Windows.Forms.TextBox Friend WithEvents txt_cual_esp As System.Windows.Forms.TextBox Friend WithEvents txt_cual_mat As System.Windows.Forms.TextBox Friend WithEvents txt_cual_fis As System.Windows.Forms.TextBox Friend WithEvents txt_cal_fis As System.Windows.Forms.TextBox Friend WithEvents txt_cal_qui As System.Windows.Forms.TextBox Friend WithEvents txt_cal_fil As System.Windows.Forms.TextBox Friend WithEvents txt_cal_nat As System.Windows.Forms.TextBox Friend WithEvents txt_cal_ing As System.Windows.Forms.TextBox Friend WithEvents txt_cal_rel As System.Windows.Forms.TextBox Friend WithEvents txt_cal_soc As System.Windows.Forms.TextBox Friend WithEvents txt_cal_tec As System.Windows.Forms.TextBox Friend WithEvents txt_cal_art As System.Windows.Forms.TextBox Friend WithEvents txt_cal_esp As System.Windows.Forms.TextBox Friend WithEvents txt_cal_mat As System.Windows.Forms.TextBox Friend WithEvents lbl_calificacion As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents txt_cal_act_fis As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_qui As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_fil As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_nat As System.Windows.Forms.TextBox
229
230 SOFBATEC 1.0DERECHOS RESERVADOS
Friend WithEvents txt_cal_act_ing As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_rel As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_soc As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_tec As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_art As System.Windows.Forms.TextBox Friend WithEvents txt_cal_act_esp As System.Windows.Forms.TextBox Friend WithEvents lbl_asignaturas As System.Windows.Forms.Label Friend WithEvents chk_fisica As System.Windows.Forms.CheckBox Friend WithEvents chk_quimica As System.Windows.Forms.CheckBox Friend WithEvents chk_filosofia As System.Windows.Forms.CheckBox Friend WithEvents chk_naturales As System.Windows.Forms.CheckBox Friend WithEvents chk_ingles As System.Windows.Forms.CheckBox Friend WithEvents chk_religion As System.Windows.Forms.CheckBox Friend WithEvents chk_sociales As System.Windows.Forms.CheckBox Friend WithEvents chk_tecnologia As System.Windows.Forms.CheckBox Friend WithEvents chk_artes As System.Windows.Forms.CheckBox Friend WithEvents chk_español As System.Windows.Forms.CheckBox Friend WithEvents chk_matematicas As System.Windows.Forms.CheckBox Friend WithEvents txt_periodo As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents txt_grado As System.Windows.Forms.TextBox Friend WithEvents lbl_grado As System.Windows.Forms.Label Friend WithEvents txt_estudiante As System.Windows.Forms.TextBox Friend WithEvents lbl_id_estudiante As System.Windows.Forms.Label Friend WithEvents txt_id_estudiante As System.Windows.Forms.TextBox Friend WithEvents txt_apellidos_estudiante As System.Windows.Forms.TextBox Friend WithEvents lbl_apellidos_estudiante As System.Windows.Forms.Label Friend WithEvents lbl_nom_estudiante As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txt_cal_act_mat As System.Windows.Forms.TextBox Friend WithEvents dtg_consulta As System.Windows.Forms.DataGrid Friend WithEvents btn_eliminar As System.Windows.Forms.Button Friend WithEvents grb_aprobo As System.Windows.Forms.GroupBox Friend WithEvents rbt_no_apro_mater As System.Windows.Forms.RadioButton Friend WithEvents rbt_si_apro_mater As System.Windows.Forms.RadioButton Friend WithEvents btn_modificar As System.Windows.Forms.Button Friend WithEvents txt_cual_ing As System.Windows.Forms.TextBox Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.TabControl1 = New System.Windows.Forms.TabControl Me.TabPage1 = New System.Windows.Forms.TabPage Me.txt_cual_ing = New System.Windows.Forms.TextBox Me.btn_modificar = New System.Windows.Forms.Button Me.grb_aprobo = New System.Windows.Forms.GroupBox Me.rbt_no_apro_mater = New System.Windows.Forms.RadioButton Me.rbt_si_apro_mater = New System.Windows.Forms.RadioButton Me.lblposicion = New System.Windows.Forms.Label Me.btn_ultimo = New System.Windows.Forms.Button Me.btn_siguiente = New System.Windows.Forms.Button Me.btn_anterior = New System.Windows.Forms.Button
230
231 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_primero = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button Me.btn_cancelar = New System.Windows.Forms.Button Me.btn_grabar = New System.Windows.Forms.Button Me.btn_nuevo = New System.Windows.Forms.Button Me.txt_cual_rel = New System.Windows.Forms.TextBox Me.txt_cual_nat = New System.Windows.Forms.TextBox Me.txt_cual_fil = New System.Windows.Forms.TextBox Me.txt_cual_qui = New System.Windows.Forms.TextBox Me.txt_cual_soc = New System.Windows.Forms.TextBox Me.txt_cual_tec = New System.Windows.Forms.TextBox Me.txt_cual_art = New System.Windows.Forms.TextBox Me.txt_cual_esp = New System.Windows.Forms.TextBox Me.txt_cual_mat = New System.Windows.Forms.TextBox Me.txt_cual_fis = New System.Windows.Forms.TextBox Me.txt_cal_fis = New System.Windows.Forms.TextBox Me.txt_cal_qui = New System.Windows.Forms.TextBox Me.txt_cal_fil = New System.Windows.Forms.TextBox Me.txt_cal_nat = New System.Windows.Forms.TextBox Me.txt_cal_ing = New System.Windows.Forms.TextBox Me.txt_cal_rel = New System.Windows.Forms.TextBox Me.txt_cal_soc = New System.Windows.Forms.TextBox Me.txt_cal_tec = New System.Windows.Forms.TextBox Me.txt_cal_art = New System.Windows.Forms.TextBox Me.txt_cal_esp = New System.Windows.Forms.TextBox Me.txt_cal_mat = New System.Windows.Forms.TextBox Me.lbl_calificacion = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.txt_cal_act_fis = New System.Windows.Forms.TextBox Me.txt_cal_act_qui = New System.Windows.Forms.TextBox Me.txt_cal_act_fil = New System.Windows.Forms.TextBox Me.txt_cal_act_nat = New System.Windows.Forms.TextBox Me.txt_cal_act_ing = New System.Windows.Forms.TextBox Me.txt_cal_act_rel = New System.Windows.Forms.TextBox Me.txt_cal_act_soc = New System.Windows.Forms.TextBox Me.txt_cal_act_tec = New System.Windows.Forms.TextBox Me.txt_cal_act_art = New System.Windows.Forms.TextBox Me.txt_cal_act_esp = New System.Windows.Forms.TextBox Me.lbl_asignaturas = New System.Windows.Forms.Label Me.chk_fisica = New System.Windows.Forms.CheckBox Me.chk_quimica = New System.Windows.Forms.CheckBox Me.chk_filosofia = New System.Windows.Forms.CheckBox Me.chk_naturales = New System.Windows.Forms.CheckBox Me.chk_ingles = New System.Windows.Forms.CheckBox Me.chk_religion = New System.Windows.Forms.CheckBox Me.chk_sociales = New System.Windows.Forms.CheckBox Me.chk_tecnologia = New System.Windows.Forms.CheckBox Me.chk_artes = New System.Windows.Forms.CheckBox Me.chk_español = New System.Windows.Forms.CheckBox Me.chk_matematicas = New System.Windows.Forms.CheckBox
231
232 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_periodo = New System.Windows.Forms.TextBox Me.Label2 = New System.Windows.Forms.Label Me.txt_grado = New System.Windows.Forms.TextBox Me.lbl_grado = New System.Windows.Forms.Label Me.txt_estudiante = New System.Windows.Forms.TextBox Me.lbl_id_estudiante = New System.Windows.Forms.Label Me.txt_id_estudiante = New System.Windows.Forms.TextBox Me.txt_apellidos_estudiante = New System.Windows.Forms.TextBox Me.lbl_apellidos_estudiante = New System.Windows.Forms.Label Me.lbl_nom_estudiante = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.txt_cal_act_mat = New System.Windows.Forms.TextBox Me.btn_eliminar = New System.Windows.Forms.Button Me.TabPage2 = New System.Windows.Forms.TabPage Me.dtg_consulta = New System.Windows.Forms.DataGrid Me.TabControl1.SuspendLayout() Me.TabPage1.SuspendLayout() Me.grb_aprobo.SuspendLayout() Me.TabPage2.SuspendLayout() CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'TabControl1 ' Me.TabControl1.Controls.Add(Me.TabPage1) Me.TabControl1.Controls.Add(Me.TabPage2) Me.TabControl1.Location = New System.Drawing.Point(0, 0) Me.TabControl1.Name = "TabControl1" Me.TabControl1.SelectedIndex = 0 Me.TabControl1.Size = New System.Drawing.Size(728, 575) Me.TabControl1.TabIndex = 0 ' 'TabPage1 ' Me.TabPage1.BackColor = System.Drawing.Color.Blue Me.TabPage1.Controls.Add(Me.txt_cual_ing) Me.TabPage1.Controls.Add(Me.btn_modificar) Me.TabPage1.Controls.Add(Me.grb_aprobo) Me.TabPage1.Controls.Add(Me.lblposicion) Me.TabPage1.Controls.Add(Me.btn_ultimo) Me.TabPage1.Controls.Add(Me.btn_siguiente) Me.TabPage1.Controls.Add(Me.btn_anterior) Me.TabPage1.Controls.Add(Me.btn_primero) Me.TabPage1.Controls.Add(Me.btn_salir) Me.TabPage1.Controls.Add(Me.btn_cancelar) Me.TabPage1.Controls.Add(Me.btn_grabar) Me.TabPage1.Controls.Add(Me.btn_nuevo) Me.TabPage1.Controls.Add(Me.txt_cual_rel) Me.TabPage1.Controls.Add(Me.txt_cual_nat) Me.TabPage1.Controls.Add(Me.txt_cual_fil)
232
233 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TabPage1.Controls.Add(Me.txt_cual_qui) Me.TabPage1.Controls.Add(Me.txt_cual_soc) Me.TabPage1.Controls.Add(Me.txt_cual_tec) Me.TabPage1.Controls.Add(Me.txt_cual_art) Me.TabPage1.Controls.Add(Me.txt_cual_esp) Me.TabPage1.Controls.Add(Me.txt_cual_mat) Me.TabPage1.Controls.Add(Me.txt_cual_fis) Me.TabPage1.Controls.Add(Me.txt_cal_fis) Me.TabPage1.Controls.Add(Me.txt_cal_qui) Me.TabPage1.Controls.Add(Me.txt_cal_fil) Me.TabPage1.Controls.Add(Me.txt_cal_nat) Me.TabPage1.Controls.Add(Me.txt_cal_ing) Me.TabPage1.Controls.Add(Me.txt_cal_rel) Me.TabPage1.Controls.Add(Me.txt_cal_soc) Me.TabPage1.Controls.Add(Me.txt_cal_tec) Me.TabPage1.Controls.Add(Me.txt_cal_art) Me.TabPage1.Controls.Add(Me.txt_cal_esp) Me.TabPage1.Controls.Add(Me.txt_cal_mat) Me.TabPage1.Controls.Add(Me.lbl_calificacion) Me.TabPage1.Controls.Add(Me.Label3) Me.TabPage1.Controls.Add(Me.txt_cal_act_fis) Me.TabPage1.Controls.Add(Me.txt_cal_act_qui) Me.TabPage1.Controls.Add(Me.txt_cal_act_fil) Me.TabPage1.Controls.Add(Me.txt_cal_act_nat) Me.TabPage1.Controls.Add(Me.txt_cal_act_ing) Me.TabPage1.Controls.Add(Me.txt_cal_act_rel) Me.TabPage1.Controls.Add(Me.txt_cal_act_soc) Me.TabPage1.Controls.Add(Me.txt_cal_act_tec) Me.TabPage1.Controls.Add(Me.txt_cal_act_art) Me.TabPage1.Controls.Add(Me.txt_cal_act_esp) Me.TabPage1.Controls.Add(Me.lbl_asignaturas) Me.TabPage1.Controls.Add(Me.chk_fisica) Me.TabPage1.Controls.Add(Me.chk_quimica) Me.TabPage1.Controls.Add(Me.chk_filosofia) Me.TabPage1.Controls.Add(Me.chk_naturales) Me.TabPage1.Controls.Add(Me.chk_ingles) Me.TabPage1.Controls.Add(Me.chk_religion) Me.TabPage1.Controls.Add(Me.chk_sociales) Me.TabPage1.Controls.Add(Me.chk_tecnologia) Me.TabPage1.Controls.Add(Me.chk_artes) Me.TabPage1.Controls.Add(Me.chk_español) Me.TabPage1.Controls.Add(Me.chk_matematicas) Me.TabPage1.Controls.Add(Me.txt_periodo) Me.TabPage1.Controls.Add(Me.Label2) Me.TabPage1.Controls.Add(Me.txt_grado) Me.TabPage1.Controls.Add(Me.lbl_grado) Me.TabPage1.Controls.Add(Me.txt_estudiante) Me.TabPage1.Controls.Add(Me.lbl_id_estudiante) Me.TabPage1.Controls.Add(Me.txt_id_estudiante) Me.TabPage1.Controls.Add(Me.txt_apellidos_estudiante)
233
234 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TabPage1.Controls.Add(Me.lbl_apellidos_estudiante) Me.TabPage1.Controls.Add(Me.lbl_nom_estudiante) Me.TabPage1.Controls.Add(Me.Label1) Me.TabPage1.Controls.Add(Me.txt_cal_act_mat) Me.TabPage1.Controls.Add(Me.btn_eliminar) Me.TabPage1.ForeColor = System.Drawing.Color.Blue Me.TabPage1.Location = New System.Drawing.Point(4, 22) Me.TabPage1.Name = "TabPage1" Me.TabPage1.Size = New System.Drawing.Size(720, 549) Me.TabPage1.TabIndex = 0 Me.TabPage1.Text = "Datos" ' 'txt_cual_ing ' Me.txt_cual_ing.Location = New System.Drawing.Point(488, 305) Me.txt_cual_ing.Name = "txt_cual_ing" Me.txt_cual_ing.Size = New System.Drawing.Size(120, 20) Me.txt_cual_ing.TabIndex = 470 Me.txt_cual_ing.Text = "" ' 'btn_modificar ' Me.btn_modificar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_modificar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_modificar.ForeColor = System.Drawing.Color.Transparent Me.btn_modificar.Location = New System.Drawing.Point(224, 471) Me.btn_modificar.Name = "btn_modificar" Me.btn_modificar.Size = New System.Drawing.Size(72, 33) Me.btn_modificar.TabIndex = 469 Me.btn_modificar.Text = "&Modificar" Me.btn_modificar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'grb_aprobo ' Me.grb_aprobo.BackColor = System.Drawing.Color.LightSkyBlue Me.grb_aprobo.Controls.Add(Me.rbt_no_apro_mater) Me.grb_aprobo.Controls.Add(Me.rbt_si_apro_mater) Me.grb_aprobo.ForeColor = System.Drawing.Color.Blue Me.grb_aprobo.Location = New System.Drawing.Point(224, 423) Me.grb_aprobo.Name = "grb_aprobo" Me.grb_aprobo.Size = New System.Drawing.Size(296, 35) Me.grb_aprobo.TabIndex = 468 Me.grb_aprobo.TabStop = False Me.grb_aprobo.Text = "¿Aprobo el estudiante el proceso de nivelacion?" ' 'rbt_no_apro_mater ' Me.rbt_no_apro_mater.Location = New System.Drawing.Point(168, 14) Me.rbt_no_apro_mater.Name = "rbt_no_apro_mater"
234
235 SOFBATEC 1.0DERECHOS RESERVADOS
Me.rbt_no_apro_mater.Size = New System.Drawing.Size(72, 14) Me.rbt_no_apro_mater.TabIndex = 1 Me.rbt_no_apro_mater.Text = "No" ' 'rbt_si_apro_mater ' Me.rbt_si_apro_mater.Location = New System.Drawing.Point(88, 14) Me.rbt_si_apro_mater.Name = "rbt_si_apro_mater" Me.rbt_si_apro_mater.Size = New System.Drawing.Size(72, 14) Me.rbt_si_apro_mater.TabIndex = 0 Me.rbt_si_apro_mater.Text = "Si" ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.Blue Me.lblposicion.Location = New System.Drawing.Point(312, 506) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(96, 32) Me.lblposicion.TabIndex = 467 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btn_ultimo ' Me.btn_ultimo.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_ultimo.Location = New System.Drawing.Point(456, 506) Me.btn_ultimo.Name = "btn_ultimo" Me.btn_ultimo.Size = New System.Drawing.Size(48, 32) Me.btn_ultimo.TabIndex = 466 ' 'btn_siguiente ' Me.btn_siguiente.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_siguiente.Location = New System.Drawing.Point(408, 506) Me.btn_siguiente.Name = "btn_siguiente" Me.btn_siguiente.Size = New System.Drawing.Size(48, 32) Me.btn_siguiente.TabIndex = 465 ' 'btn_anterior ' Me.btn_anterior.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_anterior.Location = New System.Drawing.Point(264, 506) Me.btn_anterior.Name = "btn_anterior" Me.btn_anterior.Size = New System.Drawing.Size(48, 32) Me.btn_anterior.TabIndex = 464 ' 'btn_primero
235
236 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.btn_primero.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_primero.Location = New System.Drawing.Point(216, 506) Me.btn_primero.Name = "btn_primero" Me.btn_primero.Size = New System.Drawing.Size(48, 32) Me.btn_primero.TabIndex = 463 ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.ForeColor = System.Drawing.Color.Transparent Me.btn_salir.Location = New System.Drawing.Point(512, 471) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(72, 33) Me.btn_salir.TabIndex = 462 Me.btn_salir.Text = "&Salir" Me.btn_salir.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_cancelar ' Me.btn_cancelar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_cancelar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_cancelar.ForeColor = System.Drawing.Color.Transparent Me.btn_cancelar.Location = New System.Drawing.Point(440, 471) Me.btn_cancelar.Name = "btn_cancelar" Me.btn_cancelar.Size = New System.Drawing.Size(72, 33) Me.btn_cancelar.TabIndex = 461 Me.btn_cancelar.Text = "&Cancelar" Me.btn_cancelar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_grabar ' Me.btn_grabar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_grabar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_grabar.ForeColor = System.Drawing.Color.Transparent Me.btn_grabar.Location = New System.Drawing.Point(296, 471) Me.btn_grabar.Name = "btn_grabar" Me.btn_grabar.Size = New System.Drawing.Size(72, 33) Me.btn_grabar.TabIndex = 459 Me.btn_grabar.Text = "&Grabar" Me.btn_grabar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'btn_nuevo ' Me.btn_nuevo.BackColor = System.Drawing.Color.LightSkyBlue
236
237 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_nuevo.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_nuevo.ForeColor = System.Drawing.Color.Transparent Me.btn_nuevo.Location = New System.Drawing.Point(152, 471) Me.btn_nuevo.Name = "btn_nuevo" Me.btn_nuevo.Size = New System.Drawing.Size(72, 33) Me.btn_nuevo.TabIndex = 457 Me.btn_nuevo.Text = "&Nuevo" Me.btn_nuevo.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'txt_cual_rel ' Me.txt_cual_rel.Location = New System.Drawing.Point(488, 284) Me.txt_cual_rel.Name = "txt_cual_rel" Me.txt_cual_rel.Size = New System.Drawing.Size(120, 20) Me.txt_cual_rel.TabIndex = 455 Me.txt_cual_rel.Text = "" ' 'txt_cual_nat ' Me.txt_cual_nat.Location = New System.Drawing.Point(488, 326) Me.txt_cual_nat.Name = "txt_cual_nat" Me.txt_cual_nat.Size = New System.Drawing.Size(120, 20) Me.txt_cual_nat.TabIndex = 454 Me.txt_cual_nat.Text = "" ' 'txt_cual_fil ' Me.txt_cual_fil.Location = New System.Drawing.Point(488, 347) Me.txt_cual_fil.Name = "txt_cual_fil" Me.txt_cual_fil.Size = New System.Drawing.Size(120, 20) Me.txt_cual_fil.TabIndex = 453 Me.txt_cual_fil.Text = "" ' 'txt_cual_qui ' Me.txt_cual_qui.Location = New System.Drawing.Point(488, 367) Me.txt_cual_qui.Name = "txt_cual_qui" Me.txt_cual_qui.Size = New System.Drawing.Size(120, 20) Me.txt_cual_qui.TabIndex = 452 Me.txt_cual_qui.Text = "" ' 'txt_cual_soc ' Me.txt_cual_soc.Location = New System.Drawing.Point(488, 263) Me.txt_cual_soc.Name = "txt_cual_soc" Me.txt_cual_soc.Size = New System.Drawing.Size(120, 20) Me.txt_cual_soc.TabIndex = 451 Me.txt_cual_soc.Text = "" '
237
238 SOFBATEC 1.0DERECHOS RESERVADOS
'txt_cual_tec ' Me.txt_cual_tec.Location = New System.Drawing.Point(488, 243) Me.txt_cual_tec.Name = "txt_cual_tec" Me.txt_cual_tec.Size = New System.Drawing.Size(120, 20) Me.txt_cual_tec.TabIndex = 450 Me.txt_cual_tec.Text = "" ' 'txt_cual_art ' Me.txt_cual_art.Location = New System.Drawing.Point(488, 222) Me.txt_cual_art.Name = "txt_cual_art" Me.txt_cual_art.Size = New System.Drawing.Size(120, 20) Me.txt_cual_art.TabIndex = 449 Me.txt_cual_art.Text = "" ' 'txt_cual_esp ' Me.txt_cual_esp.Location = New System.Drawing.Point(488, 201) Me.txt_cual_esp.Name = "txt_cual_esp" Me.txt_cual_esp.Size = New System.Drawing.Size(120, 20) Me.txt_cual_esp.TabIndex = 448 Me.txt_cual_esp.Text = "" ' 'txt_cual_mat ' Me.txt_cual_mat.Location = New System.Drawing.Point(488, 180) Me.txt_cual_mat.Name = "txt_cual_mat" Me.txt_cual_mat.Size = New System.Drawing.Size(120, 20) Me.txt_cual_mat.TabIndex = 447 Me.txt_cual_mat.Text = "" ' 'txt_cual_fis ' Me.txt_cual_fis.Location = New System.Drawing.Point(488, 388) Me.txt_cual_fis.Name = "txt_cual_fis" Me.txt_cual_fis.Size = New System.Drawing.Size(120, 20) Me.txt_cual_fis.TabIndex = 446 Me.txt_cual_fis.Text = "" ' 'txt_cal_fis ' Me.txt_cal_fis.Location = New System.Drawing.Point(392, 388) Me.txt_cal_fis.Name = "txt_cal_fis" Me.txt_cal_fis.Size = New System.Drawing.Size(48, 20) Me.txt_cal_fis.TabIndex = 445 Me.txt_cal_fis.Text = "" ' 'txt_cal_qui '
238
239 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_qui.Location = New System.Drawing.Point(392, 367) Me.txt_cal_qui.Name = "txt_cal_qui" Me.txt_cal_qui.Size = New System.Drawing.Size(48, 20) Me.txt_cal_qui.TabIndex = 444 Me.txt_cal_qui.Text = "" ' 'txt_cal_fil ' Me.txt_cal_fil.Location = New System.Drawing.Point(392, 347) Me.txt_cal_fil.Name = "txt_cal_fil" Me.txt_cal_fil.Size = New System.Drawing.Size(48, 20) Me.txt_cal_fil.TabIndex = 443 Me.txt_cal_fil.Text = "" ' 'txt_cal_nat ' Me.txt_cal_nat.Location = New System.Drawing.Point(392, 326) Me.txt_cal_nat.Name = "txt_cal_nat" Me.txt_cal_nat.Size = New System.Drawing.Size(48, 20) Me.txt_cal_nat.TabIndex = 442 Me.txt_cal_nat.Text = "" ' 'txt_cal_ing ' Me.txt_cal_ing.Location = New System.Drawing.Point(392, 305) Me.txt_cal_ing.Name = "txt_cal_ing" Me.txt_cal_ing.Size = New System.Drawing.Size(48, 20) Me.txt_cal_ing.TabIndex = 441 Me.txt_cal_ing.Text = "" ' 'txt_cal_rel ' Me.txt_cal_rel.Location = New System.Drawing.Point(392, 284) Me.txt_cal_rel.Name = "txt_cal_rel" Me.txt_cal_rel.Size = New System.Drawing.Size(48, 20) Me.txt_cal_rel.TabIndex = 440 Me.txt_cal_rel.Text = "" ' 'txt_cal_soc ' Me.txt_cal_soc.Location = New System.Drawing.Point(392, 263) Me.txt_cal_soc.Name = "txt_cal_soc" Me.txt_cal_soc.Size = New System.Drawing.Size(48, 20) Me.txt_cal_soc.TabIndex = 439 Me.txt_cal_soc.Text = "" ' 'txt_cal_tec ' Me.txt_cal_tec.Location = New System.Drawing.Point(392, 243) Me.txt_cal_tec.Name = "txt_cal_tec"
239
240 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_tec.Size = New System.Drawing.Size(48, 20) Me.txt_cal_tec.TabIndex = 438 Me.txt_cal_tec.Text = "" ' 'txt_cal_art ' Me.txt_cal_art.Location = New System.Drawing.Point(392, 222) Me.txt_cal_art.Name = "txt_cal_art" Me.txt_cal_art.Size = New System.Drawing.Size(48, 20) Me.txt_cal_art.TabIndex = 437 Me.txt_cal_art.Text = "" ' 'txt_cal_esp ' Me.txt_cal_esp.Location = New System.Drawing.Point(392, 201) Me.txt_cal_esp.Name = "txt_cal_esp" Me.txt_cal_esp.Size = New System.Drawing.Size(48, 20) Me.txt_cal_esp.TabIndex = 436 Me.txt_cal_esp.Text = "" ' 'txt_cal_mat ' Me.txt_cal_mat.Location = New System.Drawing.Point(392, 180) Me.txt_cal_mat.Name = "txt_cal_mat" Me.txt_cal_mat.Size = New System.Drawing.Size(48, 20) Me.txt_cal_mat.TabIndex = 435 Me.txt_cal_mat.Text = "" ' 'lbl_calificacion ' Me.lbl_calificacion.AutoSize = True Me.lbl_calificacion.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_calificacion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_calificacion.ForeColor = System.Drawing.Color.Blue Me.lbl_calificacion.Location = New System.Drawing.Point(384, 153) Me.lbl_calificacion.Name = "lbl_calificacion" Me.lbl_calificacion.Size = New System.Drawing.Size(260, 19) Me.lbl_calificacion.TabIndex = 434 Me.lbl_calificacion.Text = "Calificacion alcanzada por el periodo de nivelacion" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.BackColor = System.Drawing.Color.LightSkyBlue Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label3.ForeColor = System.Drawing.Color.Blue Me.Label3.Location = New System.Drawing.Point(240, 153) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(99, 19)
240
241 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Label3.TabIndex = 433 Me.Label3.Text = "Calificacion Actual" ' 'txt_cal_act_fis ' Me.txt_cal_act_fis.Location = New System.Drawing.Point(240, 388) Me.txt_cal_act_fis.Name = "txt_cal_act_fis" Me.txt_cal_act_fis.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_fis.TabIndex = 432 Me.txt_cal_act_fis.Text = "" ' 'txt_cal_act_qui ' Me.txt_cal_act_qui.Location = New System.Drawing.Point(240, 367) Me.txt_cal_act_qui.Name = "txt_cal_act_qui" Me.txt_cal_act_qui.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_qui.TabIndex = 431 Me.txt_cal_act_qui.Text = "" ' 'txt_cal_act_fil ' Me.txt_cal_act_fil.Location = New System.Drawing.Point(240, 347) Me.txt_cal_act_fil.Name = "txt_cal_act_fil" Me.txt_cal_act_fil.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_fil.TabIndex = 430 Me.txt_cal_act_fil.Text = "" ' 'txt_cal_act_nat ' Me.txt_cal_act_nat.Location = New System.Drawing.Point(240, 326) Me.txt_cal_act_nat.Name = "txt_cal_act_nat" Me.txt_cal_act_nat.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_nat.TabIndex = 429 Me.txt_cal_act_nat.Text = "" ' 'txt_cal_act_ing ' Me.txt_cal_act_ing.Location = New System.Drawing.Point(240, 305) Me.txt_cal_act_ing.Name = "txt_cal_act_ing" Me.txt_cal_act_ing.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_ing.TabIndex = 428 Me.txt_cal_act_ing.Text = "" ' 'txt_cal_act_rel ' Me.txt_cal_act_rel.Location = New System.Drawing.Point(240, 284) Me.txt_cal_act_rel.Name = "txt_cal_act_rel" Me.txt_cal_act_rel.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_rel.TabIndex = 427 Me.txt_cal_act_rel.Text = ""
241
242 SOFBATEC 1.0DERECHOS RESERVADOS
' 'txt_cal_act_soc ' Me.txt_cal_act_soc.Location = New System.Drawing.Point(240, 263) Me.txt_cal_act_soc.Name = "txt_cal_act_soc" Me.txt_cal_act_soc.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_soc.TabIndex = 426 Me.txt_cal_act_soc.Text = "" ' 'txt_cal_act_tec ' Me.txt_cal_act_tec.Location = New System.Drawing.Point(240, 243) Me.txt_cal_act_tec.Name = "txt_cal_act_tec" Me.txt_cal_act_tec.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_tec.TabIndex = 425 Me.txt_cal_act_tec.Text = "" ' 'txt_cal_act_art ' Me.txt_cal_act_art.Location = New System.Drawing.Point(240, 222) Me.txt_cal_act_art.Name = "txt_cal_act_art" Me.txt_cal_act_art.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_art.TabIndex = 424 Me.txt_cal_act_art.Text = "" ' 'txt_cal_act_esp ' Me.txt_cal_act_esp.Location = New System.Drawing.Point(240, 201) Me.txt_cal_act_esp.Name = "txt_cal_act_esp" Me.txt_cal_act_esp.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_esp.TabIndex = 423 Me.txt_cal_act_esp.Text = "" ' 'lbl_asignaturas ' Me.lbl_asignaturas.AutoSize = True Me.lbl_asignaturas.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_asignaturas.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_asignaturas.ForeColor = System.Drawing.Color.Blue Me.lbl_asignaturas.Location = New System.Drawing.Point(72, 153) Me.lbl_asignaturas.Name = "lbl_asignaturas" Me.lbl_asignaturas.Size = New System.Drawing.Size(130, 19) Me.lbl_asignaturas.TabIndex = 421 Me.lbl_asignaturas.Text = "Asignatura programadas" ' 'chk_fisica ' Me.chk_fisica.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_fisica.ForeColor = System.Drawing.Color.Blue
242
243 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_fisica.Location = New System.Drawing.Point(120, 388) Me.chk_fisica.Name = "chk_fisica" Me.chk_fisica.Size = New System.Drawing.Size(72, 21) Me.chk_fisica.TabIndex = 420 Me.chk_fisica.Text = "Fisica" Me.chk_fisica.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_quimica ' Me.chk_quimica.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_quimica.ForeColor = System.Drawing.Color.Blue Me.chk_quimica.Location = New System.Drawing.Point(120, 367) Me.chk_quimica.Name = "chk_quimica" Me.chk_quimica.Size = New System.Drawing.Size(72, 21) Me.chk_quimica.TabIndex = 419 Me.chk_quimica.Text = "Quimica" Me.chk_quimica.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_filosofia ' Me.chk_filosofia.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_filosofia.ForeColor = System.Drawing.Color.Blue Me.chk_filosofia.Location = New System.Drawing.Point(120, 347) Me.chk_filosofia.Name = "chk_filosofia" Me.chk_filosofia.Size = New System.Drawing.Size(72, 20) Me.chk_filosofia.TabIndex = 418 Me.chk_filosofia.Text = "Filosofia" Me.chk_filosofia.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_naturales ' Me.chk_naturales.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_naturales.ForeColor = System.Drawing.Color.Blue Me.chk_naturales.Location = New System.Drawing.Point(120, 326) Me.chk_naturales.Name = "chk_naturales" Me.chk_naturales.Size = New System.Drawing.Size(72, 21) Me.chk_naturales.TabIndex = 417 Me.chk_naturales.Text = "Naturales" Me.chk_naturales.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_ingles ' Me.chk_ingles.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_ingles.ForeColor = System.Drawing.Color.Blue Me.chk_ingles.Location = New System.Drawing.Point(120, 305) Me.chk_ingles.Name = "chk_ingles" Me.chk_ingles.Size = New System.Drawing.Size(72, 22) Me.chk_ingles.TabIndex = 416 Me.chk_ingles.Text = "Ingles " Me.chk_ingles.TextAlign = System.Drawing.ContentAlignment.MiddleRight
243
244 SOFBATEC 1.0DERECHOS RESERVADOS
' 'chk_religion ' Me.chk_religion.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_religion.ForeColor = System.Drawing.Color.Blue Me.chk_religion.Location = New System.Drawing.Point(120, 284) Me.chk_religion.Name = "chk_religion" Me.chk_religion.Size = New System.Drawing.Size(72, 21) Me.chk_religion.TabIndex = 415 Me.chk_religion.Text = "Religion" Me.chk_religion.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_sociales ' Me.chk_sociales.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_sociales.ForeColor = System.Drawing.Color.Blue Me.chk_sociales.Location = New System.Drawing.Point(120, 263) Me.chk_sociales.Name = "chk_sociales" Me.chk_sociales.Size = New System.Drawing.Size(72, 21) Me.chk_sociales.TabIndex = 414 Me.chk_sociales.Text = "Sociales" Me.chk_sociales.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_tecnologia ' Me.chk_tecnologia.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_tecnologia.ForeColor = System.Drawing.Color.Blue Me.chk_tecnologia.Location = New System.Drawing.Point(56, 236) Me.chk_tecnologia.Name = "chk_tecnologia" Me.chk_tecnologia.Size = New System.Drawing.Size(136, 30) Me.chk_tecnologia.TabIndex = 413 Me.chk_tecnologia.Text = "Tecnologia y Sistemas" Me.chk_tecnologia.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_artes ' Me.chk_artes.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_artes.ForeColor = System.Drawing.Color.Blue Me.chk_artes.Location = New System.Drawing.Point(80, 222) Me.chk_artes.Name = "chk_artes" Me.chk_artes.Size = New System.Drawing.Size(112, 21) Me.chk_artes.TabIndex = 412 Me.chk_artes.Text = "Artes" Me.chk_artes.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_español ' Me.chk_español.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_español.ForeColor = System.Drawing.Color.Blue Me.chk_español.Location = New System.Drawing.Point(104, 201)
244
245 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_español.Name = "chk_español" Me.chk_español.Size = New System.Drawing.Size(88, 21) Me.chk_español.TabIndex = 411 Me.chk_español.Text = "Español" Me.chk_español.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'chk_matematicas ' Me.chk_matematicas.BackColor = System.Drawing.Color.LightSkyBlue Me.chk_matematicas.ForeColor = System.Drawing.Color.Blue Me.chk_matematicas.Location = New System.Drawing.Point(104, 173) Me.chk_matematicas.Name = "chk_matematicas" Me.chk_matematicas.Size = New System.Drawing.Size(88, 28) Me.chk_matematicas.TabIndex = 410 Me.chk_matematicas.Text = "Matematicas" Me.chk_matematicas.TextAlign = System.Drawing.ContentAlignment.MiddleRight ' 'txt_periodo ' Me.txt_periodo.BackColor = System.Drawing.Color.RoyalBlue Me.txt_periodo.Location = New System.Drawing.Point(544, 83) Me.txt_periodo.Name = "txt_periodo" Me.txt_periodo.ReadOnly = True Me.txt_periodo.Size = New System.Drawing.Size(48, 20) Me.txt_periodo.TabIndex = 409 Me.txt_periodo.Text = "" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.BackColor = System.Drawing.Color.LightSkyBlue Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label2.ForeColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(480, 83) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(58, 19) Me.Label2.TabIndex = 408 Me.Label2.Text = "PERIODO" ' 'txt_grado ' Me.txt_grado.BackColor = System.Drawing.Color.RoyalBlue Me.txt_grado.Location = New System.Drawing.Point(544, 55) Me.txt_grado.Name = "txt_grado" Me.txt_grado.ReadOnly = True Me.txt_grado.Size = New System.Drawing.Size(56, 20) Me.txt_grado.TabIndex = 407 Me.txt_grado.Text = "" '
245
246 SOFBATEC 1.0DERECHOS RESERVADOS
'lbl_grado ' Me.lbl_grado.AutoSize = True Me.lbl_grado.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_grado.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_grado.ForeColor = System.Drawing.Color.Blue Me.lbl_grado.Location = New System.Drawing.Point(488, 55) Me.lbl_grado.Name = "lbl_grado" Me.lbl_grado.Size = New System.Drawing.Size(48, 19) Me.lbl_grado.TabIndex = 406 Me.lbl_grado.Text = "GRADO" ' 'txt_estudiante ' Me.txt_estudiante.BackColor = System.Drawing.Color.RoyalBlue Me.txt_estudiante.Location = New System.Drawing.Point(192, 83) Me.txt_estudiante.Name = "txt_estudiante" Me.txt_estudiante.ReadOnly = True Me.txt_estudiante.Size = New System.Drawing.Size(264, 20) Me.txt_estudiante.TabIndex = 405 Me.txt_estudiante.Text = "" ' 'lbl_id_estudiante ' Me.lbl_id_estudiante.AutoSize = True Me.lbl_id_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_id_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_id_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_id_estudiante.Location = New System.Drawing.Point(16, 55) Me.lbl_id_estudiante.Name = "lbl_id_estudiante" Me.lbl_id_estudiante.Size = New System.Drawing.Size(197, 19) Me.lbl_id_estudiante.TabIndex = 404 Me.lbl_id_estudiante.Text = "IDENTIFICACION DEL ESTUDIANTE" ' 'txt_id_estudiante ' Me.txt_id_estudiante.Location = New System.Drawing.Point(216, 55) Me.txt_id_estudiante.Name = "txt_id_estudiante" Me.txt_id_estudiante.Size = New System.Drawing.Size(168, 20) Me.txt_id_estudiante.TabIndex = 403 Me.txt_id_estudiante.Text = "" ' 'txt_apellidos_estudiante ' Me.txt_apellidos_estudiante.BackColor = System.Drawing.Color.RoyalBlue Me.txt_apellidos_estudiante.Location = New System.Drawing.Point(192, 118) Me.txt_apellidos_estudiante.Name = "txt_apellidos_estudiante" Me.txt_apellidos_estudiante.ReadOnly = True Me.txt_apellidos_estudiante.Size = New System.Drawing.Size(272, 20)
246
247 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_apellidos_estudiante.TabIndex = 402 Me.txt_apellidos_estudiante.Text = "" ' 'lbl_apellidos_estudiante ' Me.lbl_apellidos_estudiante.AutoSize = True Me.lbl_apellidos_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_apellidos_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_apellidos_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_apellidos_estudiante.Location = New System.Drawing.Point(16, 118) Me.lbl_apellidos_estudiante.Name = "lbl_apellidos_estudiante" Me.lbl_apellidos_estudiante.Size = New System.Drawing.Size(169, 19) Me.lbl_apellidos_estudiante.TabIndex = 401 Me.lbl_apellidos_estudiante.Text = "APELLIDOS DEL ESTUDIANTE" ' 'lbl_nom_estudiante ' Me.lbl_nom_estudiante.AutoSize = True Me.lbl_nom_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_nom_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_nom_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_nom_estudiante.Location = New System.Drawing.Point(24, 83) Me.lbl_nom_estudiante.Name = "lbl_nom_estudiante" Me.lbl_nom_estudiante.Size = New System.Drawing.Size(163, 19) Me.lbl_nom_estudiante.TabIndex = 400 Me.lbl_nom_estudiante.Text = "NOMBRES DEL ESTUDIANTE" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(64, 14) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(568, 28) Me.Label1.TabIndex = 399 Me.Label1.Text = "REGISTRO DE NIVELACION DE ASIGNATURAS" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'txt_cal_act_mat ' Me.txt_cal_act_mat.Location = New System.Drawing.Point(240, 180) Me.txt_cal_act_mat.Name = "txt_cal_act_mat" Me.txt_cal_act_mat.Size = New System.Drawing.Size(96, 20) Me.txt_cal_act_mat.TabIndex = 404
247
248 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_act_mat.Text = "" ' 'btn_eliminar ' Me.btn_eliminar.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_eliminar.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_eliminar.ForeColor = System.Drawing.Color.Transparent Me.btn_eliminar.Location = New System.Drawing.Point(368, 471) Me.btn_eliminar.Name = "btn_eliminar" Me.btn_eliminar.Size = New System.Drawing.Size(72, 33) Me.btn_eliminar.TabIndex = 359 Me.btn_eliminar.Text = "&Eliminiar" Me.btn_eliminar.TextAlign = System.Drawing.ContentAlignment.MiddleLeft ' 'TabPage2 ' Me.TabPage2.BackColor = System.Drawing.Color.LightSkyBlue Me.TabPage2.Controls.Add(Me.dtg_consulta) Me.TabPage2.Location = New System.Drawing.Point(4, 22) Me.TabPage2.Name = "TabPage2" Me.TabPage2.Size = New System.Drawing.Size(720, 549) Me.TabPage2.TabIndex = 1 Me.TabPage2.Text = "Consulta" ' 'dtg_consulta ' Me.dtg_consulta.DataMember = "" Me.dtg_consulta.HeaderForeColor = System.Drawing.SystemColors.ControlText Me.dtg_consulta.Location = New System.Drawing.Point(8, 14) Me.dtg_consulta.Name = "dtg_consulta" Me.dtg_consulta.Size = New System.Drawing.Size(688, 305) Me.dtg_consulta.TabIndex = 0 ' 'frm_nivelacion_materias ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(714, 568) Me.Controls.Add(Me.TabControl1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_nivelacion_materias" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Registro de nivelacion de asignaturas - SOFTBATEC" Me.TabControl1.ResumeLayout(False) Me.TabPage1.ResumeLayout(False) Me.grb_aprobo.ResumeLayout(False) Me.TabPage2.ResumeLayout(False) CType(Me.dtg_consulta, System.ComponentModel.ISupportInitialize).EndInit()
248
249 SOFBATEC 1.0DERECHOS RESERVADOS
Me.ResumeLayout(False)
End Sub
#End Region Private notvisible As Boolean = False
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
Private Sub ENLACES() If Me.txt_estudiante.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.IDENTIFICACION DEL ESTUDIANTE") Me.txt_id_estudiante.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.NOMBRES DEL ESTUDIANTE") Me.txt_estudiante.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.APELLIDOS DEL ESTUDIANTE") Me.txt_apellidos_estudiante.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.GRADO") Me.txt_grado.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.PERIODO") Me.txt_periodo.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION MATEMATICAS") Me.txt_cual_mat.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION ESPAÑOL") Me.txt_cual_esp.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION ARTES") Me.txt_cual_art.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION TECNOLOGIA") Me.txt_cual_tec.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION SOCIALES")
249
250 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cual_soc.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION RELIGION") Me.txt_cual_rel.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION INGLES") Me.txt_cual_ing.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION NATURALES") Me.txt_cual_nat.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION FILOSOFIA") Me.txt_cual_fil.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION QUIMICA") Me.txt_cual_qui.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_NIVELACION.DEFINICION FISICA") Me.txt_cual_fis.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.MATEMATICAS") Me.chk_matematicas.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.ESPAÑOL") Me.chk_español.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.ARTES") Me.chk_artes.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.TECNOLOGIA") Me.chk_tecnologia.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.SOCIALES") Me.chk_sociales.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.RELIGION") Me.chk_religion.DataBindings.Add(ENLACE) ENLACE = Nothing
250
251 SOFBATEC 1.0DERECHOS RESERVADOS
ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.INGLES") Me.chk_ingles.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.NATURALES") Me.chk_naturales.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.FILOSOFIA") Me.chk_filosofia.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.QUIMICA") Me.chk_quimica.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("Checked", DS_Datos, "TBL_NIVELACION.FISICA") Me.chk_fisica.DataBindings.Add(ENLACE) ENLACE = Nothing
EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_NIVELACION")
End If End Sub
Private Sub CARGARIMAGENES() Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.btn_eliminar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.btn_eliminar.ImageAlign = ContentAlignment.MiddleRight
251
252 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.btn_cancelar.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight End Sub
Private Sub visibilidad() If notvisible = True Then Me.txt_cal_act_mat.Visible = False Me.txt_cal_act_esp.Visible = False Me.txt_cal_act_art.Visible = False Me.txt_cal_act_tec.Visible = False Me.txt_cal_act_soc.Visible = False Me.txt_cal_act_rel.Visible = False Me.txt_cal_act_ing.Visible = False Me.txt_cal_act_nat.Visible = False Me.txt_cal_act_fil.Visible = False Me.txt_cal_act_qui.Visible = False Me.txt_cal_act_fis.Visible = False Me.txt_cal_mat.Visible = False Me.txt_cal_esp.Visible = False Me.txt_cal_art.Visible = False Me.txt_cal_tec.Visible = False Me.txt_cal_soc.Visible = False Me.txt_cal_rel.Visible = False Me.txt_cal_ing.Visible = False Me.txt_cal_nat.Visible = False Me.txt_cal_fil.Visible = False Me.txt_cal_qui.Visible = False Me.txt_cal_fis.Visible = False Me.Label3.Visible = False Me.lbl_calificacion.Location = New System.Drawing.Point(269, 152) Me.txt_cual_mat.Location = New System.Drawing.Point(360, 180) Me.txt_cual_esp.Location = New System.Drawing.Point(360, 201) Me.txt_cual_art.Location = New System.Drawing.Point(360, 222) Me.txt_cual_tec.Location = New System.Drawing.Point(360, 243) Me.txt_cual_soc.Location = New System.Drawing.Point(360, 263) Me.txt_cual_rel.Location = New System.Drawing.Point(360, 284) Me.txt_cual_ing.Location = New System.Drawing.Point(360, 305) Me.txt_cual_nat.Location = New System.Drawing.Point(360, 326) Me.txt_cual_fil.Location = New System.Drawing.Point(360, 347) Me.txt_cual_qui.Location = New System.Drawing.Point(360, 367) Me.txt_cual_fis.Location = New System.Drawing.Point(360, 388)
Else Me.txt_cal_act_mat.Visible = True Me.txt_cal_act_esp.Visible = True Me.txt_cal_act_art.Visible = True
252
253 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_act_tec.Visible = True Me.txt_cal_act_soc.Visible = True Me.txt_cal_act_rel.Visible = True Me.txt_cal_act_ing.Visible = True Me.txt_cal_act_nat.Visible = True Me.txt_cal_act_fil.Visible = True Me.txt_cal_act_qui.Visible = True Me.txt_cal_act_fis.Visible = True Me.txt_cal_mat.Visible = True Me.txt_cal_esp.Visible = True Me.txt_cal_art.Visible = True Me.txt_cal_tec.Visible = True Me.txt_cal_soc.Visible = True Me.txt_cal_rel.Visible = True Me.txt_cal_ing.Visible = True Me.txt_cal_nat.Visible = True Me.txt_cal_fil.Visible = True Me.txt_cal_qui.Visible = True Me.txt_cal_fis.Visible = True Me.Label3.Visible = True Me.lbl_calificacion.Location = New System.Drawing.Point(384, 153) Me.txt_cual_mat.Location = New System.Drawing.Point(488, 180) Me.txt_cual_esp.Location = New System.Drawing.Point(488, 201) Me.txt_cual_art.Location = New System.Drawing.Point(488, 222) Me.txt_cual_tec.Location = New System.Drawing.Point(488, 243) Me.txt_cual_soc.Location = New System.Drawing.Point(488, 263) Me.txt_cual_rel.Location = New System.Drawing.Point(488, 284) Me.txt_cual_ing.Location = New System.Drawing.Point(488, 305) Me.txt_cual_nat.Location = New System.Drawing.Point(488, 326) Me.txt_cual_fil.Location = New System.Drawing.Point(488, 347) Me.txt_cual_qui.Location = New System.Drawing.Point(488, 367) Me.txt_cual_fis.Location = New System.Drawing.Point(488, 388)
End If End Sub
Private Sub LIMPIAROBJETOS() Me.txt_cal_art.Clear() Me.txt_cal_esp.Clear() Me.txt_cal_fil.Clear() Me.txt_cal_fis.Clear() Me.txt_cal_ing.Clear() Me.txt_cal_mat.Clear() Me.txt_cal_nat.Clear() Me.txt_cal_qui.Clear() Me.txt_cal_rel.Clear() Me.txt_cal_soc.Clear() Me.txt_cal_tec.Clear() Me.txt_cual_art.Clear() Me.txt_cual_esp.Clear()
253
254 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cual_fil.Clear() Me.txt_cual_fis.Clear() Me.txt_cual_ing.Clear() Me.txt_cual_mat.Clear() Me.txt_cual_nat.Clear() Me.txt_cual_qui.Clear() Me.txt_cual_rel.Clear() Me.txt_cual_soc.Clear() Me.txt_id_estudiante.Clear() Me.txt_estudiante.Clear() Me.txt_apellidos_estudiante.Clear() Me.txt_cual_tec.Clear() Me.txt_grado.Text = "" Me.txt_periodo.Clear() Me.chk_matematicas.Checked = False Me.chk_español.Checked = False Me.chk_artes.Checked = False Me.chk_tecnologia.Checked = False Me.chk_sociales.Checked = False Me.chk_religion.Checked = False Me.chk_ingles.Checked = False Me.chk_naturales.Checked = False Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.txt_cal_art.ReadOnly = True Me.txt_cal_esp.ReadOnly = True Me.txt_cal_fil.ReadOnly = True Me.txt_cal_fis.ReadOnly = True Me.txt_cal_ing.ReadOnly = True Me.txt_cal_mat.ReadOnly = True Me.txt_cal_nat.ReadOnly = True Me.txt_cal_qui.ReadOnly = True Me.txt_cal_rel.ReadOnly = True Me.txt_cal_soc.ReadOnly = True Me.txt_cal_tec.ReadOnly = True Me.txt_cual_art.ReadOnly = True Me.txt_cual_esp.ReadOnly = True Me.txt_cual_fil.ReadOnly = True Me.txt_cual_fis.ReadOnly = True Me.txt_cual_ing.ReadOnly = True Me.txt_cual_mat.ReadOnly = True Me.txt_cual_nat.ReadOnly = True Me.txt_cual_qui.ReadOnly = True Me.txt_cual_rel.ReadOnly = True Me.txt_cual_soc.ReadOnly = True Me.txt_id_estudiante.ReadOnly = True
254
255 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_estudiante.ReadOnly = True Me.txt_apellidos_estudiante.ReadOnly = True Me.txt_cual_tec.ReadOnly = True Me.txt_grado.ReadOnly = True Me.txt_periodo.ReadOnly = False Me.chk_matematicas.Enabled = False Me.chk_español.Enabled = False Me.chk_artes.Enabled = False Me.chk_tecnologia.Enabled = False Me.chk_sociales.Enabled = False Me.chk_naturales.Enabled = False Me.chk_ingles.Enabled = False Me.chk_religion.Enabled = False Me.chk_filosofia.Enabled = False Me.chk_fisica.Enabled = False Me.chk_quimica.Enabled = False Me.txt_cal_act_mat.ReadOnly = True Me.txt_cal_act_esp.ReadOnly = True Me.txt_cal_act_art.ReadOnly = True Me.txt_cal_act_tec.ReadOnly = True Me.txt_cal_act_soc.ReadOnly = True Me.txt_cal_act_rel.ReadOnly = True Me.txt_cal_act_ing.ReadOnly = True Me.txt_cal_act_nat.ReadOnly = True Me.txt_cal_act_fil.ReadOnly = True Me.txt_cal_act_qui.ReadOnly = True Me.txt_cal_act_fis.ReadOnly = True
Else Me.txt_cal_art.ReadOnly = True Me.txt_cal_esp.ReadOnly = True Me.txt_cal_fil.ReadOnly = True Me.txt_cal_fis.ReadOnly = True Me.txt_cal_ing.ReadOnly = True Me.txt_cal_mat.ReadOnly = True Me.txt_cal_nat.ReadOnly = True Me.txt_cal_qui.ReadOnly = True Me.txt_cal_rel.ReadOnly = True Me.txt_cal_soc.ReadOnly = True Me.txt_cal_tec.ReadOnly = True Me.txt_cual_art.ReadOnly = True Me.txt_cual_esp.ReadOnly = True Me.txt_cual_fil.ReadOnly = True Me.txt_cual_fis.ReadOnly = True Me.txt_cual_ing.ReadOnly = True Me.txt_cual_mat.ReadOnly = True Me.txt_cual_nat.ReadOnly = True Me.txt_cual_qui.ReadOnly = True Me.txt_cual_rel.ReadOnly = True Me.txt_cual_soc.ReadOnly = True
255
256 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_id_estudiante.ReadOnly = False Me.txt_estudiante.ReadOnly = False Me.txt_apellidos_estudiante.ReadOnly = False Me.txt_cual_tec.ReadOnly = True Me.txt_grado.ReadOnly = False Me.txt_cal_act_mat.ReadOnly = True Me.txt_cal_act_esp.ReadOnly = True Me.txt_cal_act_art.ReadOnly = True Me.txt_cal_act_tec.ReadOnly = True Me.txt_cal_act_soc.ReadOnly = True Me.txt_cal_act_rel.ReadOnly = True Me.txt_cal_act_ing.ReadOnly = True Me.txt_cal_act_nat.ReadOnly = True Me.txt_cal_act_fil.ReadOnly = True Me.txt_cal_act_qui.ReadOnly = True Me.txt_cal_act_fis.ReadOnly = True
End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.btn_nuevo.Enabled = True Me.btn_modificar.Enabled = True Me.btn_grabar.Enabled = False Me.btn_cancelar.Enabled = False Me.btn_primero.Enabled = True Me.btn_anterior.Enabled = True Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.btn_eliminar.Enabled = True Me.btn_salir.Enabled = True
Else Me.btn_nuevo.Enabled = False Me.btn_modificar.Enabled = False Me.btn_grabar.Enabled = True Me.btn_cancelar.Enabled = True Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_eliminar.Enabled = False Me.btn_salir.Enabled = False
End If End Sub
Private Function Validar() As Boolean
If Me.txt_id_estudiante.Text.Length = 0 Then
256
257 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show("DIGITE LA IDENTIFICACION DEL ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_id_estudiante.Focus() Validar = False Exit Function End If If Me.txt_cal_mat.ReadOnly = False Then If Me.txt_cal_mat.TextLength = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA MATEMATICAS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Validar = False Exit Function End If If Me.txt_cal_esp.ReadOnly = False Then If Me.txt_cal_esp.TextLength = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA ESPAÑOL", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_esp.Focus() Validar = False Exit Function End If End If End If If Me.txt_cal_art.ReadOnly = False Then If Me.txt_cal_art.TextLength = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA ARTES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_art.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_tec.ReadOnly = False Then If Me.txt_cal_tec.TextLength = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA TECNOLOGIA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_tec.Focus() Validar = False Exit Function End If End If If Me.txt_cal_soc.ReadOnly = False Then If Me.txt_cal_soc.TextLength = 0 Then
257
258 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA SOCIALES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_soc.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_rel.ReadOnly = False Then If Me.txt_cal_rel.TextLength = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA RELIGION", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_rel.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_ing.ReadOnly = False Then If Me.txt_cal_ing.TextLength = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA INGLES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_ing.Focus() Validar = False Exit Function End If
End If If Me.txt_cal_nat.ReadOnly = False Then If Me.txt_cal_nat.Text.Length = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA NATURALES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_nat.Focus() Validar = False Exit Function End If End If
If Me.txt_cal_qui.ReadOnly = False Then If Me.txt_cal_qui.Text.Length = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA QUIMICA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_qui.Focus() Validar = False Exit Function
258
259 SOFBATEC 1.0DERECHOS RESERVADOS
End If End If If Me.txt_cal_fil.ReadOnly = False Then If Me.txt_cal_fil.Text.Length = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA FILOSOFIA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_fil.Focus() Validar = False Exit Function End If End If If Me.txt_cal_fis.ReadOnly = False Then If Me.txt_cal_fis.Text.Length = 0 Then MessageBox.Show("DIGITE LA CALIFICACION QUE ALCANZÓ EL ESTUDIANTE PARA FISICA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cal_fis.Focus() Validar = False Exit Function End If End If Validar = True End Function#End Region
Private Sub frm_nivelacion_materias_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL, SQL1 As String Me.Cursor = System.Windows.Forms.Cursors.Default Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_matematicas AS MATEMATICAS,A.fld_español AS ESPAÑOL,A.fld_artes AS ARTES,A.fld_tecnologia AS TECNOLOGIA,A.fld_sociales AS SOCIALES,A.fld_religion AS RELIGION,A.fld_ingles AS INGLES,A.fld_naturales AS NATURALES,A.fld_filosofia AS FILOSOFIA,A.fld_quimica AS QUIMICA,A.fld_fisica AS FISICA,A.fld_cual_matematicas AS [DEFINICION MATEMATICAS],A.fld_cual_español AS [DEFINICION ESPAÑOL],A.fld_cual_artes AS [DEFINICION ARTES],A.fld_cual_tecnologia AS [DEFINICION TECNOLOGIA],A.fld_cual_sociales AS [DEFINICION SOCIALES],A.fld_cual_religion AS [DEFINICION RELIGION],A.fld_cual_ingles AS
259
260 SOFBATEC 1.0DERECHOS RESERVADOS
[DEFINICION INGLES],A.fld_cual_naturales AS [DEFINICION NATURALES],A.fld_cual_filosofia AS [DEFINICION FILOSOFIA],A.fld_cual_quimica AS [DEFINICION QUIMICA],A.fld_cual_fisica AS [DEFINICION FISICA]" SQL = SQL & " from tbl_nivelacion_estudiante A" SQL = SQL & " order by A.fld_grado" CMDselect.CommandText = SQL DA_CALIFICACION.SelectCommand = CMDselect DA_CALIFICACION.Fill(DS_Datos, "TBL_NIVELACION")
SQL1 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA" SQL1 = SQL1 & " from tbl_nivelacion_estudiante A" SQL1 = SQL1 & " order by A.fld_grado" CMDselect.CommandText = SQL1 DA_GRIDCALIFICACION.SelectCommand = CMDselect DA_GRIDCALIFICACION.Fill(DS_Datos, "TBL_GRIDNIV")
CONEXION.Close()
Me.dtg_consulta.CaptionText = "REGISTROS DE CALIFICACIONES DE LOS ESTUDIANTES EN EL PROCESO DE NIVELACION" Me.dtg_consulta.DataSource = DS_Datos.Tables("TBL_GRIDNIV")
Me.lblposicion.Text = "Registro de nivelacion de estudiantes"
Call LIMPIAROBJETOS() Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub txt_id_estudiante_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_id_estudiante.Leave If Me.txt_id_estudiante.TextLength = 0 Then
260
261 SOFBATEC 1.0DERECHOS RESERVADOS
DS_Datos.Tables("TBL_GRIDNIV").Clear() Exit Sub Else Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select A.fld_id_estudiante,A.fld_nom_estudiante,A.fld_ape_estudiante,A.fld_grado,A.fld_periodo,A.fld_cual_matematicas,A.fld_cual_español,A.fld_cual_artes,A.fld_cual_tecnologia,A.fld_cual_sociales,A.fld_cual_religion,A.fld_cual_ingles,A.fld_cual_naturales,A.fld_cual_filosofia,A.fld_cual_quimica,A.fld_cual_fisica from tbl_calificacion_estudiantes A where A.fld_id_estudiante=" & Me.txt_id_estudiante.Text & "" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then Me.txt_apellidos_estudiante.Text = DR_CONSULTA.Item("fld_ape_estudiante") Me.txt_estudiante.Text = DR_CONSULTA.Item("fld_nom_estudiante") Me.txt_grado.Text = DR_CONSULTA.Item("fld_grado") Me.txt_periodo.Text = DR_CONSULTA.Item("fld_periodo") Me.txt_cal_act_mat.Text = DR_CONSULTA.Item("fld_cual_matematicas") Me.txt_cal_act_esp.Text = DR_CONSULTA.Item("fld_cual_español") Me.txt_cal_act_art.Text = DR_CONSULTA.Item("fld_cual_artes") Me.txt_cal_act_tec.Text = DR_CONSULTA.Item("fld_cual_tecnologia") Me.txt_cal_act_soc.Text = DR_CONSULTA.Item("fld_cual_sociales") Me.txt_cal_act_rel.Text = DR_CONSULTA.Item("fld_cual_religion") Me.txt_cal_act_ing.Text = DR_CONSULTA.Item("fld_cual_ingles") Me.txt_cal_act_nat.Text = DR_CONSULTA.Item("fld_cual_naturales") Me.txt_cal_act_fil.Text = DR_CONSULTA.Item("fld_cual_filosofia") Me.txt_cal_act_qui.Text = DR_CONSULTA.Item("fld_cual_quimica") Me.txt_cal_act_fis.Text = DR_CONSULTA.Item("fld_cual_fisica") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("LA IDENTIFICACION DIGITADA NO ESTA REGISTRADA EN LAS CALIFICACIONES DE LOS ESTUDIANTES", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_id_estudiante.Focus() DR_CONSULTA.Close() Exit Sub End If
If Me.txt_periodo.TextLength = 0 Or Me.txt_cal_act_mat.TextLength = 0 Then MessageBox.Show("EL ESTUDIANTE NO REGISTRA CALIFICACIONES QUE NIVELAR", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Stop) Me.txt_id_estudiante.Clear()
261
262 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_id_estudiante.Focus() Exit Sub
Else
If Me.txt_cal_mat.ReadOnly = True Then Me.txt_cal_mat.ReadOnly = False If Me.txt_cual_mat.ReadOnly = True Then Me.txt_cual_mat.ReadOnly = False If Me.txt_cal_esp.ReadOnly = True Then Me.txt_cal_esp.ReadOnly = False If Me.txt_cual_esp.ReadOnly = True Then Me.txt_cual_esp.ReadOnly = False If Me.txt_cal_art.ReadOnly = True Then Me.txt_cal_art.ReadOnly = False If Me.txt_cual_art.ReadOnly = True Then Me.txt_cual_art.ReadOnly = False If Me.txt_cal_tec.ReadOnly = True Then Me.txt_cal_tec.ReadOnly = False If Me.txt_cual_tec.ReadOnly = True Then Me.txt_cual_tec.ReadOnly = False If Me.txt_cal_rel.ReadOnly = True Then Me.txt_cal_rel.ReadOnly = False If Me.txt_cual_rel.ReadOnly = True Then Me.txt_cual_rel.ReadOnly = False If Me.txt_cal_ing.ReadOnly = True Then Me.txt_cal_ing.ReadOnly = False If Me.txt_cual_ing.ReadOnly = True Then Me.txt_cual_ing.ReadOnly = False
If Me.txt_grado.Text = "6ºA" Or Me.txt_grado.Text = "6ºB" Or Me.txt_grado.Text = "6ºC" Or Me.txt_grado.Text = "6ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False
If Me.chk_artes.Text = "artes graficas" Or Me.chk_artes.Text = "artisitcas" Then Me.chk_artes.Text = "artes" End If
If Me.chk_tecnologia.Text = "tecnologia" Then Me.chk_tecnologia.Text = "tecnologia y sistemas"
262
263 SOFBATEC 1.0DERECHOS RESERVADOS
End If
If Me.txt_cual_soc.ReadOnly = True Then Me.txt_cual_soc.ReadOnly = False If Me.txt_cal_soc.ReadOnly = True Then Me.txt_cal_soc.ReadOnly = False If Me.txt_cual_nat.ReadOnly = True Then Me.txt_cual_nat.ReadOnly = False If Me.txt_cal_nat.ReadOnly = True Then Me.txt_cal_nat.ReadOnly = False If Me.txt_cal_qui.ReadOnly = False Then Me.txt_cal_qui.ReadOnly = True If Me.txt_cual_qui.ReadOnly = False Then Me.txt_cual_qui.ReadOnly = True If Me.txt_cal_fis.ReadOnly = False Then Me.txt_cal_fis.ReadOnly = True If Me.txt_cual_fis.ReadOnly = False Then Me.txt_cual_fis.ReadOnly = True If Me.txt_cal_fil.ReadOnly = False Then Me.txt_cal_fil.ReadOnly = True If Me.txt_cual_fil.ReadOnly = False Then Me.txt_cual_fil.ReadOnly = True
End If
If Me.txt_grado.Text = "7ºA" Or Me.txt_grado.Text = "7ºB" Or Me.txt_grado.Text = "7ºC" Or Me.txt_grado.Text = "7ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False
If Me.txt_cual_soc.ReadOnly = True Then Me.txt_cual_soc.ReadOnly = False If Me.txt_cal_soc.ReadOnly = True Then Me.txt_cal_soc.ReadOnly = False If Me.txt_cual_nat.ReadOnly = True Then Me.txt_cual_nat.ReadOnly = False If Me.txt_cal_nat.ReadOnly = True Then Me.txt_cal_nat.ReadOnly = False
263
264 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_cal_qui.ReadOnly = False Then Me.txt_cal_qui.ReadOnly = True If Me.txt_cual_qui.ReadOnly = False Then Me.txt_cual_qui.ReadOnly = True If Me.txt_cal_fis.ReadOnly = False Then Me.txt_cal_fis.ReadOnly = True If Me.txt_cual_fis.ReadOnly = False Then Me.txt_cual_fis.ReadOnly = True If Me.txt_cal_fil.ReadOnly = False Then Me.txt_cal_fil.ReadOnly = True If Me.txt_cual_fil.ReadOnly = False Then Me.txt_cual_fil.ReadOnly = True
If Me.chk_artes.Text = "artes graficas" Or Me.chk_artes.Text = "artisitcas" Then Me.chk_artes.Text = "artes" End If
If Me.chk_tecnologia.Text = "tecnologia" Then Me.chk_tecnologia.Text = "tecnologia y sistemas" End If
End If
If Me.txt_grado.Text = "8ºA" Or Me.txt_grado.Text = "8ºB" Or Me.txt_grado.Text = "8ºC" Or Me.txt_grado.Text = "8ºD" Then
If Me.txt_cual_soc.ReadOnly = True Then Me.txt_cual_soc.ReadOnly = False If Me.txt_cal_soc.ReadOnly = True Then Me.txt_cal_soc.ReadOnly = False If Me.txt_cual_nat.ReadOnly = True Then Me.txt_cual_nat.ReadOnly = False If Me.txt_cal_nat.ReadOnly = True Then Me.txt_cal_nat.ReadOnly = False If Me.txt_cal_qui.ReadOnly = False Then Me.txt_cal_qui.ReadOnly = True If Me.txt_cual_qui.ReadOnly = False Then Me.txt_cual_qui.ReadOnly = True If Me.txt_cal_fis.ReadOnly = False Then Me.txt_cal_fis.ReadOnly = True If Me.txt_cual_fis.ReadOnly = False Then Me.txt_cual_fis.ReadOnly = True If Me.txt_cal_fil.ReadOnly = False Then Me.txt_cal_fil.ReadOnly = True If Me.txt_cual_fil.ReadOnly = False Then Me.txt_cual_fil.ReadOnly = True
Me.chk_matematicas.Checked = True
264
265 SOFBATEC 1.0DERECHOS RESERVADOS
Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False Me.chk_artes.Text = "artisticas" Me.chk_tecnologia.Text = "tecnologia"
End If
If Me.txt_grado.Text = "9ºA" Or Me.txt_grado.Text = "9ºB" Or Me.txt_grado.Text = "9ºC" Or Me.txt_grado.Text = "9ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = True Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = True Me.chk_filosofia.Checked = False Me.chk_quimica.Checked = False Me.chk_fisica.Checked = False
If Me.txt_cual_soc.ReadOnly = True Then Me.txt_cual_soc.ReadOnly = False If Me.txt_cal_soc.ReadOnly = True Then Me.txt_cal_soc.ReadOnly = False If Me.txt_cual_nat.ReadOnly = True Then Me.txt_cual_nat.ReadOnly = False If Me.txt_cal_nat.ReadOnly = True Then Me.txt_cal_nat.ReadOnly = False If Me.txt_cal_qui.ReadOnly = False Then Me.txt_cal_qui.ReadOnly = True If Me.txt_cual_qui.ReadOnly = False Then Me.txt_cual_qui.ReadOnly = True If Me.txt_cal_fis.ReadOnly = False Then Me.txt_cal_fis.ReadOnly = True If Me.txt_cual_fis.ReadOnly = False Then Me.txt_cual_fis.ReadOnly = True If Me.txt_cal_fil.ReadOnly = False Then Me.txt_cal_fil.ReadOnly = True
265
266 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_cual_fil.ReadOnly = False Then Me.txt_cual_fil.ReadOnly = True
Me.chk_artes.Text = "artisticas" Me.chk_tecnologia.Text = "tecnologia"
End If
If Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = False Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = False Me.chk_filosofia.Checked = True Me.chk_quimica.Checked = True Me.chk_fisica.Checked = True
If Me.txt_cual_soc.ReadOnly = False Then Me.txt_cual_soc.ReadOnly = True If Me.txt_cal_soc.ReadOnly = False Then Me.txt_cal_soc.ReadOnly = True If Me.txt_cual_nat.ReadOnly = False Then Me.txt_cual_nat.ReadOnly = True If Me.txt_cal_nat.ReadOnly = False Then Me.txt_cal_nat.ReadOnly = True If Me.txt_cal_qui.ReadOnly = True Then Me.txt_cal_qui.ReadOnly = False If Me.txt_cual_qui.ReadOnly = True Then Me.txt_cual_qui.ReadOnly = False If Me.txt_cal_fis.ReadOnly = True Then Me.txt_cal_fis.ReadOnly = False If Me.txt_cual_fis.ReadOnly = True Then Me.txt_cual_fis.ReadOnly = False If Me.txt_cal_fil.ReadOnly = True Then Me.txt_cal_fil.ReadOnly = False If Me.txt_cual_fil.ReadOnly = True Then Me.txt_cual_fil.ReadOnly = False
Me.chk_artes.Text = "artes graficas" Me.chk_tecnologia.Text = "tecnologia"
End If
266
267 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Then
Me.chk_matematicas.Checked = True Me.chk_español.Checked = True Me.chk_artes.Checked = True Me.chk_tecnologia.Checked = True Me.chk_sociales.Checked = False Me.chk_religion.Checked = True Me.chk_ingles.Checked = True Me.chk_naturales.Checked = False Me.chk_filosofia.Checked = True Me.chk_quimica.Checked = True Me.chk_fisica.Checked = True
If Me.txt_cual_soc.ReadOnly = False Then Me.txt_cual_soc.ReadOnly = True If Me.txt_cal_soc.ReadOnly = False Then Me.txt_cal_soc.ReadOnly = True If Me.txt_cual_nat.ReadOnly = False Then Me.txt_cual_nat.ReadOnly = True If Me.txt_cal_nat.ReadOnly = False Then Me.txt_cal_nat.ReadOnly = True If Me.txt_cal_qui.ReadOnly = True Then Me.txt_cal_qui.ReadOnly = False If Me.txt_cual_qui.ReadOnly = True Then Me.txt_cual_qui.ReadOnly = False If Me.txt_cal_fis.ReadOnly = True Then Me.txt_cal_fis.ReadOnly = False If Me.txt_cual_fis.ReadOnly = True Then Me.txt_cual_fis.ReadOnly = False If Me.txt_cal_fil.ReadOnly = True Then Me.txt_cal_fil.ReadOnly = False If Me.txt_cual_fil.ReadOnly = True Then Me.txt_cual_fil.ReadOnly = False
Me.chk_artes.Text = "artes graficas" Me.chk_tecnologia.Text = "tecnologia" End If
Me.txt_cal_mat.Focus() End If Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If
267
268 SOFBATEC 1.0DERECHOS RESERVADOS
End Try End If End Sub
Private Sub btn_nuevo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_nuevo.Click Try If notvisible = True Then notvisible = False Call visibilidad()
Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.txt_id_estudiante.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1)
Catch excepcion As Exception If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_cancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_cancelar.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 Call ENLACES() End Sub
Private Sub btn_grabar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_grabar.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1, SQL2, SQL3 As String Try
Dim Estadope As String If Me.rbt_si_apro_mater.Checked = True Then Estadope = "APROBADO" Else Estadope = "REPROBADO" End If If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO tbl_nivelacion_estudiante(fld_id_estudiante,fld_nom_estudiante,fld_ape_estudiante,fld_grado,fld_periodo,fld_matematicas,fld_español,fld_artes,fld_tecnologia,fld_sociales,fld_religion,fld_ingles,fld_naturales,fld_filosofia,fld_quimica,fld_fisica,fld_cual_matematicas,fld_cual_español,fld_cual_artes,fld_cual_tecnologia,fld_cual_sociales,fld_cual_religion,fld_cual_ingles,fld_cual_naturales,fld_cual_filosofia,fld_cual_quimica,fld_cual_fisica)VALUES("
268
269 SOFBATEC 1.0DERECHOS RESERVADOS
SQL = SQL & Me.txt_id_estudiante.Text & "" SQL = SQL & ",'" & Me.txt_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_apellidos_estudiante.Text & "'" SQL = SQL & ",'" & Me.txt_grado.Text & "'" SQL = SQL & ",'" & Me.txt_periodo.Text & "'" SQL = SQL & "," & Me.chk_matematicas.Checked & "" SQL = SQL & "," & Me.chk_español.Checked & "" SQL = SQL & "," & Me.chk_artes.Checked & "" SQL = SQL & "," & Me.chk_tecnologia.Checked & "" SQL = SQL & "," & Me.chk_sociales.Checked & "" SQL = SQL & "," & Me.chk_religion.Checked & "" SQL = SQL & "," & Me.chk_ingles.Checked & "" SQL = SQL & "," & Me.chk_naturales.Checked & "" SQL = SQL & "," & Me.chk_filosofia.Checked & "" SQL = SQL & "," & Me.chk_quimica.Checked & "" SQL = SQL & "," & Me.chk_fisica.Checked & "" SQL = SQL & ",'" & Me.txt_cual_mat.Text & "'" SQL = SQL & ",'" & Me.txt_cual_esp.Text & "'" SQL = SQL & ",'" & Me.txt_cual_art.Text & "'" SQL = SQL & ",'" & Me.txt_cual_tec.Text & "'" SQL = SQL & ",'" & Me.txt_cual_soc.Text & "'" SQL = SQL & ",'" & Me.txt_cual_rel.Text & "'" SQL = SQL & ",'" & Me.txt_cual_ing.Text & "'" SQL = SQL & ",'" & Me.txt_cual_nat.Text & "'" SQL = SQL & ",'" & Me.txt_cual_fil.Text & "'" SQL = SQL & ",'" & Me.txt_cual_qui.Text & "'" SQL = SQL & ",'" & Me.txt_cual_fis.Text & "')"
SQL1 = "UPDATE tbl_calificacion_estudiantes SET " SQL1 = SQL1 & "fld_cual_matematicas='" & Me.txt_cual_mat.Text & "'" SQL1 = SQL1 & ",fld_cual_español='" & Me.txt_cual_esp.Text & "'" SQL1 = SQL1 & ",fld_cual_artes='" & Me.txt_cual_art.Text & "'" SQL1 = SQL1 & ",fld_cual_tecnologia='" & Me.txt_cual_tec.Text & "'" SQL1 = SQL1 & ",fld_cual_sociales='" & Me.txt_cual_soc.Text & "'" SQL1 = SQL1 & ",fld_cual_religion='" & Me.txt_cual_rel.Text & "'" SQL1 = SQL1 & ",fld_cual_ingles='" & Me.txt_cual_ing.Text & "'" SQL1 = SQL1 & ",fld_cual_naturales='" & Me.txt_cual_nat.Text & "'" SQL1 = SQL1 & ",fld_cual_filosofia='" & Me.txt_cual_fil.Text & "'" SQL1 = SQL1 & ",fld_cual_quimica='" & Me.txt_cual_qui.Text & "'" SQL1 = SQL1 & ",fld_cual_fisica='" & Me.txt_cual_fis.Text & "'" SQL1 = SQL1 & ",fld_estado_periodo='" & Estadope & "'" SQL1 = SQL1 & " WHERE fld_nom_estudiante='" & Me.txt_estudiante.Text & "'AND fld_ape_estudiante='" & Me.txt_apellidos_estudiante.Text & "'"
CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CALIFICACION.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery()
269
270 SOFBATEC 1.0DERECHOS RESERVADOS
CMDActualizar.CommandText = SQL1 CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "ASIGNATURAS NIVELADAS SATISFACTORIAMENTE"
Else
SQL = "UPDATE tbl_nivelacion_estudiante SET " SQL = SQL & "fld_cual_matematicas='" & Me.txt_cual_mat.Text & "'" SQL = SQL & ",fld_cual_español='" & Me.txt_cual_esp.Text & "'" SQL = SQL & ",fld_cual_artes='" & Me.txt_cual_art.Text & "'" SQL = SQL & ",fld_cual_tecnologia='" & Me.txt_cual_tec.Text & "'" SQL = SQL & ",fld_cual_sociales='" & Me.txt_cual_soc.Text & "'" SQL = SQL & ",fld_cual_religion='" & Me.txt_cual_rel.Text & "'" SQL = SQL & ",fld_cual_ingles='" & Me.txt_cual_ing.Text & "'" SQL = SQL & ",fld_cual_naturales='" & Me.txt_cual_nat.Text & "'" SQL = SQL & ",fld_cual_filosofia='" & Me.txt_cual_fil.Text & "'" SQL = SQL & ",fld_cual_quimica='" & Me.txt_cual_qui.Text & "'" SQL = SQL & ",fld_cual_fisica='" & Me.txt_cual_fis.Text & "'"
SQL1 = "UPDATE tbl_calificacion_estudiantes SET " SQL1 = SQL1 & "fld_cual_matematicas='" & Me.txt_cual_mat.Text & "'" SQL1 = SQL1 & ",fld_cual_español='" & Me.txt_cual_esp.Text & "'" SQL1 = SQL1 & ",fld_cual_artes='" & Me.txt_cual_art.Text & "'" SQL1 = SQL1 & ",fld_cual_tecnologia='" & Me.txt_cual_tec.Text & "'" SQL1 = SQL1 & ",fld_cual_sociales='" & Me.txt_cual_soc.Text & "'" SQL1 = SQL1 & ",fld_cual_religion='" & Me.txt_cual_rel.Text & "'" SQL1 = SQL1 & ",fld_cual_ingles='" & Me.txt_cual_ing.Text & "'" SQL1 = SQL1 & ",fld_cual_naturales='" & Me.txt_cual_nat.Text & "'" SQL1 = SQL1 & ",fld_cual_filosofia='" & Me.txt_cual_fil.Text & "'" SQL1 = SQL1 & ",fld_cual_quimica='" & Me.txt_cual_qui.Text & "'" SQL1 = SQL1 & ",fld_cual_fisica='" & Me.txt_cual_fis.Text & "'" SQL1 = SQL1 & ",fld_estado_periodo='" & Estadope & "'" SQL1 = SQL1 & " WHERE fld_nom_estudiante='" & Me.txt_estudiante.Text & "'AND fld_ape_estudiante='" & Me.txt_apellidos_estudiante.Text & "'"
If MessageBox.Show("RECUERDE QUE AL GRABAR LAS RESPECITVAS CALIFICACIONES NO PODRA EN UN FUTURO MODIFICARLAS DESEA CONTINUAR?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery()
CMDActualizar.CommandText = SQL1 CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar
270
271 SOFBATEC 1.0DERECHOS RESERVADOS
CMDActualizar.ExecuteNonQuery() MENSAJE = "CALIFICACIONES MODIFICADAS EXITOSAMENE" Else SWGrabar = -1 MessageBox.Show("SE HA CANCELADO LA MIDIFICACION DE LAS NOTAS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Stop) Exit Sub End If
End If SQL2 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_matematicas AS MATEMATICAS,A.fld_español AS ESPAÑOL,A.fld_artes AS ARTES,A.fld_tecnologia AS TECNOLOGIA,A.fld_sociales AS SOCIALES,A.fld_religion AS RELIGION,A.fld_ingles AS INGLES,A.fld_naturales AS NATURALES,A.fld_filosofia AS FILOSOFIA,A.fld_quimica AS QUIMICA,A.fld_fisica AS FISICA,A.fld_cual_matematicas AS [DEFINICION MATEMATICAS],A.fld_cual_español AS [DEFINICION ESPAÑOL],A.fld_cual_artes AS [DEFINICION ARTES],A.fld_cual_tecnologia AS [DEFINICION TECNOLOGIA],A.fld_cual_sociales AS [DEFINICION SOCIALES],A.fld_cual_religion AS [DEFINICION RELIGION],A.fld_cual_ingles AS [DEFINICION INGLES],A.fld_cual_naturales AS [DEFINICION NATURALES],A.fld_cual_filosofia AS [DEFINICION FILOSOFIA],A.fld_cual_quimica AS [DEFINICION QUIMICA],A.fld_cual_fisica AS [DEFINICION FISICA]" SQL2 = SQL2 & " from tbl_nivelacion_estudiante A" SQL2 = SQL2 & " order by A.fld_grado" CMDselect.CommandText = SQL2 DS_Datos.Tables("tbl_nivelacion").Clear() DA_CALIFICACION.SelectCommand = CMDselect DA_CALIFICACION.Fill(DS_Datos, "TBL_NIVELACION")
SQL3 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA" SQL3 = SQL3 & " from tbl_nivelacion_estudiante A" SQL3 = SQL3 & " order by A.fld_grado" CMDselect.CommandText = SQL3 DS_Datos.Tables("tbl_gridniv").Clear() DA_GRIDCALIFICACION.SelectCommand = CMDselect
271
272 SOFBATEC 1.0DERECHOS RESERVADOS
DA_GRIDCALIFICACION.Fill(DS_Datos, "TBL_GRIDNIV")
CONEXION.Close() Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_modificar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_modificar.Click
If Me.txt_id_estudiante.TextLength = 0 Then MessageBox.Show("NO HAY NINGUN ESTUDIANTE SELECCIONADO PARA MODIFICAR LAS NOTAS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Stop) Exit Sub End If
If notvisible = True Then notvisible = False Call visibilidad()
Dim optnive As New frm_mod_nivelacion optnive.ShowDialog()
If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Or Me.txt_grado.Text = "11º0" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then If mat = True Then Me.txt_cal_mat.ReadOnly = False Me.txt_cual_mat.ReadOnly = False End If
If esp = True Then Me.txt_cal_esp.ReadOnly = False Me.txt_cual_esp.ReadOnly = False End If
If art = True Then Me.txt_cal_art.ReadOnly = False Me.txt_cual_art.ReadOnly = False End If
272
273 SOFBATEC 1.0DERECHOS RESERVADOS
If tec = True Then Me.txt_cal_tec.ReadOnly = False Me.txt_cual_tec.ReadOnly = False End If
If rel = True Then Me.txt_cal_rel.ReadOnly = False Me.txt_cual_rel.ReadOnly = False End If
If ing = True Then Me.txt_cal_ing.ReadOnly = False Me.txt_cual_ing.ReadOnly = False End If
If fil = True Then Me.txt_cal_fil.ReadOnly = False Me.txt_cual_fil.ReadOnly = False End If
If qui = True Then Me.txt_cal_qui.ReadOnly = False Me.txt_cual_qui.ReadOnly = False End If
If fis = True Then Me.txt_cal_fis.ReadOnly = False Me.txt_cual_fis.ReadOnly = False End If
Me.txt_cal_soc.Enabled = False Me.txt_cual_soc.Enabled = False Me.txt_cal_nat.Enabled = False Me.txt_cual_nat.Enabled = False
If Me.txt_cal_mat.ReadOnly = False Then Me.txt_cal_mat.Focus() Else If Me.txt_cal_esp.ReadOnly = False Then Me.txt_cal_esp.Focus() Else If Me.txt_cal_art.ReadOnly = False Then Me.txt_cal_art.Focus() Else If Me.txt_cal_tec.ReadOnly = False Then Me.txt_cal_tec.Focus() Else If Me.txt_cal_rel.ReadOnly = False Then
273
274 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_rel.Focus() Else If Me.txt_cal_ing.ReadOnly = False Then Me.txt_cal_ing.Focus() Else If Me.txt_cal_fil.ReadOnly = False Then Me.txt_cal_fil.Focus() Else If Me.txt_cal_qui.ReadOnly = False Then Me.txt_cal_qui.Focus() Else If Me.txt_cal_fis.ReadOnly = False Then Me.txt_cal_fis.Focus() End If End If End If End If End If End If End If End If End If
Else If mat = True Then Me.txt_cal_mat.ReadOnly = False Me.txt_cual_mat.ReadOnly = False End If
If esp = True Then Me.txt_cal_esp.ReadOnly = False Me.txt_cual_esp.ReadOnly = False End If
If art = True Then Me.txt_cal_art.ReadOnly = False Me.txt_cual_art.ReadOnly = False End If
If tec = True Then Me.txt_cal_tec.ReadOnly = False Me.txt_cual_tec.ReadOnly = False End If
If soc = True Then Me.txt_cal_soc.ReadOnly = False Me.txt_cual_soc.ReadOnly = False End If
If rel = True Then
274
275 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cal_rel.ReadOnly = False Me.txt_cual_rel.ReadOnly = False End If
If ing = True Then Me.txt_cal_ing.ReadOnly = False Me.txt_cual_ing.ReadOnly = False End If
If nat = True Then Me.txt_cal_nat.ReadOnly = False Me.txt_cual_nat.ReadOnly = False End If
Me.txt_cal_fil.Enabled = False Me.txt_cual_fil.Enabled = False Me.txt_cal_qui.Enabled = False Me.txt_cual_qui.Enabled = False Me.txt_cal_fis.Enabled = False Me.txt_cual_fis.Enabled = False
If Me.txt_cal_mat.ReadOnly = False Then Me.txt_cal_mat.Focus() Else If Me.txt_cal_esp.ReadOnly = False Then Me.txt_cal_esp.Focus() Else If Me.txt_cal_art.ReadOnly = False Then Me.txt_cal_art.Focus() Else If Me.txt_cal_tec.ReadOnly = False Then Me.txt_cal_tec.Focus() Else If Me.txt_cal_soc.ReadOnly = False Then Me.txt_cal_soc.Focus() Else If Me.txt_cal_rel.ReadOnly = False Then Me.txt_cal_rel.Focus() Else If Me.txt_cal_ing.ReadOnly = False Then Me.txt_cal_ing.Focus() Else If Me.txt_cal_nat.ReadOnly = False Then Me.txt_cal_nat.Focus() End If End If
End If End If End If
275
276 SOFBATEC 1.0DERECHOS RESERVADOS
End If End If End If
End If Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub txt_cal_ing_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_ing.Leave If Me.txt_cal_ing.Text = "e" Or Me.txt_cal_ing.Text = "E" Then Me.txt_cual_ing.Text = "EXCELENTE" If Me.txt_cal_ing.Text = "s" Or Me.txt_cal_ing.Text = "S" Then Me.txt_cual_ing.Text = "SOBRESALIENTE" If Me.txt_cal_ing.Text = "a" Or Me.txt_cal_ing.Text = "A" Then Me.txt_cual_ing.Text = "ACEPTABLE" If Me.txt_cal_ing.Text = "i" Or Me.txt_cal_ing.Text = "I" Then Me.txt_cual_ing.Text = "INSUFICIENTE" Me.txt_cual_ing.ReadOnly = True End Sub
Private Sub txt_cal_qui_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_qui.Leave If Me.txt_cal_qui.Text = "e" Or Me.txt_cal_qui.Text = "E" Then Me.txt_cual_qui.Text = "EXCELENTE" If Me.txt_cal_qui.Text = "s" Or Me.txt_cal_qui.Text = "S" Then Me.txt_cual_qui.Text = "SOBRESALIENTE" If Me.txt_cal_qui.Text = "a" Or Me.txt_cal_qui.Text = "A" Then Me.txt_cual_qui.Text = "ACEPTABLE" If Me.txt_cal_qui.Text = "i" Or Me.txt_cal_qui.Text = "I" Then Me.txt_cual_qui.Text = "INSUFICIENTE" Me.txt_cual_qui.ReadOnly = True End Sub
Private Sub txt_cal_mat_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_mat.Leave If Me.txt_cal_mat.Text = "e" Or Me.txt_cal_mat.Text = "E" Then Me.txt_cual_mat.Text = "EXCELENTE" If Me.txt_cal_mat.Text = "s" Or Me.txt_cal_mat.Text = "S" Then Me.txt_cual_mat.Text = "SOBRESALIENTE" If Me.txt_cal_mat.Text = "a" Or Me.txt_cal_mat.Text = "A" Then Me.txt_cual_mat.Text = "ACEPTABLE" If Me.txt_cal_mat.Text = "i" Or Me.txt_cal_mat.Text = "I" Then Me.txt_cual_mat.Text = "INSUFICIENTE" Me.txt_cual_mat.ReadOnly = True End Sub
Private Sub txt_cal_esp_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_esp.Leave
276
277 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_cal_esp.Text = "e" Or Me.txt_cal_esp.Text = "E" Then Me.txt_cual_esp.Text = "EXCELENTE" If Me.txt_cal_esp.Text = "s" Or Me.txt_cal_esp.Text = "S" Then Me.txt_cual_esp.Text = "SOBRESALIENTE" If Me.txt_cal_esp.Text = "a" Or Me.txt_cal_esp.Text = "A" Then Me.txt_cual_esp.Text = "ACEPTABLE" If Me.txt_cal_esp.Text = "i" Or Me.txt_cal_esp.Text = "I" Then Me.txt_cual_esp.Text = "INSUFICIENTE" Me.txt_cual_esp.ReadOnly = True End Sub
Private Sub txt_cal_fil_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_fil.Leave If Me.txt_cal_fil.Text = "e" Or Me.txt_cal_fil.Text = "E" Then Me.txt_cual_fil.Text = "EXCELENTE" If Me.txt_cal_fil.Text = "s" Or Me.txt_cal_fil.Text = "S" Then Me.txt_cual_fil.Text = "SOBRESALIENTE" If Me.txt_cal_fil.Text = "a" Or Me.txt_cal_fil.Text = "A" Then Me.txt_cual_fil.Text = "ACEPTABLE" If Me.txt_cal_fil.Text = "i" Or Me.txt_cal_fil.Text = "I" Then Me.txt_cual_fil.Text = "INSUFICIENTE" Me.txt_cual_fil.ReadOnly = True End Sub
Private Sub txt_cal_tec_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_tec.Leave If Me.txt_cal_tec.Text = "e" Or Me.txt_cal_tec.Text = "E" Then Me.txt_cual_tec.Text = "EXCELENTE" If Me.txt_cal_tec.Text = "s" Or Me.txt_cal_tec.Text = "S" Then Me.txt_cual_tec.Text = "SOBRESALIENTE" If Me.txt_cal_tec.Text = "a" Or Me.txt_cal_tec.Text = "A" Then Me.txt_cual_tec.Text = "ACEPTABLE" If Me.txt_cal_tec.Text = "i" Or Me.txt_cal_tec.Text = "I" Then Me.txt_cual_tec.Text = "INSUFICIENTE" Me.txt_cual_tec.ReadOnly = True End Sub
Private Sub txt_cal_soc_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_soc.Leave If Me.txt_cal_soc.Text = "e" Or Me.txt_cal_soc.Text = "E" Then Me.txt_cual_soc.Text = "EXCELENTE" If Me.txt_cal_soc.Text = "s" Or Me.txt_cal_soc.Text = "S" Then Me.txt_cual_soc.Text = "SOBRESALIENTE" If Me.txt_cal_soc.Text = "a" Or Me.txt_cal_soc.Text = "A" Then Me.txt_cual_soc.Text = "ACEPTABLE" If Me.txt_cal_soc.Text = "i" Or Me.txt_cal_soc.Text = "I" Then Me.txt_cual_soc.Text = "INSUFICIENTE" Me.txt_cual_soc.ReadOnly = True End Sub
277
278 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub txt_cal_art_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_art.Leave If Me.txt_cal_art.Text = "e" Or Me.txt_cal_art.Text = "E" Then Me.txt_cual_art.Text = "EXCELENTE" If Me.txt_cal_art.Text = "s" Or Me.txt_cal_art.Text = "S" Then Me.txt_cual_art.Text = "SOBRESALIENTE" If Me.txt_cal_art.Text = "a" Or Me.txt_cal_art.Text = "A" Then Me.txt_cual_art.Text = "ACEPTABLE" If Me.txt_cal_art.Text = "i" Or Me.txt_cal_art.Text = "I" Then Me.txt_cual_art.Text = "INSUFICIENTE" Me.txt_cual_art.ReadOnly = True End Sub
Private Sub txt_cal_rel_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_rel.Leave If Me.txt_cal_rel.Text = "e" Or Me.txt_cal_rel.Text = "E" Then Me.txt_cual_rel.Text = "EXCELENTE" If Me.txt_cal_rel.Text = "s" Or Me.txt_cal_rel.Text = "S" Then Me.txt_cual_rel.Text = "SOBRESALIENTE" If Me.txt_cal_rel.Text = "a" Or Me.txt_cal_rel.Text = "A" Then Me.txt_cual_rel.Text = "ACEPTABLE" If Me.txt_cal_rel.Text = "i" Or Me.txt_cal_rel.Text = "I" Then Me.txt_cual_rel.Text = "INSUFICIENTE" Me.txt_cual_rel.ReadOnly = True End Sub
Private Sub txt_cal_fis_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_fis.Leave If Me.txt_cal_fis.Text = "e" Or Me.txt_cal_fis.Text = "E" Then Me.txt_cual_fis.Text = "EXCELENTE" If Me.txt_cal_fis.Text = "s" Or Me.txt_cal_fis.Text = "S" Then Me.txt_cual_fis.Text = "SOBRESALIENTE" If Me.txt_cal_fis.Text = "a" Or Me.txt_cal_fis.Text = "A" Then Me.txt_cual_fis.Text = "ACEPTABLE" If Me.txt_cal_fis.Text = "i" Or Me.txt_cal_fis.Text = "I" Then Me.txt_cual_fis.Text = "INSUFICIENTE" Me.txt_cual_fis.ReadOnly = True End Sub
Private Sub txt_cal_nat_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cal_nat.Leave If Me.txt_cal_nat.Text = "e" Or Me.txt_cal_nat.Text = "E" Then Me.txt_cual_nat.Text = "EXCELENTE" If Me.txt_cal_nat.Text = "s" Or Me.txt_cal_nat.Text = "S" Then Me.txt_cual_nat.Text = "SOBRESALIENTE" If Me.txt_cal_nat.Text = "a" Or Me.txt_cal_nat.Text = "A" Then Me.txt_cual_nat.Text = "ACEPTABLE" If Me.txt_cal_nat.Text = "i" Or Me.txt_cal_nat.Text = "I" Then Me.txt_cual_nat.Text = "INSUFICIENTE" Me.txt_cual_nat.ReadOnly = True
278
279 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
Private Sub btn_eliminar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_eliminar.Click Dim SQL, SQL1 As String If Me.txt_estudiante.Text.Length = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE * FROM tbl_nivelacion_estudiante WHERE fld_id_estudiante=" & Me.txt_id_estudiante.Text & "" CMDBorrar.Connection = CONEXION DA_MATRICULA.DeleteCommand = CMDBorrar If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_matematicas AS MATEMATICAS,A.fld_español AS ESPAÑOL,A.fld_artes AS ARTES,A.fld_tecnologia AS TECNOLOGIA,A.fld_sociales AS SOCIALES,A.fld_religion AS RELIGION,A.fld_ingles AS INGLES,A.fld_naturales AS NATURALES,A.fld_filosofia AS FILOSOFIA,A.fld_quimica AS QUIMICA,A.fld_fisica AS FISICA,A.fld_cual_matematicas AS [DEFINICION MATEMATICAS],A.fld_cual_español AS [DEFINICION ESPAÑOL],A.fld_cual_artes AS [DEFINICION ARTES],A.fld_cual_tecnologia AS [DEFINICION TECNOLOGIA],A.fld_cual_sociales AS [DEFINICION SOCIALES],A.fld_cual_religion AS [DEFINICION RELIGION],A.fld_cual_ingles AS [DEFINICION INGLES],A.fld_cual_naturales AS [DEFINICION NATURALES],A.fld_cual_filosofia AS [DEFINICION FILOSOFIA],A.fld_cual_quimica AS [DEFINICION QUIMICA],A.fld_cual_fisica AS [DEFINICION FISICA]" SQL = SQL & " from tbl_nivelacion_estudiante A" SQL = SQL & " order by A.fld_grado" CMDselect.CommandText = SQL DS_Datos.Tables("tbl_nivelacion").Clear() DA_CALIFICACION.SelectCommand = CMDselect DA_CALIFICACION.Fill(DS_Datos, "TBL_NIVELACION")
SQL1 = "select A.fld_id_estudiante as [IDENTIFICACION DEL ESTUDIANTE],A.fld_nom_estudiante AS [NOMBRES DEL
279
280 SOFBATEC 1.0DERECHOS RESERVADOS
ESTUDIANTE],A.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],A.fld_grado AS GRADO,A.fld_periodo AS PERIODO,A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA" SQL1 = SQL1 & " from tbl_nivelacion_estudiante A" SQL1 = SQL1 & " order by A.fld_grado" CMDselect.CommandText = SQL1 DS_Datos.Tables("tbl_gridniv").Clear() DA_GRIDCALIFICACION.SelectCommand = CMDselect DA_GRIDCALIFICACION.Fill(DS_Datos, "TBL_GRIDNIV") MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
If notvisible = True Then notvisible = False Call visibilidad()
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub btn_primero_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_primero.Click Try If notvisible = False Then notvisible = True Call visibilidad()
Call ENLACES() EnlaceBASE.Position = 0 Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
280
281 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub btn_anterior_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_anterior.Click Try If notvisible = False Then notvisible = True Call visibilidad()
Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.btn_primero.Enabled = False Me.btn_anterior.Enabled = False End If Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Me.btn_siguiente.Enabled = True Me.btn_ultimo.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_siguiente_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_siguiente.Click Try If notvisible = False Then notvisible = True Call visibilidad()
Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False End If Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_ultimo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_ultimo.Click Try If notvisible = False Then notvisible = True
281
282 SOFBATEC 1.0DERECHOS RESERVADOS
Call visibilidad()
Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.btn_siguiente.Enabled = False Me.btn_ultimo.Enabled = False Me.btn_anterior.Enabled = True Me.btn_primero.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub frm_nivelacion_materias_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing DS_Datos.Tables("TBL_GRIDNIV").Clear() DS_Datos.Tables("TBL_NIVELACION").Clear() End Sub
Private Sub txt_id_estudiante_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_id_estudiante.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_id_estudiante_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_id_estudiante.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_grado_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_grado.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_grado_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_grado.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0
282
283 SOFBATEC 1.0DERECHOS RESERVADOS
End Select End Sub
Private Sub txt_cal_mat_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_mat.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_mat_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_mat.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_esp_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_esp.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_esp_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_esp.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_art_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_art.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_art_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_art.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_tec_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_tec.KeyDown
283
284 SOFBATEC 1.0DERECHOS RESERVADOS
If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_tec_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_tec.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_soc_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_soc.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_soc_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_soc.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_rel_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_rel.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_rel_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_rel.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_ing_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_ing.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_ing_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_ing.KeyPress
284
285 SOFBATEC 1.0DERECHOS RESERVADOS
Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_nat_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_nat.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_nat_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_nat.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_fil_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_fil.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_fil_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_fil.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub txt_cal_qui_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_qui.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_qui_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_qui.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0
285
286 SOFBATEC 1.0DERECHOS RESERVADOS
End Select End Sub
Private Sub txt_cal_fis_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txt_cal_fis.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub txt_cal_fis_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txt_cal_fis.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub btn_salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_salir.Click Me.Close() End SubEnd Class
Codigo registrar graduandos
286
287 SOFBATEC 1.0DERECHOS RESERVADOS
Imports System.DataImports System.Data.OleDbPublic Class frm_rpt_graduandos Inherits System.Windows.Forms.Form Dim cne As New OleDbConnection Dim datos As New DataSet Dim adactador As New OleDbDataAdapter Dim reporte As New rpt_graduandos Dim comando As New OleDbCommand
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents crv_graduandos As CrystalDecisions.Windows.Forms.CrystalReportViewer <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frm_rpt_graduandos)) Me.crv_graduandos = New CrystalDecisions.Windows.Forms.CrystalReportViewer Me.SuspendLayout() ' 'crv_graduandos '
287
288 SOFBATEC 1.0DERECHOS RESERVADOS
Me.crv_graduandos.ActiveViewIndex = -1 Me.crv_graduandos.Location = New System.Drawing.Point(0, 0) Me.crv_graduandos.Name = "crv_graduandos" Me.crv_graduandos.ReportSource = Nothing Me.crv_graduandos.Size = New System.Drawing.Size(288, 272) Me.crv_graduandos.TabIndex = 0 ' 'frm_rpt_graduandos ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15) Me.ClientSize = New System.Drawing.Size(292, 273) Me.Controls.Add(Me.crv_graduandos) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Name = "frm_rpt_graduandos" Me.Text = "Impresion de documentos - SOFTBATEC" Me.ResumeLayout(False)
End Sub
#End Region
Private Sub frm_rpt_graduandos_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize Me.crv_graduandos.Width = Me.Width Me.crv_graduandos.Height = Me.Height Me.crv_graduandos.Left = 0 Me.crv_graduandos.Top = 0 End Sub
Private Sub frm_rpt_graduandos_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Try cne.ConnectionString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & RutaReal & "\BD_softbatec.mdb" cne.Open() comando.CommandText = "select * from vw_graduandos" comando.Connection = cne comando.ExecuteNonQuery() adactador.SelectCommand = comando adactador.Fill(datos, "tbl_graduandos") reporte.SetDataSource(datos.Tables("tbl_graduandos")) Me.crv_graduandos.ReportSource = reporte Me.crv_graduandos.Show() Catch excepcion As Exception MsgBox(excepcion.Message.ToUpper, MsgBoxStyle.Information And MsgBoxStyle.OKOnly, "SOFTBATEC") End Try End SubEnd Class
288
289 SOFBATEC 1.0DERECHOS RESERVADOS
Codigo registrar ciudades
Public Class frm_ciudades Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms
289
290 SOFBATEC 1.0DERECHOS RESERVADOS
Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip Friend WithEvents dtg_CONSULTA As System.Windows.Forms.DataGrid Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents BTN_CANCELAR As System.Windows.Forms.Button Friend WithEvents BTN_BORRAR As System.Windows.Forms.Button Friend WithEvents BTN_GRABAR As System.Windows.Forms.Button Friend WithEvents BTN_MODIFICAR As System.Windows.Forms.Button Friend WithEvents BTN_NUEVO As System.Windows.Forms.Button Friend WithEvents BTN_EXAMINAR As System.Windows.Forms.Button Friend WithEvents CMB_DPTOS As System.Windows.Forms.ComboBox Friend WithEvents LBL_DEPARTAMENTO As System.Windows.Forms.Label Friend WithEvents BTN_ULTIMO As System.Windows.Forms.Button Friend WithEvents BTN_SIGUIENTE As System.Windows.Forms.Button Friend WithEvents BTN_ANTERIOR As System.Windows.Forms.Button Friend WithEvents BTN_PRIMERO As System.Windows.Forms.Button Friend WithEvents TXT_NOMBRE As System.Windows.Forms.TextBox Friend WithEvents TXT_CODIGO As System.Windows.Forms.TextBox Friend WithEvents LBL_NOMBRE As System.Windows.Forms.Label Friend WithEvents LBL_CODIGO As System.Windows.Forms.Label Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Me.Label4 = New System.Windows.Forms.Label Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.BTN_CANCELAR = New System.Windows.Forms.Button Me.BTN_BORRAR = New System.Windows.Forms.Button Me.BTN_GRABAR = New System.Windows.Forms.Button Me.BTN_MODIFICAR = New System.Windows.Forms.Button Me.BTN_NUEVO = New System.Windows.Forms.Button Me.BTN_EXAMINAR = New System.Windows.Forms.Button Me.BTN_ULTIMO = New System.Windows.Forms.Button Me.BTN_SIGUIENTE = New System.Windows.Forms.Button Me.BTN_ANTERIOR = New System.Windows.Forms.Button Me.BTN_PRIMERO = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button Me.dtg_CONSULTA = New System.Windows.Forms.DataGrid Me.Label3 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.CMB_DPTOS = New System.Windows.Forms.ComboBox Me.LBL_DEPARTAMENTO = New System.Windows.Forms.Label
290
291 SOFBATEC 1.0DERECHOS RESERVADOS
Me.TXT_NOMBRE = New System.Windows.Forms.TextBox Me.TXT_CODIGO = New System.Windows.Forms.TextBox Me.LBL_NOMBRE = New System.Windows.Forms.Label Me.LBL_CODIGO = New System.Windows.Forms.Label Me.lblposicion = New System.Windows.Forms.Label CType(Me.dtg_CONSULTA, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.LightSkyBlue Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Blue Me.Label4.Location = New System.Drawing.Point(152, 16) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(376, 32) Me.Label4.TabIndex = 2 Me.Label4.Text = "REGISTRO DE CIUDADES" Me.Label4.TextAlign = System.Drawing.ContentAlignment.TopCenter ' 'BTN_CANCELAR ' Me.BTN_CANCELAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_CANCELAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_CANCELAR.Location = New System.Drawing.Point(408, 336) Me.BTN_CANCELAR.Name = "BTN_CANCELAR" Me.BTN_CANCELAR.Size = New System.Drawing.Size(64, 41) Me.BTN_CANCELAR.TabIndex = 59 Me.ToolTip1.SetToolTip(Me.BTN_CANCELAR, "cancelar operacion actual") ' 'BTN_BORRAR ' Me.BTN_BORRAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_BORRAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_BORRAR.Location = New System.Drawing.Point(344, 336) Me.BTN_BORRAR.Name = "BTN_BORRAR" Me.BTN_BORRAR.Size = New System.Drawing.Size(64, 41) Me.BTN_BORRAR.TabIndex = 58 Me.ToolTip1.SetToolTip(Me.BTN_BORRAR, "quitar registro de la base de datos") ' 'BTN_GRABAR
291
292 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.BTN_GRABAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_GRABAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_GRABAR.ForeColor = System.Drawing.Color.Crimson Me.BTN_GRABAR.Location = New System.Drawing.Point(280, 336) Me.BTN_GRABAR.Name = "BTN_GRABAR" Me.BTN_GRABAR.Size = New System.Drawing.Size(64, 41) Me.BTN_GRABAR.TabIndex = 57 Me.ToolTip1.SetToolTip(Me.BTN_GRABAR, "adicionar registro en la base de datos") ' 'BTN_MODIFICAR ' Me.BTN_MODIFICAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_MODIFICAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_MODIFICAR.ForeColor = System.Drawing.Color.Crimson Me.BTN_MODIFICAR.Location = New System.Drawing.Point(216, 336) Me.BTN_MODIFICAR.Name = "BTN_MODIFICAR" Me.BTN_MODIFICAR.Size = New System.Drawing.Size(64, 41) Me.BTN_MODIFICAR.TabIndex = 56 Me.ToolTip1.SetToolTip(Me.BTN_MODIFICAR, "crear cambios en el registro actual") ' 'BTN_NUEVO ' Me.BTN_NUEVO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_NUEVO.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_NUEVO.ForeColor = System.Drawing.Color.Crimson Me.BTN_NUEVO.Location = New System.Drawing.Point(152, 336) Me.BTN_NUEVO.Name = "BTN_NUEVO" Me.BTN_NUEVO.Size = New System.Drawing.Size(64, 41) Me.BTN_NUEVO.TabIndex = 55 Me.ToolTip1.SetToolTip(Me.BTN_NUEVO, "permite crear un nuevo registro") ' 'BTN_EXAMINAR ' Me.BTN_EXAMINAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_EXAMINAR.Font = New System.Drawing.Font("Arial Black", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_EXAMINAR.ForeColor = System.Drawing.Color.Blue Me.BTN_EXAMINAR.Location = New System.Drawing.Point(625, 284) Me.BTN_EXAMINAR.Name = "BTN_EXAMINAR" Me.BTN_EXAMINAR.Size = New System.Drawing.Size(24, 24)
292
293 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_EXAMINAR.TabIndex = 54 Me.BTN_EXAMINAR.Text = "..." Me.ToolTip1.SetToolTip(Me.BTN_EXAMINAR, "EXAMINAR") ' 'BTN_ULTIMO ' Me.BTN_ULTIMO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ULTIMO.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ULTIMO.Location = New System.Drawing.Point(440, 381) Me.BTN_ULTIMO.Name = "BTN_ULTIMO" Me.BTN_ULTIMO.Size = New System.Drawing.Size(48, 35) Me.BTN_ULTIMO.TabIndex = 51 Me.ToolTip1.SetToolTip(Me.BTN_ULTIMO, "IR AL ULTIMO REGISTRO") ' 'BTN_SIGUIENTE ' Me.BTN_SIGUIENTE.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SIGUIENTE.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_SIGUIENTE.Location = New System.Drawing.Point(392, 381) Me.BTN_SIGUIENTE.Name = "BTN_SIGUIENTE" Me.BTN_SIGUIENTE.Size = New System.Drawing.Size(48, 35) Me.BTN_SIGUIENTE.TabIndex = 50 Me.ToolTip1.SetToolTip(Me.BTN_SIGUIENTE, "SIGUIENTE REGISTRO") ' 'BTN_ANTERIOR ' Me.BTN_ANTERIOR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ANTERIOR.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ANTERIOR.Location = New System.Drawing.Point(240, 381) Me.BTN_ANTERIOR.Name = "BTN_ANTERIOR" Me.BTN_ANTERIOR.Size = New System.Drawing.Size(48, 35) Me.BTN_ANTERIOR.TabIndex = 49 Me.ToolTip1.SetToolTip(Me.BTN_ANTERIOR, "ANTERIOR REGISTRO") ' 'BTN_PRIMERO ' Me.BTN_PRIMERO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_PRIMERO.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_PRIMERO.Location = New System.Drawing.Point(192, 381) Me.BTN_PRIMERO.Name = "BTN_PRIMERO" Me.BTN_PRIMERO.Size = New System.Drawing.Size(48, 35) Me.BTN_PRIMERO.TabIndex = 48
293
294 SOFBATEC 1.0DERECHOS RESERVADOS
Me.ToolTip1.SetToolTip(Me.BTN_PRIMERO, "IR AL MPRIMER REGISTRO") ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.Location = New System.Drawing.Point(472, 336) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(64, 41) Me.btn_salir.TabIndex = 285 Me.ToolTip1.SetToolTip(Me.btn_salir, "cancelar operacion actual") ' 'dtg_CONSULTA ' Me.dtg_CONSULTA.AlternatingBackColor = System.Drawing.Color.WhiteSmoke Me.dtg_CONSULTA.BackColor = System.Drawing.Color.Gainsboro Me.dtg_CONSULTA.BackgroundColor = System.Drawing.Color.DarkGray Me.dtg_CONSULTA.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.dtg_CONSULTA.CaptionBackColor = System.Drawing.Color.DarkKhaki Me.dtg_CONSULTA.CaptionFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold) Me.dtg_CONSULTA.CaptionForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.DataMember = "" Me.dtg_CONSULTA.FlatMode = True Me.dtg_CONSULTA.Font = New System.Drawing.Font("Times New Roman", 9.0!) Me.dtg_CONSULTA.ForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.GridLineColor = System.Drawing.Color.Silver Me.dtg_CONSULTA.HeaderBackColor = System.Drawing.Color.Black Me.dtg_CONSULTA.HeaderFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold) Me.dtg_CONSULTA.HeaderForeColor = System.Drawing.Color.White Me.dtg_CONSULTA.LinkColor = System.Drawing.Color.DarkSlateBlue Me.dtg_CONSULTA.Location = New System.Drawing.Point(40, 125) Me.dtg_CONSULTA.Name = "dtg_CONSULTA" Me.dtg_CONSULTA.ParentRowsBackColor = System.Drawing.Color.LightGray Me.dtg_CONSULTA.ParentRowsForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.ReadOnly = True Me.dtg_CONSULTA.SelectionBackColor = System.Drawing.Color.Firebrick Me.dtg_CONSULTA.SelectionForeColor = System.Drawing.Color.White Me.dtg_CONSULTA.Size = New System.Drawing.Size(591, 136) Me.dtg_CONSULTA.TabIndex = 64 ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.BackColor = System.Drawing.Color.LightSkyBlue
294
295 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Blue Me.Label3.Location = New System.Drawing.Point(289, 284) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(118, 21) Me.Label3.TabIndex = 63 Me.Label3.Text = "DEPARTAMENTO" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.BackColor = System.Drawing.Color.LightSkyBlue Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(25, 284) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(66, 21) Me.Label2.TabIndex = 62 Me.Label2.Text = "NOMBRE" ' 'Label1 ' Me.Label1.AutoSize = True Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(25, 97) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(61, 21) Me.Label1.TabIndex = 61 Me.Label1.Text = "CODIGO" ' 'CMB_DPTOS ' Me.CMB_DPTOS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.CMB_DPTOS.Location = New System.Drawing.Point(417, 284) Me.CMB_DPTOS.Name = "CMB_DPTOS" Me.CMB_DPTOS.Size = New System.Drawing.Size(200, 21) Me.CMB_DPTOS.TabIndex = 53 '
295
296 SOFBATEC 1.0DERECHOS RESERVADOS
'LBL_DEPARTAMENTO ' Me.LBL_DEPARTAMENTO.AutoSize = True Me.LBL_DEPARTAMENTO.Location = New System.Drawing.Point(57, 222) Me.LBL_DEPARTAMENTO.Name = "LBL_DEPARTAMENTO" Me.LBL_DEPARTAMENTO.Size = New System.Drawing.Size(0, 16) Me.LBL_DEPARTAMENTO.TabIndex = 52 ' 'TXT_NOMBRE ' Me.TXT_NOMBRE.Location = New System.Drawing.Point(97, 284) Me.TXT_NOMBRE.MaxLength = 60 Me.TXT_NOMBRE.Name = "TXT_NOMBRE" Me.TXT_NOMBRE.Size = New System.Drawing.Size(184, 20) Me.TXT_NOMBRE.TabIndex = 47 Me.TXT_NOMBRE.Text = "" ' 'TXT_CODIGO ' Me.TXT_CODIGO.Location = New System.Drawing.Point(89, 97) Me.TXT_CODIGO.MaxLength = 3 Me.TXT_CODIGO.Name = "TXT_CODIGO" Me.TXT_CODIGO.Size = New System.Drawing.Size(48, 20) Me.TXT_CODIGO.TabIndex = 46 Me.TXT_CODIGO.Text = "" ' 'LBL_NOMBRE ' Me.LBL_NOMBRE.AutoSize = True Me.LBL_NOMBRE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_NOMBRE.Location = New System.Drawing.Point(97, 173) Me.LBL_NOMBRE.Name = "LBL_NOMBRE" Me.LBL_NOMBRE.Size = New System.Drawing.Size(0, 19) Me.LBL_NOMBRE.TabIndex = 45 ' 'LBL_CODIGO ' Me.LBL_CODIGO.AutoSize = True Me.LBL_CODIGO.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_CODIGO.Location = New System.Drawing.Point(41, 104) Me.LBL_CODIGO.Name = "LBL_CODIGO" Me.LBL_CODIGO.Size = New System.Drawing.Size(0, 19) Me.LBL_CODIGO.TabIndex = 44 ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
296
297 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lblposicion.ForeColor = System.Drawing.Color.DarkTurquoise Me.lblposicion.Location = New System.Drawing.Point(288, 381) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(104, 32) Me.lblposicion.TabIndex = 284 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'frm_ciudades ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(666, 429) Me.Controls.Add(Me.btn_salir) Me.Controls.Add(Me.lblposicion) Me.Controls.Add(Me.dtg_CONSULTA) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.BTN_CANCELAR) Me.Controls.Add(Me.BTN_BORRAR) Me.Controls.Add(Me.BTN_GRABAR) Me.Controls.Add(Me.BTN_MODIFICAR) Me.Controls.Add(Me.BTN_NUEVO) Me.Controls.Add(Me.BTN_EXAMINAR) Me.Controls.Add(Me.CMB_DPTOS) Me.Controls.Add(Me.LBL_DEPARTAMENTO) Me.Controls.Add(Me.BTN_ULTIMO) Me.Controls.Add(Me.BTN_SIGUIENTE) Me.Controls.Add(Me.BTN_ANTERIOR) Me.Controls.Add(Me.BTN_PRIMERO) Me.Controls.Add(Me.TXT_NOMBRE) Me.Controls.Add(Me.TXT_CODIGO) Me.Controls.Add(Me.LBL_NOMBRE) Me.Controls.Add(Me.LBL_CODIGO) Me.Controls.Add(Me.Label4) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_ciudades" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen CType(Me.dtg_CONSULTA, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO"
297
298 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub ENLACES() If Me.TXT_CODIGO.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_CIUDADES.CODIGO DE LA CIUDAD") Me.TXT_CODIGO.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_CIUDADES.NOMBRE DE LA CIUDAD") Me.TXT_NOMBRE.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("SELECTEDVALUE", DS_Datos, "TBL_CIUDADES.CODIGO DEL DEPARTAMENTO") Me.CMB_DPTOS.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_CIUDADES")
End If End Sub
Private Sub CARGARIMAGENES() Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.BTN_BORRAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.BTN_BORRAR.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.BTN_CANCELAR.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png")
298
299 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight
End Sub
Private Sub LIMPIAROBJETOS() Me.TXT_CODIGO.Clear() Me.TXT_NOMBRE.Clear() Me.CMB_DPTOS.Text = "" End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = True Me.CMB_DPTOS.Enabled = False Else Me.TXT_CODIGO.ReadOnly = False Me.TXT_NOMBRE.ReadOnly = False Me.CMB_DPTOS.Enabled = True End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.BTN_NUEVO.Enabled = True Me.BTN_MODIFICAR.Enabled = True Me.BTN_GRABAR.Enabled = False Me.BTN_CANCELAR.Enabled = False Me.BTN_PRIMERO.Enabled = True Me.BTN_ANTERIOR.Enabled = True Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Me.BTN_BORRAR.Enabled = True Me.btn_salir.Enabled = True
Else Me.BTN_NUEVO.Enabled = False Me.BTN_MODIFICAR.Enabled = False Me.BTN_GRABAR.Enabled = True Me.BTN_CANCELAR.Enabled = True Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_BORRAR.Enabled = False Me.btn_salir.Enabled = False
End If End Sub
Private Function Validar() As Boolean
299
300 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("falta el codigo de LA CIUDAD", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_CODIGO.Focus() Validar = False Exit Function End If
If Me.TXT_NOMBRE.TextLength = 0 Then MessageBox.Show("FALTA EL NOMBRE DE LA CIUDAD", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_NOMBRE.Focus() Validar = False Exit Function End If
If Me.CMB_DPTOS.Text.Length = 0 Then MessageBox.Show("DEBE SELECCIONAR UN DEPARTAMENTO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.CMB_DPTOS.Focus() Validar = False Exit Function End If
Validar = True End Function
#End Region
Private Sub frm_ciudades_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim SQL As String Me.Cursor = System.Windows.Forms.Cursors.Default Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "Select A.FLD_CODCIUDAD AS [CODIGO DE LA CIUDAD],A.FLD_NOMBRE AS [NOMBRE DE LA CIUDAD],A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],B.FLD_NOMBRE AS DEPARTAMENTO" SQL = SQL & " from tbl_CIUDADES A,TBL_DPTOS B" SQL = SQL & " WHERE A.FLD_CODDPTO=B.FLD_CODDPTO" SQL = SQL & " order by A.FLD_NOMBRE" CMDselect.CommandText = SQL
300
301 SOFBATEC 1.0DERECHOS RESERVADOS
DA_CIUDADES.SelectCommand = CMDselect DA_CIUDADES.Fill(DS_Datos, "tbl_CIUDADES") CMDselect.CommandText = "SELECT A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],A.FLD_NOMBRE AS [NOMBRE DEL DEPARTAMENTO] FROM TBL_DPTOS A ORDER BY FLD_NOMBRE" DA_DPTOS.SelectCommand = CMDselect DA_DPTOS.Fill(DS_Datos, "TBL_DPTOS")
CONEXION.Close() Me.dtg_CONSULTA.DataSource = DS_Datos.Tables("tbl_CIUDADES") Me.CMB_DPTOS.DataSource = DS_Datos.Tables("TBL_DPTOS") Me.CMB_DPTOS.ValueMember = DS_Datos.Tables("TBL_DPTOS").Columns(0).ToString Me.CMB_DPTOS.DisplayMember = DS_Datos.Tables("TBL_DPTOS").Columns(1).ToString
Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_NUEVO_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_NUEVO.Click Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.TXT_CODIGO.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1) End Sub
Private Sub BTN_BORRAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_BORRAR.Click Dim SQL As String If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) : Exit Sub End If
301
302 SOFBATEC 1.0DERECHOS RESERVADOS
If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC 1.O", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE FROM TBL_CIUDADES WHERE FLD_CODCIUDAD='" & Me.TXT_CODIGO.Text & "'" CMDBorrar.Connection = CONEXION DA_PAISES.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "Select A.FLD_CODCIUDAD AS [CODIGO DE LA CIUDAD],A.FLD_NOMBRE AS [NOMBRE DE LA CIUDAD],A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],B.FLD_NOMBRE AS DEPARTAMENTO" SQL = SQL & " from tbl_CIUDADES A,TBL_DPTOS B" SQL = SQL & " WHERE A.FLD_CODDPTO=B.FLD_CODDPTO" SQL = SQL & " order by A.FLD_NOMBRE" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_CIUDADES").Clear() DA_CIUDADES.SelectCommand = CMDselect DA_CIUDADES.Fill(DS_Datos, "TBL_CIUDADES") CONEXION.Close() MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub BTN_PRIMERO_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_PRIMERO.Click Try Call ENLACES() EnlaceBASE.Position = 0 Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
302
303 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub BTN_ANTERIOR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_ANTERIOR.Click Try Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False End If Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_SIGUIENTE_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_SIGUIENTE.Click Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False End If Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ULTIMO_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_ULTIMO.Click Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True
303
304 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_GRABAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_GRABAR.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1 As String Try CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO TBL_CIUDADES(FLD_codciudad,FLD_NOMBRE,FLD_CODDPTO)VALUES(" SQL = SQL & "'" & Me.TXT_CODIGO.Text & "'" SQL = SQL & ",'" & Me.TXT_NOMBRE.Text & "'" SQL = SQL & ",'" & Me.CMB_DPTOS.SelectedValue & "')" CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CIUDADES.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else SQL = "UPDATE TBL_CIUDADES SET " SQL = SQL & "FLD_NOMBRE='" & Me.TXT_NOMBRE.Text & "'" SQL = SQL & ",FLD_CODDPTO='" & Me.CMB_DPTOS.SelectedValue & "'" SQL = SQL & " WHERE FLD_CODCIUDAD='" & Me.TXT_CODIGO.Text & "'"
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_CIUDADES.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If
Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) SQL1 = "Select A.FLD_CODCIUDAD AS [CODIGO DE LA CIUDAD],A.FLD_NOMBRE AS [NOMBRE DE LA CIUDAD],A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],B.FLD_NOMBRE AS DEPARTAMENTO" SQL1 = SQL1 & " from tbl_CIUDADES A,TBL_DPTOS B" SQL1 = SQL1 & " WHERE A.FLD_CODDPTO=B.FLD_CODDPTO" SQL1 = SQL1 & " order by A.FLD_NOMBRE"
304
305 SOFBATEC 1.0DERECHOS RESERVADOS
CMDselect.CommandText = SQL1 DS_Datos.Tables("TBL_CIUDADES").Clear() DA_CIUDADES.SelectCommand = CMDselect DA_CIUDADES.Fill(DS_Datos, "TBL_CIUDADES") CONEXION.Close() Call BLOQUEAROBJETOS(0) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_MODIFICAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_MODIFICAR.Click If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Debe seleccionar un registro para modificar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1) : Exit Sub Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = False Me.CMB_DPTOS.Enabled = True Me.TXT_NOMBRE.Focus() Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub BTN_CANCELAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_CANCELAR.Click Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 End Sub
Private Sub TXT_CODIGO_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_CODIGO.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_CODIGO_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_CODIGO.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
305
306 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub TXT_NOMBRE_KeyPress1(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TXT_NOMBRE.KeyPress Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_NOMBRE_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TXT_NOMBRE.KeyDown If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub CMB_DPTOS_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles CMB_DPTOS.KeyPress Dim KEYASCII As Short = Asc(e.KeyChar) KEYASCII = 0 End Sub
Private Sub CMB_DPTOS_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles CMB_DPTOS.KeyDown If e.KeyCode = Keys.Enter Then If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End If End Sub
Private Sub BTN_EXAMINAR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_EXAMINAR.Click
DS_Datos.Tables("TBL_DPTOS").Clear() Dim EXAMINAR As New FRM_DPTOS EXAMINAR.ShowDialog()
DS_Datos.Tables("TBL_DPTOS").Clear() CMDselect.CommandText = "SELECT A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],A.FLD_NOMBRE AS [NOMBRE DEL DEPARTAMENTO] FROM TBL_DPTOS A ORDER BY FLD_NOMBRE" DA_DPTOS.SelectCommand = CMDselect DA_DPTOS.Fill(DS_Datos, "TBL_DPTOS") End Sub
Private Sub TXT_CODIGO_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TXT_CODIGO.Leave Try If Me.TXT_CODIGO.TextLength = 0 Then Exit Sub CMDselect.CommandText = "SELECT * FROM TBL_CIUDADES WHERE FLD_CODCIUDAD='" & Me.TXT_CODIGO.Text & "'"
306
307 SOFBATEC 1.0DERECHOS RESERVADOS
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() DR_buscar = CMDselect.ExecuteReader(CommandBehavior.SingleRow) If DR_buscar.Read = True Then Me.TXT_NOMBRE.Text = DR_buscar.Item("FLD_NOMBRE") Me.CMB_DPTOS.SelectedValue = DR_buscar.Item("FLD_CODDPTO") Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.Focus() SWGrabar = 1 End If CONEXION.Close() Catch EXCEPCION As Exception MsgBox(EXCEPCION.Message.ToUpper) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_salir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_salir.Click DS_Datos.Tables("TBL_CIUDADES").Clear() Me.Close() End SubEnd Class
Codigo registrar departamentos
Public Class FRM_DPTOS Inherits System.Windows.Forms.Form
307
308 SOFBATEC 1.0DERECHOS RESERVADOS
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents dtg_CONSULTA As System.Windows.Forms.DataGrid Friend WithEvents BTN_CANCELAR As System.Windows.Forms.Button Friend WithEvents BTN_BORRAR As System.Windows.Forms.Button Friend WithEvents BTN_GRABAR As System.Windows.Forms.Button Friend WithEvents BTN_MODIFICAR As System.Windows.Forms.Button Friend WithEvents BTN_NUEVO As System.Windows.Forms.Button Friend WithEvents CMB_PAIS As System.Windows.Forms.ComboBox Friend WithEvents LBL_PAIS As System.Windows.Forms.Label Friend WithEvents BTN_ULTIMO As System.Windows.Forms.Button Friend WithEvents BTN_SIGUIENTE As System.Windows.Forms.Button Friend WithEvents BTN_ANTERIOR As System.Windows.Forms.Button Friend WithEvents BTN_PRIMERO As System.Windows.Forms.Button Friend WithEvents TXT_NOMBRE As System.Windows.Forms.TextBox Friend WithEvents TXT_CODIGO As System.Windows.Forms.TextBox Friend WithEvents LBL_NOMBRE As System.Windows.Forms.Label Friend WithEvents LBL_CODIGO As System.Windows.Forms.Label
308
309 SOFBATEC 1.0DERECHOS RESERVADOS
Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents btn_salir As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Me.Label1 = New System.Windows.Forms.Label Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.BTN_CANCELAR = New System.Windows.Forms.Button Me.BTN_BORRAR = New System.Windows.Forms.Button Me.BTN_GRABAR = New System.Windows.Forms.Button Me.BTN_MODIFICAR = New System.Windows.Forms.Button Me.BTN_NUEVO = New System.Windows.Forms.Button Me.BTN_ULTIMO = New System.Windows.Forms.Button Me.BTN_SIGUIENTE = New System.Windows.Forms.Button Me.BTN_ANTERIOR = New System.Windows.Forms.Button Me.BTN_PRIMERO = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button Me.Label4 = New System.Windows.Forms.Label Me.Label3 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.dtg_CONSULTA = New System.Windows.Forms.DataGrid Me.CMB_PAIS = New System.Windows.Forms.ComboBox Me.LBL_PAIS = New System.Windows.Forms.Label Me.TXT_NOMBRE = New System.Windows.Forms.TextBox Me.TXT_CODIGO = New System.Windows.Forms.TextBox Me.LBL_NOMBRE = New System.Windows.Forms.Label Me.LBL_CODIGO = New System.Windows.Forms.Label Me.lblposicion = New System.Windows.Forms.Label CType(Me.dtg_CONSULTA, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(80, 16) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(480, 32) Me.Label1.TabIndex = 3 Me.Label1.Text = "REGISTRO DE DEPARTAMENTOS" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'BTN_CANCELAR ' Me.BTN_CANCELAR.BackColor = System.Drawing.Color.LightSkyBlue
309
310 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_CANCELAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_CANCELAR.ForeColor = System.Drawing.SystemColors.Control Me.BTN_CANCELAR.Location = New System.Drawing.Point(376, 304) Me.BTN_CANCELAR.Name = "BTN_CANCELAR" Me.BTN_CANCELAR.Size = New System.Drawing.Size(64, 41) Me.BTN_CANCELAR.TabIndex = 60 Me.ToolTip1.SetToolTip(Me.BTN_CANCELAR, "cancelar operacion actual") ' 'BTN_BORRAR ' Me.BTN_BORRAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_BORRAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_BORRAR.ForeColor = System.Drawing.SystemColors.Control Me.BTN_BORRAR.Location = New System.Drawing.Point(312, 304) Me.BTN_BORRAR.Name = "BTN_BORRAR" Me.BTN_BORRAR.Size = New System.Drawing.Size(64, 41) Me.BTN_BORRAR.TabIndex = 59 Me.ToolTip1.SetToolTip(Me.BTN_BORRAR, "quitar registro de la base de datos") ' 'BTN_GRABAR ' Me.BTN_GRABAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_GRABAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_GRABAR.ForeColor = System.Drawing.SystemColors.Control Me.BTN_GRABAR.Location = New System.Drawing.Point(248, 304) Me.BTN_GRABAR.Name = "BTN_GRABAR" Me.BTN_GRABAR.Size = New System.Drawing.Size(64, 41) Me.BTN_GRABAR.TabIndex = 58 Me.ToolTip1.SetToolTip(Me.BTN_GRABAR, "adicionar registro actual en la base de datos") ' 'BTN_MODIFICAR ' Me.BTN_MODIFICAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_MODIFICAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_MODIFICAR.ForeColor = System.Drawing.SystemColors.Control Me.BTN_MODIFICAR.Location = New System.Drawing.Point(184, 304) Me.BTN_MODIFICAR.Name = "BTN_MODIFICAR" Me.BTN_MODIFICAR.Size = New System.Drawing.Size(64, 41) Me.BTN_MODIFICAR.TabIndex = 57
310
311 SOFBATEC 1.0DERECHOS RESERVADOS
Me.ToolTip1.SetToolTip(Me.BTN_MODIFICAR, "crear cambios en el registro actual") ' 'BTN_NUEVO ' Me.BTN_NUEVO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_NUEVO.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_NUEVO.ForeColor = System.Drawing.SystemColors.Control Me.BTN_NUEVO.Location = New System.Drawing.Point(120, 304) Me.BTN_NUEVO.Name = "BTN_NUEVO" Me.BTN_NUEVO.Size = New System.Drawing.Size(64, 41) Me.BTN_NUEVO.TabIndex = 56 Me.ToolTip1.SetToolTip(Me.BTN_NUEVO, "permite crear un nnuevo registro") ' 'BTN_ULTIMO ' Me.BTN_ULTIMO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ULTIMO.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ULTIMO.Location = New System.Drawing.Point(384, 347) Me.BTN_ULTIMO.Name = "BTN_ULTIMO" Me.BTN_ULTIMO.Size = New System.Drawing.Size(35, 27) Me.BTN_ULTIMO.TabIndex = 52 Me.ToolTip1.SetToolTip(Me.BTN_ULTIMO, "ultimo") ' 'BTN_SIGUIENTE ' Me.BTN_SIGUIENTE.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SIGUIENTE.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_SIGUIENTE.Location = New System.Drawing.Point(352, 347) Me.BTN_SIGUIENTE.Name = "BTN_SIGUIENTE" Me.BTN_SIGUIENTE.Size = New System.Drawing.Size(35, 27) Me.BTN_SIGUIENTE.TabIndex = 51 Me.ToolTip1.SetToolTip(Me.BTN_SIGUIENTE, "siguiente") ' 'BTN_ANTERIOR ' Me.BTN_ANTERIOR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ANTERIOR.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ANTERIOR.Location = New System.Drawing.Point(240, 347) Me.BTN_ANTERIOR.Name = "BTN_ANTERIOR" Me.BTN_ANTERIOR.Size = New System.Drawing.Size(35, 27) Me.BTN_ANTERIOR.TabIndex = 50
311
312 SOFBATEC 1.0DERECHOS RESERVADOS
Me.ToolTip1.SetToolTip(Me.BTN_ANTERIOR, "anterior") ' 'BTN_PRIMERO ' Me.BTN_PRIMERO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_PRIMERO.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_PRIMERO.Location = New System.Drawing.Point(208, 347) Me.BTN_PRIMERO.Name = "BTN_PRIMERO" Me.BTN_PRIMERO.Size = New System.Drawing.Size(35, 27) Me.BTN_PRIMERO.TabIndex = 49 Me.ToolTip1.SetToolTip(Me.BTN_PRIMERO, "primero") ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.btn_salir.ForeColor = System.Drawing.SystemColors.Control Me.btn_salir.Location = New System.Drawing.Point(440, 304) Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(64, 41) Me.btn_salir.TabIndex = 284 Me.ToolTip1.SetToolTip(Me.btn_salir, "cancelar operacion actual") ' 'Label4 ' Me.Label4.BackColor = System.Drawing.Color.LightSkyBlue Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.Blue Me.Label4.Location = New System.Drawing.Point(293, 238) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(40, 17) Me.Label4.TabIndex = 65 Me.Label4.Text = "PAIS" ' 'Label3 ' Me.Label3.BackColor = System.Drawing.Color.LightSkyBlue Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.Blue Me.Label3.Location = New System.Drawing.Point(32, 238) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(64, 17) Me.Label3.TabIndex = 64
312
313 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Label3.Text = "NOMBRE" ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.LightSkyBlue Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(29, 62) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(64, 17) Me.Label2.TabIndex = 63 Me.Label2.Text = "CODIGO" ' 'dtg_CONSULTA ' Me.dtg_CONSULTA.AlternatingBackColor = System.Drawing.Color.WhiteSmoke Me.dtg_CONSULTA.BackColor = System.Drawing.Color.Gainsboro Me.dtg_CONSULTA.BackgroundColor = System.Drawing.Color.DarkGray Me.dtg_CONSULTA.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.dtg_CONSULTA.CaptionBackColor = System.Drawing.Color.DarkKhaki Me.dtg_CONSULTA.CaptionFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold) Me.dtg_CONSULTA.CaptionForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.DataMember = "" Me.dtg_CONSULTA.FlatMode = True Me.dtg_CONSULTA.Font = New System.Drawing.Font("Times New Roman", 9.0!) Me.dtg_CONSULTA.ForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.GridLineColor = System.Drawing.Color.Silver Me.dtg_CONSULTA.HeaderBackColor = System.Drawing.Color.Black Me.dtg_CONSULTA.HeaderFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold) Me.dtg_CONSULTA.HeaderForeColor = System.Drawing.Color.White Me.dtg_CONSULTA.LinkColor = System.Drawing.Color.DarkSlateBlue Me.dtg_CONSULTA.Location = New System.Drawing.Point(24, 90) Me.dtg_CONSULTA.Name = "dtg_CONSULTA" Me.dtg_CONSULTA.ParentRowsBackColor = System.Drawing.Color.LightGray Me.dtg_CONSULTA.ParentRowsForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.ReadOnly = True Me.dtg_CONSULTA.SelectionBackColor = System.Drawing.Color.Firebrick Me.dtg_CONSULTA.SelectionForeColor = System.Drawing.Color.White Me.dtg_CONSULTA.Size = New System.Drawing.Size(560, 139) Me.dtg_CONSULTA.TabIndex = 62 ' 'CMB_PAIS '
313
314 SOFBATEC 1.0DERECHOS RESERVADOS
Me.CMB_PAIS.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList Me.CMB_PAIS.Location = New System.Drawing.Point(341, 238) Me.CMB_PAIS.Name = "CMB_PAIS" Me.CMB_PAIS.Size = New System.Drawing.Size(216, 21) Me.CMB_PAIS.TabIndex = 54 ' 'LBL_PAIS ' Me.LBL_PAIS.AutoSize = True Me.LBL_PAIS.BackColor = System.Drawing.SystemColors.Control Me.LBL_PAIS.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_PAIS.Location = New System.Drawing.Point(293, 238) Me.LBL_PAIS.Name = "LBL_PAIS" Me.LBL_PAIS.Size = New System.Drawing.Size(0, 19) Me.LBL_PAIS.TabIndex = 53 ' 'TXT_NOMBRE ' Me.TXT_NOMBRE.Location = New System.Drawing.Point(101, 238) Me.TXT_NOMBRE.MaxLength = 60 Me.TXT_NOMBRE.Name = "TXT_NOMBRE" Me.TXT_NOMBRE.Size = New System.Drawing.Size(184, 20) Me.TXT_NOMBRE.TabIndex = 48 Me.TXT_NOMBRE.Text = "" ' 'TXT_CODIGO ' Me.TXT_CODIGO.Location = New System.Drawing.Point(96, 62) Me.TXT_CODIGO.MaxLength = 3 Me.TXT_CODIGO.Name = "TXT_CODIGO" Me.TXT_CODIGO.Size = New System.Drawing.Size(48, 20) Me.TXT_CODIGO.TabIndex = 47 Me.TXT_CODIGO.Text = "" ' 'LBL_NOMBRE ' Me.LBL_NOMBRE.AutoSize = True Me.LBL_NOMBRE.BackColor = System.Drawing.SystemColors.Control Me.LBL_NOMBRE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_NOMBRE.Location = New System.Drawing.Point(37, 223) Me.LBL_NOMBRE.Name = "LBL_NOMBRE" Me.LBL_NOMBRE.Size = New System.Drawing.Size(0, 19) Me.LBL_NOMBRE.TabIndex = 46 ' 'LBL_CODIGO ' Me.LBL_CODIGO.AutoSize = True Me.LBL_CODIGO.BackColor = System.Drawing.SystemColors.Control Me.LBL_CODIGO.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
314
315 SOFBATEC 1.0DERECHOS RESERVADOS
Me.LBL_CODIGO.Location = New System.Drawing.Point(29, 62) Me.LBL_CODIGO.Name = "LBL_CODIGO" Me.LBL_CODIGO.Size = New System.Drawing.Size(0, 19) Me.LBL_CODIGO.TabIndex = 45 ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.DarkTurquoise Me.lblposicion.Location = New System.Drawing.Point(272, 347) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(80, 27) Me.lblposicion.TabIndex = 283 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'FRM_DPTOS ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(618, 388) Me.Controls.Add(Me.btn_salir) Me.Controls.Add(Me.lblposicion) Me.Controls.Add(Me.Label4) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.dtg_CONSULTA) Me.Controls.Add(Me.BTN_CANCELAR) Me.Controls.Add(Me.BTN_BORRAR) Me.Controls.Add(Me.BTN_GRABAR) Me.Controls.Add(Me.BTN_MODIFICAR) Me.Controls.Add(Me.BTN_NUEVO) Me.Controls.Add(Me.CMB_PAIS) Me.Controls.Add(Me.LBL_PAIS) Me.Controls.Add(Me.BTN_ULTIMO) Me.Controls.Add(Me.BTN_SIGUIENTE) Me.Controls.Add(Me.BTN_ANTERIOR) Me.Controls.Add(Me.BTN_PRIMERO) Me.Controls.Add(Me.TXT_NOMBRE) Me.Controls.Add(Me.TXT_CODIGO) Me.Controls.Add(Me.LBL_NOMBRE) Me.Controls.Add(Me.LBL_CODIGO) Me.Controls.Add(Me.Label1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "FRM_DPTOS" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
315
316 SOFBATEC 1.0DERECHOS RESERVADOS
CType(Me.dtg_CONSULTA, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO" Private Sub ENLACES() If Me.TXT_CODIGO.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_DPTOS.CODIGO DEL DEPARTAMENTO") Me.TXT_CODIGO.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_DPTOS.NOMBRE DEL DEPARTAMENTO") Me.TXT_NOMBRE.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("SELECTEDVALUE", DS_Datos, "TBL_DPTOS.CODIGO DEL PAIS") Me.CMB_PAIS.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_DPTOS")
End If End Sub Private Sub LIMPIAROBJETOS() Me.TXT_CODIGO.Clear() Me.TXT_NOMBRE.Clear() Me.CMB_PAIS.Text = "" End Sub
Private Sub CARGARIMAGENES() Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight
316
317 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.BTN_BORRAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.BTN_BORRAR.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.BTN_CANCELAR.ImageAlign = ContentAlignment.MiddleRight Me.btn_salir.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.btn_salir.ImageAlign = ContentAlignment.MiddleRight End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = True Me.CMB_PAIS.Enabled = False Else Me.TXT_CODIGO.ReadOnly = False Me.TXT_NOMBRE.ReadOnly = False Me.CMB_PAIS.Enabled = True End If End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.BTN_NUEVO.Enabled = True Me.BTN_MODIFICAR.Enabled = True Me.BTN_GRABAR.Enabled = False Me.BTN_CANCELAR.Enabled = False Me.BTN_PRIMERO.Enabled = True Me.BTN_ANTERIOR.Enabled = True Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Me.BTN_BORRAR.Enabled = True Me.btn_salir.Enabled = True Else Me.BTN_NUEVO.Enabled = False Me.BTN_MODIFICAR.Enabled = False Me.BTN_GRABAR.Enabled = True Me.BTN_CANCELAR.Enabled = True Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_BORRAR.Enabled = False Me.btn_salir.Enabled = False End If End Sub
317
318 SOFBATEC 1.0DERECHOS RESERVADOS
Private Function Validar() As Boolean If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("falta el codigo deL DEPARTAMENTO O ESTADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_CODIGO.Focus() Validar = False Exit Function End If
If Me.TXT_NOMBRE.TextLength = 0 Then MessageBox.Show("FALTA EL NOMBRE DEL DEPARTAMENTO O ESTADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_NOMBRE.Focus() Validar = False Exit Function End If
If Me.CMB_PAIS.Text.Length = 0 Then MessageBox.Show("DEBE SELECCIONAR UN PAIS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.CMB_PAIS.Focus() Validar = False Exit Function End If
Validar = True End Function
#End Region
Private Sub BTN_NUEVO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.TXT_CODIGO.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1) End Sub
Private Sub BTN_PRIMERO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try Call ENLACES() EnlaceBASE.Position = 0 Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = True
318
319 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_ULTIMO.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ANTERIOR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False End If Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_SIGUIENTE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False End If Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
319
320 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
Private Sub BTN_ULTIMO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub frm_DPTOS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL As String Me.Cursor = System.Windows.Forms.Cursors.Default Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "Select A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],A.FLD_NOMBRE AS [NOMBRE DEL DEPARTAMENTO],A.FLD_CODPAIS AS [CODIGO DEL PAIS],B.FLD_NOMBRE" SQL = SQL & " from tbl_DPTOS A,TBL_PAISES B" SQL = SQL & " WHERE A.FLD_CODPAIS=B.FLD_CODPAIS" SQL = SQL & " order by A.FLD_NOMBRE" CMDselect.CommandText = SQL DA_DPTOS.SelectCommand = CMDselect DA_DPTOS.Fill(DS_Datos, "tbl_DPTOS") CMDselect.CommandText = "SELECT A.FLD_CODPAIS AS [CODIGO DEL PAIS],A.FLD_NOMBRE AS [NOMBRE DEL PAIS] FROM TBL_PAISES A ORDER BY FLD_NOMBRE" DA_PAISES.SelectCommand = CMDselect DA_PAISES.Fill(DS_Datos, "TBL_PAISES")
CONEXION.Close() Me.dtg_CONSULTA.DataSource = DS_Datos.Tables("tbl_DPTOS")
320
321 SOFBATEC 1.0DERECHOS RESERVADOS
Me.CMB_PAIS.DataSource = DS_Datos.Tables("TBL_PAISES") Me.CMB_PAIS.ValueMember = DS_Datos.Tables("TBL_PAISES").Columns(0).ToString Me.CMB_PAIS.DisplayMember = DS_Datos.Tables("TBL_PAISES").Columns(1).ToString
Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_GRABAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1 As String Try CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO TBL_DPTOS(FLD_codDPTO,FLD_NOMBRE,FLD_CODPAIS)VALUES(" SQL = SQL & "'" & Me.TXT_CODIGO.Text & "'" SQL = SQL & ",'" & Me.TXT_NOMBRE.Text & "'" SQL = SQL & ",'" & Me.CMB_PAIS.SelectedValue & "')" CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_DPTOS.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else SQL = "UPDATE TBL_DPTOS SET " SQL = SQL & "FLD_NOMBRE='" & Me.TXT_NOMBRE.Text & "'" SQL = SQL & ",FLD_CODPAIS='" & Me.CMB_PAIS.SelectedValue & "'" SQL = SQL & " WHERE FLD_codDPTO='" & Me.TXT_CODIGO.Text & "'"
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_DPTOS.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If SQL1 = "Select A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],A.FLD_NOMBRE AS [NOMBRE DEL
321
322 SOFBATEC 1.0DERECHOS RESERVADOS
DEPARTAMENTO],A.FLD_CODPAIS AS [CODIGO DEL PAIS],B.FLD_NOMBRE" SQL1 = SQL1 & " from tbl_DPTOS A,TBL_PAISES B" SQL1 = SQL1 & " WHERE A.FLD_CODPAIS=B.FLD_CODPAIS" SQL1 = SQL1 & " order by A.FLD_NOMBRE" CMDselect.CommandText = SQL1 DS_Datos.Tables("TBL_DPTOS").Clear() DA_DPTOS.SelectCommand = CMDselect DA_DPTOS.Fill(DS_Datos, "TBL_DPTOS") CONEXION.Close() Call BLOQUEAROBJETOS(0) Me.lblposicion.Text = "Registro Nº " & Str(EnlaceBASE.Position + 1) & " de " & Str(EnlaceBASE.Count) MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub BTN_MODIFICAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Debe seleccionar un registro para modificar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) : Exit Sub Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = False Me.CMB_PAIS.Enabled = True Me.TXT_NOMBRE.Focus() Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub BTN_CANCELAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 End Sub
Private Sub TXT_CODIGO_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
322
323 SOFBATEC 1.0DERECHOS RESERVADOS
Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_CODIGO_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_NOMBRE_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_NOMBRE_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub CMB_PAIS_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim KEYASCII As Short = Asc(e.KeyChar)
KEYASCII = 0 End Sub
Private Sub CMB_PAIS_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If e.KeyCode = Keys.Enter Then If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End If End Sub
323
324 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub BTN_EXAMINAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) DS_Datos.Tables("tbl_paises").Clear()
Dim fpaises As New FRM_PAISES fpaises.ShowDialog()
DS_Datos.Tables("tbl_paises").Clear() CMDselect.CommandText = "Select A.FLD_CODPAIS AS [CODIGO DEL PAIS],A.FLD_NOMBRE AS [NOMBRE DEL PAIS] from tbl_paises A order by fld_nombre" DA_PAISES.SelectCommand = CMDselect DA_PAISES.Fill(DS_Datos, "tbl_paises")
End Sub
Private Sub TXT_CODIGO_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Try If Me.TXT_CODIGO.TextLength = 0 Then Exit Sub CMDselect.CommandText = "SELECT * FROM TBL_DPTOS WHERE FLD_CODDPTO='" & Me.TXT_CODIGO.Text & "'" If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() DR_buscar = CMDselect.ExecuteReader(CommandBehavior.SingleRow) If DR_buscar.Read = True Then Me.TXT_NOMBRE.Text = DR_buscar.Item("FLD_NOMBRE") Me.CMB_PAIS.SelectedValue = DR_buscar.Item("FLD_CODPAIS") Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.Focus() SWGrabar = 1 End If CONEXION.Close() Catch EXCEPCION As Exception MsgBox(EXCEPCION.Message.ToUpper) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub BTN_BORRAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BTN_BORRAR.Click Dim SQL As String If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try
324
325 SOFBATEC 1.0DERECHOS RESERVADOS
CMDBorrar.CommandText = "DELETE FROM TBL_DPTOS WHERE FLD_CODDPTO='" & Me.TXT_CODIGO.Text & "'" CMDBorrar.Connection = CONEXION DA_DPTOS.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() SQL = "Select A.FLD_CODDPTO AS [CODIGO DEL DEPARTAMENTO],A.FLD_NOMBRE AS [NOMBRE DEL DEPARTAMENTO],A.FLD_CODPAIS AS [CODIGO DEL PAIS],B.FLD_NOMBRE" SQL = SQL & " from tbl_DPTOS A,TBL_PAISES B" SQL = SQL & " WHERE A.FLD_CODPAIS=B.FLD_CODPAIS" SQL = SQL & " order by A.FLD_NOMBRE" CMDselect.CommandText = SQL DS_Datos.Tables("TBL_DPTOS").Clear() DA_DPTOS.SelectCommand = CMDselect DA_DPTOS.Fill(DS_Datos, "TBL_DPTOS") CONEXION.Close() MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1)
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub btn_salir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_salir.Click DS_Datos.Tables("tbl_dptos").Clear() Me.Close() End SubEnd Class
325
326 SOFBATEC 1.0DERECHOS RESERVADOS
Codigo registrar países
Public Class FRM_PAISES Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing)
326
327 SOFBATEC 1.0DERECHOS RESERVADOS
End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip Friend WithEvents lbltitulo As System.Windows.Forms.Label Friend WithEvents dtg_CONSULTA As System.Windows.Forms.DataGrid Friend WithEvents BTN_SALIR As System.Windows.Forms.Button Friend WithEvents BTN_CANCELAR As System.Windows.Forms.Button Friend WithEvents BTN_BORRAR As System.Windows.Forms.Button Friend WithEvents BTN_GRABAR As System.Windows.Forms.Button Friend WithEvents BTN_MODIFICAR As System.Windows.Forms.Button Friend WithEvents BTN_ULTIMO As System.Windows.Forms.Button Friend WithEvents BTN_SIGUIENTE As System.Windows.Forms.Button Friend WithEvents BTN_ANTERIOR As System.Windows.Forms.Button Friend WithEvents BTN_PRIMERO As System.Windows.Forms.Button Friend WithEvents TXT_NOMBRE As System.Windows.Forms.TextBox Friend WithEvents TXT_CODIGO As System.Windows.Forms.TextBox Friend WithEvents LBL_NOMBRE As System.Windows.Forms.Label Friend WithEvents LBL_CODIGO As System.Windows.Forms.Label Friend WithEvents lblposicion As System.Windows.Forms.Label Friend WithEvents BTN_NUEVO As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components) Me.BTN_SALIR = New System.Windows.Forms.Button Me.BTN_CANCELAR = New System.Windows.Forms.Button Me.BTN_BORRAR = New System.Windows.Forms.Button Me.BTN_GRABAR = New System.Windows.Forms.Button Me.BTN_MODIFICAR = New System.Windows.Forms.Button Me.BTN_ULTIMO = New System.Windows.Forms.Button Me.BTN_SIGUIENTE = New System.Windows.Forms.Button Me.BTN_ANTERIOR = New System.Windows.Forms.Button Me.BTN_PRIMERO = New System.Windows.Forms.Button Me.BTN_NUEVO = New System.Windows.Forms.Button Me.lbltitulo = New System.Windows.Forms.Label Me.dtg_CONSULTA = New System.Windows.Forms.DataGrid Me.TXT_NOMBRE = New System.Windows.Forms.TextBox Me.TXT_CODIGO = New System.Windows.Forms.TextBox Me.LBL_NOMBRE = New System.Windows.Forms.Label Me.LBL_CODIGO = New System.Windows.Forms.Label Me.lblposicion = New System.Windows.Forms.Label CType(Me.dtg_CONSULTA, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() '
327
328 SOFBATEC 1.0DERECHOS RESERVADOS
'BTN_SALIR ' Me.BTN_SALIR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SALIR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_SALIR.Location = New System.Drawing.Point(424, 312) Me.BTN_SALIR.Name = "BTN_SALIR" Me.BTN_SALIR.Size = New System.Drawing.Size(64, 48) Me.BTN_SALIR.TabIndex = 54 Me.ToolTip1.SetToolTip(Me.BTN_SALIR, "salir del contenedor") ' 'BTN_CANCELAR ' Me.BTN_CANCELAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_CANCELAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_CANCELAR.Location = New System.Drawing.Point(360, 312) Me.BTN_CANCELAR.Name = "BTN_CANCELAR" Me.BTN_CANCELAR.Size = New System.Drawing.Size(64, 48) Me.BTN_CANCELAR.TabIndex = 53 Me.ToolTip1.SetToolTip(Me.BTN_CANCELAR, "cancelar opercion actual") ' 'BTN_BORRAR ' Me.BTN_BORRAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_BORRAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_BORRAR.Location = New System.Drawing.Point(296, 312) Me.BTN_BORRAR.Name = "BTN_BORRAR" Me.BTN_BORRAR.Size = New System.Drawing.Size(64, 48) Me.BTN_BORRAR.TabIndex = 52 Me.ToolTip1.SetToolTip(Me.BTN_BORRAR, "quitar registro de la base de datos") ' 'BTN_GRABAR ' Me.BTN_GRABAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_GRABAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_GRABAR.Location = New System.Drawing.Point(232, 312) Me.BTN_GRABAR.Name = "BTN_GRABAR" Me.BTN_GRABAR.Size = New System.Drawing.Size(64, 48) Me.BTN_GRABAR.TabIndex = 51 Me.ToolTip1.SetToolTip(Me.BTN_GRABAR, "adicionar registro a la base de datos") ' 'BTN_MODIFICAR
328
329 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.BTN_MODIFICAR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_MODIFICAR.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_MODIFICAR.Location = New System.Drawing.Point(168, 312) Me.BTN_MODIFICAR.Name = "BTN_MODIFICAR" Me.BTN_MODIFICAR.Size = New System.Drawing.Size(64, 48) Me.BTN_MODIFICAR.TabIndex = 50 Me.ToolTip1.SetToolTip(Me.BTN_MODIFICAR, "crear cambios en el registro actual") ' 'BTN_ULTIMO ' Me.BTN_ULTIMO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ULTIMO.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ULTIMO.Location = New System.Drawing.Point(376, 368) Me.BTN_ULTIMO.Name = "BTN_ULTIMO" Me.BTN_ULTIMO.Size = New System.Drawing.Size(40, 32) Me.BTN_ULTIMO.TabIndex = 48 Me.ToolTip1.SetToolTip(Me.BTN_ULTIMO, "ultimo") ' 'BTN_SIGUIENTE ' Me.BTN_SIGUIENTE.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_SIGUIENTE.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_SIGUIENTE.Location = New System.Drawing.Point(336, 368) Me.BTN_SIGUIENTE.Name = "BTN_SIGUIENTE" Me.BTN_SIGUIENTE.Size = New System.Drawing.Size(40, 32) Me.BTN_SIGUIENTE.TabIndex = 47 Me.ToolTip1.SetToolTip(Me.BTN_SIGUIENTE, "siguiente") ' 'BTN_ANTERIOR ' Me.BTN_ANTERIOR.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_ANTERIOR.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_ANTERIOR.Location = New System.Drawing.Point(176, 368) Me.BTN_ANTERIOR.Name = "BTN_ANTERIOR" Me.BTN_ANTERIOR.Size = New System.Drawing.Size(40, 32) Me.BTN_ANTERIOR.TabIndex = 46 Me.ToolTip1.SetToolTip(Me.BTN_ANTERIOR, "anterior") ' 'BTN_PRIMERO '
329
330 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_PRIMERO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_PRIMERO.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_PRIMERO.Location = New System.Drawing.Point(216, 368) Me.BTN_PRIMERO.Name = "BTN_PRIMERO" Me.BTN_PRIMERO.Size = New System.Drawing.Size(40, 32) Me.BTN_PRIMERO.TabIndex = 45 Me.ToolTip1.SetToolTip(Me.BTN_PRIMERO, "primero") ' 'BTN_NUEVO ' Me.BTN_NUEVO.BackColor = System.Drawing.Color.LightSkyBlue Me.BTN_NUEVO.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.BTN_NUEVO.Location = New System.Drawing.Point(104, 312) Me.BTN_NUEVO.Name = "BTN_NUEVO" Me.BTN_NUEVO.Size = New System.Drawing.Size(64, 48) Me.BTN_NUEVO.TabIndex = 49 Me.ToolTip1.SetToolTip(Me.BTN_NUEVO, "permite crear unnuevo registro") ' 'lbltitulo ' Me.lbltitulo.BackColor = System.Drawing.Color.LightSkyBlue Me.lbltitulo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbltitulo.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lbltitulo.ForeColor = System.Drawing.Color.Blue Me.lbltitulo.Location = New System.Drawing.Point(120, 32) Me.lbltitulo.Name = "lbltitulo" Me.lbltitulo.Size = New System.Drawing.Size(326, 24) Me.lbltitulo.TabIndex = 11 Me.lbltitulo.Text = "REGISTRO DE PAISES" Me.lbltitulo.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'dtg_CONSULTA ' Me.dtg_CONSULTA.AlternatingBackColor = System.Drawing.Color.WhiteSmoke Me.dtg_CONSULTA.BackColor = System.Drawing.Color.Gainsboro Me.dtg_CONSULTA.BackgroundColor = System.Drawing.Color.DarkGray Me.dtg_CONSULTA.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.dtg_CONSULTA.CaptionBackColor = System.Drawing.Color.DarkKhaki Me.dtg_CONSULTA.CaptionFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold) Me.dtg_CONSULTA.CaptionForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.DataMember = ""
330
331 SOFBATEC 1.0DERECHOS RESERVADOS
Me.dtg_CONSULTA.FlatMode = True Me.dtg_CONSULTA.Font = New System.Drawing.Font("Times New Roman", 9.0!) Me.dtg_CONSULTA.ForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.GridLineColor = System.Drawing.Color.Silver Me.dtg_CONSULTA.HeaderBackColor = System.Drawing.Color.Black Me.dtg_CONSULTA.HeaderFont = New System.Drawing.Font("Tahoma", 8.0!, System.Drawing.FontStyle.Bold) Me.dtg_CONSULTA.HeaderForeColor = System.Drawing.Color.White Me.dtg_CONSULTA.LinkColor = System.Drawing.Color.DarkSlateBlue Me.dtg_CONSULTA.Location = New System.Drawing.Point(40, 128) Me.dtg_CONSULTA.Name = "dtg_CONSULTA" Me.dtg_CONSULTA.ParentRowsBackColor = System.Drawing.Color.LightGray Me.dtg_CONSULTA.ParentRowsForeColor = System.Drawing.Color.Black Me.dtg_CONSULTA.ReadOnly = True Me.dtg_CONSULTA.SelectionBackColor = System.Drawing.Color.Firebrick Me.dtg_CONSULTA.SelectionForeColor = System.Drawing.Color.White Me.dtg_CONSULTA.Size = New System.Drawing.Size(472, 152) Me.dtg_CONSULTA.TabIndex = 55 ' 'TXT_NOMBRE ' Me.TXT_NOMBRE.Location = New System.Drawing.Point(280, 96) Me.TXT_NOMBRE.MaxLength = 60 Me.TXT_NOMBRE.Name = "TXT_NOMBRE" Me.TXT_NOMBRE.Size = New System.Drawing.Size(240, 20) Me.TXT_NOMBRE.TabIndex = 44 Me.TXT_NOMBRE.Text = "" ' 'TXT_CODIGO ' Me.TXT_CODIGO.Location = New System.Drawing.Point(112, 96) Me.TXT_CODIGO.MaxLength = 3 Me.TXT_CODIGO.Name = "TXT_CODIGO" Me.TXT_CODIGO.Size = New System.Drawing.Size(48, 20) Me.TXT_CODIGO.TabIndex = 43 Me.TXT_CODIGO.Text = "" ' 'LBL_NOMBRE ' Me.LBL_NOMBRE.AutoSize = True Me.LBL_NOMBRE.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_NOMBRE.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_NOMBRE.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LBL_NOMBRE.ForeColor = System.Drawing.Color.Blue Me.LBL_NOMBRE.Location = New System.Drawing.Point(208, 96) Me.LBL_NOMBRE.Name = "LBL_NOMBRE" Me.LBL_NOMBRE.Size = New System.Drawing.Size(66, 21)
331
332 SOFBATEC 1.0DERECHOS RESERVADOS
Me.LBL_NOMBRE.TabIndex = 42 Me.LBL_NOMBRE.Text = "NOMBRE" ' 'LBL_CODIGO ' Me.LBL_CODIGO.AutoSize = True Me.LBL_CODIGO.BackColor = System.Drawing.Color.LightSkyBlue Me.LBL_CODIGO.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.LBL_CODIGO.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.LBL_CODIGO.ForeColor = System.Drawing.Color.Blue Me.LBL_CODIGO.Location = New System.Drawing.Point(48, 96) Me.LBL_CODIGO.Name = "LBL_CODIGO" Me.LBL_CODIGO.Size = New System.Drawing.Size(61, 21) Me.LBL_CODIGO.TabIndex = 41 Me.LBL_CODIGO.Text = "CODIGO" ' 'lblposicion ' Me.lblposicion.BackColor = System.Drawing.Color.White Me.lblposicion.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lblposicion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lblposicion.ForeColor = System.Drawing.Color.DarkTurquoise Me.lblposicion.Location = New System.Drawing.Point(256, 368) Me.lblposicion.Name = "lblposicion" Me.lblposicion.Size = New System.Drawing.Size(80, 32) Me.lblposicion.TabIndex = 284 Me.lblposicion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'FRM_PAISES ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(578, 424) Me.Controls.Add(Me.lblposicion) Me.Controls.Add(Me.dtg_CONSULTA) Me.Controls.Add(Me.BTN_SALIR) Me.Controls.Add(Me.BTN_CANCELAR) Me.Controls.Add(Me.BTN_BORRAR) Me.Controls.Add(Me.BTN_GRABAR) Me.Controls.Add(Me.BTN_MODIFICAR) Me.Controls.Add(Me.BTN_NUEVO) Me.Controls.Add(Me.BTN_ULTIMO) Me.Controls.Add(Me.BTN_SIGUIENTE) Me.Controls.Add(Me.BTN_ANTERIOR) Me.Controls.Add(Me.BTN_PRIMERO) Me.Controls.Add(Me.TXT_NOMBRE) Me.Controls.Add(Me.TXT_CODIGO)
332
333 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Controls.Add(Me.LBL_NOMBRE) Me.Controls.Add(Me.LBL_CODIGO) Me.Controls.Add(Me.lbltitulo) Me.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "FRM_PAISES" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Registro de paises - SOFTBATEC" CType(Me.dtg_CONSULTA, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False)
End Sub
#End Region
#Region "FUNCIONES Y PROCEDIMIENTOS DEL USUARIO" Private Sub ENLACES() If Me.TXT_CODIGO.DataBindings.Count = 0 Then Dim ENLACE As Binding ENLACE = New Binding("TEXT", DS_Datos, "TBL_PAISES.CODIGO DEL PAIS") Me.TXT_CODIGO.DataBindings.Add(ENLACE) ENLACE = Nothing ENLACE = New Binding("TEXT", DS_Datos, "TBL_PAISES.NOMBRE DEL PAIS") Me.TXT_NOMBRE.DataBindings.Add(ENLACE) ENLACE = Nothing EnlaceBASE = Me.BindingContext(DS_Datos, "TBL_PAISES") End If End Sub Private Sub LIMPIAROBJETOS() Me.TXT_CODIGO.Clear() Me.TXT_NOMBRE.Clear() End Sub Private Sub BLOQUEAROBJETOS(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = True Else Me.TXT_CODIGO.ReadOnly = False Me.TXT_NOMBRE.ReadOnly = False End If End Sub
Private Sub CARGARIMAGENES()
333
334 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_primero.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\primero.png") Me.btn_anterior.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\anterior.png") Me.btn_siguiente.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\siguiente.png") Me.btn_ultimo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\ultimo.png")
Me.btn_nuevo.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\nuevo.png") Me.btn_nuevo.ImageAlign = ContentAlignment.MiddleRight Me.btn_modificar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\modificar.png") Me.btn_modificar.ImageAlign = ContentAlignment.MiddleRight Me.btn_grabar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\grabar.png") Me.btn_grabar.ImageAlign = ContentAlignment.MiddleRight Me.BTN_BORRAR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\eliminar.png") Me.BTN_BORRAR.ImageAlign = ContentAlignment.MiddleRight Me.btn_cancelar.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\cancelar.png") Me.btn_cancelar.ImageAlign = ContentAlignment.MiddleRight Me.BTN_SALIR.Image = Image.FromFile(Application.StartupPath & "\IMAGENES\salir.png") Me.BTN_SALIR.ImageAlign = ContentAlignment.MiddleRight End Sub Private Sub BLOQUEARBOTONES(ByVal SWOPERACION As Byte) If SWOPERACION = 0 Then Me.BTN_NUEVO.Enabled = True Me.BTN_MODIFICAR.Enabled = True Me.BTN_GRABAR.Enabled = False Me.BTN_CANCELAR.Enabled = False Me.BTN_PRIMERO.Enabled = True Me.BTN_ANTERIOR.Enabled = True Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Me.BTN_BORRAR.Enabled = True Me.BTN_SALIR.Enabled = True Else Me.BTN_NUEVO.Enabled = False Me.BTN_MODIFICAR.Enabled = False Me.BTN_GRABAR.Enabled = True Me.BTN_CANCELAR.Enabled = True Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_BORRAR.Enabled = False
334
335 SOFBATEC 1.0DERECHOS RESERVADOS
Me.BTN_SALIR.Enabled = False
End If End Sub
Private Function Validar() As Boolean If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("falta el codigo del pais", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_CODIGO.Focus() Validar = False Exit Function End If
If Me.TXT_NOMBRE.TextLength = 0 Then MessageBox.Show("FALTA EL NOMBRE DEL PAIS", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.TXT_NOMBRE.Focus() Validar = False Exit Function End If
Validar = True End Function
#End Region
Private Sub TXT_CODIGO_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else keyascii = 0 End Select End Sub
Private Sub TXT_CODIGO_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_NOMBRE_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim keyascii As Short = Asc(e.KeyChar) Select Case keyascii Case 48 To 57 Case Else
335
336 SOFBATEC 1.0DERECHOS RESERVADOS
keyascii = 0 End Select End Sub
Private Sub TXT_NOMBRE_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) If SALTAR(e.KeyCode) = True Then e.Handled = True Else e.Handled = False End Sub
Private Sub TXT_CODIGO_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Try If Me.TXT_CODIGO.TextLength = 0 Then Exit Sub CMDselect.CommandText = "SELECT * FROM TBL_PAISES WHERE FLD_CODPAIS='" & Me.TXT_CODIGO.Text & "'" If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() DR_buscar = CMDselect.ExecuteReader(CommandBehavior.SingleRow) If DR_buscar.Read = True Then Me.TXT_NOMBRE.Text = DR_buscar.Item("FLD_NOMBRE") Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.Focus() SWGrabar = 1 End If CONEXION.Close() Catch EXCEPCION As Exception MsgBox(EXCEPCION.Message.ToUpper) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub FRM_PAISES_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL As String Me.Cursor = System.Windows.Forms.Cursors.Default Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) Call CARGARIMAGENES() Try If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "Select A.FLD_CODpais AS [CODIGO DEL PAIS],A.FLD_NOMBRE AS [NOMBRE DEL PAIS]" SQL = SQL & " from tbl_paises A" SQL = SQL & " order by FLD_NOMBRE" CMDselect.CommandText = SQL DA_Paises.SelectCommand = CMDselect
DA_PAISES.Fill(DS_Datos, "tbl_paises")
336
337 SOFBATEC 1.0DERECHOS RESERVADOS
CONEXION.Close() Me.dtg_CONSULTA.DataSource = DS_Datos.Tables("tbl_paises") Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_PRIMERO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try Call ENLACES() EnlaceBASE.Position = 0 Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ANTERIOR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try Call ENLACES() EnlaceBASE.Position -= 1 If EnlaceBASE.Position = 0 Then Me.BTN_PRIMERO.Enabled = False Me.BTN_ANTERIOR.Enabled = False End If Me.BTN_SIGUIENTE.Enabled = True Me.BTN_ULTIMO.Enabled = True
Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_SIGUIENTE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
337
338 SOFBATEC 1.0DERECHOS RESERVADOS
Try Call ENLACES() EnlaceBASE.Position += 1 If EnlaceBASE.Position = EnlaceBASE.Count - 1 Then Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False End If Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_ULTIMO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try Call ENLACES() EnlaceBASE.Position = EnlaceBASE.Count - 1 Me.BTN_SIGUIENTE.Enabled = False Me.BTN_ULTIMO.Enabled = False Me.BTN_ANTERIOR.Enabled = True Me.BTN_PRIMERO.Enabled = True
Catch excepcion As Exception MessageBox.Show(excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub BTN_NUEVO_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Call LIMPIAROBJETOS() Call BLOQUEAROBJETOS(1) Me.TXT_CODIGO.Focus() SWGrabar = 0 Call BLOQUEARBOTONES(1) End Sub
Private Sub BTN_SALIR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) DS_Datos.Tables("TBL_PAISES").Clear() Me.Close() End Sub
338
339 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub BTN_MODIFICAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Debe seleccionar un registro para modificar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1) : Exit Sub Me.TXT_CODIGO.ReadOnly = True Me.TXT_NOMBRE.ReadOnly = False Me.TXT_NOMBRE.Focus() Call BLOQUEARBOTONES(1) SWGrabar = 1 End Sub
Private Sub BTN_GRABAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1 As String Try CONEXION.Open() If SWGrabar = 0 Then SQL = "INSERT INTO TBL_PAISES(FLD_codpais,FLD_NOMBRE)VALUES(" SQL = SQL & "'" & Me.TXT_CODIGO.Text & "'" SQL = SQL & ",'" & Me.TXT_NOMBRE.Text & "')" CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_Paises.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery() MENSAJE = "REGISTRO GRABADO" Else SQL = "UPDATE TBL_PAISES SET " SQL = SQL & "FLD_NOMBRE='" & Me.TXT_NOMBRE.Text & "'" SQL = SQL & " WHERE FLD_codpais='" & Me.TXT_CODIGO.Text & "'"
CMDActualizar.CommandText = SQL CMDActualizar.Connection = CONEXION DA_Paises.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "REGISTRO MODIFICADO" End If
CMDselect.CommandText = "SELECT A.FLD_CODPAIS AS [CODIGO DEL PAIS],A.FLD_NOMBRE AS [NOMBRE DEL PAIS] FROM TBL_PAISES A ORDER BY FLD_NOMBRE" DS_Datos.Tables("TBL_PAISES").Clear() DA_Paises.SelectCommand = CMDselect DA_PAISES.Fill(DS_Datos, "TBL_PAISES") CONEXION.Close() Call BLOQUEAROBJETOS(0)
339
340 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) Call BLOQUEARBOTONES(0) Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub BTN_BORRAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
If Me.TXT_CODIGO.TextLength = 0 Then MessageBox.Show("Debe seleccionar un registro para borrar", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) End If If MessageBox.Show("Desea borrar el registro actual?", "SOFTBATEC 1.O", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then Try CMDBorrar.CommandText = "DELETE FROM TBL_PAISES WHERE FLD_codpais='" & Me.TXT_CODIGO.Text & "'" CMDBorrar.Connection = CONEXION DA_PAISES.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() CMDselect.CommandText = "SELECT A.FLD_CODpais AS [CODIGO DEL PAIS],A.FLD_NOMBRE AS [NOMBRE DEL PAIS] FROM TBL_PAISES A ORDER BY FLD_NOMBRE" DS_Datos.Tables("TBL_PAISES").Clear() DA_PAISES.SelectCommand = CMDselect DA_PAISES.Fill(DS_Datos, "TBL_PAISES") CONEXION.Close() MessageBox.Show("REGISTRO ELIMINADO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End If End Sub
Private Sub BTN_CANCELAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
340
341 SOFBATEC 1.0DERECHOS RESERVADOS
Call BLOQUEAROBJETOS(0) Call BLOQUEARBOTONES(0) SWGrabar = -1 End Sub
Private Sub BTN_SALIR_Click1(ByVal sender As Object, ByVal e As System.EventArgs) Handles BTN_SALIR.Click DS_Datos.Tables("tbl_paises").Clear() Me.Close() End SubEnd Class
Codigo imprimir boletines
Public Class frm_impr_boletines Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
341
342 SOFBATEC 1.0DERECHOS RESERVADOS
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents lbl_cod_logro As System.Windows.Forms.Label Friend WithEvents lbl_asignatura As System.Windows.Forms.Label Friend WithEvents lbl_grado As System.Windows.Forms.Label Friend WithEvents btn_impr_boletin As System.Windows.Forms.Button Friend WithEvents btn_salir As System.Windows.Forms.Button Friend WithEvents lbl_ape_estudiante As System.Windows.Forms.Label Friend WithEvents lbl_nom_estd As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents txt_id_estudiante As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txt_nom_estd As System.Windows.Forms.TextBox Friend WithEvents txt_ape_estd As System.Windows.Forms.TextBox Friend WithEvents txt_num_semestre As System.Windows.Forms.TextBox Friend WithEvents lbl_semestre_No As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents btn_agre_logros As System.Windows.Forms.Button Friend WithEvents txt_grado As System.Windows.Forms.TextBox Friend WithEvents txt_materia1 As System.Windows.Forms.TextBox Friend WithEvents txt_materia9 As System.Windows.Forms.TextBox Friend WithEvents txt_materia8 As System.Windows.Forms.TextBox Friend WithEvents txt_materia7 As System.Windows.Forms.TextBox Friend WithEvents txt_materia6 As System.Windows.Forms.TextBox Friend WithEvents txt_materia5 As System.Windows.Forms.TextBox Friend WithEvents txt_materia4 As System.Windows.Forms.TextBox Friend WithEvents txt_materia3 As System.Windows.Forms.TextBox Friend WithEvents txt_materia2 As System.Windows.Forms.TextBox Friend WithEvents labelnota2 As System.Windows.Forms.Label Friend WithEvents labelnota3 As System.Windows.Forms.Label Friend WithEvents labelnota4 As System.Windows.Forms.Label Friend WithEvents labelnota5 As System.Windows.Forms.Label Friend WithEvents labelnota6 As System.Windows.Forms.Label Friend WithEvents labelnota7 As System.Windows.Forms.Label Friend WithEvents labelnota8 As System.Windows.Forms.Label Friend WithEvents labelnota9 As System.Windows.Forms.Label Friend WithEvents labelnota1 As System.Windows.Forms.Label Friend WithEvents txt_cod2 As System.Windows.Forms.TextBox Friend WithEvents txt_cod1 As System.Windows.Forms.TextBox Friend WithEvents txt_cod3 As System.Windows.Forms.TextBox Friend WithEvents txt_cod4 As System.Windows.Forms.TextBox Friend WithEvents txt_cod5 As System.Windows.Forms.TextBox Friend WithEvents txt_cod6 As System.Windows.Forms.TextBox Friend WithEvents txt_cod7 As System.Windows.Forms.TextBox Friend WithEvents txt_cod8 As System.Windows.Forms.TextBox Friend WithEvents txt_cod9 As System.Windows.Forms.TextBox
342
343 SOFBATEC 1.0DERECHOS RESERVADOS
Friend WithEvents TXT_NOMESTD As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.lbl_cod_logro = New System.Windows.Forms.Label Me.lbl_asignatura = New System.Windows.Forms.Label Me.lbl_grado = New System.Windows.Forms.Label Me.btn_impr_boletin = New System.Windows.Forms.Button Me.btn_salir = New System.Windows.Forms.Button Me.lbl_ape_estudiante = New System.Windows.Forms.Label Me.lbl_nom_estd = New System.Windows.Forms.Label Me.txt_id_estudiante = New System.Windows.Forms.TextBox Me.Label2 = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.txt_nom_estd = New System.Windows.Forms.TextBox Me.txt_ape_estd = New System.Windows.Forms.TextBox Me.txt_num_semestre = New System.Windows.Forms.TextBox Me.lbl_semestre_No = New System.Windows.Forms.Label Me.txt_grado = New System.Windows.Forms.TextBox Me.Label3 = New System.Windows.Forms.Label Me.txt_materia1 = New System.Windows.Forms.TextBox Me.txt_materia9 = New System.Windows.Forms.TextBox Me.txt_materia8 = New System.Windows.Forms.TextBox Me.txt_materia7 = New System.Windows.Forms.TextBox Me.txt_materia6 = New System.Windows.Forms.TextBox Me.txt_materia5 = New System.Windows.Forms.TextBox Me.txt_materia4 = New System.Windows.Forms.TextBox Me.txt_materia3 = New System.Windows.Forms.TextBox Me.txt_materia2 = New System.Windows.Forms.TextBox Me.btn_agre_logros = New System.Windows.Forms.Button Me.labelnota2 = New System.Windows.Forms.Label Me.labelnota3 = New System.Windows.Forms.Label Me.labelnota4 = New System.Windows.Forms.Label Me.labelnota5 = New System.Windows.Forms.Label Me.labelnota6 = New System.Windows.Forms.Label Me.labelnota7 = New System.Windows.Forms.Label Me.labelnota8 = New System.Windows.Forms.Label Me.labelnota9 = New System.Windows.Forms.Label Me.labelnota1 = New System.Windows.Forms.Label Me.txt_cod2 = New System.Windows.Forms.TextBox Me.txt_cod1 = New System.Windows.Forms.TextBox Me.txt_cod3 = New System.Windows.Forms.TextBox Me.txt_cod4 = New System.Windows.Forms.TextBox Me.txt_cod5 = New System.Windows.Forms.TextBox Me.txt_cod6 = New System.Windows.Forms.TextBox Me.txt_cod7 = New System.Windows.Forms.TextBox Me.txt_cod8 = New System.Windows.Forms.TextBox Me.txt_cod9 = New System.Windows.Forms.TextBox Me.TXT_NOMESTD = New System.Windows.Forms.TextBox Me.SuspendLayout() ' 'lbl_cod_logro
343
344 SOFBATEC 1.0DERECHOS RESERVADOS
' Me.lbl_cod_logro.AutoSize = True Me.lbl_cod_logro.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_cod_logro.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_cod_logro.ForeColor = System.Drawing.Color.Blue Me.lbl_cod_logro.Location = New System.Drawing.Point(456, 222) Me.lbl_cod_logro.Name = "lbl_cod_logro" Me.lbl_cod_logro.Size = New System.Drawing.Size(121, 19) Me.lbl_cod_logro.TabIndex = 121 Me.lbl_cod_logro.Text = "CODIGO DEL LOGRO" ' 'lbl_asignatura ' Me.lbl_asignatura.AutoSize = True Me.lbl_asignatura.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_asignatura.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_asignatura.ForeColor = System.Drawing.Color.Blue Me.lbl_asignatura.Location = New System.Drawing.Point(80, 222) Me.lbl_asignatura.Name = "lbl_asignatura" Me.lbl_asignatura.Size = New System.Drawing.Size(87, 19) Me.lbl_asignatura.TabIndex = 93 Me.lbl_asignatura.Text = "ASIGNATURAS" ' 'lbl_grado ' Me.lbl_grado.AutoSize = True Me.lbl_grado.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_grado.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_grado.ForeColor = System.Drawing.Color.Blue Me.lbl_grado.Location = New System.Drawing.Point(504, 139) Me.lbl_grado.Name = "lbl_grado" Me.lbl_grado.Size = New System.Drawing.Size(48, 19) Me.lbl_grado.TabIndex = 92 Me.lbl_grado.Text = "GRADO" ' 'btn_impr_boletin ' Me.btn_impr_boletin.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_impr_boletin.ForeColor = System.Drawing.Color.Blue Me.btn_impr_boletin.Location = New System.Drawing.Point(248, 485) Me.btn_impr_boletin.Name = "btn_impr_boletin" Me.btn_impr_boletin.Size = New System.Drawing.Size(152, 21) Me.btn_impr_boletin.TabIndex = 98 Me.btn_impr_boletin.Text = "Imprimir boletin" ' 'btn_salir ' Me.btn_salir.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_salir.ForeColor = System.Drawing.Color.Blue Me.btn_salir.Location = New System.Drawing.Point(408, 485)
344
345 SOFBATEC 1.0DERECHOS RESERVADOS
Me.btn_salir.Name = "btn_salir" Me.btn_salir.Size = New System.Drawing.Size(152, 21) Me.btn_salir.TabIndex = 99 Me.btn_salir.Text = "Salir" ' 'lbl_ape_estudiante ' Me.lbl_ape_estudiante.AutoSize = True Me.lbl_ape_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_ape_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_ape_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_ape_estudiante.Location = New System.Drawing.Point(64, 139) Me.lbl_ape_estudiante.Name = "lbl_ape_estudiante" Me.lbl_ape_estudiante.Size = New System.Drawing.Size(169, 19) Me.lbl_ape_estudiante.TabIndex = 100 Me.lbl_ape_estudiante.Text = "APELLIDOS DEL ESTUDIANTE" ' 'lbl_nom_estd ' Me.lbl_nom_estd.AutoSize = True Me.lbl_nom_estd.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_nom_estd.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_nom_estd.ForeColor = System.Drawing.Color.Blue Me.lbl_nom_estd.Location = New System.Drawing.Point(272, 139) Me.lbl_nom_estd.Name = "lbl_nom_estd" Me.lbl_nom_estd.Size = New System.Drawing.Size(163, 19) Me.lbl_nom_estd.TabIndex = 101 Me.lbl_nom_estd.Text = "NOMBRES DEL ESTUDIANTE" ' 'txt_id_estudiante ' Me.txt_id_estudiante.Location = New System.Drawing.Point(264, 97) Me.txt_id_estudiante.Name = "txt_id_estudiante" Me.txt_id_estudiante.Size = New System.Drawing.Size(168, 20) Me.txt_id_estudiante.TabIndex = 116 Me.txt_id_estudiante.Text = "" ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.BackColor = System.Drawing.Color.LightSkyBlue Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label2.ForeColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(256, 76) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(197, 19) Me.Label2.TabIndex = 105 Me.Label2.Text = "IDENTIFICACION DEL ESTUDIANTE" '
345
346 SOFBATEC 1.0DERECHOS RESERVADOS
'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 18.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(160, 24) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(360, 28) Me.Label1.TabIndex = 110 Me.Label1.Text = "IMPRESION DE BOLETINES" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'txt_nom_estd ' Me.txt_nom_estd.BackColor = System.Drawing.Color.RoyalBlue Me.txt_nom_estd.ForeColor = System.Drawing.SystemColors.WindowText Me.txt_nom_estd.Location = New System.Drawing.Point(248, 159) Me.txt_nom_estd.Name = "txt_nom_estd" Me.txt_nom_estd.ReadOnly = True Me.txt_nom_estd.Size = New System.Drawing.Size(200, 20) Me.txt_nom_estd.TabIndex = 125 Me.txt_nom_estd.Text = "" ' 'txt_ape_estd ' Me.txt_ape_estd.BackColor = System.Drawing.Color.RoyalBlue Me.txt_ape_estd.ForeColor = System.Drawing.SystemColors.WindowText Me.txt_ape_estd.Location = New System.Drawing.Point(56, 159) Me.txt_ape_estd.Name = "txt_ape_estd" Me.txt_ape_estd.ReadOnly = True Me.txt_ape_estd.Size = New System.Drawing.Size(168, 20) Me.txt_ape_estd.TabIndex = 117 Me.txt_ape_estd.Text = "" ' 'txt_num_semestre ' Me.txt_num_semestre.Location = New System.Drawing.Point(104, 97) Me.txt_num_semestre.Name = "txt_num_semestre" Me.txt_num_semestre.Size = New System.Drawing.Size(64, 20) Me.txt_num_semestre.TabIndex = 115 Me.txt_num_semestre.Text = "" ' 'lbl_semestre_No ' Me.lbl_semestre_No.AutoSize = True Me.lbl_semestre_No.BackColor = System.Drawing.Color.LightSkyBlue
346
347 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lbl_semestre_No.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_semestre_No.ForeColor = System.Drawing.Color.Blue Me.lbl_semestre_No.Location = New System.Drawing.Point(96, 76) Me.lbl_semestre_No.Name = "lbl_semestre_No" Me.lbl_semestre_No.Size = New System.Drawing.Size(86, 19) Me.lbl_semestre_No.TabIndex = 114 Me.lbl_semestre_No.Text = "SEMESTRE No" ' 'txt_grado ' Me.txt_grado.BackColor = System.Drawing.Color.RoyalBlue Me.txt_grado.ForeColor = System.Drawing.SystemColors.WindowText Me.txt_grado.Location = New System.Drawing.Point(496, 159) Me.txt_grado.Name = "txt_grado" Me.txt_grado.ReadOnly = True Me.txt_grado.Size = New System.Drawing.Size(64, 20) Me.txt_grado.TabIndex = 126 Me.txt_grado.Text = "" ' 'Label3 ' Me.Label3.AutoSize = True Me.Label3.BackColor = System.Drawing.Color.LightSkyBlue Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label3.ForeColor = System.Drawing.Color.Blue Me.Label3.Location = New System.Drawing.Point(224, 222) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(213, 19) Me.Label3.TabIndex = 120 Me.Label3.Text = "CALIFICACION DE LAS ASIGNATURAS" ' 'txt_materia1 ' Me.txt_materia1.BackColor = System.Drawing.Color.White Me.txt_materia1.Location = New System.Drawing.Point(40, 250) Me.txt_materia1.Name = "txt_materia1" Me.txt_materia1.ReadOnly = True Me.txt_materia1.Size = New System.Drawing.Size(168, 20) Me.txt_materia1.TabIndex = 140 Me.txt_materia1.Text = "" ' 'txt_materia9 ' Me.txt_materia9.BackColor = System.Drawing.Color.White Me.txt_materia9.Location = New System.Drawing.Point(40, 416) Me.txt_materia9.Name = "txt_materia9" Me.txt_materia9.ReadOnly = True Me.txt_materia9.Size = New System.Drawing.Size(168, 20) Me.txt_materia9.TabIndex = 148
347
348 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_materia9.Text = "" ' 'txt_materia8 ' Me.txt_materia8.BackColor = System.Drawing.Color.White Me.txt_materia8.Location = New System.Drawing.Point(40, 395) Me.txt_materia8.Name = "txt_materia8" Me.txt_materia8.ReadOnly = True Me.txt_materia8.Size = New System.Drawing.Size(168, 20) Me.txt_materia8.TabIndex = 147 Me.txt_materia8.Text = "" ' 'txt_materia7 ' Me.txt_materia7.BackColor = System.Drawing.Color.White Me.txt_materia7.Location = New System.Drawing.Point(40, 374) Me.txt_materia7.Name = "txt_materia7" Me.txt_materia7.ReadOnly = True Me.txt_materia7.Size = New System.Drawing.Size(168, 20) Me.txt_materia7.TabIndex = 146 Me.txt_materia7.Text = "" ' 'txt_materia6 ' Me.txt_materia6.BackColor = System.Drawing.Color.White Me.txt_materia6.Location = New System.Drawing.Point(40, 354) Me.txt_materia6.Name = "txt_materia6" Me.txt_materia6.ReadOnly = True Me.txt_materia6.Size = New System.Drawing.Size(168, 20) Me.txt_materia6.TabIndex = 145 Me.txt_materia6.Text = "" ' 'txt_materia5 ' Me.txt_materia5.BackColor = System.Drawing.Color.White Me.txt_materia5.Location = New System.Drawing.Point(40, 333) Me.txt_materia5.Name = "txt_materia5" Me.txt_materia5.ReadOnly = True Me.txt_materia5.Size = New System.Drawing.Size(168, 20) Me.txt_materia5.TabIndex = 144 Me.txt_materia5.Text = "" ' 'txt_materia4 ' Me.txt_materia4.BackColor = System.Drawing.Color.White Me.txt_materia4.Location = New System.Drawing.Point(40, 312) Me.txt_materia4.Name = "txt_materia4" Me.txt_materia4.ReadOnly = True Me.txt_materia4.Size = New System.Drawing.Size(168, 20) Me.txt_materia4.TabIndex = 143
348
349 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_materia4.Text = "" ' 'txt_materia3 ' Me.txt_materia3.BackColor = System.Drawing.Color.White Me.txt_materia3.Location = New System.Drawing.Point(40, 291) Me.txt_materia3.Name = "txt_materia3" Me.txt_materia3.ReadOnly = True Me.txt_materia3.Size = New System.Drawing.Size(168, 20) Me.txt_materia3.TabIndex = 142 Me.txt_materia3.Text = "" ' 'txt_materia2 ' Me.txt_materia2.BackColor = System.Drawing.Color.White Me.txt_materia2.Location = New System.Drawing.Point(40, 270) Me.txt_materia2.Name = "txt_materia2" Me.txt_materia2.ReadOnly = True Me.txt_materia2.Size = New System.Drawing.Size(168, 20) Me.txt_materia2.TabIndex = 141 Me.txt_materia2.Text = "" ' 'btn_agre_logros ' Me.btn_agre_logros.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_agre_logros.ForeColor = System.Drawing.Color.Blue Me.btn_agre_logros.Location = New System.Drawing.Point(88, 485) Me.btn_agre_logros.Name = "btn_agre_logros" Me.btn_agre_logros.Size = New System.Drawing.Size(152, 21) Me.btn_agre_logros.TabIndex = 129 Me.btn_agre_logros.Text = "agregar logros" ' 'labelnota2 ' Me.labelnota2.AutoSize = True Me.labelnota2.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota2.ForeColor = System.Drawing.Color.Blue Me.labelnota2.Location = New System.Drawing.Point(280, 270) Me.labelnota2.Name = "labelnota2" Me.labelnota2.Size = New System.Drawing.Size(87, 19) Me.labelnota2.TabIndex = 130 Me.labelnota2.Text = "ASIGNATURAS" ' 'labelnota3 ' Me.labelnota3.AutoSize = True Me.labelnota3.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota3.ForeColor = System.Drawing.Color.Blue
349
350 SOFBATEC 1.0DERECHOS RESERVADOS
Me.labelnota3.Location = New System.Drawing.Point(280, 291) Me.labelnota3.Name = "labelnota3" Me.labelnota3.Size = New System.Drawing.Size(87, 19) Me.labelnota3.TabIndex = 131 Me.labelnota3.Text = "ASIGNATURAS" ' 'labelnota4 ' Me.labelnota4.AutoSize = True Me.labelnota4.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota4.ForeColor = System.Drawing.Color.Blue Me.labelnota4.Location = New System.Drawing.Point(280, 312) Me.labelnota4.Name = "labelnota4" Me.labelnota4.Size = New System.Drawing.Size(87, 19) Me.labelnota4.TabIndex = 132 Me.labelnota4.Text = "ASIGNATURAS" ' 'labelnota5 ' Me.labelnota5.AutoSize = True Me.labelnota5.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota5.ForeColor = System.Drawing.Color.Blue Me.labelnota5.Location = New System.Drawing.Point(280, 333) Me.labelnota5.Name = "labelnota5" Me.labelnota5.Size = New System.Drawing.Size(87, 19) Me.labelnota5.TabIndex = 133 Me.labelnota5.Text = "ASIGNATURAS" ' 'labelnota6 ' Me.labelnota6.AutoSize = True Me.labelnota6.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota6.ForeColor = System.Drawing.Color.Blue Me.labelnota6.Location = New System.Drawing.Point(280, 354) Me.labelnota6.Name = "labelnota6" Me.labelnota6.Size = New System.Drawing.Size(87, 19) Me.labelnota6.TabIndex = 134 Me.labelnota6.Text = "ASIGNATURAS" ' 'labelnota7 ' Me.labelnota7.AutoSize = True Me.labelnota7.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota7.ForeColor = System.Drawing.Color.Blue Me.labelnota7.Location = New System.Drawing.Point(280, 374) Me.labelnota7.Name = "labelnota7"
350
351 SOFBATEC 1.0DERECHOS RESERVADOS
Me.labelnota7.Size = New System.Drawing.Size(87, 19) Me.labelnota7.TabIndex = 135 Me.labelnota7.Text = "ASIGNATURAS" ' 'labelnota8 ' Me.labelnota8.AutoSize = True Me.labelnota8.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota8.ForeColor = System.Drawing.Color.Blue Me.labelnota8.Location = New System.Drawing.Point(280, 395) Me.labelnota8.Name = "labelnota8" Me.labelnota8.Size = New System.Drawing.Size(87, 19) Me.labelnota8.TabIndex = 136 Me.labelnota8.Text = "ASIGNATURAS" ' 'labelnota9 ' Me.labelnota9.AutoSize = True Me.labelnota9.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota9.ForeColor = System.Drawing.Color.Blue Me.labelnota9.Location = New System.Drawing.Point(280, 416) Me.labelnota9.Name = "labelnota9" Me.labelnota9.Size = New System.Drawing.Size(87, 19) Me.labelnota9.TabIndex = 137 Me.labelnota9.Text = "ASIGNATURAS" ' 'labelnota1 ' Me.labelnota1.AutoSize = True Me.labelnota1.BackColor = System.Drawing.Color.LightSkyBlue Me.labelnota1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.labelnota1.ForeColor = System.Drawing.Color.Blue Me.labelnota1.Location = New System.Drawing.Point(280, 250) Me.labelnota1.Name = "labelnota1" Me.labelnota1.Size = New System.Drawing.Size(87, 19) Me.labelnota1.TabIndex = 140 Me.labelnota1.Text = "ASIGNATURAS" ' 'txt_cod2 ' Me.txt_cod2.Location = New System.Drawing.Point(480, 270) Me.txt_cod2.Name = "txt_cod2" Me.txt_cod2.Size = New System.Drawing.Size(72, 20) Me.txt_cod2.TabIndex = 118 Me.txt_cod2.Text = "" ' 'txt_cod1 '
351
352 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cod1.Location = New System.Drawing.Point(480, 250) Me.txt_cod1.Name = "txt_cod1" Me.txt_cod1.Size = New System.Drawing.Size(72, 20) Me.txt_cod1.TabIndex = 117 Me.txt_cod1.Text = "" ' 'txt_cod3 ' Me.txt_cod3.Location = New System.Drawing.Point(480, 291) Me.txt_cod3.Name = "txt_cod3" Me.txt_cod3.Size = New System.Drawing.Size(72, 20) Me.txt_cod3.TabIndex = 119 Me.txt_cod3.Text = "" ' 'txt_cod4 ' Me.txt_cod4.Location = New System.Drawing.Point(480, 312) Me.txt_cod4.Name = "txt_cod4" Me.txt_cod4.Size = New System.Drawing.Size(72, 20) Me.txt_cod4.TabIndex = 120 Me.txt_cod4.Text = "" ' 'txt_cod5 ' Me.txt_cod5.Location = New System.Drawing.Point(480, 333) Me.txt_cod5.Name = "txt_cod5" Me.txt_cod5.Size = New System.Drawing.Size(72, 20) Me.txt_cod5.TabIndex = 121 Me.txt_cod5.Text = "" ' 'txt_cod6 ' Me.txt_cod6.Location = New System.Drawing.Point(480, 354) Me.txt_cod6.Name = "txt_cod6" Me.txt_cod6.Size = New System.Drawing.Size(72, 20) Me.txt_cod6.TabIndex = 122 Me.txt_cod6.Text = "" ' 'txt_cod7 ' Me.txt_cod7.Location = New System.Drawing.Point(480, 374) Me.txt_cod7.Name = "txt_cod7" Me.txt_cod7.Size = New System.Drawing.Size(72, 20) Me.txt_cod7.TabIndex = 123 Me.txt_cod7.Text = "" ' 'txt_cod8 ' Me.txt_cod8.Location = New System.Drawing.Point(480, 395) Me.txt_cod8.Name = "txt_cod8"
352
353 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cod8.Size = New System.Drawing.Size(72, 20) Me.txt_cod8.TabIndex = 124 Me.txt_cod8.Text = "" ' 'txt_cod9 ' Me.txt_cod9.Location = New System.Drawing.Point(480, 416) Me.txt_cod9.Name = "txt_cod9" Me.txt_cod9.Size = New System.Drawing.Size(72, 20) Me.txt_cod9.TabIndex = 125 Me.txt_cod9.Text = "" ' 'TXT_NOMESTD ' Me.TXT_NOMESTD.Location = New System.Drawing.Point(672, 513) Me.TXT_NOMESTD.Name = "TXT_NOMESTD" Me.TXT_NOMESTD.Size = New System.Drawing.Size(72, 20) Me.TXT_NOMESTD.TabIndex = 152 Me.TXT_NOMESTD.Text = "" Me.TXT_NOMESTD.Visible = False ' 'frm_impr_boletines ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(682, 532) Me.Controls.Add(Me.TXT_NOMESTD) Me.Controls.Add(Me.txt_cod9) Me.Controls.Add(Me.txt_cod8) Me.Controls.Add(Me.txt_cod7) Me.Controls.Add(Me.txt_cod6) Me.Controls.Add(Me.txt_cod5) Me.Controls.Add(Me.txt_cod4) Me.Controls.Add(Me.txt_cod3) Me.Controls.Add(Me.txt_cod1) Me.Controls.Add(Me.txt_cod2) Me.Controls.Add(Me.labelnota1) Me.Controls.Add(Me.labelnota9) Me.Controls.Add(Me.labelnota8) Me.Controls.Add(Me.labelnota7) Me.Controls.Add(Me.labelnota6) Me.Controls.Add(Me.labelnota5) Me.Controls.Add(Me.labelnota4) Me.Controls.Add(Me.labelnota3) Me.Controls.Add(Me.labelnota2) Me.Controls.Add(Me.btn_agre_logros) Me.Controls.Add(Me.txt_materia2) Me.Controls.Add(Me.txt_materia3) Me.Controls.Add(Me.txt_materia4) Me.Controls.Add(Me.txt_materia5)
353
354 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Controls.Add(Me.txt_materia6) Me.Controls.Add(Me.txt_materia7) Me.Controls.Add(Me.txt_materia8) Me.Controls.Add(Me.txt_materia9) Me.Controls.Add(Me.txt_materia1) Me.Controls.Add(Me.Label3) Me.Controls.Add(Me.txt_grado) Me.Controls.Add(Me.txt_num_semestre) Me.Controls.Add(Me.lbl_semestre_No) Me.Controls.Add(Me.txt_ape_estd) Me.Controls.Add(Me.txt_nom_estd) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.txt_id_estudiante) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.lbl_nom_estd) Me.Controls.Add(Me.lbl_ape_estudiante) Me.Controls.Add(Me.btn_salir) Me.Controls.Add(Me.btn_impr_boletin) Me.Controls.Add(Me.lbl_cod_logro) Me.Controls.Add(Me.lbl_asignatura) Me.Controls.Add(Me.lbl_grado) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog Me.Name = "frm_impr_boletines" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Impresion de boletines - SOFTBATEC" Me.ResumeLayout(False)
End Sub
#End Region
Dim SWDATOS As Boolean = False Dim ESTDEXIST As Boolean = False Dim cal As String Dim año As String
#Region "VALIDACION DE CAMPOS"
Private Function Validar() As Boolean
If Me.txt_id_estudiante.Text.Length = 0 Then MessageBox.Show("DIGITE LA IDENTIDAD DEL ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_id_estudiante.Focus() Validar = False Exit Function End If
354
355 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_ape_estd.Text.Length = 0 Then MessageBox.Show("DIGITE LOS APELLIDOS DEL ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_ape_estd.Focus() Validar = False Exit Function End If
If Me.txt_nom_estd.Text.Length = 0 Then MessageBox.Show("DIGITE EL NOMBRE DEL ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_nom_estd.Focus() Validar = False Exit Function End If
If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Or Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then
If Me.txt_cod1.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod1.Focus() Validar = False Exit Function End If
If Me.txt_cod2.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod2.Focus() Validar = False Exit Function End If
If Me.txt_cod3.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod3.Focus() Validar = False Exit Function End If
355
356 SOFBATEC 1.0DERECHOS RESERVADOS
If Me.txt_cod4.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod4.Focus() Validar = False Exit Function End If
If Me.txt_cod5.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod5.Focus() Validar = False Exit Function End If
If Me.txt_cod6.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod6.Focus() Validar = False Exit Function End If
If Me.txt_cod7.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod7.Focus() Validar = False Exit Function End If
If Me.txt_cod8.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod8.Focus() Validar = False Exit Function End If
If Me.txt_cod9.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1)
356
357 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cod9.Focus() Validar = False Exit Function End If
Else
If Me.txt_cod1.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod1.Focus() Validar = False Exit Function End If
If Me.txt_cod2.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod2.Focus() Validar = False Exit Function End If
If Me.txt_cod3.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod3.Focus() Validar = False Exit Function End If
If Me.txt_cod4.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod4.Focus() Validar = False Exit Function End If
If Me.txt_cod5.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod5.Focus() Validar = False Exit Function
357
358 SOFBATEC 1.0DERECHOS RESERVADOS
End If
If Me.txt_cod6.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod6.Focus() Validar = False Exit Function End If
If Me.txt_cod7.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod7.Focus() Validar = False Exit Function End If
If Me.txt_cod8.Text.Length = 0 Then MessageBox.Show("DIGITE EL CODIGO CORRESPONDIENTE A LA ASIGNATURA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) Me.txt_cod8.Focus() Validar = False Exit Function End If
End If
Validar = True End Function#End Region
Private Sub frm_impr_boletines_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim SQL, SQL2 As String Me.Cursor = System.Windows.Forms.Cursors.Default
Try
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() SQL = "select A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA,A.fld_logro_mat AS [LOGRO MATEMATICAS],A.fld_logro_esp AS
358
359 SOFBATEC 1.0DERECHOS RESERVADOS
[LOGRO ESPAÑOL],A.fld_logro_art AS [LOGRO ARTES],A.fld_logro_tec AS [LOGRO TECNOLOGIA],A.fld_logro_soc AS [LOGRO SOCIALES],fld_logro_rel AS [LOGRO RELIGION],A.fld_logro_ing AS [LOGRO INGLES],A.fld_logro_nat AS [LOGRO NATURALES],A.fld_logro_fil AS [LOGRO FILOSOFIA],A.fld_logro_qui AS [LOGRO QUIMICA],A.fld_logro_fis AS [LOGRO FISICA],B.fld_id_estudiante AS [IDENTIDAD DEL ESTUDIANTE],B.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],B.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],B.fld_semestre AS SEMESTRE,B.fld_grado AS GRADO,B.fld_año_lectivo AS [AÑO LECTIVO]" SQL = SQL & " from tbl_calificacion_estudiantes A,tbl_datos_alum_boletines B" SQL = SQL & " WHERE A.fld_id_estudiante=B.fld_id_estudiante" CMDselect.CommandText = SQL DA_LOGROS.SelectCommand = CMDselect DA_LOGROS.Fill(DS_Datos, "TBL_BOLETIN")
CONEXION.Close()
gradomtr = " "
Me.Width = 550 Me.Height = 169 Me.Label1.Location = New System.Drawing.Point(96, 16)
Me.txt_num_semestre.Focus() año = Now.Year
Me.btn_agre_logros.Enabled = True Me.btn_impr_boletin.Enabled = False
Me.Cursor = System.Windows.Forms.Cursors.Default Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "PSICOLSOFT", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub txt_id_estudiante_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_id_estudiante.Leave Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_nom_estudiante,fld_ape_estudiante,fld_grado,fld_cual_matematicas,fld_cual_español,fld_cual_artes,fld_cual_tecnologia,fld_cual_sociales,fld_cual_religion,fld_cual_ingles,fld_cual_naturales,fld_cual_filosofia,fld_cual_quimica,fld_cual_fisica from
359
360 SOFBATEC 1.0DERECHOS RESERVADOS
tbl_calificacion_estudiantes where fld_id_estudiante=" & Me.txt_id_estudiante.Text & "" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then Me.txt_ape_estd.Text = DR_CONSULTA.Item("fld_ape_estudiante") Me.txt_nom_estd.Text = DR_CONSULTA.Item("Fld_nom_estudiante") Me.txt_grado.Text = DR_CONSULTA.Item("fld_grado") If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Or Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then Me.txt_materia1.Text = "MATEMATICAS" Me.txt_materia2.Text = "ESPAÑOL" Me.txt_materia3.Text = "ARTES GRAFICAS" Me.txt_materia4.Text = "TECNOLOGIA" Me.txt_materia5.Text = "RELIGION" Me.txt_materia6.Text = "INGLES" Me.txt_materia7.Text = "FILOSOFIA" Me.txt_materia8.Text = "QUIMICA" Me.txt_materia9.Text = "FISICA" Me.labelnota1.Text = DR_CONSULTA.Item("fld_cual_matematicas") Me.labelnota2.Text = DR_CONSULTA.Item("fld_cual_español") Me.labelnota3.Text = DR_CONSULTA.Item("fld_cual_artes") Me.labelnota4.Text = DR_CONSULTA.Item("fld_cual_tecnologia") Me.labelnota5.Text = DR_CONSULTA.Item("fld_cual_religion") Me.labelnota6.Text = DR_CONSULTA.Item("fld_cual_ingles") Me.labelnota7.Text = DR_CONSULTA.Item("fld_cual_filosofia") Me.labelnota8.Text = DR_CONSULTA.Item("fld_cual_quimica") Me.labelnota9.Text = DR_CONSULTA.Item("fld_cual_fisica")
Else Me.txt_materia1.Text = "MATEMATICAS" Me.txt_materia2.Text = "ESPAÑOL" Me.txt_materia3.Text = "ARTES" Me.txt_materia4.Text = "TECNOLOGIA" Me.txt_materia5.Text = "SOCIALES" Me.txt_materia6.Text = "RELIGION" Me.txt_materia7.Text = "INGLES" Me.txt_materia8.Text = "NATURALES" Me.labelnota1.Text = DR_CONSULTA.Item("fld_cual_matematicas") Me.labelnota2.Text = DR_CONSULTA.Item("fld_cual_español") Me.labelnota3.Text = DR_CONSULTA.Item("fld_cual_artes") Me.labelnota4.Text = DR_CONSULTA.Item("fld_cual_tecnologia") Me.labelnota6.Text = DR_CONSULTA.Item("fld_cual_religion") Me.labelnota7.Text = DR_CONSULTA.Item("fld_cual_ingles") Me.labelnota8.Text = DR_CONSULTA.Item("fld_cual_naturales") Me.txt_materia9.Visible = False Me.labelnota9.Visible = False
360
361 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_cod9.Visible = False
End If DR_CONSULTA.Close()
Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select * from tbl_datos_alum_boletines where fld_id_estudiante=" & Me.txt_id_estudiante.Text & "" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then Me.TXT_NOMESTD.Text = DR_CONSULTA.Item("fld_nom_estudiante") CONEXION.Close() End If If Me.TXT_NOMESTD.Text.Length > 0 Then ESTDEXIST = True Else If ESTDEXIST = True Then ESTDEXIST = False End If DR_CONSULTA.Close() Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTLUKAKRY 1.0", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If End Try Me.Width = 688 Me.Height = 640 Me.Label1.Location = New System.Drawing.Point(160, 24) Me.txt_cod1.Focus() Else MessageBox.Show("LA IDENTIFICACION DIGITADA NO PERTENECE A NINGUN ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_id_estudiante.Clear() Me.txt_id_estudiante.Focus() DR_CONSULTA.Close() Exit Sub End If CONEXION.Close() id = Me.txt_id_estudiante.Text Catch EXCEPCION As Exception
361
362 SOFBATEC 1.0DERECHOS RESERVADOS
MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If End Try End Sub
Private Sub btn_generar_boletin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Try CMDBorrar.CommandText = "DELETE FROM tbl_datos_alum_boletines" CMDBorrar.Connection = CONEXION DA_DESCRIPCION_LOGRO.DeleteCommand = CMDBorrar CONEXION.Open() CMDBorrar.ExecuteNonQuery() CONEXION.Close() Me.txt_id_estudiante.Clear() Me.txt_ape_estd.Clear() Me.txt_nom_estd.Clear() If SWDATOS = True Then SWDATOS = False Me.btn_salir.Enabled = False Me.btn_impr_boletin.Enabled = True Me.txt_num_semestre.ReadOnly = False
Me.txt_id_estudiante.ReadOnly = False Me.txt_nom_estd.ReadOnly = False Me.txt_ape_estd.ReadOnly = False Me.txt_id_estudiante.Focus()
Catch excepcion As Exception If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try End Sub
Private Sub btn_impr_boletin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_impr_boletin.Click Dim impr As New frm_rpt_boletin_bach impr.ShowDialog() End Sub
Private Sub btn_agre_logros_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_agre_logros.Click If Validar() = False Then Exit Sub Dim SQL, MENSAJE, SQL1, SQL2 As String Try gradomtr = Me.txt_grado.Text
362
363 SOFBATEC 1.0DERECHOS RESERVADOS
If CONEXION.State = ConnectionState.Closed Then CONEXION.Open()
If ESTDEXIST = False Then SQL = "INSERT INTO tbl_datos_alum_boletines(fld_id_estudiante,fld_ape_estudiante,fld_nom_estudiante,fld_semestre,fld_grado,fld_año_lectivo)VALUES(" SQL = SQL & "" & Me.txt_id_estudiante.Text & "" SQL = SQL & ",'" & Me.txt_ape_estd.Text & "'" SQL = SQL & ",'" & Me.txt_nom_estd.Text & "'" SQL = SQL & ",'" & Me.txt_num_semestre.Text & "'" SQL = SQL & ",'" & Me.txt_grado.Text & "'" SQL = SQL & ",'" & año & "')"
CMDInsertar.CommandText = SQL CMDInsertar.Connection = CONEXION DA_CALIFICACION.InsertCommand = CMDInsertar CMDInsertar.ExecuteNonQuery()
If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Or Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then SQL1 = "UPDATE tbl_calificacion_estudiantes SET " SQL1 = SQL1 & "fld_logro_mat='" & logrmat & "'" SQL1 = SQL1 & ",fld_logro_esp='" & logresp & "'" SQL1 = SQL1 & ",fld_logro_art='" & logrart & "'" SQL1 = SQL1 & ",fld_logro_tec='" & logrtec & "'" SQL1 = SQL1 & ",fld_logro_rel='" & logrrel & "'" SQL1 = SQL1 & ",fld_logro_ing='" & logring & "'" SQL1 = SQL1 & ",fld_logro_fil='" & logrfil & "'" SQL1 = SQL1 & ",fld_logro_qui='" & logrqui & "'" SQL1 = SQL1 & ",fld_logro_fis='" & logrfis & "'" SQL1 = SQL1 & " WHERE fld_id_estudiante=" & Me.txt_id_estudiante.Text & "AND fld_grado='" & Me.txt_grado.Text & "'"
CMDActualizar.CommandText = SQL1 CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "INGRESO DE LOGROS SATISFACTORIO" Else SQL1 = "UPDATE tbl_calificacion_estudiantes SET " SQL1 = SQL1 & "fld_logro_mat='" & logrmat & "'" SQL1 = SQL1 & ",fld_logro_esp='" & logresp & "'" SQL1 = SQL1 & ",fld_logro_art='" & logrart & "'" SQL1 = SQL1 & ",fld_logro_tec='" & logrtec & "'" SQL1 = SQL1 & ",fld_logro_soc='" & logrsoc & "'" SQL1 = SQL1 & ",fld_logro_rel='" & logrrel & "'" SQL1 = SQL1 & ",fld_logro_ing='" & logring & "'" SQL1 = SQL1 & ",fld_logro_nat='" & logrnat & "'"
363
364 SOFBATEC 1.0DERECHOS RESERVADOS
SQL1 = SQL1 & " WHERE fld_id_estudiante=" & Me.txt_id_estudiante.Text & "AND fld_grado='" & Me.txt_grado.Text & "'"
CMDActualizar.CommandText = SQL1 CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "INGRESO DE LOGROS SATISFACTORIO" End If Else
If Me.txt_grado.Text = "11ºA" Or Me.txt_grado.Text = "11ºB" Or Me.txt_grado.Text = "11ºC" Or Me.txt_grado.Text = "11ºD" Or Me.txt_grado.Text = "10ºA" Or Me.txt_grado.Text = "10ºB" Or Me.txt_grado.Text = "10ºC" Or Me.txt_grado.Text = "10ºD" Then SQL1 = "UPDATE tbl_calificacion_estudiantes SET " SQL1 = SQL1 & "fld_logro_mat='" & logrmat & "'" SQL1 = SQL1 & ",fld_logro_esp='" & logresp & "'" SQL1 = SQL1 & ",fld_logro_art='" & logrart & "'" SQL1 = SQL1 & ",fld_logro_tec='" & logrtec & "'" SQL1 = SQL1 & ",fld_logro_rel='" & logrrel & "'" SQL1 = SQL1 & ",fld_logro_ing='" & logring & "'" SQL1 = SQL1 & ",fld_logro_fil='" & logrfil & "'" SQL1 = SQL1 & ",fld_logro_qui='" & logrqui & "'" SQL1 = SQL1 & ",fld_logro_fis='" & logrfis & "'" SQL1 = SQL1 & " WHERE fld_id_estudiante=" & Me.txt_id_estudiante.Text & "AND fld_grado='" & Me.txt_grado.Text & "'"
CMDActualizar.CommandText = SQL1 CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery() MENSAJE = "INGRESO DE LOGROS SATISFACTORIO" Else SQL1 = "UPDATE tbl_calificacion_estudiantes SET " SQL1 = SQL1 & "fld_logro_mat='" & logrmat & "'" SQL1 = SQL1 & ",fld_logro_esp='" & logresp & "'" SQL1 = SQL1 & ",fld_logro_art='" & logrart & "'" SQL1 = SQL1 & ",fld_logro_tec='" & logrtec & "'" SQL1 = SQL1 & ",fld_logro_soc='" & logrsoc & "'" SQL1 = SQL1 & ",fld_logro_rel='" & logrrel & "'" SQL1 = SQL1 & ",fld_logro_ing='" & logring & "'" SQL1 = SQL1 & ",fld_logro_nat='" & logrnat & "'" SQL1 = SQL1 & " WHERE fld_id_estudiante=" & Me.txt_id_estudiante.Text & "AND fld_grado='" & Me.txt_grado.Text & "'"
CMDActualizar.CommandText = SQL1 CMDActualizar.Connection = CONEXION DA_CALIFICACION.UpdateCommand = CMDActualizar CMDActualizar.ExecuteNonQuery()
364
365 SOFBATEC 1.0DERECHOS RESERVADOS
MENSAJE = "INGRESO DE LOGROS SATISFACTORIO" End If
End If
SQL2 = "select A.fld_cual_matematicas AS MATEMATICAS,A.fld_cual_español AS ESPAÑOL,A.fld_cual_artes AS ARTES,A.fld_cual_tecnologia AS TECNOLOGIA,A.fld_cual_sociales AS SOCIALES,A.fld_cual_religion AS RELIGION,A.fld_cual_ingles AS INGLES,A.fld_cual_naturales AS NATURALES,A.fld_cual_filosofia AS FILOSOFIA,A.fld_cual_quimica AS QUIMICA,A.fld_cual_fisica AS FISICA,A.fld_logro_mat AS [LOGRO MATEMATICAS],A.fld_logro_esp AS [LOGRO ESPAÑOL],A.fld_logro_art AS [LOGRO ARTES],A.fld_logro_tec AS [LOGRO TECNOLOGIA],A.fld_logro_soc AS [LOGRO SOCIALES],fld_logro_rel AS [LOGRO RELIGION],A.fld_logro_ing AS [LOGRO INGLES],A.fld_logro_nat AS [LOGRO NATURALES],A.fld_logro_fil AS [LOGRO FILOSOFIA],A.fld_logro_qui AS [LOGRO QUIMICA],A.fld_logro_fis AS [LOGRO FISICA],B.fld_id_estudiante AS [IDENTIDAD DEL ESTUDIANTE],B.fld_ape_estudiante AS [APELLIDOS DEL ESTUDIANTE],B.fld_nom_estudiante AS [NOMBRES DEL ESTUDIANTE],B.fld_semestre AS SEMESTRE,B.fld_grado AS GRADO,B.fld_año_lectivo AS [AÑO LECTIVO]" SQL2 = SQL2 & " from tbl_calificacion_estudiantes A,tbl_datos_alum_boletines B" SQL2 = SQL2 & " WHERE A.fld_id_estudiante=B.fld_id_estudiante" CMDselect.CommandText = SQL2 DA_LOGROS.SelectCommand = CMDselect DA_LOGROS.Fill(DS_Datos, "TBL_BOLETIN")
CONEXION.Close() Me.btn_agre_logros.Enabled = False MessageBox.Show(MENSAJE, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1) If Me.btn_impr_boletin.Enabled = False Then Me.btn_impr_boletin.Enabled = True Me.btn_agre_logros.Enabled = False Catch Excepcion As Exception MessageBox.Show(Excepcion.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End Try
End Sub
Private Sub txt_cod1_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod1.Leave Dim ASIGNATURA As String
' Try
365
366 SOFBATEC 1.0DERECHOS RESERVADOS
CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod1.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod1.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod1.Text & "'and fld_asignatura='" & ASIGNATURA & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logrmat = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod1.Focus() DR_CONSULTA.Close() Exit Sub End If
366
367 SOFBATEC 1.0DERECHOS RESERVADOS
'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If Me.txt_cod2.Focus() 'End Try End Sub
Private Sub txt_cod2_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod2.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod2.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod2.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open()
367
368 SOFBATEC 1.0DERECHOS RESERVADOS
CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod2.Text & "'and fld_asignatura='" & ASIGNATURA & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logresp = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod2.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub txt_cod3_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod3.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod3.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod3.Focus() DR_CONSULTA.Close() Exit Sub End If
368
369 SOFBATEC 1.0DERECHOS RESERVADOS
'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod3.Text & "'and fld_asignatura='" & ASIGNATURA & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logrart = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod3.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub txt_cod4_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod4.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open()
369
370 SOFBATEC 1.0DERECHOS RESERVADOS
CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod4.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod4.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod4.Text & "'and fld_asignatura='" & ASIGNATURA & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logrtec = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod4.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception
370
371 SOFBATEC 1.0DERECHOS RESERVADOS
'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub txt_cod5_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod5.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod5.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod5.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod5.Text & "'and fld_asignatura='" & ASIGNATURA & "'"
371
372 SOFBATEC 1.0DERECHOS RESERVADOS
DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logrrel = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod5.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub txt_cod6_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod6.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod6.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod6.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception
372
373 SOFBATEC 1.0DERECHOS RESERVADOS
'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod6.Text & "'and fld_asignatura='" & ASIGNATURA & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logring = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod6.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub txt_cod7_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod7.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open()
373
374 SOFBATEC 1.0DERECHOS RESERVADOS
CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod7.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod7.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close()
End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod7.Text & "'and fld_asignatura='" & ASIGNATURA & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logrfil = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod7.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception
374
375 SOFBATEC 1.0DERECHOS RESERVADOS
'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub txt_cod8_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod8.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod8.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod8.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod8.Text & "'and fld_asignatura='" & ASIGNATURA & "'"
375
376 SOFBATEC 1.0DERECHOS RESERVADOS
DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logrqui = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod8.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub txt_cod9_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_cod9.Leave Dim ASIGNATURA As String
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_asignatura from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod9.Text & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then ASIGNATURA = DR_CONSULTA.Item("fld_asignatura") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL SE ENCUENTRA ASIGNATURA PARA DICHO CODIGO", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod9.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception
376
377 SOFBATEC 1.0DERECHOS RESERVADOS
'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try
' Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() CONEXION.Open() CMDCONSULTAR.CommandText = "select fld_descripcion_logro from tbl_descripcion_logro where fld_codigologro='" & Me.txt_cod9.Text & "'and fld_asignatura='" & ASIGNATURA & "'" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then logrfis = DR_CONSULTA.Item("fld_descripcion_logro") CONEXION.Close() DR_CONSULTA.Close() Else MessageBox.Show("EL CODIGO DIGITADO NO HACE REFERENCIA A NINGUN LOGRO O BIEN EL CODIGO NO PERTENECE A LA ASIGNATURA ASIGNADA", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_cod9.Focus() DR_CONSULTA.Close() Exit Sub End If 'CatCh EXCEPCION As Exception 'MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If 'End Try End Sub
Private Sub btn_salir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_salir.Click DS_Datos.Tables("TBL_BOLETIN").Clear() Me.Close() End SubEnd Class
377
378 SOFBATEC 1.0DERECHOS RESERVADOS
Codigo impresión de certificados
Public Class frm_impr_certificados Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
378
379 SOFBATEC 1.0DERECHOS RESERVADOS
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents txt_grado As System.Windows.Forms.TextBox Friend WithEvents txt_ape_estd As System.Windows.Forms.TextBox Friend WithEvents txt_nom_estd As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents lbl_nom_estd As System.Windows.Forms.Label Friend WithEvents lbl_ape_estudiante As System.Windows.Forms.Label Friend WithEvents lbl_grado As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents btn_exp_certificado As System.Windows.Forms.Button Friend WithEvents rbt_matricula As System.Windows.Forms.RadioButton Friend WithEvents rbt_notas As System.Windows.Forms.RadioButton Friend WithEvents grd_cer_tipo As System.Windows.Forms.GroupBox Friend WithEvents txt_id_estudiante As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.txt_grado = New System.Windows.Forms.TextBox Me.txt_ape_estd = New System.Windows.Forms.TextBox Me.txt_nom_estd = New System.Windows.Forms.TextBox Me.Label2 = New System.Windows.Forms.Label Me.lbl_nom_estd = New System.Windows.Forms.Label Me.lbl_ape_estudiante = New System.Windows.Forms.Label Me.lbl_grado = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.btn_exp_certificado = New System.Windows.Forms.Button Me.grd_cer_tipo = New System.Windows.Forms.GroupBox Me.rbt_notas = New System.Windows.Forms.RadioButton Me.rbt_matricula = New System.Windows.Forms.RadioButton Me.txt_id_estudiante = New System.Windows.Forms.TextBox Me.grd_cer_tipo.SuspendLayout() Me.SuspendLayout() ' 'txt_grado ' Me.txt_grado.Location = New System.Drawing.Point(424, 215) Me.txt_grado.Name = "txt_grado" Me.txt_grado.Size = New System.Drawing.Size(64, 20) Me.txt_grado.TabIndex = 124 Me.txt_grado.Text = "" Me.txt_grado.Visible = False ' 'txt_ape_estd ' Me.txt_ape_estd.Location = New System.Drawing.Point(16, 215) Me.txt_ape_estd.Name = "txt_ape_estd" Me.txt_ape_estd.Size = New System.Drawing.Size(168, 20) Me.txt_ape_estd.TabIndex = 123 Me.txt_ape_estd.Text = ""
379
380 SOFBATEC 1.0DERECHOS RESERVADOS
Me.txt_ape_estd.Visible = False ' 'txt_nom_estd ' Me.txt_nom_estd.Location = New System.Drawing.Point(200, 215) Me.txt_nom_estd.Name = "txt_nom_estd" Me.txt_nom_estd.Size = New System.Drawing.Size(200, 20) Me.txt_nom_estd.TabIndex = 122 Me.txt_nom_estd.Text = "" Me.txt_nom_estd.Visible = False ' 'Label2 ' Me.Label2.AutoSize = True Me.Label2.BackColor = System.Drawing.Color.LightSkyBlue Me.Label2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Label2.ForeColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(8, 132) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(197, 19) Me.Label2.TabIndex = 120 Me.Label2.Text = "IDENTIFICACION DEL ESTUDIANTE" ' 'lbl_nom_estd ' Me.lbl_nom_estd.AutoSize = True Me.lbl_nom_estd.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_nom_estd.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_nom_estd.ForeColor = System.Drawing.Color.Blue Me.lbl_nom_estd.Location = New System.Drawing.Point(224, 194) Me.lbl_nom_estd.Name = "lbl_nom_estd" Me.lbl_nom_estd.Size = New System.Drawing.Size(163, 19) Me.lbl_nom_estd.TabIndex = 119 Me.lbl_nom_estd.Text = "NOMBRES DEL ESTUDIANTE" ' 'lbl_ape_estudiante ' Me.lbl_ape_estudiante.AutoSize = True Me.lbl_ape_estudiante.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_ape_estudiante.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_ape_estudiante.ForeColor = System.Drawing.Color.Blue Me.lbl_ape_estudiante.Location = New System.Drawing.Point(24, 194) Me.lbl_ape_estudiante.Name = "lbl_ape_estudiante" Me.lbl_ape_estudiante.Size = New System.Drawing.Size(169, 19) Me.lbl_ape_estudiante.TabIndex = 118 Me.lbl_ape_estudiante.Text = "APELLIDOS DEL ESTUDIANTE" ' 'lbl_grado '
380
381 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lbl_grado.AutoSize = True Me.lbl_grado.BackColor = System.Drawing.Color.LightSkyBlue Me.lbl_grado.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.lbl_grado.ForeColor = System.Drawing.Color.Blue Me.lbl_grado.Location = New System.Drawing.Point(432, 194) Me.lbl_grado.Name = "lbl_grado" Me.lbl_grado.Size = New System.Drawing.Size(48, 19) Me.lbl_grado.TabIndex = 117 Me.lbl_grado.Text = "GRADO" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.LightSkyBlue Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 21.75!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(40, 14) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(480, 28) Me.Label1.TabIndex = 125 Me.Label1.Text = "IMPRESION DE CERTIFICADOS" Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'btn_exp_certificado ' Me.btn_exp_certificado.BackColor = System.Drawing.Color.LightSkyBlue Me.btn_exp_certificado.ForeColor = System.Drawing.Color.Blue Me.btn_exp_certificado.Location = New System.Drawing.Point(192, 263) Me.btn_exp_certificado.Name = "btn_exp_certificado" Me.btn_exp_certificado.Size = New System.Drawing.Size(152, 21) Me.btn_exp_certificado.TabIndex = 126 Me.btn_exp_certificado.Text = "Expedir certificado" ' 'grd_cer_tipo ' Me.grd_cer_tipo.BackColor = System.Drawing.Color.LightSkyBlue Me.grd_cer_tipo.Controls.Add(Me.rbt_notas) Me.grd_cer_tipo.Controls.Add(Me.rbt_matricula) Me.grd_cer_tipo.ForeColor = System.Drawing.Color.Blue Me.grd_cer_tipo.Location = New System.Drawing.Point(128, 62) Me.grd_cer_tipo.Name = "grd_cer_tipo" Me.grd_cer_tipo.Size = New System.Drawing.Size(280, 49) Me.grd_cer_tipo.TabIndex = 127 Me.grd_cer_tipo.TabStop = False Me.grd_cer_tipo.Text = "Certificado de:" ' 'rbt_notas '
381
382 SOFBATEC 1.0DERECHOS RESERVADOS
Me.rbt_notas.Location = New System.Drawing.Point(168, 21) Me.rbt_notas.Name = "rbt_notas" Me.rbt_notas.Size = New System.Drawing.Size(88, 14) Me.rbt_notas.TabIndex = 1 Me.rbt_notas.Text = "Notas" ' 'rbt_matricula ' Me.rbt_matricula.Location = New System.Drawing.Point(32, 21) Me.rbt_matricula.Name = "rbt_matricula" Me.rbt_matricula.Size = New System.Drawing.Size(88, 14) Me.rbt_matricula.TabIndex = 0 Me.rbt_matricula.Text = "Matricula" ' 'txt_id_estudiante ' Me.txt_id_estudiante.Location = New System.Drawing.Point(16, 153) Me.txt_id_estudiante.Name = "txt_id_estudiante" Me.txt_id_estudiante.Size = New System.Drawing.Size(160, 20) Me.txt_id_estudiante.TabIndex = 128 Me.txt_id_estudiante.Text = "" ' 'frm_impr_certificados ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Blue Me.ClientSize = New System.Drawing.Size(544, 298) Me.Controls.Add(Me.txt_id_estudiante) Me.Controls.Add(Me.grd_cer_tipo) Me.Controls.Add(Me.btn_exp_certificado) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.txt_grado) Me.Controls.Add(Me.txt_ape_estd) Me.Controls.Add(Me.txt_nom_estd) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.lbl_nom_estd) Me.Controls.Add(Me.lbl_ape_estudiante) Me.Controls.Add(Me.lbl_grado) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_impr_certificados" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Impresion de certificados" Me.grd_cer_tipo.ResumeLayout(False) Me.ResumeLayout(False)
End Sub
#End Region
382
383 SOFBATEC 1.0DERECHOS RESERVADOS
Private Sub btn_exp_certificado_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_exp_certificado.Click If Me.rbt_matricula.Checked = True Then Dim impr As New frm_rpt_certificado_matricula_voc impr.ShowDialog() Else Dim impr As New frm_rpt_certificado_notas impr.ShowDialog() End If End Sub
Private Sub frm_impr_certificados_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.grd_cer_tipo.Focus() End Sub
Private Sub txt_id_estudiante_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles txt_id_estudiante.Leave Try CMDCONSULTAR.Connection = CONEXION If CONEXION.State = ConnectionState.Open Then CONEXION.Close() If CONEXION.State = ConnectionState.Closed Then CONEXION.Open() CMDCONSULTAR.CommandText = "select A.fld_identificacion_estudiante,A.fld_lugarexp_id,A.fld_nombres_estudiante,A.fld_apellidos_estudiante,B.fld_grado_matricula from tbl_estudiantes A,tbl_matriculas B where A.fld_identificacion_estudiante=" & Me.txt_id_estudiante.Text & "and B.fld_id_estudiante=" & Me.txt_id_estudiante.Text & "" DR_CONSULTA = CMDCONSULTAR.ExecuteReader(CommandBehavior.SingleRow) If DR_CONSULTA.Read = True Then Me.txt_ape_estd.Text = DR_CONSULTA.Item("fld_apellidos_estudiante") Me.txt_nom_estd.Text = DR_CONSULTA.Item("Fld_nombres_estudiante") Me.txt_grado.Text = DR_CONSULTA.Item("fld_grado_matricula") Me.txt_nom_estd.Visible = True Me.txt_ape_estd.Visible = True Me.txt_grado.Visible = True idmatr = Me.txt_id_estudiante.Text grado = Me.txt_grado.Text DR_CONSULTA.Close() Else MessageBox.Show("LA IDENTIFICACION DIGITADA NO PERTENECE A NINGUN ESTUDIANTE", "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Error) Me.txt_id_estudiante.Clear() Me.txt_id_estudiante.Focus() DR_CONSULTA.Close() End If
If CONEXION.State = ConnectionState.Open Then CONEXION.Close()
383
384 SOFBATEC 1.0DERECHOS RESERVADOS
Catch EXCEPCION As Exception MessageBox.Show(EXCEPCION.Message.ToUpper, "SOFTBATEC", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly) If CONEXION.State = ConnectionState.Open Then CONEXION.Close() End If End Try End SubEnd Class
Ayuda acerca de
Public Class frm_acercade Inherits System.Windows.Forms.Form
#Region " Código generado por el Diseñador de Windows Forms "
Public Sub New() MyBase.New()
'El Diseñador de Windows Forms requiere esta llamada. InitializeComponent()
'Agregar cualquier inicialización después de la llamada a InitializeComponent()
End Sub
384
385 SOFBATEC 1.0DERECHOS RESERVADOS
'Form reemplaza a Dispose para limpiar la lista de componentes. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Requerido por el Diseñador de Windows Forms Private components As System.ComponentModel.IContainer
'NOTA: el Diseñador de Windows Forms requiere el siguiente procedimiento 'Puede modificarse utilizando el Diseñador de Windows Forms. 'No lo modifique con el editor de código. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents lbltextomovimiento As System.Windows.Forms.Label Friend WithEvents Timer1 As System.Windows.Forms.Timer Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frm_acercade)) Me.Panel1 = New System.Windows.Forms.Panel Me.lbltextomovimiento = New System.Windows.Forms.Label Me.Timer1 = New System.Windows.Forms.Timer(Me.components) Me.Label1 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Button1 = New System.Windows.Forms.Button Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.LightGray Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.Add(Me.lbltextomovimiento) Me.Panel1.Location = New System.Drawing.Point(88, 305) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(272, 249) Me.Panel1.TabIndex = 0 ' 'lbltextomovimiento ' Me.lbltextomovimiento.BackColor = System.Drawing.Color.Transparent
385
386 SOFBATEC 1.0DERECHOS RESERVADOS
Me.lbltextomovimiento.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.lbltextomovimiento.ForeColor = System.Drawing.Color.MidnightBlue Me.lbltextomovimiento.Location = New System.Drawing.Point(12, -242) Me.lbltextomovimiento.Name = "lbltextomovimiento" Me.lbltextomovimiento.Size = New System.Drawing.Size(248, 242) Me.lbltextomovimiento.TabIndex = 0 Me.lbltextomovimiento.Text = " SOFTBATEC ® Sistema desarollado para Centro Inca derechos reservados" & _ " © 2008. software Desarrollado por: Enna Maritza, José Orozco, Gustavo Ballestas. Derechos reservados" & _ " Uso Exclusivo de la Centro Inca para las matriculas del bachillerato autodirigido. " & _ "Asesor: Jorge Valiente.software desarrollado con opciones con nosione" & _ "s basicas de los formatos de matricula del bachillerato autodirigido. Se prohíbe la comerci" & _ "alización sin autorización de Centro Inca." Me.lbltextomovimiento.TextAlign = System.Drawing.ContentAlignment.TopCenter ' 'Timer1 ' Me.Timer1.Enabled = True ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.Blue Me.Label1.Location = New System.Drawing.Point(0, 305) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(88, 249) Me.Label1.TabIndex = 2 ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.Blue Me.Label2.Location = New System.Drawing.Point(360, 305) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(120, 249) Me.Label2.TabIndex = 3 ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.DodgerBlue Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.SystemColors.ControlLightLight Me.Button1.Location = New System.Drawing.Point(384, 406) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(80, 37)
386
387 SOFBATEC 1.0DERECHOS RESERVADOS
Me.Button1.TabIndex = 4 Me.Button1.Text = "Ok" ' 'frm_acercade ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15) Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image) Me.ClientSize = New System.Drawing.Size(480, 553) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Label2) Me.Controls.Add(Me.Label1) Me.Controls.Add(Me.Panel1) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "frm_acercade" Me.ShowInTaskbar = False Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = " Informacion Sobre " Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False)
End Sub
#End Region
Private Sub frm_acercade_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If Me.lbltextomovimiento.Top <= 233 And Me.lbltextomovimiento.Top >= -210 Then Me.lbltextomovimiento.Top -= 1 Else Me.lbltextomovimiento.Top = 233 End If End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() End SubEnd Class
387
388 SOFBATEC 1.0DERECHOS RESERVADOS
Registro de asignación de materias a docentes
------------------------------------------------------------------------------' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
388
389 SOFBATEC 1.0DERECHOS RESERVADOS
Public Class rpt_asignacion_mat_docente Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_asignacion_mat_docente.rpt" End Get Set 'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property
389
390 SOFBATEC 1.0DERECHOS RESERVADOS
<Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_asignacion_mat_docente Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set '
390
391 SOFBATEC 1.0DERECHOS RESERVADOS
End Set End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set End Property Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_asignacion_mat_docente = New rpt_asignacion_mat_docente rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Class
391
392 SOFBATEC 1.0DERECHOS RESERVADOS
Reportes boletines
------------------------------------------------------------------------------' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
392
393 SOFBATEC 1.0DERECHOS RESERVADOS
Public Class rpt_boletin_bach Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_boletin_bach.rpt" End Get Set 'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _
393
394 SOFBATEC 1.0DERECHOS RESERVADOS
DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_boletin_bach Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set
394
395 SOFBATEC 1.0DERECHOS RESERVADOS
End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set End Property Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_boletin_bach = New rpt_boletin_bach rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Class
395
396 SOFBATEC 1.0DERECHOS RESERVADOS
Reportes calificaiones
' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDec'------------------------------------------------------------------------------isions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
Public Class rpt_calificaciones2 Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_calificaciones2.rpt" End Get Set
396
397 SOFBATEC 1.0DERECHOS RESERVADOS
'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property <Browsable(false), _
397
398 SOFBATEC 1.0DERECHOS RESERVADOS
DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_calificaciones2 Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set End Property
398
399 SOFBATEC 1.0DERECHOS RESERVADOS
Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_calificaciones2 = New rpt_calificaciones2 rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Class
399
400 SOFBATEC 1.0DERECHOS RESERVADOS
Reportes certificado matricula
'------------------------------------------------------------------------------' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
Public Class rpt_certificado_matricula_bach
400
401 SOFBATEC 1.0DERECHOS RESERVADOS
Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_certificado_matricula_bach.rpt" End Get Set 'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _
401
402 SOFBATEC 1.0DERECHOS RESERVADOS
DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_certificado_matricula_bach Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set
402
403 SOFBATEC 1.0DERECHOS RESERVADOS
End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set End Property Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_certificado_matricula_bach = New rpt_certificado_matricula_bach rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Class
403
404 SOFBATEC 1.0DERECHOS RESERVADOS
Reporte Certificado de notas
' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
Public Class rpt_certificado_notas_voc Inherits ReportClass Public Sub New() MyBase.New End Sub
404
405 SOFBATEC 1.0DERECHOS RESERVADOS
Public Overrides Property ResourceName As String Get Return "rpt_certificado_notas_voc.rpt" End Get Set 'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3)
405
406 SOFBATEC 1.0DERECHOS RESERVADOS
End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_certificado_notas_voc Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get
406
407 SOFBATEC 1.0DERECHOS RESERVADOS
Set ' End Set End Property Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_certificado_notas_voc = New rpt_certificado_notas_voc rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Class
Certificado descripción de logros
' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'
407
408 SOFBATEC 1.0DERECHOS RESERVADOS
' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
Public Class rpt_descripcion_logro Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_descripcion_logro.rpt" End Get Set 'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1)
408
409 SOFBATEC 1.0DERECHOS RESERVADOS
End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_descripcion_logro Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get
409
410 SOFBATEC 1.0DERECHOS RESERVADOS
Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set End Property Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_descripcion_logro = New rpt_descripcion_logro rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo );
410
411 SOFBATEC 1.0DERECHOS RESERVADOS
Return key End FunctionEnd Class
Reporte de docentes
'------------------------------------------------------------------------------' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
Public Class rpt_docentes Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_docentes.rpt" End Get Set 'Do nothing End Set
411
412 SOFBATEC 1.0DERECHOS RESERVADOS
End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
412
413 SOFBATEC 1.0DERECHOS RESERVADOS
Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_docentes Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set End Property
413
414 SOFBATEC 1.0DERECHOS RESERVADOS
Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_docentes = New rpt_docentes rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Class
Reporte graduandos
------------------------------------------------------------------------------' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict Off
414
415 SOFBATEC 1.0DERECHOS RESERVADOS
Option Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
Public Class rpt_graduandos Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_graduandos.rpt" End Get Set 'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _
415
416 SOFBATEC 1.0DERECHOS RESERVADOS
DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_graduandos Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set '
416
417 SOFBATEC 1.0DERECHOS RESERVADOS
End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set End Property Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_graduandos = New rpt_graduandos rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Class
417
418 SOFBATEC 1.0DERECHOS RESERVADOS
Reporte de nivelacion de asignaturas
'------------------------------------------------------------------------------' <autogenerated>' This code was generated by a tool.' Runtime Version: 1.1.4322.573'' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated.' </autogenerated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
Public Class rpt_nivelacion2 Inherits ReportClass Public Sub New() MyBase.New End Sub Public Overrides Property ResourceName As String Get Return "rpt_nivelacion2.rpt"
418
419 SOFBATEC 1.0DERECHOS RESERVADOS
End Get Set 'Do nothing End Set End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section1 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(0) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section2 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(1) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section3 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(2) End Get End Property <Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section4 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(3) End Get End Property
419
420 SOFBATEC 1.0DERECHOS RESERVADOS
<Browsable(false), _ DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _ Public ReadOnly Property Section5 As CrystalDecisions.CrystalReports.Engine.Section Get Return Me.ReportDefinition.Sections(4) End Get End PropertyEnd Class
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.Shared.ExportOptions), "report.bmp")> _Public Class Cachedrpt_nivelacion2 Inherits Component Implements ICachedReport Public Sub New() MyBase.New End Sub Public Overridable Property IsCacheable As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.IsCacheable Get Return true End Get Set ' End Set End Property Public Overridable Property ShareDBLogonInfo As Boolean Implements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfo Get Return false End Get Set ' End Set End Property Public Overridable Property CacheTimeOut As System.TimeSpan Implements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOut Get Return CachedReportConstants.DEFAULT_TIMEOUT End Get Set ' End Set
420
421 SOFBATEC 1.0DERECHOS RESERVADOS
End Property Public Overridable Function CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocument Implements CrystalDecisions.ReportSource.ICachedReport.CreateReport Dim rpt As rpt_nivelacion2 = New rpt_nivelacion2 rpt.Site = Me.Site Return rpt End Function Public Overridable Function GetCustomizedCacheKey(ByVal request As RequestContext) As String Implements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKey Dim key As [String] = Nothing '// The following is the code used to generate the default '// cache key for caching report jobs in the ASP.NET Cache. '// Feel free to modify this code to suit your needs. '// Returning key == null causes the default cache key to '// be generated. ' 'key = RequestContext.BuildCompleteCacheKey( ' request, ' null, // sReportFilename ' this.GetType(), ' this.ShareDBLogonInfo ); Return key End FunctionEnd Clas
421