frmDrJC.frm
资源名称:0123..rar [点击查看]
上传用户:naidiweb
上传日期:2013-08-15
资源大小:672k
文件大小:26k
源码类别:
软件设计/软件工程
开发平台:
WORD
- 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 frmDrJC
- BorderStyle = 1 'Fixed Single
- Caption = "驾驶员奖罚"
- ClientHeight = 3495
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7755
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 3495
- ScaleWidth = 7755
- Begin VB.TextBox Text9
- Enabled = 0 'False
- Height = 270
- Left = 5310
- TabIndex = 23
- Top = 795
- Width = 1065
- End
- Begin MSAdodcLib.Adodc AdoYY
- Height = 330
- Left = 180
- Top = 1680
- Visible = 0 'False
- Width = 1815
- _ExtentX = 3201
- _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 = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "select * from 车辆运营表"
- Caption = "AdoYY"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin MSAdodcLib.Adodc AdoWX
- Height = 330
- Left = 180
- Top = 2595
- Visible = 0 'False
- Width = 1815
- _ExtentX = 3201
- _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 = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "select * from 车辆维修表"
- Caption = "AdoWX"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin MSAdodcLib.Adodc AdoSG
- Height = 330
- Left = 180
- Top = 1965
- Visible = 0 'False
- Width = 1815
- _ExtentX = 3201
- _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 = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "select * from 车辆事故表"
- Caption = "AdoSG"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin MSAdodcLib.Adodc AdoWZ
- Height = 330
- Left = 180
- Top = 2265
- Visible = 0 'False
- Width = 1815
- _ExtentX = 3201
- _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 = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "select * from 车辆违章表"
- Caption = "AdoWZ"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin VB.TextBox TName
- BackColor = &H00E0E0E0&
- Height = 270
- Left = 1335
- TabIndex = 21
- Top = 465
- Width = 1350
- End
- Begin VB.CommandButton CmdPrint
- Caption = "打印(&P)"
- Height = 315
- Left = 6645
- TabIndex = 19
- Top = 495
- Width = 930
- End
- Begin VB.TextBox Text8
- BackColor = &H00E0E0E0&
- Enabled = 0 'False
- Height = 270
- Left = 1335
- TabIndex = 18
- Top = 810
- Width = 1350
- End
- Begin VB.TextBox Text7
- BackColor = &H00E0E0E0&
- Enabled = 0 'False
- Height = 270
- Left = 3705
- TabIndex = 16
- Top = 795
- Width = 630
- End
- Begin VB.CommandButton CmdSave
- Caption = "保存(&S)"
- Height = 315
- Left = 6645
- TabIndex = 15
- Top = 840
- Width = 930
- End
- Begin VB.TextBox Text6
- BackColor = &H00C0C0FF&
- Enabled = 0 'False
- Height = 270
- Left = 5310
- TabIndex = 14
- Top = 465
- Width = 630
- End
- Begin VB.TextBox Text5
- BackColor = &H00C0C0FF&
- Enabled = 0 'False
- Height = 270
- Left = 5325
- TabIndex = 13
- Top = 120
- Width = 630
- End
- Begin VB.TextBox Text4
- BackColor = &H00C0C0FF&
- Enabled = 0 'False
- Height = 270
- Left = 3705
- TabIndex = 12
- Top = 450
- Width = 630
- End
- Begin VB.TextBox Text3
- BackColor = &H00C0C0FF&
- Enabled = 0 'False
- Height = 270
- Left = 6945
- TabIndex = 11
- Top = 90
- Width = 630
- End
- Begin VB.TextBox Text2
- BackColor = &H00C0C0FF&
- Enabled = 0 'False
- Height = 270
- Left = 3705
- TabIndex = 10
- Top = 120
- Width = 630
- End
- Begin VB.Frame Frame1
- Height = 2220
- Left = 45
- TabIndex = 8
- Top = 1140
- Width = 7605
- Begin MSAdodcLib.Adodc AdoJF
- Height = 330
- Left = 135
- Top = 1770
- Visible = 0 'False
- Width = 1830
- _ExtentX = 3228
- _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 = 1
- BackColor = -2147483643
- ForeColor = -2147483640
- Orientation = 0
- Enabled = -1
- Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
- OLEDBFile = ""
- DataSourceName = ""
- OtherAttributes = ""
- UserName = ""
- Password = ""
- RecordSource = "select * from 奖罚表"
- Caption = "AdoJF"
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "宋体"
- Size = 9
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- _Version = 393216
- End
- Begin MSDataGridLib.DataGrid DataGrid1
- Bindings = "frmDrJC.frx":0000
- Height = 1845
- Left = 135
- TabIndex = 9
- Top = 240
- Width = 7365
- _ExtentX = 12991
- _ExtentY = 3254
- _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 = 10
- 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
- BeginProperty Column06
- 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 Column07
- 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 Column08
- 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 Column09
- 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 = 884.976
- EndProperty
- BeginProperty Column01
- ColumnWidth = 659.906
- EndProperty
- BeginProperty Column02
- ColumnWidth = 854.929
- EndProperty
- BeginProperty Column03
- ColumnWidth = 854.929
- EndProperty
- BeginProperty Column04
- ColumnWidth = 854.929
- EndProperty
- BeginProperty Column05
- ColumnWidth = 794.835
- EndProperty
- BeginProperty Column06
- ColumnWidth = 824.882
- EndProperty
- BeginProperty Column07
- ColumnWidth = 794.835
- EndProperty
- BeginProperty Column08
- ColumnWidth = 854.929
- EndProperty
- BeginProperty Column09
- ColumnWidth = 840.189
- EndProperty
- EndProperty
- End
- End
- Begin VB.TextBox Text1
- BackColor = &H00E0E0E0&
- Height = 270
- Left = 1335
- TabIndex = 0
- Top = 120
- Width = 1350
- End
- Begin VB.Label Label10
- Caption = "本月奖金:"
- Height = 225
- Left = 4440
- TabIndex = 22
- Top = 810
- Width = 945
- End
- Begin VB.Label Label9
- Caption = "驾驶员姓名:"
- Height = 210
- Left = 120
- TabIndex = 20
- Top = 480
- Width = 1230
- End
- Begin VB.Label Label8
- Caption = "日期:"
- Height = 165
- Left = 120
- TabIndex = 17
- Top = 810
- Width = 765
- End
- Begin VB.Label Label7
- Caption = "司机驾驶车号:"
- Height = 210
- Left = 120
- TabIndex = 7
- Top = 165
- Width = 1425
- End
- Begin VB.Label Label6
- Caption = "运营次数:"
- Height = 225
- Left = 2775
- TabIndex = 6
- Top = 465
- Width = 945
- End
- Begin VB.Label Label5
- Caption = "违章次数:"
- Height = 225
- Left = 4440
- TabIndex = 5
- Top = 480
- Width = 945
- End
- Begin VB.Label Label4
- Caption = "事故次数:"
- Height = 225
- Left = 4440
- TabIndex = 4
- Top = 150
- Width = 945
- End
- Begin VB.Label Label3
- Caption = "本月得分:"
- Height = 225
- Left = 2775
- TabIndex = 3
- Top = 810
- Width = 945
- End
- Begin VB.Label Label2
- Caption = "维修费用:"
- Height = 225
- Left = 6030
- TabIndex = 2
- Top = 165
- Width = 945
- End
- Begin VB.Label Label1
- Caption = "运营收入:"
- Height = 225
- Left = 2775
- TabIndex = 1
- Top = 165
- Width = 945
- End
- End
- Attribute VB_Name = "frmDrJC"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub cmdSave_Click()
- If Text1.Text = "" Then
- MsgBox "车牌号码,不能为空!", , "系统提示"
- Text1.SetFocus
- Exit Sub
- End If
- Dim strdate As String
- Dim strNo As String
- strdate = Mid(Date, 1, 7)
- AdoJF.RecordSource = "select * from 奖罚表 where 车牌号码='" + Text1.Text + "'"
- AdoJF.Refresh
- For i = 0 To AdoJF.Recordset.RecordCount - 1
- On Error Resume Next
- strNo = Mid(AdoJF.Recordset.Fields(7), 1, 7)
- AdoJF.Recordset.MoveNext
- strNo = Mid(AdoJF.Recordset.Fields(7), 1, 7)
- If strdate = strNo Then
- MsgBox "车牌号码为:" + Text1.Text + "本月已经统计过运营情况了", , "系统提示"
- Text1.Text = ""
- Text1.SetFocus
- Exit Sub
- End If
- Next i
- On Error Resume Next
- AdoJF.Recordset.AddNew
- AdoJF.Recordset.Fields("车牌号码") = Text1.Text
- AdoJF.Recordset.Fields("姓名") = TName.Text
- AdoJF.Recordset.Fields("运营收入") = Text2.Text
- AdoJF.Recordset.Fields("运营次数") = Text4.Text
- AdoJF.Recordset.Fields("维修费用") = Text3.Text
- AdoJF.Recordset.Fields("违章次数") = Text6.Text
- AdoJF.Recordset.Fields("事故次数") = Text5.Text
- AdoJF.Recordset.Fields("日期") = Text8.Text
- AdoJF.Recordset.Fields("每月得分") = Text7.Text
- AdoJF.Recordset.Fields("每月奖金") = Text9.Text
- AdoJF.Recordset.Update
- Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
- Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
- TName.Text = "": Text9.Text = ""
- End Sub
- Private Sub Cmdprint_Click()
- DataReport1.Show
- End Sub
- Private Sub Form_Load()
- frmDrJC.Width = 7875: frmDrJC.Height = 4080
- Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
- Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
- TName.Text = "": Text9.Text = ""
- End Sub
- Private Sub Text1_KeyPress(KeyAscii As Integer)
- If KeyAscii = 13 Then
- TName.SetFocus
- End If
- End Sub
- Private Sub Text1_LostFocus()
- Dim rss1 As New ADODB.Recordset
- Set rss1 = adoCon.Execute("select * from 车辆异动表 where 车牌号码='" & Text1.Text & "'")
- If rss1.EOF Then
- Else
- MsgBox "该车为异动车辆!", , "系统提示"
- Text1.Text = ""
- Text1.SetFocus
- Exit Sub
- End If
- rss1.Close
- Dim rss2 As New ADODB.Recordset
- Set rss2 = adoCon.Execute("select * from 车辆报废表 where 车牌号码='" & Text1.Text & "'")
- If rss2.EOF Then
- Else
- MsgBox "该车已经报废!", , "系统提示"
- Text1.Text = ""
- Text1.SetFocus
- Exit Sub
- End If
- rss2.Close
- If Text1.Text = "" Then Exit Sub
- Text8.Text = Date
- On Error Resume Next
- AdoYY.RecordSource = "select * from 车辆运营表 where 车牌号码='" & Text1.Text & "'"
- AdoYY.Refresh
- If AdoYY.Recordset.RecordCount > 0 Then
- Else
- MsgBox "此车没有参加运营!", , "系统提示"
- Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = ""
- Text5.Text = "": Text6.Text = "": Text7.Text = "": Text8.Text = ""
- TName.Text = "": Text9.Text = ""
- Exit Sub
- AdoYY.Recordset.Close
- End If
- AdoYY.RecordSource = "select sum(运营收入) as 收入,count(运营收入) as 次数 from 车辆运营表 where 车牌号码='" & Text1.Text & "'"
- AdoYY.Refresh
- Text2.Text = AdoYY.Recordset.Fields(0).Value
- Text4.Text = AdoYY.Recordset.Fields(1).Value
- AdoWX.RecordSource = "select sum(共计费用) as 费用 from 车辆维修表 where 车牌号码='" & Text1.Text & "'"
- AdoWX.Refresh
- Text3.Text = AdoWX.Recordset.Fields(0)
- AdoSG.RecordSource = "select count(车牌号码) as 事故次数 from 车辆事故表 where 车牌号码='" & Text1.Text & "'"
- AdoSG.Refresh
- Text5.Text = AdoSG.Recordset.Fields(0)
- AdoWZ.RecordSource = "select count(车牌号码) as 违章次数 from 车辆违章表 where 车牌号码='" & Text1.Text & "'"
- AdoWZ.Refresh
- Text6.Text = AdoWZ.Recordset.Fields(0)
- If Val(tex4.Text) > 30 Then
- Text7.Text = 10 - (Text5.Text * 10 + Text6.Text * 2 + (30 - Text4.Text) * 0.3)
- Else '>=30次
- Text7.Text = 10 - (Text5.Text * 10 + Text6.Text * 2)
- End If
- If Val(Text7.Text) > 0 Then
- Text9.Text = ((Val(Text2.Text) * 0.2 - Val(Text3.Text) * 0.4) * Val(Text7.Text) * 0.1)
- Else
- Text9.Text = 0
- End If
- End Sub
- Private Sub TName_KeyPress(KeyAscii As Integer)
- If KeyAscii = 13 Then
- CmdSave.SetFocus
- End If
- End Sub