📄 frminputdriearning.frm
字号:
Private Sub txtM20_Change()
If Not IsNumeric(txtM20.Text) Then
txtM20 = 0
End If
End Sub
Private Sub txtM20_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM10.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM10_Change()
If Not IsNumeric(txtM10.Text) Then
txtM10 = 0
End If
End Sub
Private Sub txtM10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM5.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM5_Change()
If Not IsNumeric(txtM5.Text) Then
txtM5 = 0
End If
End Sub
Private Sub txtM5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM2.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM2_Change()
If Not IsNumeric(txtM2.Text) Then
txtM2 = 0
End If
End Sub
Private Sub txtM2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM1.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM1_Change()
If Not IsNumeric(txtM1.Text) Then
txtM1 = 0
End If
End Sub
Private Sub txtM1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM05.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM05_Change()
If Not IsNumeric(txtM05.Text) Then
txtM05 = 0
End If
End Sub
Private Sub txtM05_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM02.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM02_Change()
If Not IsNumeric(txtM02.Text) Then
txtM02 = 0
End If
End Sub
Private Sub txtM02_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM01.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM01_Change()
If Not IsNumeric(txtM01.Text) Then
txtM01 = 0
End If
End Sub
Private Sub txtM01_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM005.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM005_Change()
If Not IsNumeric(txtM005.Text) Then
txtM005 = 0
End If
End Sub
Private Sub txtM005_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM002.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM002_Change()
If Not IsNumeric(txtM002.Text) Then
txtM002 = 0
End If
End Sub
Private Sub txtM002_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtM001.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM001_Change()
If Not IsNumeric(txtM001.Text) Then
txtM001 = 0
End If
End Sub
Private Sub txtM001_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdOK.SetFocus
Else
KeyAscii = clsDaivd.ValiText(KeyAscii, "0123456789", True)
End If
End Sub
Private Sub txtM100_LostFocus()
sumMonetNum
End Sub
Private Sub txtM100_GotFocus()
txtM100.SelLength = Len(txtM100)
End Sub
Private Sub txtM50_LostFocus()
sumMonetNum
End Sub
Private Sub txtM50_GotFocus()
txtM50.SelLength = Len(txtM50)
End Sub
Private Sub txtM20_LostFocus()
sumMonetNum
End Sub
Private Sub txtM20_GotFocus()
txtM20.SelLength = Len(txtM20)
End Sub
Private Sub txtM10_LostFocus()
sumMonetNum
End Sub
Private Sub txtM10_GotFocus()
txtM10.SelLength = Len(txtM10)
End Sub
Private Sub txtM5_LostFocus()
sumMonetNum
End Sub
Private Sub txtM5_GotFocus()
txtM5.SelLength = Len(txtM5)
End Sub
Private Sub txtM2_LostFocus()
sumMonetNum
End Sub
Private Sub txtM2_GotFocus()
txtM2.SelLength = Len(txtM2)
End Sub
Private Sub txtM1_LostFocus()
sumMonetNum
End Sub
Private Sub txtM1_GotFocus()
txtM1.SelLength = Len(txtM1)
End Sub
Private Sub txtM05_LostFocus()
sumMonetNum
End Sub
Private Sub txtM05_GotFocus()
txtM05.SelLength = Len(txtM05)
End Sub
Private Sub txtM02_LostFocus()
sumMonetNum
End Sub
Private Sub txtM02_GotFocus()
txtM02.SelLength = Len(txtM02)
End Sub
Private Sub txtM01_LostFocus()
sumMonetNum
End Sub
Private Sub txtM01_GotFocus()
txtM01.SelLength = Len(txtM01)
End Sub
Private Sub txtM005_LostFocus()
sumMonetNum
End Sub
Private Sub txtM005_GotFocus()
txtM005.SelLength = Len(txtM005)
End Sub
Private Sub txtM002_LostFocus()
sumMonetNum
End Sub
Private Sub txtM002_GotFocus()
txtM002.SelLength = Len(txtM002)
End Sub
Private Sub txtM001_LostFocus()
sumMonetNum
cmdOK.SetFocus
End Sub
Private Sub txtM001_GotFocus()
txtM001.SelLength = Len(txtM001)
End Sub
Private Sub sumMonetNum()
txtToTalMoney = CDbl(txtM100) * 100 + CDbl(txtM50) * 50 + CDbl(txtM20) * 20 + _
CDbl(txtM10) * 10 + CDbl(txtM5) * 5 + CDbl(txtM2) * 2 + _
CDbl(txtM1) * 1 + CDbl(txtM05) * 0.5 + CDbl(txtM02) * 0.2 + _
CDbl(txtM01) * 0.1 + CDbl(txtM005) * 0.05 + CDbl(txtM002) * 0.02 + CDbl(txtM001) * 0.01
txtToTalTicket = IIf(Int(CDbl(txtToTalMoney)) < CDbl(txtToTalMoney), Int(CDbl(txtToTalMoney)) + 1, Int(CDbl(txtToTalMoney)))
txtTotalNum = CDbl(txtM100) + CDbl(txtM50) + CDbl(txtM20) + CDbl(txtM10) + CDbl(txtM5) + CDbl(txtM2) + CDbl(txtM1) + CDbl(txtM05) + CDbl(txtM02) + CDbl(txtM01) + CDbl(txtM005) + CDbl(txtM002) + CDbl(txtM001)
End Sub
''''han 覆盖掉原来的
''''Dim nobusno As Boolean
''''Private Function NoToName(OpNo As String) As String
'''' Dim rs As New ADODB.Recordset
'''' If OpNo <> "" Then
'''' rs.Open "select opname from AMC_DCY_INFO where opno='" + Trim(OpNo) + "'", cnn, adOpenStatic, adLockOptimistic
'''' If rs.EOF Then
'''' Else
'''' NoToName = rs.Fields(0).Value
'''' End If
'''' End If
''''End Function
''''
''''Private Function DrNoToName(OpNo As String) As String
'''' Dim rs As New ADODB.Recordset
'''' If OpNo <> "" Then
'''' rs.Open "select name from zz_bus_ic.dbo.Zy_Worker_INFO where op_no='" + Trim(OpNo) + "'", cnn, adOpenStatic, adLockOptimistic
'''' If rs.EOF Then
'''' Else
'''' DrNoToName = rs.Fields(0).Value
'''' End If
'''' End If
''''End Function
''''
''''Private Sub cmbCompany_GotFocus()
'''' Dim rs As New ADODB.Recordset
'''' On Error Resume Next
'''' cmbCompany.ListIndex = -1
'''' rs.Open "select * from zz_bus_ic.dbo.ZY_line_bus_dept_view where line_no='" + txtLineNo + "'", cnn, adOpenStatic, adLockOptimistic
'''' If rs.EOF Then
'''' MsgBox "无此线路号,请检查重输!", vbExclamation, "提示."
'''' Exit Sub
'''' Else
'''' cmbCompany.Text = rs.Fields(1).Value
'''' End If
''''
''''End Sub
''''
''''Private Sub cmbCompany_KeyPress(KeyAscii As Integer)
'''' If KeyAscii = 13 Then
'''' txtDriverNo.SetFocus
'''' End If
''''End Sub
''''
''''Private Sub cmbSxw_KeyDown(KeyCode As Integer, Shift As Integer)
'''' If KeyCode = 13 Then
'''' txtDcOPNo.SetFocus
'''' End If
''''End Sub
''''
''''Private Sub cmdCancel_Click()
'''' txtBusNo = ""
''''' txtCheckName = ""
''''' txtCheckNo = ""
'''' txtDcName = ""
'''' txtDcOPNo = ""
'''' txtDriverName = ""
'''' txtDriverNo = ""
'''' txtLineNo = ""
'''' txtM001 = ""
'''' txtM002 = ""
'''' txtM005 = ""
'''' txtM01 = ""
'''' txtM02 = ""
'''' txtM05 = ""
'''' txtM1 = ""
'''' txtM2 = ""
'''' txtM5 = ""
'''' txtM10 = ""
'''' txtM20 = ""
'''' txtM50 = ""
'''' txtM100 = ""
'''' txtToTalMoney = 0
'''' txtTotalNum = 0
''''End Sub
''''
''''Private Sub cmdDel_Click()
''''
''''End Sub
''''
''''Private Sub cmdExit_Click()
'''' Unload Me
''''End Sub
''''
''''Private Sub cmdOK_Click()
'''' Dim acmd As New Command
'''' Dim param As ADODB.Parameter
'''' Dim rs As New ADODB.Recordset
'''' If txtLineNo = 0 Or txtDcOPNo = 0 Or txtCheckNo = 0 Or txtLineNo = "" Or cmbCompany.Text = "" Or txtDriverName = "" Or txtDcName = "" Or txtToTalMoney = 0 Or txtTotalNum = 0 Then
'''' MsgBox "数据录入不完整,请检查重输!", vbExclamation, "提示..."
'''' Exit Sub
'''' End If
'''' On Error Resume Next
'''' With acmd
'''' .ActiveConnection = cnn
'''' .CommandText = "ZYSP_INSERT_CASH_INPUT"
'''' .CommandType = adCmdStoredProc
'''' .Parameters("@DRIVEROPNO") = Trim(txtDriverNo)
'''' .Parameters("@INPUT_DATE") = Trim(dtpDate)
'''' .Parameters("@BUS_NO") = Trim(txtBusNo)
'''' .Parameters("@LINE_NO") = Trim(txtLineNo)
'''' rs.Open "select dept_no from zz_bus_ic.dbo.zy_dept_info where name='" + Trim(cmbCompany.Text) + "'", cnn, adOpenStatic, adLockOptimistic
'''' If Not rs.EOF Then
'''' .Parameters("@DEPT_NO") = rs.Fields(0).Value
'''' Else
'''' MsgBox "数据录入不完整,请检查重输!", vbExclamation, "提示..."
'''' Exit Sub
'''' End If
'''' .Parameters("@COUNTBILLOPNO") = Trim(txtDcOPNo)
'''' .Parameters("@CHECKOPNO") = Trim(txtCheckNo)
'''' .Parameters("@M100") = Trim(txtM100)
'''' .Parameters("@M50") = Trim(txtM50)
'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -