?? main.frm
字號:
Top = 360
Width = 6015
End
End
Begin VB.Frame Frame4
Caption = "收費選項"
Height = 3855
Left = 8280
TabIndex = 10
Top = 3720
Width = 3495
Begin VB.TextBox txtShoufei
Alignment = 2 'Center
BackColor = &H00E0E0E0&
Height = 285
Left = 1080
Locked = -1 'True
TabIndex = 34
Text = "0"
Top = 2520
Width = 1095
End
Begin VB.TextBox txtZonge
Alignment = 2 'Center
BackColor = &H00E0E0E0&
Height = 285
Left = 1080
Locked = -1 'True
TabIndex = 31
Text = "0"
Top = 1320
Width = 1095
End
Begin VB.TextBox txtFeilv
Alignment = 2 'Center
BackColor = &H00E0E0E0&
ForeColor = &H00000000&
Height = 285
Left = 1080
Locked = -1 'True
TabIndex = 28
Text = "0.03"
Top = 1920
Width = 1095
End
Begin VB.TextBox txtDanjia
Alignment = 2 'Center
BackColor = &H00FFC0FF&
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 285
Left = 1080
MaxLength = 10
TabIndex = 24
Text = "0"
Top = 472
Width = 1095
End
Begin VB.Label Label17
Caption = "元"
Height = 255
Left = 2280
TabIndex = 35
Top = 2520
Width = 495
End
Begin VB.Label Label16
Caption = "收 費:"
Height = 255
Left = 360
TabIndex = 33
Top = 2520
Width = 735
End
Begin VB.Label Label15
Caption = "元"
Height = 375
Left = 2280
TabIndex = 32
Top = 1320
Width = 495
End
Begin VB.Label Label14
Caption = "總 額:"
Height = 375
Left = 360
TabIndex = 30
Top = 1320
Width = 855
End
Begin VB.Label Label13
Caption = "元(按凈重)"
Height = 255
Left = 2280
TabIndex = 29
Top = 1920
Width = 1095
End
Begin VB.Label Label12
Caption = "費 率:"
Height = 255
Left = 360
TabIndex = 27
Top = 1920
Width = 735
End
Begin VB.Label Label11
Caption = "元/KG"
Height = 255
Left = 2280
TabIndex = 25
Top = 487
Width = 615
End
Begin VB.Label Label10
Caption = "單 價:"
Height = 255
Left = 360
TabIndex = 23
Top = 487
Width = 855
End
End
Begin VB.Label Label26
Caption = "稱重編號:"
Height = 255
Left = 8280
TabIndex = 54
Top = 3120
Width = 975
End
Begin VB.Label Label3
Caption = "Label3"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 9600
TabIndex = 7
Top = -300
Visible = 0 'False
Width = 975
End
Begin VB.Label Label2
Caption = "Label2"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 8400
TabIndex = 6
Top = -300
Visible = 0 'False
Width = 855
End
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 630
Left = 0
TabIndex = 1
Top = 0
Width = 12000
_ExtentX = 21167
_ExtentY = 1111
ButtonWidth = 609
ButtonHeight = 953
Appearance = 1
_Version = 393216
End
Begin VB.Label Label1
Caption = "Mob:13956990212"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 5160
TabIndex = 2
Top = 8400
Width = 1455
End
End
Attribute VB_Name = "op"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cnnUser As New ADODB.Connection
Dim rstUser As New ADODB.Recordset
Private Sub fahuoData()
On Error GoTo p
With rstUser
If .State = adStateOpen Then .Close
.Open "select id as 編號,name as 發貨單位 from [danwei] where tag ='1' order by id desc", cnnUser, adOpenKeyset, adLockReadOnly
Dim kkk As Integer
kkk = rstUser.RecordCount
With faHuoGrid
.Clear
End With
If Not .EOF Then
Dim i As Integer
Dim j As Integer
With faHuoGrid
.Clear
.Rows = 2
.Cols = rstUser.Fields.Count
For i = 0 To .Cols - 1
.TextMatrix(0, i) = rstUser.Fields(i).Name
'將矩陣的第一行設置為表字段名
Next i
.ColWidth(0) = 1000
.ColWidth(1) = 4200
If rstUser.RecordCount > 0 Then
.Rows = rstUser.RecordCount + 10
i = 1
rstUser.MoveFirst
Do Until rstUser.EOF
'直到rs至結果集末尾退出循環
For j = 0 To rstUser.Fields.Count - 1
.TextMatrix(i, j) = rstUser.Fields(j).Value & ""
'.ColAlignment(i) = center
'將表中的記錄導入grid
Next j
rstUser.MoveNext
i = i + 1
Loop
End If
.ColSel = .Cols - 1
End With
' Else
'MsgBox "沒有記錄!", vbOKOnly, "提示:"
End If
.Close
End With
Exit Sub
p:
MsgBox "fahuoDATA錯誤!", vbOKOnly, "錯誤"
End Sub
Private Sub shouhuoData()
On Error GoTo p
With rstUser
If .State = adStateOpen Then .Close
.Open "select id as 編號,name as 發貨單位 from [danwei] where tag ='2' order by id desc", cnnUser, adOpenKeyset, adLockReadOnly
Dim kkk As Integer
kkk = rstUser.RecordCount
With shouHuoGrid
.Clear
End With
If Not .EOF Then
Dim i As Integer
Dim j As Integer
With shouHuoGrid
.Clear
.Rows = 2
.Cols = rstUser.Fields.Count
For i = 0 To .Cols - 1
.TextMatrix(0, i) = rstUser.Fields(i).Name
'將矩陣的第一行設置為表字段名
Next i
.ColWidth(0) = 1000
.ColWidth(1) = 4200
If rstUser.RecordCount > 0 Then
.Rows = rstUser.RecordCount + 10
i = 1
rstUser.MoveFirst
Do Until rstUser.EOF
'直到rs至結果集末尾退出循環
For j = 0 To rstUser.Fields.Count - 1
.TextMatrix(i, j) = rstUser.Fields(j).Value & ""
'.ColAlignment(i) = center
'將表中的記錄導入grid
Next j
rstUser.MoveNext
i = i + 1
Loop
End If
.ColSel = .Cols - 1
End With
' Else
'MsgBox "沒有記錄!", vbOKOnly, "提示:"
End If
.Close
End With
Exit Sub
p:
MsgBox "shouhuoDATA錯誤!", vbOKOnly, "錯誤"
End Sub
Private Sub danweiData()
On Error GoTo p
With rstUser
If .State = adStateOpen Then .Close
.Open "select id as 編號,name as 單位 from [danwei] order by id desc", cnnUser, adOpenKeyset, adLockReadOnly
Dim kkk As Integer
kkk = rstUser.RecordCount
With danweiGrid
.Clear
End With
If Not .EOF Then
Dim i As Integer
Dim j As Integer
With danweiGrid
.Clear
.Rows = 2
.Cols = rstUser.Fields.Count
For i = 0 To .Cols - 1
.TextMatrix(0, i) = rstUser.Fields(i).Name
'將矩陣的第一行設置為表字段名
Next i
.ColWidth(0) = 1000
.ColWidth(1) = 4200
If rstUser.RecordCount > 0 Then
.Rows = rstUser.RecordCount + 10
i = 1
rstUser.MoveFirst
Do Until rstUser.EOF
'直到rs至結果集末尾退出循環
For j = 0 To rstUser.Fields.Count - 1
.TextMatrix(i, j) = rstUser.Fields(j).Value & ""
'.ColAlignment(i) = center
'將表中的記錄導入grid
Next j
rstUser.MoveNext
i = i + 1
Loop
End If
.ColSel = .Cols - 1
End With
' Else
'MsgBox "沒有記錄!", vbOKOnly, "提示:"
End If
.Close
End With
Exit Sub
p:
MsgBox "danweiDATA錯誤!", vbOKOnly, "錯誤"
End Sub
Private Sub chepaiData()
On Error GoTo p
With rstUser
If .State = adStateOpen Then .Close
.Open "select id as 編號,chepai as 車牌號碼,weight as 自重,danwei_id as 所屬單位編號 from [che] order by id desc", cnnUser, adOpenKeyset, adLockReadOnly
Dim kkk As Integer
kkk = rstUser.RecordCount
With chepaiGrid
.Clear
End With
If Not .EOF Then
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -