VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FConfigurarTablas 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Configuración de tablas para Transferencia (95.030.00)"
   ClientHeight    =   4785
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   10575
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   4785
   ScaleWidth      =   10575
   Begin VB.CommandButton cmdModificar 
      Caption         =   "Modificar"
      Height          =   855
      Left            =   9360
      Picture         =   "FConfigurarTablas.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   2640
      Width           =   1095
   End
   Begin VB.CommandButton Cmd_salir 
      Cancel          =   -1  'True
      Caption         =   "Salir"
      Height          =   795
      Left            =   9360
      Picture         =   "FConfigurarTablas.frx":030A
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   3720
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "General"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   975
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   6735
      Begin VB.ComboBox cmbModulo 
         Height          =   315
         ItemData        =   "FConfigurarTablas.frx":0614
         Left            =   4800
         List            =   "FConfigurarTablas.frx":062A
         Style           =   2  'Dropdown List
         TabIndex        =   6
         Top             =   360
         Width           =   735
      End
      Begin VB.ComboBox cmbTipoPantalla 
         Height          =   315
         ItemData        =   "FConfigurarTablas.frx":0646
         Left            =   1800
         List            =   "FConfigurarTablas.frx":0653
         Style           =   2  'Dropdown List
         TabIndex        =   4
         Top             =   360
         Width           =   1935
      End
      Begin VB.Image Image1 
         Height          =   480
         Left            =   5880
         Picture         =   "FConfigurarTablas.frx":0684
         Top             =   240
         Width           =   480
      End
      Begin VB.Label Label2 
         Caption         =   "Módulo :"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3960
         TabIndex        =   5
         Top             =   360
         Width           =   735
      End
      Begin VB.Label Label1 
         Caption         =   "Tipo de Pantalla :"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   360
         Width           =   1455
      End
   End
   Begin MSDataGridLib.DataGrid dbDetalle 
      Height          =   3375
      Left            =   120
      TabIndex        =   0
      Top             =   1200
      Width           =   9135
      _ExtentX        =   16113
      _ExtentY        =   5953
      _Version        =   393216
      AllowUpdate     =   -1  'True
      Appearance      =   0
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "Detalle de Tablas"
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   10250
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   10250
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "FConfigurarTablas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private objConfigtable As DB_UT_MANTENIMIENTOS.C_PROCESOS
Public rsdatos As ADODB.Recordset

Public intPantalla As Integer
Public intModulo As Integer

Private Sub cmbModulo_Click()
    rsdatos.Filter = "[TYPE]='" & OBTIENETIPOPANTALLA(cmbTipoPantalla.ListIndex) & "' AND [MODULEID]='" & cmbModulo.Text & "'"
    rsdatos.Sort = "[SECUENCIA] ASC"
    intModulo = cmbModulo.ListIndex
End Sub

Private Sub cmbTipoPantalla_Click()
    rsdatos.Filter = "[TYPE]='" & OBTIENETIPOPANTALLA(cmbTipoPantalla.ListIndex) & "' AND [MODULEID]='" & cmbModulo.Text & "'"
    rsdatos.Sort = "[SECUENCIA] ASC"
    intPantalla = cmbTipoPantalla.ListIndex
End Sub

Private Sub Cmd_salir_Click()
Unload Me
End Sub

Private Sub cmdModificar_Click()
If dbDetalle.Bookmark <> 0 Or Not IsNull(dbDetalle.Bookmark) Then
    FModificarTabla.MstrPantalla = cmbTipoPantalla.Text
    FModificarTabla.MstrModulo = cmbModulo.Text
    FModificarTabla.MstrCodigo = dbDetalle.Columns(0).Text
    FModificarTabla.MstrDes = dbDetalle.Columns(1).Text
    FModificarTabla.MstrSecuencia = dbDetalle.Columns(2).Text
    FModificarTabla.MstrCampo = GVDATO(dbDetalle.Columns(3).Text)
    FModificarTabla.MblnAEstacion = IIf(dbDetalle.Columns(4).Text = "SI", 1, 0)
    FModificarTabla.MblnACentral = IIf(dbDetalle.Columns(5).Text = "SI", 1, 0)
    FModificarTabla.MblnSite = IIf(dbDetalle.Columns(6).Text = "SI", 1, 0)
    FModificarTabla.MblnEmision = IIf(dbDetalle.Columns(7).Text = "SI", 1, 0)
    FModificarTabla.MstrComent = dbDetalle.Columns(10).Text
    FModificarTabla.Show

End If
End Sub

Private Sub dbDetalle_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
dbDetalle.ToolTipText = "Comentario : '" & dbDetalle.Columns(10).Text & "'"
End Sub

Public Sub Form_Load()
    Set objConfigtable = New DB_UT_MANTENIMIENTOS.C_PROCESOS
    Set rsdatos = New ADODB.Recordset
    Set rsdatos = objConfigtable.ObtenerDetalleTablasTranferencia()
    
    cmbTipoPantalla.ListIndex = intPantalla
    cmbModulo.ListIndex = intModulo
    
    rsdatos.Filter = "[TYPE]='" & OBTIENETIPOPANTALLA(cmbTipoPantalla.ListIndex) & "' AND [MODULEID]='" & cmbModulo.Text & "'"
    rsdatos.Sort = "[SECUENCIA] ASC"
    
    Set dbDetalle.DataSource = rsdatos
    Call FormatoGrilla
    
    Me.Top = 100
    Me.Left = (Screen.Width - Me.Width) / 2
    
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set objConfigtable = Nothing
Set rsdatos = Nothing
End Sub

Private Function OBTIENETIPOPANTALLA(intValor) As String
    If intValor = 0 Then OBTIENETIPOPANTALLA = "M"
    If intValor = 1 Then OBTIENETIPOPANTALLA = "T"
    If intValor = 2 Then OBTIENETIPOPANTALLA = "X"
End Function

Public Sub salir_formulario()
Unload Me
End Sub

Private Sub FormatoGrilla()
    dbDetalle.Columns(0).Width = 600
    dbDetalle.Columns(1).Width = 2050
    dbDetalle.Columns(2).Width = 900
    dbDetalle.Columns(2).Alignment = dbgCenter
    dbDetalle.Columns(3).Width = 2000
    dbDetalle.Columns(4).Width = 900
    dbDetalle.Columns(4).Alignment = dbgCenter
    dbDetalle.Columns(5).Width = 800
    dbDetalle.Columns(5).Alignment = dbgCenter
    dbDetalle.Columns(6).Width = 650
    dbDetalle.Columns(6).Alignment = dbgCenter
    dbDetalle.Columns(7).Alignment = dbgCenter
    dbDetalle.Columns(7).Width = 650
    dbDetalle.Columns(8).Visible = False
    dbDetalle.Columns(9).Visible = False
    dbDetalle.Columns(10).Visible = False
End Sub

