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

📄 frmmain.frm

📁 这是用VB+SQL编写的贸易信息管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain 
   BackColor       =   &H8000000C&
   Caption         =   "贸易公司管理信息系统"
   ClientHeight    =   5304
   ClientLeft      =   132
   ClientTop       =   732
   ClientWidth     =   7344
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  'Windows Default
   Begin MSComctlLib.StatusBar sbStatusBar 
      Align           =   2  'Align Bottom
      Height          =   264
      Left            =   0
      TabIndex        =   0
      Top             =   5040
      Width           =   7344
      _ExtentX        =   12954
      _ExtentY        =   466
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   3
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   7345
            Text            =   "Status"
            TextSave        =   "Status"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            AutoSize        =   2
            TextSave        =   "2002-1-11"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            TextSave        =   "14:49"
         EndProperty
      EndProperty
   End
   Begin VB.Menu menuSystem 
      Caption         =   "系统"
      Begin VB.Menu menuModifypwd 
         Caption         =   "修改密码"
      End
      Begin VB.Menu menuAdduser 
         Caption         =   "添加用户"
      End
      Begin VB.Menu menuExit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu menuCustom 
      Caption         =   "客户信息管理"
      Begin VB.Menu menuProvider 
         Caption         =   "供应商信息管理"
         Begin VB.Menu menuAddprovider 
            Caption         =   "添加供应商信息"
         End
         Begin VB.Menu menuModifyprovider 
            Caption         =   "修改供应商信息"
         End
         Begin VB.Menu menuDeleteprovider 
            Caption         =   "删除供应商信息"
         End
         Begin VB.Menu menuInquireprovider 
            Caption         =   "查询供应商信息"
         End
      End
      Begin VB.Menu menuCustomers 
         Caption         =   "顾客信息管理"
         Begin VB.Menu menuAddcustomer 
            Caption         =   "添加顾客信息"
         End
         Begin VB.Menu menuModifycustomer 
            Caption         =   "修改顾客信息"
         End
         Begin VB.Menu menuDeletecustomer 
            Caption         =   "删除顾客信息"
         End
         Begin VB.Menu menuInquirecustomer 
            Caption         =   "查询顾客信息"
         End
      End
   End
   Begin VB.Menu menuGoods 
      Caption         =   "商品信息管理"
      Begin VB.Menu menuAddgoods 
         Caption         =   "添加商品信息"
      End
      Begin VB.Menu menuModifygoods 
         Caption         =   "修改商品信息"
      End
      Begin VB.Menu menuDeletegoods 
         Caption         =   "删除商品信息"
      End
   End
   Begin VB.Menu menuSS 
      Caption         =   "营销信息管理"
      Begin VB.Menu menuStock 
         Caption         =   "进货信息管理"
         Begin VB.Menu menuAddstock 
            Caption         =   "添加进货信息"
         End
         Begin VB.Menu menuModifystock 
            Caption         =   "修改进货信息"
         End
         Begin VB.Menu menuDeletestock 
            Caption         =   "删除进货信息"
         End
         Begin VB.Menu menuInquirestock 
            Caption         =   "查询进货信息"
         End
      End
      Begin VB.Menu menuSell 
         Caption         =   "销售信息管理"
         Begin VB.Menu menuAddsell 
            Caption         =   "添加销售信息"
         End
         Begin VB.Menu menuModifysell 
            Caption         =   "修改销售信息"
         End
         Begin VB.Menu menuDeletesell 
            Caption         =   "删除销售信息"
         End
         Begin VB.Menu menuInquiresell 
            Caption         =   "查询销售信息"
         End
      End
   End
   Begin VB.Menu menuHelp 
      Caption         =   "帮助"
      Begin VB.Menu menuAbout 
         Caption         =   "About"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub MDIForm_Load()
    Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
    Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
    Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
    Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
    
End Sub





Private Sub MDIForm_Unload(Cancel As Integer)
    If Me.WindowState <> vbMinimized Then
        SaveSetting App.Title, "Settings", "MainLeft", Me.Left
        SaveSetting App.Title, "Settings", "MainTop", Me.Top
        SaveSetting App.Title, "Settings", "MainWidth", Me.Width
        SaveSetting App.Title, "Settings", "MainHeight", Me.Height
    End If
End Sub

Private Sub menuAddcustomer_Click()
    gintCmode = 1
    frmCustomer1.Show
    frmCustomer1.ZOrder 0
End Sub

Private Sub menuAddgoodstype_Click()

End Sub

Private Sub menuAddgoods_Click()
    gintGmode = 1
    frmProduct1.Show
    frmProduct1.ZOrder 0
End Sub

Private Sub menuAddprovider_Click()
    gintPmode = 1
    frmProvider1.Show
    frmProvider1.ZOrder 0
End Sub

Private Sub menuAddsell_Click()
    gintOmode = 1
    frmSell1.Show
    frmSell1.ZOrder 0
End Sub

Private Sub menuAddstock_Click()
    gintSmode = 1
    frmStock1.Show
    frmStock1.ZOrder 0
End Sub

Private Sub menuDeletecustomer_Click()
    Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    
    
    If flagCedit Then
        If frmCustomer.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmCustomer.msgList.Row
                txtSQL = "delete from customers where CustomerID ='" & Trim(frmCustomer.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtSQL, MsgText)
                
                Unload frmCustomer
                frmCustomer.txtSQL = "select * from customers"
                frmCustomer.Show
            End If
        End If
    End If
End Sub

Private Sub menuDeletegoods_Click()
    Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim mrcc As ADODB.Recordset
    Dim MsgText As String
    
    
    If flagGedit Then
        If frmProduct.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmProduct.msgList.Row
                txtSQL = "delete from products where ProductID ='" & Trim(frmProduct.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtSQL, MsgText)
                
                
                Unload frmProduct
                frmProduct.txtSQL = "select * from products"
                frmProduct.Show
            End If
        End If
    End If
End Sub

Private Sub menuDeleteprovider_Click()
    Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    
    
    If flagPedit Then
        If frmProvider.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmProvider.msgList.Row
                txtSQL = "delete from suppliers where SupplierID ='" & Trim(frmProvider.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtSQL, MsgText)
                
                Unload frmProvider
                frmProvider.txtSQL = "select * from suppliers"
                frmProvider.Show
            End If
        End If
    End If
End Sub

Private Sub menuDeletesell_Click()
    Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    
    
    If flagOedit Then
        If frmSell.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmSell.msgList.Row
                txtSQL = "delete from orders where OrderID ='" & Trim(frmSell.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtSQL, MsgText)
                
                Unload frmSell
                frmSell.txtSQL = "select * from orders"
                frmSell.Show
            End If
        End If
    End If
End Sub

Private Sub menuDeletestock_Click()
    Dim txtSQL As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    
    
    If flagSedit Then
        If frmStock.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmStock.msgList.Row
                txtSQL = "delete from sstock where StockID ='" & Trim(frmStock.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtSQL, MsgText)
                
                Unload frmStock
                frmStock.txtSQL = "select * from sstock"
                frmStock.Show
            End If
        End If
    End If
End Sub

Private Sub menuInquirecustomer_Click()
    frmCustomer2.Show
End Sub

Private Sub menuInquiregoods_Click()
    frmProduct2.Show
End Sub

Private Sub menuInquireprovider_Click()
    frmProvider2.Show
End Sub

Private Sub menuInquiresell_Click()
    frmSell2.Show
End Sub

Private Sub menuInquirestock_Click()
    frmStock2.Show
End Sub

Private Sub menuModifycustomer_Click()
    Dim intCount As Integer
    If flagCedit Then
        If frmCustomer.msgList.Rows > 1 Then
            gintCmode = 2
            intCount = frmCustomer.msgList.Row
            frmCustomer1.txtSQL = "select * from customers where CustomerID ='" & Trim(frmCustomer.msgList.TextMatrix(intCount, 1)) & "'"
            frmCustomer1.Show
        Else
            Call menuAddcustomer_Click
        End If
    Else
        frmCustomer.txtSQL = "select * from customers"
        frmCustomer.Show
    End If
End Sub

Private Sub menuModifygoods_Click()
    Dim intCount As Integer
    If flagGedit Then
        If frmProduct.msgList.Rows > 1 Then
            gintGmode = 2
            intCount = frmProduct.msgList.Row
            frmProduct1.txtSQL = "select * from products where ProductID ='" & Trim(frmProduct.msgList.TextMatrix(intCount, 1)) & "'"
            frmProduct1.Show
        Else
            Call menuAddgoods_Click
        End If
    Else
        frmProduct.txtSQL = "select * from products"
        frmProduct.Show
    End If
End Sub

Private Sub menuModifyprovider_Click()
    Dim intCount As Integer
    If flagPedit Then
        If frmProvider.msgList.Rows > 1 Then
            gintPmode = 2
            intCount = frmProvider.msgList.Row
            frmProvider1.txtSQL = "select * from suppliers where SupplierID ='" & Trim(frmProvider.msgList.TextMatrix(intCount, 1)) & "'"
            frmProvider1.Show
        Else
            Call menuAddprovider_Click
        End If
    Else
        frmProvider.txtSQL = "select * from suppliers"
        frmProvider.Show
    End If
End Sub

Private Sub menuModifysell_Click()
    Dim intCount As Integer
    If flagOedit Then
        If frmSell.msgList.Rows > 1 Then
            gintOmode = 2
            intCount = frmSell.msgList.Row
            frmSell1.txtSQL = "select * from orders where OrderID ='" & Trim(frmSell.msgList.TextMatrix(intCount, 1)) & "'"
            frmSell1.Show
        Else
            Call menuAddsell_Click
        End If
    Else
        frmSell.txtSQL = "select * from orders"
        frmSell.Show
    End If
End Sub

Private Sub menuModifystock_Click()
    Dim intCount As Integer
    If flagSedit Then
        If frmStock.msgList.Rows > 1 Then
            gintSmode = 2
            intCount = frmStock.msgList.Row
            frmStock1.txtSQL = "select * from sstock where StockID ='" & Trim(frmStock.msgList.TextMatrix(intCount, 1)) & "'"
            frmStock1.Show
        Else
            Call menuAddstock_Click
        End If
    Else
        frmStock.txtSQL = "select * from sstock"
        frmStock.Show
    End If
End Sub

⌨️ 快捷键说明

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