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

📄 status_f.frm

📁 此文件为在VB环境下可用.且有数据库文件
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form status_f 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "上机管理---计算中心上机收费系统"
   ClientHeight    =   6885
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   8295
   Icon            =   "status_f.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6885
   ScaleWidth      =   8295
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command2 
      Caption         =   "注销全部用户"
      Height          =   375
      Left            =   1800
      TabIndex        =   2
      Top             =   240
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "注销单个用户"
      Height          =   375
      Left            =   240
      TabIndex        =   1
      Top             =   240
      Width           =   1575
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "status_f.frx":030A
      Height          =   5535
      Left            =   120
      TabIndex        =   0
      Top             =   720
      Width           =   8055
      _ExtentX        =   14208
      _ExtentY        =   9763
      _Version        =   393216
      AllowUpdate     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   6
      BeginProperty Column00 
         DataField       =   "卡号"
         Caption         =   "卡号"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            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            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "注册时间"
         Caption         =   "注册时间"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "班级"
         Caption         =   "班级"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "所属系"
         Caption         =   "所属系"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column05 
         DataField       =   "所属院"
         Caption         =   "所属院"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   1214.929
         EndProperty
         BeginProperty Column01 
            ColumnWidth     =   1094.74
         EndProperty
         BeginProperty Column02 
            ColumnWidth     =   1874.835
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   929.764
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   870.236
         EndProperty
         BeginProperty Column05 
            ColumnWidth     =   1484.787
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Align           =   2  'Align Bottom
      Height          =   330
      Left            =   0
      Top             =   6555
      Width           =   8295
      _ExtentX        =   14631
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   0
      BackColor       =   -2147483643
      ForeColor       =   255
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=nccc.mdb"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=nccc.mdb"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   $"status_f.frx":031F
      Caption         =   "计算中心计费系统"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "status_f"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
If Adodc1.Recordset.EOF Or Adodc1.Recordset.BOF Then
Adodc1.Refresh
Exit Sub
End If
tempkh = Adodc1.Recordset("卡号")
sql = " select * from 总帐表 where 卡号='" & tempkh & "'"
Set rs = conn.Execute(sql)
jiaoxueqian = rs("教学金额")
zifeiqian = rs("自费金额")
zc_time = Adodc1.Recordset("注册时间")
            zx_time = Now
            sq_n = Year(zx_time) - Year(zc_time)
            sq_y = Month(zx_time) - Month(zc_time)
            sq_r = Day(zx_time) - Day(zc_time)
            If sq_n <> 0 Or sq_y <> 0 Or sq_r <> 0 Then
            zx_time = Date & "  " & #9:30:00 PM#
            End If
            sq_h = Int(Hour(zx_time)) - Int(Hour(zc_time))
            sq_m = Int(Minute(zx_time)) - Int(Minute(zc_time))
            jishi = Int(sq_h * 60) + Int(sq_m)
            feilv = 1.2 / 60
            qianshu = feilv * jishi
            jiaoxue = Val(jiaoxueqian) - qianshu
            zifei = 0
            If jiaoxue <= 0 Then
            zifei = Val(zifeiqian) + jiaoxue
            jiaoxue = 0
            End If
            sql = " insert into 流水账 (卡号,注册时间,注销时间,金额) values ('" & tempkh & "','" & zc_time & "','" & zx_time & "','" & qianshu & "')"
            conn.Execute sql
            sql = "delete * from 临时表 where 卡号='" & tempkh & "'"
            conn.Execute sql
            sql = "update 总帐表 set 教学金额=" & jiaoxue & ",自费金额=" & zifei & " where 卡号='" & tempkh & "'"
            conn.Execute sql

MsgBox "注销完成!"
Adodc1.Refresh
End Sub

Private Sub Command2_Click()
Adodc1.Refresh
If Adodc1.Recordset.EOF Or Adodc1.Recordset.BOF Then
Adodc1.Refresh
Exit Sub
End If
Do While Not Adodc1.Recordset.EOF
tempkh = Adodc1.Recordset("卡号")
sql = " select * from 总帐表 where 卡号='" & tempkh & "'"
Set rs = conn.Execute(sql)
jiaoxueqian = rs("教学金额")
zifeiqian = rs("自费金额")
zc_time = Adodc1.Recordset("注册时间")
            zx_time = Now
            sq_n = Year(zx_time) - Year(zc_time)
            sq_y = Month(zx_time) - Month(zc_time)
            sq_r = Day(zx_time) - Day(zc_time)
            If sq_n <> 0 Or sq_y <> 0 Or sq_r <> 0 Then
            zx_time = Date & "  " & #9:30:00 PM#
            End If
            sq_h = Int(Hour(zx_time)) - Int(Hour(zc_time))
            sq_m = Int(Minute(zx_time)) - Int(Minute(zc_time))
            jishi = Int(sq_h * 60) + Int(sq_m)
            feilv = 1.2 / 60
            qianshu = feilv * jishi
            jiaoxue = Val(jiaoxueqian) - qianshu
            zifei = 0
            If jiaoxue <= 0 Then
            zifei = Val(zifeiqian) + jiaoxue
            jiaoxue = 0
            End If
            sql = " insert into 流水账 (卡号,注册时间,注销时间,金额) values ('" & tempkh & "','" & zc_time & "','" & zx_time & "','" & qianshu & "')"
            conn.Execute sql
            sql = "delete * from 临时表 where 卡号='" & tempkh & "'"
            conn.Execute sql
            sql = "update 总帐表 set 教学金额=" & jiaoxue & ",自费金额=" & zifei & " where 卡号='" & tempkh & "'"
            conn.Execute sql

Adodc1.Recordset.MoveNext
Loop
MsgBox "注销完成!"
Adodc1.Refresh
End Sub

Private Sub Form_Load()
conn.Open connstr
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set conn = Nothing
Set rs = Nothing
End Sub

⌨️ 快捷键说明

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