VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.2#0"; "MSCOMCTL.OCX"
Begin VB.Form Form_Consolidado_Calificaciones 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Consolidado Calificaciones"
   ClientHeight    =   5340
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6510
   Icon            =   "Form_Consolidado_Calificaciones.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   5340
   ScaleWidth      =   6510
   Begin VB.Frame Frame3 
      Caption         =   "Frame3"
      Height          =   1335
      Left            =   120
      TabIndex        =   15
      Top             =   1800
      Width           =   6255
      Begin VB.ComboBox Cmd_Per 
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1200
         Style           =   2  'Dropdown List
         TabIndex        =   17
         Top             =   720
         Width           =   2055
      End
      Begin VB.ComboBox cb_agno 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1200
         TabIndex        =   16
         Text            =   "Combo1"
         Top             =   240
         Width           =   2055
      End
      Begin VB.Label Label6 
         Caption         =   "Año"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   19
         Top             =   240
         Width           =   735
      End
      Begin VB.Label Label5 
         Caption         =   "Periodo"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   18
         Top             =   720
         Width           =   735
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "Asignatura"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1035
      Left            =   120
      TabIndex        =   9
      Top             =   3240
      Width           =   6255
      Begin VB.ComboBox Cmb_Asi 
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   960
         Style           =   2  'Dropdown List
         TabIndex        =   12
         Top             =   600
         Width           =   3855
      End
      Begin VB.CommandButton cerrar_asignatura 
         Caption         =   "Cerrar Asignatura"
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   615
         Left            =   4920
         TabIndex        =   10
         Top             =   240
         Visible         =   0   'False
         Width           =   1095
      End
      Begin MSComctlLib.ImageCombo Cmb_Sector 
         Height          =   345
         Left            =   960
         TabIndex        =   11
         Top             =   240
         Width           =   3855
         _ExtentX        =   6800
         _ExtentY        =   609
         _Version        =   393216
         ForeColor       =   -2147483640
         BackColor       =   -2147483643
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Locked          =   -1  'True
      End
      Begin VB.Label Label3 
         Caption         =   "Sector"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   120
         TabIndex        =   14
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label4 
         Caption         =   "Subsector"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   120
         TabIndex        =   13
         Top             =   720
         Width           =   975
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Exportar Excel"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   600
      Picture         =   "Form_Consolidado_Calificaciones.frx":2A8B2
      Style           =   1  'Graphical
      TabIndex        =   8
      Top             =   4440
      Width           =   1575
   End
   Begin VB.CommandButton cmd_salir 
      Caption         =   "Salir"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   4320
      Picture         =   "Form_Consolidado_Calificaciones.frx":2AE98
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   4440
      Width           =   1575
   End
   Begin VB.Frame Frame1 
      Caption         =   "Curso"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C00000&
      Height          =   1575
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6255
      Begin VB.ComboBox Cmb_Cod_ens 
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1680
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   360
         Width           =   4275
      End
      Begin VB.ComboBox Cmb_Grado 
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1680
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   720
         Width           =   615
      End
      Begin VB.ComboBox Cmb_Let_Cur 
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1680
         Style           =   2  'Dropdown List
         TabIndex        =   1
         Top             =   1080
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "Letra Curso"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   120
         TabIndex        =   6
         Top             =   1080
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "Grado"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   120
         TabIndex        =   5
         Top             =   720
         Width           =   495
      End
      Begin VB.Label Tipo 
         Caption         =   "Tipo de enseñanza"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   120
         TabIndex        =   4
         Top             =   360
         Width           =   1455
      End
   End
End
Attribute VB_Name = "Form_Consolidado_Calificaciones"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmd_salir_Click()
    Unload Me
End Sub

Private Sub Cmb_Cod_ens_Click()
If Len(Me.Cmb_Cod_ens) <> 0 Then
 CodModalidad = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.Cmb_Cod_ens.Text & "'", conn)
 Cmb_Grado.Enabled = True
 Cmb_Grado.Clear

rut = val(DevuelveCampo("usuarios", "", "rut_usu", "aut_nombre_usuario = '" & Nom_usu_ses & "'", conn))

If CodPerfil = "#UTP#" Or CodPerfil = "#ADM#" Or CodPerfil = "#GES03#" Or CodPerfil = "#PJE#" Then
    If Len(Me.Cmb_Cod_ens.Text) <> 0 Then
        nivel = DevuelveCampo("codigos_ensenanza", "des_ens", "num_gra_max", "des_ens = " & "'" & Me.Cmb_Cod_ens.Text & "'", conn)
        Me.Cmb_Grado.Enabled = True
        Me.Cmb_Grado.Clear
    For t = 4 To val(nivel)
        Me.Cmb_Grado.AddItem t
    Next t
 End If

Else
    Call LlenaCombo(Form_promedios_cuartos_medios.Cmb_Grado, "asi_x_cur_prof AP", "DISTINCT AP.NUM_GRA", "where AP.cod_ens = '" & CodModalidad & "' and MID(rut_prof,1,(LENGTH(ap.rut_prof)-2)) ='" & rut & "'", conn)
End If

 
 Cmb_Let_Cur.Clear

End If
' Me.MSFlexGrid1.Clear
End Sub

Private Sub Cmb_Grado_Change()
Ngrado = Me.Cmb_Grado.Text
Cmb_Let_Cur.Clear

rut = val(DevuelveCampo("usuarios", "", "rut_usu", "aut_nombre_usuario = '" & Nom_usu_ses & "'", conn))

If CodPerfil = "#UTP#" Or CodPerfil = "#ADM#" Or CodPerfil = "#GES03#" Or CodPerfil = "#PJE#" Then
    Call LlenaCombo(Me.Cmb_Let_Cur, "cursos", "distinct let_cur", "where cod_ens = '" & CodModalidad & "' and agno=" & cb_agno.Text & " and num_gra = '" & Ngrado & "'", conn)
Else
    'Call llenacombo(Form_Notas.Cmb_Cod_ens, "codigos_ensenanza ce, asi_x_cur_prof ap", "distinct ce.des_ens", "where ce.cod_ens = ap.cod_ens and ap.rut_prof ='" & Rutglobal & "'")
    Call LlenaCombo(Cmb_Let_Cur, "asi_x_cur_prof ap", "distinct ap.let_cur", "where ap.cod_ens = '" & CodModalidad & "' and ap.num_gra = '" & Ngrado & "' and ap.agno=" & cb_agno.Text & " and MID(rut_prof,1,(LENGTH(ap.rut_prof)-2)) ='" & rut & "'", conn)
End If
Me.Cmb_Let_Cur.Enabled = True

'btn_carga_asignaturas_Click

'Cmb_Asi.Clear
'If Me.Cmb_Sector <> "" Then
'    Call llenacombo(Form_InfoNotas.Cmb_Asi, "subsectores ss, sectores s", "NOM_ASI", "where ss.cod_sec = s.cod_sec and ss.cod_ens ='" & CodModalidad & "' and num_gra ='" & Ngrado & "' and ss.cod_sec ='" & CodSec & "'")
'End If
' Me.MSFlexGrid1.Clear
End Sub

Private Sub Cmb_Grado_Click()
Ngrado = Me.Cmb_Grado.Text
Cmb_Let_Cur.Clear
CodModalidad = DevuelveCampo("codigos_ensenanza", "", "cod_ens", "des_ens = '" & Me.Cmb_Cod_ens.Text & "'", conn)
rut = val(DevuelveCampo("usuarios", "", "rut_usu", "aut_nombre_usuario = '" & Nom_usu_ses & "'", conn))

If CodPerfil = "#UTP#" Or CodPerfil = "#ADM#" Or CodPerfil = "#GES03#" Or CodPerfil = "#PJE#" Then
    Call LlenaCombo(Me.Cmb_Let_Cur, "cursos", "distinct let_cur", "where cod_ens = '" & CodModalidad & "' and agno=" & cb_agno.Text & " and num_gra = '" & Ngrado & "'", conn)
Else
    'Call llenacombo(Form_Notas.Cmb_Cod_ens, "codigos_ensenanza ce, asi_x_cur_prof ap", "distinct ce.des_ens", "where ce.cod_ens = ap.cod_ens and ap.rut_prof ='" & Rutglobal & "'")
    Call LlenaCombo(Cmb_Let_Cur, "asi_x_cur_prof ap", "distinct ap.let_cur", "where ap.cod_ens = '" & CodModalidad & "' and ap.num_gra = '" & Ngrado & "' and ap.agno=" & cb_agno.Text & " and MID(rut_prof,1,(LENGTH(ap.rut_prof)-2)) ='" & rut & "'", conn)
End If
Me.Cmb_Let_Cur.Enabled = True

'btn_carga_asignaturas_Click

'Cmb_Asi.Clear
'If Me.Cmb_Sector <> "" Then
'    Call llenacombo(Form_InfoNotas.Cmb_Asi, "subsectores ss, sectores s", "NOM_ASI", "where ss.cod_sec = s.cod_sec and ss.cod_ens ='" & CodModalidad & "' and num_gra ='" & Ngrado & "' and ss.cod_sec ='" & CodSec & "'")
'End If
' Me.MSFlexGrid1.Clear
End Sub



Private Sub Cmb_Grado_DblClick()
Ngrado = Me.Cmb_Grado.Text
Cmb_Let_Cur.Clear

rut = val(DevuelveCampo("usuarios", "", "rut_usu", "aut_nombre_usuario = '" & Nom_usu_ses & "'", conn))

If CodPerfil = "#UTP#" Or CodPerfil = "#ADM#" Or CodPerfil = "#GES03#" Or CodPerfil = "#PJE#" Then
    Call LlenaCombo(Me.Cmb_Let_Cur, "cursos", "distinct let_cur", "where cod_ens = '" & CodModalidad & "' and agno=" & cb_agno.Text & " and num_gra = '" & Ngrado & "'", conn)
Else
    'Call llenacombo(Form_Notas.Cmb_Cod_ens, "codigos_ensenanza ce, asi_x_cur_prof ap", "distinct ce.des_ens", "where ce.cod_ens = ap.cod_ens and ap.rut_prof ='" & Rutglobal & "'")
    Call LlenaCombo(Cmb_Let_Cur, "asi_x_cur_prof ap", "distinct ap.let_cur", "where ap.cod_ens = '" & CodModalidad & "' and ap.num_gra = '" & Ngrado & "' and ap.agno=" & cb_agno.Text & " and MID(rut_prof,1,(LENGTH(ap.rut_prof)-2)) ='" & rut & "'", conn)
End If
Me.Cmb_Let_Cur.Enabled = True

'btn_carga_asignaturas_Click

'Cmb_Asi.Clear
'If Me.Cmb_Sector <> "" Then
'    Call llenacombo(Form_InfoNotas.Cmb_Asi, "subsectores ss, sectores s", "NOM_ASI", "where ss.cod_sec = s.cod_sec and ss.cod_ens ='" & CodModalidad & "' and num_gra ='" & Ngrado & "' and ss.cod_sec ='" & CodSec & "'")
'End If
'' Me.MSFlexGrid1.Clear
End Sub

Private Sub Cmb_let_cur_Click()
Cmd_Per.Enabled = True
Cmd_Per.ListIndex = 0
MSFlexGrid1.Clear
'Cmd_Per_Click
End Sub

