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

📄 form3.frm

📁 vb做的超市管理系统,带有源代码可以修改
💻 FRM
字号:
VERSION 5.00
Object = "{CFA7AFF4-3242-4269-9172-7389D695AE01}#1.0#0"; "StoneXP.ocx"
Object = "{7739C28A-7F77-4A1D-82E0-A849FB91A583}#9.0#0"; "x001.ocx"
Object = "{DAAC6951-59A4-4C08-9D6E-FE3919B64861}#1.0#0"; "FlexCell.ocx"
Begin VB.Form Form3 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "申购单与订单查询"
   ClientHeight    =   4110
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   9135
   Icon            =   "Form3.frx":0000
   LinkTopic       =   "Form3"
   MaxButton       =   0   'False
   ScaleHeight     =   4110
   ScaleWidth      =   9135
   StartUpPosition =   1  '所有者中心
   Begin x001.xcombox xcombox1 
      Height          =   315
      Left            =   4320
      TabIndex        =   4
      Top             =   270
      Width           =   2055
      _ExtentX        =   3625
      _ExtentY        =   556
      Text            =   ""
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin StoneXP.XPButton XPButton1 
      Height          =   375
      Left            =   480
      TabIndex        =   2
      Top             =   240
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ButtonStyle     =   1
      Caption         =   "申购单"
      MouseIcon       =   "Form3.frx":000C
      MousePointer    =   99
   End
   Begin FlexCell.Grid Grid1 
      Height          =   3255
      Left            =   0
      TabIndex        =   0
      Top             =   840
      Width           =   3015
      _ExtentX        =   5318
      _ExtentY        =   5741
      Appearance      =   0
      Cols            =   2
      Rows            =   13
      ScrollBars      =   0
   End
   Begin FlexCell.Grid Grid2 
      Height          =   3255
      Left            =   3000
      TabIndex        =   1
      Top             =   840
      Width           =   6135
      _ExtentX        =   10821
      _ExtentY        =   5741
      Appearance      =   0
      Cols            =   9
      Rows            =   1
   End
   Begin StoneXP.XPButton XPButton2 
      Height          =   375
      Left            =   1560
      TabIndex        =   3
      Top             =   240
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ButtonStyle     =   1
      Caption         =   "采购订单"
      MouseIcon       =   "Form3.frx":0326
      MousePointer    =   99
   End
   Begin StoneXP.XPButton XPButton3 
      Height          =   375
      Left            =   6600
      TabIndex        =   5
      Top             =   240
      Width           =   1095
      _ExtentX        =   1931
      _ExtentY        =   661
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ButtonStyle     =   1
      Caption         =   "查 询"
      MouseIcon       =   "Form3.frx":0640
      MousePointer    =   99
   End
   Begin VB.Label Label1 
      Caption         =   "单号:"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   300
      Left            =   3480
      TabIndex        =   6
      Top             =   285
      Width           =   855
   End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'作者:性灵工作室
'发布日期:2007/03/03
'描    述:简单小型超市采购系统
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Private Sub Form_Load()
Grid1.SetRegisterInformation "CNwinndy", "W]vyY-nonvk-u\nty-Zbl_e-`hms^" '进行注册
Grid2.SetRegisterInformation "CNwinndy", "W]vyY-nonvk-u\nty-Zbl_e-`hms^" '进行注册
Grid1.RowHeight(0) = 0
Grid1.Column(0).Width = 80
Grid1.Column(1).Width = 120
Grid2.Column(0).Width = 0
End Sub

Private Sub xpbutton1_Click()
Set cg1 = cnn.Execute("select 采购单号 from 申购单")
xcombox1.Clear
Do While Not cg1.EOF
xcombox1.AddItem cg1.Fields(0)
cg1.MoveNext
Loop
cgtable = "申购单"
End Sub

Private Sub XPButton2_Click()
Set cg1 = cnn.Execute("select 采购单号 from 采购订单")
xcombox1.Clear
Do While Not cg1.EOF
xcombox1.AddItem cg1.Fields(0)
cg1.MoveNext
Loop
cgtable = "采购订单"
End Sub

Private Sub XPButton3_Click()
Grid2.Rows = 1
If cgtable = "申购单" Then
sql = "select * from 申购单 where 采购单号='" & xcombox1.Text & "'"
findgrid
Else
sql = "select 申购单.* from 申购单,采购订单 where 采购订单.采购单号='" & xcombox1.Text & "' and 采购订单.采购单号=申购单.采购单号"
findgrid
End If
End Sub
Private Sub findgrid()
On Error GoTo finish:
Set cg1 = cnn.Execute(sql)
If cg1.EOF = False Then
 For i = 1 To Grid1.Rows - 1
 Grid1.Cell(i, 0).Text = cg1.Fields(i - 1).Name
 Grid1.Cell(i, 1).Text = cg1.Fields(i - 1)
 Next
 sql = "select * from 申购单明细 where 批号='" & xcombox1.Text & "'"
 Set cg2 = cnn.Execute(sql)
 For i = 1 To Grid2.Cols - 1
 Grid2.Cell(0, i).Text = cg2.Fields(i - 1).Name
 Next
Do While Not cg2.EOF
 Grid2.Rows = Grid2.Rows + 1
 For i = 1 To Grid2.Cols - 1
  If cg2.Fields(i - 1) = Null Then
  Grid2.Cell(Grid2.Rows - 1, i).Text = ""
  Else
  Grid2.Cell(Grid2.Rows - 1, i).Text = cg2.Fields(i - 1)
   If Mid(Grid2.Cell(Grid2.Rows - 1, i).Text, 1, 1) = "." Then
   Grid2.Cell(Grid2.Rows - 1, i).Text = "0" & Grid2.Cell(Grid2.Rows - 1, i).Text
   End If
  End If
  Next
  cg2.MoveNext
Loop
End If
Exit Sub
finish:
MsgBox Err.Description
End Sub

⌨️ 快捷键说明

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