frmSJWH.frm
资源名称:物流管理系统实例.rar [点击查看]
上传用户:ykswallow
上传日期:2009-12-30
资源大小:1107k
文件大小:5k
源码类别:
其他行业
开发平台:
Visual Basic
- VERSION 5.00
- Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
- Begin VB.Form frmSJWH
- BorderStyle = 3 'Fixed Dialog
- Caption = "数据维护"
- ClientHeight = 3450
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5445
- Icon = "frmSJWH.frx":0000
- LinkTopic = "Form3"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3450
- ScaleWidth = 5445
- ShowInTaskbar = 0 'False
- StartUpPosition = 1 '所有者中心
- WhatsThisButton = -1 'True
- WhatsThisHelp = -1 'True
- Begin VB.CommandButton cmdExit
- Cancel = -1 'True
- Caption = "关闭"
- Default = -1 'True
- Height = 360
- Left = 3630
- TabIndex = 8
- Tag = "确定"
- Top = 3000
- Width = 1275
- End
- Begin VB.Frame Frame1
- Caption = "清理内容"
- Height = 2775
- Index = 0
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 5175
- Begin VB.CheckBox chkWllx
- Caption = "报损数据"
- Height = 255
- Index = 2
- Left = 600
- TabIndex = 9
- Top = 2160
- WhatsThisHelpID = 15
- Width = 1095
- End
- Begin VB.CommandButton cmdRun
- Caption = "执行"
- Height = 360
- Left = 3585
- TabIndex = 3
- Top = 1800
- WhatsThisHelpID = 21
- Width = 1230
- End
- Begin VB.CheckBox chkWllx
- Caption = "进库数据"
- Height = 255
- Index = 0
- Left = 600
- TabIndex = 2
- Top = 1440
- WhatsThisHelpID = 15
- Width = 1095
- End
- Begin VB.CheckBox chkWllx
- Caption = "出库数据"
- Height = 255
- Index = 1
- Left = 600
- TabIndex = 1
- Top = 1800
- WhatsThisHelpID = 15
- Width = 1095
- End
- Begin MSComCtl2.DTPicker dtpTjRq
- Height = 300
- Index = 0
- Left = 720
- TabIndex = 4
- Top = 480
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 529
- _Version = 393216
- Format = 24576001
- CurrentDate = 36526
- End
- Begin MSComCtl2.DTPicker dtpTjRq
- Height = 300
- Index = 1
- Left = 720
- TabIndex = 5
- Top = 840
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 529
- _Version = 393216
- Format = 24576001
- CurrentDate = 36526
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "到:"
- Height = 180
- Left = 360
- TabIndex = 7
- Top = 840
- Width = 270
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "从:"
- Height = 180
- Index = 5
- Left = 360
- TabIndex = 6
- Top = 480
- Width = 270
- End
- End
- End
- Attribute VB_Name = "frmSJWH"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim strSm As String
- Private Sub cmdExit_Click()
- Unload Me
- End Sub
- Private Sub cmdRun_Click()
- On Error GoTo ErrBar
- Dim I As Integer
- strSm = "对" & dtpTjRq(0) & "至" & dtpTjRq(1) & "期间数据整理后的结果。"
- mCdt.CkBeginTrans
- For I = 0 To 2
- TrimData I
- Next
- mCdt.CkCommitTrans
- MsgBox "清理数据成功!", vbInformation
- Exit Sub
- ErrBar:
- mCdt.CkRollbackTrans
- MsgBox "清理数据失败!", vbInformation
- End Sub
- Private Sub Form_Load()
- '初始清理数据日期
- dtpTjRq(0) = DateAdd("yyyy", -2, Date)
- dtpTjRq(1) = DateAdd("yyyy", -1, Date)
- End Sub
- Private Sub TrimData(Index As Integer)
- If Not CBool(chkWllx(Index).Value) Then Exit Sub
- Dim strLx As String
- Select Case Index
- Case 0
- strLx = "进库"
- Case 1
- strLx = "出库"
- Case 2
- strLx = "报损"
- End Select
- '整理数据
- mCdt.InsWL_SJFH strLx, dtpTjRq(0), dtpTjRq(1)
- mCdt.DelWL strLx, dtpTjRq(0), dtpTjRq(1)
- mCdt.UpdataWL strSm, gstrZyID, Date
- End Sub