VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmViewDataPetugas 
   BorderStyle     =   0  'None
   Caption         =   "VIEW DATA PETUGAS"
   ClientHeight    =   2865
   ClientLeft      =   6105
   ClientTop       =   4005
   ClientWidth     =   3330
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2865
   ScaleWidth      =   3330
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton cmdBack 
      Caption         =   "<<"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   0
      TabIndex        =   2
      Top             =   0
      Width           =   495
   End
   Begin MSComctlLib.ListView lvPetugas 
      Height          =   2295
      Left            =   120
      TabIndex        =   1
      Top             =   480
      Width           =   3135
      _ExtentX        =   5530
      _ExtentY        =   4048
      View            =   3
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      HotTracking     =   -1  'True
      HoverSelection  =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   2
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "USER"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "PASSWORD"
         Object.Width           =   2540
      EndProperty
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      Caption         =   "DATA PETUGAS"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   0
      Width           =   3015
   End
End
Attribute VB_Name = "frmViewDataPetugas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdBack_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    lvPetugas.ListItems.Clear
    Dim data As ListItem
    If rec.State = 1 Then rec.Close
    rec.Open "select User,Tipe from T_User", conn, 3, 3
        While Not rec.EOF
            Set data = lvPetugas.ListItems.Add(, , rec("User"))
                data.SubItems(1) = rec("Tipe")
            rec.MoveNext
        Wend
End Sub

Private Sub Form_Resize()
    If Me.Width <> 3330 Then Me.Width = 3330
    If Me.Height <> 2865 Then Me.Height = 2865
End Sub

Private Sub lvPetugas_Click()
    If lvPetugas.ListItems.Count = 0 Then
        Unload Me
    Else
        With rec
            If .State = 1 Then .Close
                .Open "select * from T_User where User = '" & lvPetugas.SelectedItem & "'", conn
                    frmPetugas.txtEditUser = !User
                    frmPetugas.txtTampung = !User
                    frmPetugas.txtEditPass = !Password
                    frmPetugas.cboEditStatus = !Tipe
                Unload Me
        End With
    End If
End Sub
