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

📄 main.frm

📁 称重管理软件(大型地磅)源码 为农贸市场定制开发
💻 FRM
📖 第 1 页 / 共 5 页
字号:
            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 + -