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

📄 frm_xfzl_xh.frm

📁 mnnnml , ,l, ,mk mmkkmlklmkkkkkkkkkkkkkm,mkl
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frm_zlxf_xh 
   BorderStyle     =   0  'None
   Caption         =   "地图销毁管理"
   ClientHeight    =   3255
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   5895
   Icon            =   "frm_xfzl_xh.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3255
   ScaleWidth      =   5895
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1680
      TabIndex        =   18
      Text            =   "Text3"
      Top             =   2670
      Visible         =   0   'False
      Width           =   1155
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   300
      TabIndex        =   17
      Text            =   "Text2"
      Top             =   2670
      Visible         =   0   'False
      Width           =   1185
   End
   Begin VB.CommandButton Command2 
      Caption         =   "关闭(&C)"
      Height          =   375
      Left            =   4530
      TabIndex        =   8
      Top             =   2625
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定(&E)"
      Height          =   375
      Left            =   3150
      TabIndex        =   7
      Top             =   2625
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00CFCFCF&
      Caption         =   "销毁"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1980
      Left            =   120
      TabIndex        =   3
      Top             =   525
      Width           =   5655
      Begin VB.ComboBox Combo4 
         Height          =   300
         Left            =   2880
         Style           =   2  'Dropdown List
         TabIndex        =   5
         Top             =   1290
         Width           =   810
      End
      Begin VB.ComboBox Combo1 
         Appearance      =   0  'Flat
         Height          =   300
         ItemData        =   "frm_xfzl_xh.frx":1272
         Left            =   1035
         List            =   "frm_xfzl_xh.frx":1274
         Locked          =   -1  'True
         Style           =   1  'Simple Combo
         TabIndex        =   0
         Text            =   "Combo1"
         Top             =   360
         Width           =   4425
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   0
         Left            =   1035
         MaxLength       =   5
         TabIndex        =   4
         Top             =   1305
         Width           =   810
      End
      Begin VB.ComboBox Combo2 
         Appearance      =   0  'Flat
         Height          =   300
         Left            =   1035
         Locked          =   -1  'True
         Style           =   1  'Simple Combo
         TabIndex        =   1
         Text            =   "Combo2"
         Top             =   825
         Width           =   1320
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Index           =   1
         Left            =   4635
         TabIndex        =   6
         Top             =   1305
         Width           =   810
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   315
         Left            =   3825
         TabIndex        =   2
         Top             =   795
         Width           =   1635
         _ExtentX        =   2884
         _ExtentY        =   556
         _Version        =   393216
         Format          =   24510464
         CurrentDate     =   37630
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00CFCFCF&
         Caption         =   "最大数为:"
         ForeColor       =   &H000000C0&
         Height          =   180
         Left            =   180
         TabIndex        =   15
         Top             =   1620
         Width           =   810
      End
      Begin VB.Label label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00CFCFCF&
         Caption         =   "销毁方式:"
         Height          =   180
         Index           =   5
         Left            =   2025
         TabIndex        =   14
         Top             =   1350
         Width           =   810
      End
      Begin VB.Label label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00CFCFCF&
         Caption         =   "销毁时间:"
         Height          =   180
         Index           =   2
         Left            =   2970
         TabIndex        =   13
         Top             =   855
         Width           =   810
      End
      Begin VB.Label label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00CFCFCF&
         Caption         =   "销毁数量:"
         Height          =   180
         Index           =   3
         Left            =   180
         TabIndex        =   12
         Top             =   1350
         Width           =   810
      End
      Begin VB.Label label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00CFCFCF&
         Caption         =   "经 办 人:"
         Height          =   180
         Index           =   4
         Left            =   3780
         TabIndex        =   11
         Top             =   1350
         Width           =   810
      End
      Begin VB.Label label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00CFCFCF&
         Caption         =   "细    目:"
         Height          =   180
         Index           =   1
         Left            =   180
         TabIndex        =   10
         Top             =   885
         Width           =   810
      End
      Begin VB.Label label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00CFCFCF&
         Caption         =   "名    称:"
         Height          =   180
         Index           =   0
         Left            =   180
         TabIndex        =   9
         Top             =   420
         Width           =   810
      End
   End
   Begin VB.Image Imageicon 
      Height          =   315
      Left            =   3495
      Picture         =   "frm_xfzl_xh.frx":1276
      Stretch         =   -1  'True
      Top             =   4170
      Width           =   315
   End
   Begin VB.Label lblTitle 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "资料销毁"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   240
      Left            =   3450
      TabIndex        =   16
      Top             =   3810
      Width           =   840
   End
   Begin VB.Image imgTitleMinimize 
      Height          =   210
      Left            =   2820
      Picture         =   "frm_xfzl_xh.frx":24E8
      Stretch         =   -1  'True
      Top             =   3630
      Width           =   210
   End
   Begin VB.Image imgTitleClose 
      Height          =   210
      Left            =   2865
      Picture         =   "frm_xfzl_xh.frx":2732
      Stretch         =   -1  'True
      Top             =   3990
      Width           =   210
   End
   Begin VB.Image imgTitleHelp 
      Height          =   210
      Left            =   2820
      Picture         =   "frm_xfzl_xh.frx":297C
      Stretch         =   -1  'True
      Top             =   4350
      Width           =   210
   End
   Begin VB.Image imgTitleMain 
      Height          =   450
      Left            =   1380
      Picture         =   "frm_xfzl_xh.frx":2BC6
      Stretch         =   -1  'True
      Top             =   4080
      Width           =   285
   End
   Begin VB.Image imgWindowRight 
      Height          =   450
      Left            =   2460
      Picture         =   "frm_xfzl_xh.frx":3310
      Stretch         =   -1  'True
      Top             =   4110
      Width           =   285
   End
   Begin VB.Image imgWindowLeft 
      Height          =   450
      Left            =   2100
      Picture         =   "frm_xfzl_xh.frx":3A5A
      Stretch         =   -1  'True
      Top             =   4110
      Width           =   285
   End
   Begin VB.Image imgWindowBottom 
      Height          =   450
      Left            =   1740
      Picture         =   "frm_xfzl_xh.frx":41A4
      Stretch         =   -1  'True
      Top             =   4110
      Width           =   285
   End
   Begin VB.Image imgTitleRight 
      Height          =   450
      Left            =   1740
      Picture         =   "frm_xfzl_xh.frx":48EE
      Top             =   3630
      Width           =   285
   End
   Begin VB.Image imgTitleLeft 
      Height          =   450
      Left            =   1380
      Picture         =   "frm_xfzl_xh.frx":5038
      Top             =   3630
      Width           =   285
   End
   Begin VB.Image imgWindowBottomRight 
      Height          =   450
      Left            =   2460
      Picture         =   "frm_xfzl_xh.frx":5782
      Top             =   3630
      Width           =   285
   End
   Begin VB.Image imgWindowBottomLeft 
      Height          =   450
      Left            =   2100
      Picture         =   "frm_xfzl_xh.frx":5ECC
      Top             =   3630
      Width           =   285
   End
End
Attribute VB_Name = "frm_zlxf_xh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Connection

Private Sub Command1_Click()

Dim adoPrimaryRS1 As Recordset
Dim adoPrimaryRS2 As Recordset
On Error GoTo err_41:
 Set db = New ADODB.Connection
  db.CursorLocation = adUseClient
  db.Open "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" & fullpath("mdb\ziliao.lbl")


If Val(Text1(0).Text) <> 0 Then
  ii = MsgBox("确认销毁数为" & Val(Text1(0).Text), vbQuestion + vbYesNo, "提示")
  If ii = vbYes Then
  If Val(Text1(0).Text) > Val(Text3.Text) Then
     MsgBox "销毁值超过库存,重新输入数量!", vbOKOnly, "提示"
     Exit Sub
  End If

  Set adoPrimaryRS1 = New Recordset
  adoPrimaryRS1.Open "select *  from xfzl_xh_jl ", db, adOpenStatic, adLockOptimistic
  With adoPrimaryRS1
        .AddNew
        adoPrimaryRS1("名称") = combo1.Text
        adoPrimaryRS1("细目") = Combo2.Text
        adoPrimaryRS1("销毁数") = Val(Text1(0).Text)
        adoPrimaryRS1("经办人") = Text1(1).Text
        adoPrimaryRS1("销毁时间") = DTPicker1.Value
        adoPrimaryRS1("销毁方式") = Combo4.Text
        .Update
  End With
    Set adoPrimaryRS2 = New Recordset
    adoPrimaryRS2.Open "select 编号,数量,销毁数  from xfzl_v where 编号='" & Text2.Text & "'", db, adOpenStatic, adLockOptimistic
   If adoPrimaryRS2.RecordCount = 1 Then
    With adoPrimaryRS2
       
        xhl = adoPrimaryRS2("销毁数") + Val(Text1(0).Text)
        kcl = adoPrimaryRS2("数量") - Val(Text1(0).Text)
        adoPrimaryRS2("数量") = kcl
        adoPrimaryRS2("销毁数") = xhl
        .Update
    End With
  
  
  End If
  
  MsgBox "本次销毁:" & Val(Text1(0).Text) & Chr(13) & Chr(10) _
         & "销毁总数:" & xhl & Chr(13) & Chr(10) _
         & "库存数为:" & kcl & Chr(13) & Chr(10), vbExclamation
  adoPrimaryRS1.Close
  adoPrimaryRS2.Close
  db.Close
  Unload Me
  

End If
Else
  MsgBox "销毁数量不能为0", vbInformation, "重新输入"
End If
Exit Sub

err_41:
  adoPrimaryRS1.CancelUpdate
  adoPrimaryRS2.CancelUpdate
  MsgBox Err.Description, vbExclamation
End Sub

Private Sub Command2_Click()
 Unload Me
End Sub

Private Sub Form_Load()
On Error GoTo err_42:
  MakeWindow Me
  
  Text1(1).Text = gz_user
  Combo4.AddItem "化浆", 0
  Combo4.AddItem "焚烧", 1
  Combo4.AddItem "碎纸", 2
  Combo4.ListIndex = 0
  
  DTPicker1.Value = Date
  Text1(0).Text = 0
  
 Exit Sub
err_42:
 MsgBox Err.Description, vbExclamation
  End Sub



Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)
If Index = 0 Then
strValid = "0123456789"
If KeyAscii > 26 Then
            If InStr(strValid, Chr(KeyAscii)) = 0 Then
                KeyAscii = 0
            End If
        End If
End If
End Sub
Private Sub imgTitleClose_Click()
 Unload Me
End Sub

Private Sub imgTitleLeft_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub imgTitleMinimize_Click()
    Me.WindowState = 1
End Sub

Private Sub imgTitleRight_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

Private Sub lblTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DoDrag Me
End Sub

⌨️ 快捷键说明

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