⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cardin.frm

📁 用microsoft vb6.0写的上班考勤系统!
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin VB.Label YSlab 
         Height          =   255
         Left            =   8040
         TabIndex        =   23
         Top             =   4440
         Width           =   735
      End
      Begin VB.Label Label7 
         Caption         =   "是否有效"
         Height          =   255
         Left            =   8040
         TabIndex        =   21
         Top             =   3720
         Width           =   855
      End
      Begin VB.Label Label6 
         Height          =   495
         Left            =   6960
         TabIndex        =   20
         Top             =   4320
         Width           =   1095
      End
      Begin VB.Label Label5 
         Caption         =   "出入状态"
         Height          =   375
         Left            =   6960
         TabIndex        =   19
         Top             =   3720
         Width           =   855
      End
      Begin VB.Label Label4 
         Caption         =   "卡号"
         Height          =   375
         Left            =   360
         TabIndex        =   17
         Top             =   3720
         Width           =   1095
      End
      Begin VB.Label Label3 
         Caption         =   "出入楼层"
         Height          =   375
         Left            =   5400
         TabIndex        =   16
         Top             =   3720
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "姓名"
         Height          =   375
         Left            =   3840
         TabIndex        =   15
         Top             =   3720
         Width           =   1095
      End
      Begin VB.Label Label1 
         Caption         =   "卡身号"
         Height          =   375
         Left            =   2040
         TabIndex        =   14
         Top             =   3720
         Width           =   1095
      End
   End
End
Attribute VB_Name = "frmModiInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RstYS As ADODB.Recordset

Private Sub Check1_Click()
If Check1.Value = 1 Then
   'MsgBox "真的要设该卡无效?", vbDefaultButton2
   Check2.Enabled = False
   Dim AA As Integer
   Dim BB As String
   BB = Trim(Text1.Text)
   
  AA = MsgBox("你真的要设该卡无效吗?", 4, "设置无效")
  If AA = 6 Then
    
       Set RstYS = New ADODB.Recordset
       
       RstYS.Open "select YS from CardInfo where CardNo='" + BB + " '", CnnDoor, adOpenKeyset, adLockOptimistic, adCmdText
       
        If Not RstYS.EOF Then
           RstYS!YS = "1"
           RstYS.UpdateBatch
           
        End If
       RstYS.Close
       Set RstYS = Nothing
     Else
       Exit Sub
  End If
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
   'MsgBox "真的要设该卡无效?", vbDefaultButton2
   Check1.Enabled = False
   Dim AA As Integer
   Dim BB, CC As String
   BB = Trim(Text1.Text)
   
  AA = MsgBox("你真的要设该卡有效吗?", 4, "设置有效")
  If AA = 6 Then
    
       Set RstYS = New ADODB.Recordset
       
       RstYS.Open "select YS from CardInfo where CardNo='" + BB + " '", CnnDoor, adOpenKeyset, adLockOptimistic, adCmdText
       
        If Not RstYS.EOF Then
           CC = RstYS!YS
           RstYS!YS = "0"
           RstYS.UpdateBatch
        End If
       RstYS.Close
       Set RstYS = Nothing
     Else
       Exit Sub
  End If
End If
End Sub

Private Sub Command1_Click()

Adodc1.Recordset.MoveFirst

End Sub

Private Sub Command2_Click()
If Adodc1.Recordset.BOF Then
   Adodc1.Recordset.MoveFirst
   MsgBox "已到了第一条记录,不能再向上"
    Exit Sub
End If


   Adodc1.Recordset.MovePrevious
End Sub

Private Sub Command3_Click()
If Adodc1.Recordset.EOF Then
   Adodc1.Recordset.MoveLast
   MsgBox "已到了最后一条记录,不能再向下"
    Exit Sub
End If


   Adodc1.Recordset.MoveNext
End Sub

Private Sub Command4_Click()
Adodc1.Recordset.MoveLast
End Sub

Private Sub Command5_Click()
Unload Me
End Sub

Private Sub Command6_Click()
Command6.Enabled = False
Command7.Enabled = True
Command8.Enabled = True
End Sub

Private Sub Command7_Click()
Adodc1.Recordset.UpdateBatch
Command7.Enabled = False
Command8.Enabled = False
Command6.Enabled = True
End Sub

Private Sub Command8_Click()
Adodc1.Recordset.CancelUpdate
Command7.Enabled = False
Command8.Enabled = False
Command6.Enabled = True
End Sub


Private Sub Form_Load()
With DG1
   .Columns(0).Width = 850
   .Columns(0).Caption = "卡 号"
   
   .Columns(1).Width = 650
   .Columns(1).Caption = "卡身号"
   
   .Columns(2).Width = 800
   .Columns(2).Caption = "姓 名"
   
   .Columns(3).Width = 970
   .Columns(3).Caption = "发卡日期"
   
   .Columns(4).Width = 800
   .Columns(4).Caption = "出入楼层"
   
   .Columns(5).Width = 800
   .Columns(5).Caption = "是否员工"
   
   .Columns(6).Width = 800
   .Columns(6).Caption = "是否业主"
   
   .Columns(7).Width = 950
   .Columns(7).Caption = "业主属性"
   
   .Columns(8).Width = 750
   .Columns(8).Caption = "所属部门"
   
   
   .Columns(9).Width = 750
   .Columns(9).Caption = "出入状态"
   
    .Columns(10).Width = 400
   .Columns(10).Caption = "状态"
End With

End Sub

Private Sub Text5_Change()
If Text5.Text = "" Then Exit Sub
If Text5.Text = 0 Then
   Label6.ForeColor = &HFF0000
   Label6.Caption = "在外面"
End If

If Text5.Text = 1 Then
   Label6.ForeColor = &HFF&
   Label6.Caption = "在里面"
End If

End Sub


Private Sub Text6_Change()
If Text6.Text = "" Then Exit Sub
If Text6.Text = 0 Then
   YSlab.ForeColor = &HFF0000
   YSlab.Caption = "有效"
End If

If Text6.Text = 1 Then
   YSlab.ForeColor = &HFF&
  YSlab.Caption = "无效"
End If

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -