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

📄 frmmain.frm

📁 这是本人的毕业设计 超市管理信息系统 完整的毕业论文
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form frmMain 
   BorderStyle     =   0  'None
   Caption         =   "超市管理信息系统"
   ClientHeight    =   4890
   ClientLeft      =   150
   ClientTop       =   1905
   ClientWidth     =   8475
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmMain.frx":0000
   ScaleHeight     =   4890
   ScaleWidth      =   8475
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Visible         =   0   'False
   WhatsThisButton =   -1  'True
   WhatsThisHelp   =   -1  'True
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "欢迎使用"
      BeginProperty Font 
         Name            =   "华文新魏"
         Size            =   36
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FF00&
      Height          =   735
      Left            =   5400
      TabIndex        =   1
      Top             =   3840
      Width           =   3015
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "超市管理信息系统"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   36
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   1095
      Left            =   1080
      TabIndex        =   0
      Top             =   240
      Width           =   6135
      WordWrap        =   -1  'True
   End
   Begin VB.Menu mnjiaoyi 
      Caption         =   "交易管理"
      Begin VB.Menu mnBuy 
         Caption         =   "进货登记"
      End
      Begin VB.Menu mnSell 
         Caption         =   "销售登记"
      End
      Begin VB.Menu mnRetreat 
         Caption         =   "退货登记"
      End
   End
   Begin VB.Menu mnBuyAll 
      Caption         =   "进货统计"
      Begin VB.Menu mnBuyToday 
         Caption         =   "今日进货统计"
      End
      Begin VB.Menu mnBuyMonth 
         Caption         =   "本月进货统计"
      End
      Begin VB.Menu mnBuyQuarterly 
         Caption         =   "本季度进货统计"
      End
      Begin VB.Menu mnBuyYear 
         Caption         =   "今年进货统计"
      End
   End
   Begin VB.Menu mnSellAll 
      Caption         =   "销售统计"
      Begin VB.Menu mnSellToday 
         Caption         =   "今日销售统计"
      End
      Begin VB.Menu mnSellMonth 
         Caption         =   "本月销售统计"
      End
      Begin VB.Menu mnSellQuarterly 
         Caption         =   "本季度销售统计"
      End
      Begin VB.Menu mnSellYear 
         Caption         =   "今年销售统计"
      End
   End
   Begin VB.Menu mnTable 
      Caption         =   "查看数据表"
      Begin VB.Menu mnBuyTable 
         Caption         =   "查看进货表"
      End
      Begin VB.Menu mnGoodsTable 
         Caption         =   "查看现存商品表"
      End
      Begin VB.Menu mnSellTable 
         Caption         =   "查看销售表"
      End
      Begin VB.Menu mnRetreatTable 
         Caption         =   "查看退货表"
      End
      Begin VB.Menu mnEmployeeTable 
         Caption         =   "管理员工表"
      End
      Begin VB.Menu mnManufacturerTable 
         Caption         =   "查看进货商表"
      End
   End
   Begin VB.Menu mnxitong 
      Caption         =   "系统管理"
      Begin VB.Menu mnChangeEmployee 
         Caption         =   "更换用户"
      End
      Begin VB.Menu mnChangePwd 
         Caption         =   "修改密码"
      End
      Begin VB.Menu mnExit 
         Caption         =   "退出系统"
      End
      Begin VB.Menu mnabout 
         Caption         =   "关于"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs_sell As New ADODB.Recordset
Dim rs_goods As New ADODB.Recordset
Dim rs_buy As New ADODB.Recordset
Dim rs_retreat As New ADODB.Recordset
Dim rs_manufacturer As New ADODB.Recordset
Dim rs_employee As New ADODB.Recordset
Dim rs_fctotal As New ADODB.Recordset
Dim rs_total As New ADODB.Recordset
Dim strsell As String
Dim strgoods As String
Dim strbuy As String
Dim strretreat As String
Dim strmanufacturer As String
Dim stremployee As String
Dim strfctotal As String
Dim strtotal As String
Dim inty As Integer
Dim intm As Integer
Dim intd As Integer
Private Sub Form_Load()
inty = Year(Date)
intm = Month(Date)
intd = Day(Date)

End Sub



Private Sub mnabout_Click()
frmAbout.Show
End Sub

Private Sub mnBuy_Click()
frmAddgoods.Show
End Sub

Private Sub mnBuyMonth_Click()
frmBuyall.Text2.Enabled = False
frmBuyall.SSTab1.Tab = 1
frmBuyall.SSTab1.TabEnabled(0) = False
frmBuyall.SSTab1.TabEnabled(1) = True
frmBuyall.SSTab1.TabEnabled(2) = False
frmBuyall.SSTab1.TabEnabled(3) = False
frmBuyall.Show
strbuy = "select * from buy where 进货年=" & inty & " and 进货月=" & intm & " "
rs_buy.Open strbuy, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc2.RecordSource = strbuy
frmBuyall.Adodc2.Refresh
frmBuyall.DataGrid2.ReBind
If rs_buy.EOF = True Then
   frmBuyall.Adodc6.RecordSource = strbuy
   frmBuyall.Adodc6.Refresh
   frmBuyall.DataGrid6.ReBind
   MsgBox "您本月没有进货记录!", vbOKOnly + vbInformation, "注意"
   frmBuyall.Command9.Enabled = False
   frmBuyall.Command10.Enabled = False
   frmBuyall.Command11.Enabled = False
   frmBuyall.Command12.Enabled = False
   frmBuyall.Command13.Enabled = False
   frmBuyall.Command14.Enabled = False
   frmBuyall.Command15.Enabled = False
   frmBuyall.Command16.Enabled = False
   rs_buy.Close
  
   Exit Sub
End If
rs_buy.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商进货总金额 from buy where 进货年=" & inty & " and 进货月=" & intm & " group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc6.RecordSource = strfctotal
frmBuyall.Adodc6.Refresh
frmBuyall.DataGrid6.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 进货总金额 from buy where 进货年=" & inty & " and 进货月=" & intm & " "
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmBuyall.Text2.Text = rs_total.Fields("进货总金额")
rs_total.Close

End Sub

Private Sub mnBuyQuarterly_Click()
frmBuyall.Text3.Enabled = False
frmBuyall.SSTab1.Tab = 2
frmBuyall.SSTab1.TabEnabled(0) = False
frmBuyall.SSTab1.TabEnabled(1) = False
frmBuyall.SSTab1.TabEnabled(2) = True
frmBuyall.SSTab1.TabEnabled(3) = False
frmBuyall.Show
Select Case intm
       Case Is < 4
            intm = 3
       Case Is < 7
            intm = 6
       Case Is < 10
            intm = 9
       Case Is > 10
            intm = 12
End Select
strbuy = "select * from buy where 进货年=" & inty & " and 进货月 between " & (intm - 2) & " and " & intm & " "
rs_buy.Open strbuy, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc2.RecordSource = strbuy
frmBuyall.Adodc2.Refresh
frmBuyall.DataGrid2.ReBind
If rs_buy.EOF = True Then
   frmBuyall.Adodc6.RecordSource = strbuy
   frmBuyall.Adodc6.Refresh
   frmBuyall.DataGrid6.ReBind
   MsgBox "您本季度没有进货记录!", vbOKOnly + vbInformation, "注意"
   frmBuyall.Command17.Enabled = False
   frmBuyall.Command18.Enabled = False
   frmBuyall.Command19.Enabled = False
   frmBuyall.Command20.Enabled = False
   frmBuyall.Command21.Enabled = False
   frmBuyall.Command22.Enabled = False
   frmBuyall.Command23.Enabled = False
   frmBuyall.Command24.Enabled = False
   rs_buy.Close
   
   Exit Sub
End If
rs_buy.Close
strfctotal = "select 生产厂商,sum(总金额) as 各厂商进货总金额 from buy where 进货年=" & inty & " and 进货月 between " & (intm - 2) & " and " & intm & " group by 生产厂商"
rs_fctotal.Open strfctotal, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc6.RecordSource = strfctotal
frmBuyall.Adodc6.Refresh
frmBuyall.DataGrid6.ReBind
rs_fctotal.Close
strtotal = "select sum(总金额) as 进货总金额 from buy where 进货年=" & inty & " and 进货月 between " & (intm - 2) & " and " & intm & " "
rs_total.Open strtotal, cnn, adOpenKeysetm, adLockPessimistic
frmBuyall.Text3.Text = rs_total.Fields("进货总金额")
rs_total.Close

intm = Month(Date)
End Sub

Private Sub mnBuyTable_Click()
frmBuyTable.Show
End Sub

Private Sub mnBuyToday_Click()
frmBuyall.Text1.Enabled = False
frmBuyall.SSTab1.Tab = 0
frmBuyall.SSTab1.TabEnabled(0) = True
frmBuyall.SSTab1.TabEnabled(1) = False
frmBuyall.SSTab1.TabEnabled(2) = False
frmBuyall.SSTab1.TabEnabled(3) = False
frmBuyall.Show
strbuy = "select * from buy where 进货年=" & inty & " and 进货月=" & intm & " and 进货日=" & intd & " "
rs_buy.Open strbuy, cnn, adOpenKeyset, adLockPessimistic
frmBuyall.Adodc1.RecordSource = strbuy
frmBuyall.Adodc1.Refresh
frmBuyall.DataGrid1.ReBind
If rs_buy.EOF = True Then
   frmBuyall.Adodc5.RecordSource = strbuy
   frmBuyall.Adodc5.Refresh
   frmBuyall.DataGrid5.ReBind
   MsgBox "您今日没有进货记录!", vbOKOnly + vbInformation, "注意"
   frmBuyall.Command1.Enabled = False
   frmBuyall.Command2.Enabled = False
   frmBuyall.Command3.Enabled = False

⌨️ 快捷键说明

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