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

📄 cxsyk.frm

📁 该系统为空车计量系统.完成对空车的自动计量.附串口处理程序.
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Caption         =   "车皮使用列表"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   -1  'True
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000080FF&
      Height          =   372
      Left            =   1440
      TabIndex        =   14
      Top             =   360
      Width           =   6492
   End
   Begin VB.Menu caozuo 
      Caption         =   "编辑"
      Begin VB.Menu add 
         Caption         =   "添加"
      End
      Begin VB.Menu gengxin 
         Caption         =   "更新"
         Enabled         =   0   'False
      End
      Begin VB.Menu delete 
         Caption         =   "删除"
         Shortcut        =   {DEL}
      End
      Begin VB.Menu refresh 
         Caption         =   "刷新"
         Shortcut        =   {F11}
      End
      Begin VB.Menu print 
         Caption         =   "打印"
      End
      Begin VB.Menu null 
         Caption         =   "-"
      End
      Begin VB.Menu jl_bldel 
         Caption         =   "批量删除"
         Enabled         =   0   'False
      End
   End
   Begin VB.Menu clos 
      Caption         =   "关闭"
   End
End
Attribute VB_Name = "cxsyk"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'CODE Manger By BcodeXRose


':add_Click
': 无

Private Sub add_Click()
    tj.Show
    'datPrimaryRS.Recordset.AddNew
End Sub
    

':clos_Click
': 无

Private Sub clos_Click()
  Unload Me
End Sub
    

':Command1_Click
': 无

Private Sub Command1_Click()
    Dim strQueryA As String
    strQueryA = Me.datPrimaryRS.RecordSource
      With DataEnvironment1.rsCommand1
    
    If .State = adStateOpen Then .Close
    .Source = strQueryA
    .Open '打开想输出的数据库数据项以便输出
    End With
    DataReport1.Caption = " 使用数据库列表"
    
    DataReport1.Show
End Sub
    
Private Sub Command2_Click()
On Error Resume Next
Me.datPrimaryRS.RecordSource = "select ch as 车号,pz as 皮重,sj as 检斤时间 from chk where sj>='" & Format(Me.DTPicker1.Value, "yyyy-mm-dd") & "' and sj<'" & Format(Me.DTPicker2.Value, "yyyy-mm-dd") & "'  "
Me.datPrimaryRS.refresh

End Sub

Private Sub Command3_Click()
Dim Data As ADODB.Connection
Set Data = New ADODB.Connection
Data.ConnectionString = "dsn=dzqch"

Dim ti As Integer
Dim recc As Integer
Dim ii As Integer
recc = Me.datPrimaryRS.Recordset.RecordCount
ti = MsgBox("车皮库清理后将不能恢复,继续吗?", 36, "清理车皮库")
If ti = 6 Then
Data.Open
  Data.Execute "delete from chk where sj>='" & Format(Me.DTPicker1.Value, "yyyy-mm-dd-hh-nn-ss") & "' and sj<'" & Format(Me.DTPicker2.Value, "yyyy-mm-dd-hh-nn-ss") & "'  "
Data.Close
Me.datPrimaryRS.refresh
End If



End Sub

Private Sub Command4_Click()
Unload Me
End Sub


':delete_Click
': 无

Private Sub delete_Click()
    Me.datPrimaryRS.Recordset.delete
End Sub
    

':Form_KeyPress
':KeyAscii 为Integer型

Private Sub Form_KeyPress(KeyAscii As Integer)
Me.DTPicker1.Value = Now - 30
Me.DTPicker2.Value = Now - 1
    If KeyAscii = 13 Then
        Unload Me
    End If
End Sub
    

':Form_Load
': 无

Private Sub Form_Load()
DataEnvironment1.Connection1.ConnectionString = connetstr
    DataEnvironment1.Connection1.Open
  Me.datPrimaryRS.ConnectionString = connetstr
    'Dim strQueryA As String
    '  strQueryA = "SELECT ch AS 车号, pz AS 皮重, sj AS 检斤时间, lsh AS 流水号 FROM chk"
    
    '  With DataEnvironment1.rsCommand1
    '    If .State = adStateOpen Then .Close
    '       .Source = strQueryA
    '      .Open '打开想输出的数据库数据项以便输出
    'End With
    'grdDataGrid.Refresh
End Sub
    

':Form_Resize
': 无

Private Sub Form_Resize()
    On Error Resume Next
    Picture1.Left = (Me.Width - Picture1.Width) / 2
    'This will resize the grid when the form is resized
    'grdDataGrid.Hei 'ght = Me.ScaleHeight - datPrimaryRS.Height - 230 - picButtons.Height
End Sub
    

':Form_Unload
':Cancel 为Integer型

Private Sub Form_Unload(Cancel As Integer)
    Screen.MousePointer = vbDefault
    DataEnvironment1.Connection1.Close
End Sub
    

':datPrimaryRS_Error
':ByVal 为orNumber As Long型
':Description 为String型
':ByVal 为de As Long型
':ByVal 为rce As String型
':ByVal 为pFile As String型
':ByVal 为pContext As Long型
':fCancelDisplay 为Boolean型

Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
    'This is where you would put error handling code
    'If you want to ignore errors, comment out the next line
    'If you want to trap them, add code here to handle them
    MsgBox "Data error event hit err:" & Description
End Sub
    
    
    
    

':cmdClose_Click
': 无

Private Sub cmdClose_Click()
    Unload Me
End Sub
    

':Image1_Click
': 无

Private Sub Image1_Click()
    Unload Me
End Sub
    

':Image1_MouseDown
':Button 为Integer型
':Shift 为Integer型
':X 为Single型
':Y 为Single型

Private Sub Image1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Shape1.Visible = True
End Sub
    

':Image1_MouseUp
':Button 为Integer型
':Shift 为Integer型
':X 为Single型
':Y 为Single型

Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Shape1.Visible = False
End Sub
    
Private Sub gengxin_Click()
'frmLogin1.Show
cxsyk.grdDataGrid.AllowUpdate = True
grdDataGrid.refresh
End Sub

Private Sub grdDataGrid_KeyPress(KeyAscii As Integer)
MsgBox KeyAscii
End Sub

Private Sub grdDataGrid_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If boutton = 2 Then
Me.PopupMenu caozuo
End If


End Sub

Private Sub jl_bldel_Click()
Me.Frame1.Visible = True
End Sub


':print_Click
': 无

Private Sub print_Click()
    Call Command1_Click
End Sub
    
Private Sub refresh_Click()
 datPrimaryRS.refresh
 Me.grdDataGrid.AllowUpdate = False
 
End Sub


':Text1_Change
': 无

Private Sub Text1_Change()
    On Error Resume Next
    
    datPrimaryRS.RecordSource = "select ch as 车号,pz as 皮重,sj as 检斤时间  from chk where ch like '%" & Text1.Text & "%'"
    datPrimaryRS.refresh
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -