?? frmdrjc.frm
字號:
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
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -