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

📄 clearfp.frm

📁 一套VB完整的灯具销售管理系统设计
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         End
      End
      Begin VB.CommandButton FPGHR 
         Caption         =   "购货人"
         Height          =   420
         Left            =   2475
         TabIndex        =   5
         Top             =   435
         Width           =   1095
      End
      Begin VB.CommandButton FPSJ 
         Caption         =   "时间"
         Height          =   420
         Left            =   1365
         TabIndex        =   4
         Top             =   435
         Width           =   1095
      End
      Begin VB.CommandButton FPH 
         Caption         =   "发票号"
         Height          =   420
         Left            =   240
         TabIndex        =   3
         Top             =   435
         Width           =   1095
      End
      Begin VB.Line Line6 
         BorderColor     =   &H00FFFFFF&
         X1              =   15
         X2              =   4860
         Y1              =   1035
         Y2              =   1035
      End
      Begin VB.Line Line5 
         BorderColor     =   &H00808080&
         X1              =   0
         X2              =   4860
         Y1              =   1005
         Y2              =   1005
      End
   End
   Begin VB.CommandButton Sure 
      BackColor       =   &H00008000&
      Enabled         =   0   'False
      Height          =   180
      Left            =   -15
      Style           =   1  'Graphical
      TabIndex        =   21
      ToolTipText     =   "单击列出选定发票内容!"
      Top             =   2430
      Width           =   6045
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "销毁发票,谨慎、谨慎!"
      ForeColor       =   &H0000FFFF&
      Height          =   180
      Left            =   1980
      TabIndex        =   1
      Top             =   135
      Width           =   1980
   End
   Begin VB.Label Label1 
      BackColor       =   &H00800000&
      BorderStyle     =   1  'Fixed Single
      Height          =   345
      Left            =   90
      TabIndex        =   0
      Top             =   60
      Width           =   5820
   End
End
Attribute VB_Name = "ClearFp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim deleteStr As String
Private Sub Command1_Click()
Unload Me
End Sub

Private Sub Form_Load()
ClearFp.Top = (Screen.Height - ClearFp.Height) / 4
ClearFp.Left = (Screen.Width - ClearFp.Width) / 2
ClearFp.Height = 2475
Data1.DatabaseName = appData
Combo1.AddItem "01", 0
Combo1.AddItem "02", 1
Combo1.AddItem "03", 2
Combo1.AddItem "04", 3
Combo1.AddItem "05", 4
Combo1.AddItem "06", 5
Combo1.AddItem "07", 6
Combo1.AddItem "08", 7
Combo1.AddItem "09", 8
Combo1.AddItem "10", 9
Combo1.AddItem "11", 10
Combo1.AddItem "12", 11
End Sub

Private Sub FPGHR_Click()
Sure.Enabled = False
ClearFp.Height = 2670
Picture4.Visible = False
Picture2.Visible = False
Picture1.Visible = False
Picture3.Visible = True
Text2.SetFocus
Text2.Text = ""
End Sub

Private Sub FPH_Click()
Sure.Enabled = False
ClearFp.Height = 2670
Picture4.Visible = False
Picture3.Visible = False
Picture2.Visible = False
Picture1.Visible = True
Text1.SetFocus
Text1.Text = ""
End Sub

Private Sub FPSJ_Click()
Sure.Enabled = True
ClearFp.Height = 2670
Picture4.Visible = False
Picture3.Visible = False
Picture1.Visible = False
Picture2.Visible = True
xx = 1
xy = 31
Do While xx <= xy
 Combo2.AddItem xx, xx - 1
xx = xx + 1
Loop
Combo1.ListIndex = 0
Combo2.ListIndex = 0
End Sub

Private Sub Restore_Click()
ClearFp.Height = 2475
Picture1.Visible = False
Picture2.Visible = False
Picture3.Visible = False
Picture4.Visible = True
End Sub

Private Sub StarClear_Click()
DBGrid1.Visible = False
StarClear.Enabled = False
ClearAni.Visible = True
ClearBar.Visible = True
'销毁代码
 On Error GoTo exitdelete
   Dim db As Database
   Set db = OpenDatabase(appData)
   RecordStr = "delete * from fpk where "
   RecordStr = RecordStr & deleteStr
   db.Execute RecordStr
   RecordStr = "delete * from guestfindk where "
   RecordStr = RecordStr & deleteStr
   db.Execute RecordStr
   db.Close
filenames = Browser + "avi\delete.avi"
'临时路径
'filenames = "c:\dj\delete.avi"
ClearAni.Open filenames
ClearAni.Play
xxb = 1
Do While xxb <= 3740
 ClearBar.Value = xxb
 xxb = xxb + 1
 Loop
 ClearAni.Close
 ClearAni.Visible = False
 ClearBar.Visible = False
 StarClear.Enabled = True
 Call Restore_Click
 Exit Sub
exitdelete:
  MsgBox "操作失误,不能销毁。", vbOKOnly + 32, "再来一次"
  
End Sub

Private Sub Sure_Click()
ClearFp.Height = 5295
If Picture1.Visible = True Then
  RecordStr = Trim(Text1.Text)
  ssb$ = RecordStr & "号发票,购物情况!"
  RecordStr = "发票号='" & RecordStr & "'"
End If
If Picture2.Visible = True Then
   If Len(Combo2.Text) = 1 Then
      ss$ = "0" & Combo2.Text
      Else
      ss$ = Combo2.Text
      End If
 RecordStr = Year(Date) & "-" & Combo1.Text & "-" & ss$
 ssb$ = RecordStr & "日,购物情况!"
 jj$ = RecordStr
 RecordStr = "日期=#" & RecordStr & "#"
End If
If Picture3.Visible = True Then
 RecordStr = Trim(Text2.Text)
 ssb$ = " 客户 " & RecordStr & " 购物情况!"
 RecordStr = "购货人='" & RecordStr & "'"
End If
 deleteStr = RecordStr
 On Error GoTo ssb
 DBGrid1.Caption = ssb$
 RS = "select * from fpk where " & RecordStr
 Data1.RecordSource = RS
 Data1.Refresh
 DBGrid1.Visible = True
 sn = Data1.Recordset.RecordCount
 If sn = 0 Then
    StarClear.Enabled = False
    Else
    StarClear.Enabled = True
    End If
  Exit Sub
 
ssb:
   MsgBox jj$ & " 时间有错误", vbOKOnly + 32, "重新再来!"
   
End Sub

Private Sub Text1_Change()
If Trim(Text1.Text) = "" Then
   Sure.Enabled = False
   Else
   Sure.Enabled = True
   End If
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Sure.Enabled = True Then
 Sure.SetFocus
 End If
End Sub

Private Sub Text2_Change()
If Trim(Text2.Text) = "" Then
   Sure.Enabled = False
   Else
   Sure.Enabled = True
   End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And Sure.Enabled = True Then
 Sure.SetFocus
 End If
End Sub

⌨️ 快捷键说明

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