VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.UserControl CTRL_DERECHOS_1 
   ClientHeight    =   345
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   9510
   ScaleHeight     =   345
   ScaleWidth      =   9510
   Begin VB.TextBox TXT_SCREENTYPE 
      Enabled         =   0   'False
      Height          =   285
      Left            =   4080
      TabIndex        =   10
      TabStop         =   0   'False
      Top             =   0
      Width           =   1335
   End
   Begin VB.CheckBox chk_close 
      Height          =   195
      Left            =   9240
      TabIndex        =   9
      Top             =   0
      Width           =   195
   End
   Begin VB.CheckBox chk_null 
      Height          =   195
      Left            =   8640
      TabIndex        =   8
      Top             =   0
      Width           =   195
   End
   Begin MSDataListLib.DataCombo DTC_DESCR 
      BeginProperty DataFormat 
         Type            =   0
         Format          =   """S/."" #,##0.00"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   10250
         SubFormatType   =   0
      EndProperty
      Height          =   315
      Left            =   0
      TabIndex        =   7
      Top             =   0
      Width           =   3975
      _ExtentX        =   7011
      _ExtentY        =   556
      _Version        =   393216
      IntegralHeight  =   0   'False
      MatchEntry      =   -1  'True
      Style           =   2
      Text            =   ""
   End
   Begin VB.CheckBox CHK_PRINT 
      Height          =   195
      Left            =   7920
      TabIndex        =   6
      Top             =   0
      Width           =   195
   End
   Begin VB.CheckBox CHK_DELETE 
      Height          =   195
      Left            =   7320
      TabIndex        =   5
      Top             =   0
      Width           =   255
   End
   Begin VB.CheckBox CHK_UPDATE 
      Height          =   195
      Left            =   6720
      TabIndex        =   4
      Top             =   0
      Width           =   255
   End
   Begin VB.CheckBox CHK_INSERT 
      Height          =   195
      Left            =   6240
      TabIndex        =   3
      Top             =   0
      Width           =   255
   End
   Begin VB.CheckBox CHK_VIEW 
      Height          =   195
      Left            =   5520
      TabIndex        =   2
      Top             =   0
      Width           =   255
   End
   Begin VB.TextBox TXT_SCREENNAME 
      Enabled         =   0   'False
      Height          =   285
      Left            =   -240
      TabIndex        =   1
      Top             =   0
      Visible         =   0   'False
      Width           =   3855
   End
   Begin VB.TextBox TXT_SCREENID 
      Enabled         =   0   'False
      Height          =   285
      Left            =   2640
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   0
      Width           =   1215
   End
End
Attribute VB_Name = "CTRL_DERECHOS_1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Public rs_combox As ADODB.Recordset
Public cnx As ADODB.Connection
Private Sub CHK_NULL_Click()
PropertyChanged "R_NULL"
End Sub
Private Sub CHK_CLOSE_Click()
PropertyChanged "R_CLOSE"
End Sub
Private Sub CHK_DELETE_Click()
PropertyChanged "R_DELETE"
End Sub
Private Sub CHK_INSERT_Click()
PropertyChanged "R_INSERT"
End Sub
Private Sub CHK_PRINT_Click()
PropertyChanged "R_PRINT"
End Sub
Private Sub CHK_UPDATE_Click()
PropertyChanged "R_UPDATE"
End Sub
Private Sub CHK_VIEW_Click()
PropertyChanged "R_VIEW"
End Sub
Private Sub TXT_SCREENID_Change()
PropertyChanged "R_SCREENID"
End Sub
Private Sub TXT_SCREENNAME_Change()
PropertyChanged "R_SCREENNAME"
End Sub
Public Property Get R_SCREENID() As String
Attribute R_SCREENID.VB_MemberFlags = "14"
R_SCREENID = TXT_SCREENID.Text
End Property
Public Property Let R_SCREENID(ByVal NEWSCREENID As String)
    TXT_SCREENID.Text = NEWSCREENID
End Property
Public Property Get R_SCREENNAME() As String
Attribute R_SCREENNAME.VB_MemberFlags = "14"
R_SCREENNAME = TXT_SCREENNAME.Text
End Property
Public Property Let R_SCREENNAME(ByVal NEWSCREENNAME As String)
    TXT_SCREENNAME.Text = NEWSCREENNAME
End Property
Public Property Let R_SCREENTYPE(ByVal NEWSCREENTYPE As String)
    TXT_SCREENTYPE.Text = NEWSCREENTYPE
End Property
Public Property Get R_VIEW() As Boolean
Attribute R_VIEW.VB_MemberFlags = "14"
R_VIEW = IIf(CHK_VIEW.Value = 1, True, False)
End Property
Public Property Let R_VIEW(ByVal NEWRVIEW As Boolean)
    CHK_VIEW.Value = IIf(NEWRVIEW, 1, 0)
End Property
Public Property Get R_INSERT() As Boolean
Attribute R_INSERT.VB_MemberFlags = "14"
R_INSERT = IIf(CHK_INSERT.Value = 1, True, False)
End Property
Public Property Let R_INSERT(ByVal NEWRINSERT As Boolean)
    CHK_INSERT.Value = IIf(NEWRINSERT, 1, 0)
End Property
Public Property Get R_UPDATE() As Boolean
Attribute R_UPDATE.VB_MemberFlags = "14"
R_UPDATE = IIf(CHK_UPDATE.Value = 1, True, False)
End Property
Public Property Let R_UPDATE(ByVal NEWRUPDATE As Boolean)
    CHK_UPDATE.Value = IIf(NEWRUPDATE, 1, 0)
End Property

Public Property Get R_NULL() As Boolean
Attribute R_NULL.VB_MemberFlags = "14"
R_NULL = IIf(chk_null.Value = 1, True, False)
End Property
Public Property Let R_NULL(ByVal NEWRNULL As Boolean)
    chk_null.Value = IIf(NEWRNULL, 1, 0)
End Property

Public Property Get R_CLOSE() As Boolean
Attribute R_CLOSE.VB_MemberFlags = "14"
R_CLOSE = IIf(chk_close.Value = 1, True, False)
End Property
Public Property Let R_CLOSE(ByVal NEWRCLOSE As Boolean)
    chk_close.Value = IIf(NEWRCLOSE, 1, 0)
End Property
Public Property Get R_DELETE() As Boolean
Attribute R_DELETE.VB_MemberFlags = "14"
R_DELETE = IIf(CHK_DELETE.Value = 1, True, False)
End Property
Public Property Let R_DELETE(ByVal NEWRDELETE As Boolean)
    CHK_DELETE.Value = IIf(NEWRDELETE, 1, 0)
End Property
Public Property Get R_PRINT() As Boolean
Attribute R_PRINT.VB_MemberFlags = "14"
R_PRINT = IIf(CHK_PRINT.Value = 1, True, False)
End Property
Public Property Let R_PRINT(ByVal NEWRPRINT As Boolean)
    CHK_PRINT.Value = IIf(NEWRPRINT, 1, 0)
End Property

Private Sub DTC_DESCR_Change()
PropertyChanged "R_DESCR"
TXT_SCREENID.Text = DTC_DESCR.BoundText
Select Case Mid(DTC_DESCR.Text, 12, 1)
    Case "M"
        TXT_SCREENTYPE.Text = "Maestras"
    Case "T"
        TXT_SCREENTYPE.Text = "Transaccion"
    Case "R"
        TXT_SCREENTYPE.Text = "Reportes"
    Case "P"
        TXT_SCREENTYPE.Text = "Procesos"
End Select
End Sub

Public Property Get R_DESCR() As String
Attribute R_DESCR.VB_MemberFlags = "34"
R_DESCR = DTC_DESCR.BoundText
End Property
Public Property Let R_DESCR(ByVal NEWRDESCR As String)
    DTC_DESCR.BoundText = NEWRDESCR
End Property


Private Sub UserControl_Initialize()
Dim STRSQL As String

STRSQL = "select * from vw_se_screen order by screenid"
Set rs_combox = New ADODB.Recordset
rs_combox.CursorLocation = adUseClient
';USER ID=SA;PWD=
rs_combox.Open STRSQL, "FILEDSN=CONEXIONSIES", adOpenDynamic, adLockBatchOptimistic
Dim LS_CAMPOID, LS_CAMPODESCR As String
Set DTC_DESCR.RowSource = rs_combox
DTC_DESCR.ListField = "screen"
DTC_DESCR.BoundColumn = "screenid"
End Sub

