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

📄 frmmain.frm

📁 本系统是根据企业的特点
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{0ECD9B60-23AA-11D0-B351-00A0C9055D8E}#6.0#0"; "MSHFLXGD.OCX"
Begin VB.Form frmMain 
   BackColor       =   &H00808080&
   Caption         =   "公司业务情况"
   ClientHeight    =   6990
   ClientLeft      =   165
   ClientTop       =   795
   ClientWidth     =   9555
   ForeColor       =   &H00000000&
   LinkTopic       =   "Form1"
   ScaleHeight     =   6990
   ScaleWidth      =   9555
   StartUpPosition =   3  '窗口缺省
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   255
      Left            =   0
      TabIndex        =   0
      Top             =   6735
      Width           =   9555
      _ExtentX        =   16854
      _ExtentY        =   450
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   16351
         EndProperty
      EndProperty
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00C0C0C0&
      Caption         =   "刷新数据"
      Height          =   375
      Left            =   7800
      MaskColor       =   &H008080FF&
      TabIndex        =   1
      Top             =   240
      Width           =   1215
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   3120
      Top             =   6720
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=电脑经营系统"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "电脑经营系统"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   "14813808"
      RecordSource    =   "公司业务情况"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHF 
      Bindings        =   "frmMain.frx":0000
      Height          =   5295
      Left            =   720
      TabIndex        =   2
      Top             =   1200
      Width           =   8655
      _ExtentX        =   15266
      _ExtentY        =   9340
      _Version        =   393216
      ForeColor       =   0
      Rows            =   3
      Cols            =   5
      FixedRows       =   0
      FixedCols       =   0
      BackColorFixed  =   0
      BackColorBkg    =   16777215
      BackColorUnpopulated=   8421504
      FocusRect       =   0
      HighLight       =   2
      SelectionMode   =   1
      AllowUserResizing=   3
      _NumberOfBands  =   1
      _Band(0).Cols   =   5
      _Band(0)._NumMapCols=   5
      _Band(0)._MapCol(0)._Name=   "型号和名称"
      _Band(0)._MapCol(0)._RSIndex=   0
      _Band(0)._MapCol(1)._Name=   "价格"
      _Band(0)._MapCol(1)._RSIndex=   1
      _Band(0)._MapCol(1)._Alignment=   7
      _Band(0)._MapCol(2)._Name=   "库存量"
      _Band(0)._MapCol(2)._RSIndex=   2
      _Band(0)._MapCol(2)._Alignment=   7
      _Band(0)._MapCol(3)._Name=   "供应商"
      _Band(0)._MapCol(3)._RSIndex=   3
      _Band(0)._MapCol(4)._Name=   "备注"
      _Band(0)._MapCol(4)._RSIndex=   4
   End
   Begin VB.Label Label6 
      BackColor       =   &H00808080&
      Caption         =   "备注"
      ForeColor       =   &H00800000&
      Height          =   255
      Left            =   6600
      TabIndex        =   8
      Top             =   840
      Width           =   1575
   End
   Begin VB.Label Label5 
      BackColor       =   &H00808080&
      Caption         =   "供应商"
      ForeColor       =   &H00800000&
      Height          =   375
      Left            =   4920
      TabIndex        =   7
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label4 
      BackColor       =   &H00808080&
      Caption         =   "存货量"
      ForeColor       =   &H00800000&
      Height          =   375
      Left            =   3720
      TabIndex        =   6
      Top             =   840
      Width           =   1095
   End
   Begin VB.Label Label3 
      BackColor       =   &H00808080&
      Caption         =   "价格(元)"
      ForeColor       =   &H00800000&
      Height          =   375
      Left            =   2760
      TabIndex        =   5
      Top             =   840
      Width           =   975
   End
   Begin VB.Label Label2 
      BackColor       =   &H00808080&
      Caption         =   "图书名称"
      ForeColor       =   &H00800000&
      Height          =   255
      Left            =   720
      TabIndex        =   4
      Top             =   840
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackColor       =   &H00808080&
      Caption         =   "欢 迎 查 看 公 司 信 息 表"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   495
      Left            =   1200
      TabIndex        =   3
      Top             =   120
      Width           =   6135
   End
   Begin VB.Menu menusystem 
      Caption         =   "系统"
      Begin VB.Menu adduser 
         Caption         =   "增加用户"
      End
      Begin VB.Menu modifypassword 
         Caption         =   "修改密码"
      End
      Begin VB.Menu exit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu sellandstock 
      Caption         =   "进销管理"
      Begin VB.Menu stock 
         Caption         =   "进货管理"
      End
      Begin VB.Menu sell 
         Caption         =   "销售管理"
      End
   End
   Begin VB.Menu manage 
      Caption         =   "老板管理"
      Begin VB.Menu bossmanage 
         Caption         =   "员工及信息查询"
      End
   End
   Begin VB.Menu table 
      Caption         =   "报表打印"
      Begin VB.Menu presstable1 
         Caption         =   "公司业务情况"
      End
      Begin VB.Menu yeji 
         Caption         =   "员工业绩"
      End
   End
   Begin VB.Menu help 
      Caption         =   "帮助"
      Begin VB.Menu message 
         Caption         =   "系统信息"
      End
      Begin VB.Menu online 
         Caption         =   "网上服务"
      End
   End
   Begin VB.Menu menuinquire 
      Caption         =   "查询"
      Begin VB.Menu inquire 
         Caption         =   "信息查询"
      End
   End
   Begin VB.Menu menukehu 
      Caption         =   "客户管理"
      Begin VB.Menu customer 
         Caption         =   "顾客信息查看与修改"
      End
      Begin VB.Menu supplier 
         Caption         =   "供应商信息查看与修改"
      End
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False






Private Sub Command1_Click()
'数据刷新
Adodc1.Refresh
MSHF.Refresh
End Sub







Private Sub exit_Click()
'退出系统
HXFYN = MsgBox("是否退出系统?", 36, "信息提示")
       If HXFYN = vbYes Then
         If Adodc1.Recordset.RecordCount > 0 Then
            Adodc1.Recordset.MoveFirst
         End If
         If Adodc1.Recordset.RecordCount > 0 Then
            Adodc1.Recordset.MoveFirst
         End If
         End
      End If
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyHome
       If Adodc1.Recordset.RecordCount > 0 Then
         Adodc1.Recordset.MoveFirst
       End If
       If Adodc1.Recordset.RecordCount > 0 Then
         Adodc1.Recordset.MoveFirst
       End If
    Case vbKeyPageUp
        Call Command2_Click
    Case vbKeyPageDown
        Call Command3_Click
    Case vbKeyEnd
        If Adodc1.Recordset.RecordCount > 0 Then
         Adodc1.Recordset.MoveFirst
       End If
     If Adodc1.Recordset.RecordCount > 0 Then
         Adodc1.Recordset.MoveLast
      End If
    Case vbKeyF6
       Call findyp
    Case vbKeyEscape
       HXFYN = MsgBox("是否退出系统?", 36, "信息提示")
       If HXFYN = vbYes Then
         If Adodc1.Recordset.RecordCount > 0 Then
            Adodc1.Recordset.MoveFirst
         End If
         If Adodc1.Recordset.RecordCount > 0 Then
            Adodc1.Recordset.MoveFirst
         End If
         End
      End If
    End Select

End Sub

Private Sub Form_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)
    MSHF.ColWidth(0) = 2000
    MSHF.ColWidth(1) = 1000
    MSHF.ColWidth(2) = 1000
    MSHF.ColWidth(3) = 1000
    MSHF.ColWidth(4) = 10000
    Set conn = New ADODB.Connection
    conn.Open "DSN=电脑经营系统", ";pwd=14813808"
    Set ado = New ADODB.Recordset
    ado.Open "select * from 公司业务情况", conn, adOpenStatic, adLockOptimistic
    ado.Update
    Set ado1 = New ADODB.Recordset
    ado1.Open "select * from 用户注册", conn, adOpenStatic, adLockOptimistic
    ado1.Update
    Set ado2 = New ADODB.Recordset
    ado2.Open "select * from 统计", conn, adOpenStatic, adLockOptimistic
    ado2.Update
      Set adokehu = New ADODB.Recordset
    adokehu.Open "select * from 顾客", conn, adOpenStatic, adLockOptimistic
     ado2.Update
    
    
End Sub





Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
  
   Dim ws As Workspace
   Dim DB As Database
   Dim rs As Recordset
   
   For Each ws In Workspaces
       For Each DB In ws.Databases
           For Each rs In DB.Recordsets
               rs.Close
               Set rs = Nothing
           Next
           DB.Close
           Set DB = Nothing
       Next
       ws.Close
       Set ws = Nothing
   Next
    Dim i As Integer
    'close all sub forms
         If Adodc1.Recordset.RecordCount > 0 Then
            Adodc1.Recordset.MoveFirst
         End If
         If Adodc1.Recordset.RecordCount > 0 Then
            Adodc1.Recordset.MoveFirst
         End If
    
    For i = Forms.Count - 1 To 1 Step -1
        Unload Forms(i)
    Next
    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 adduser_Click()
Load frmadduser
frmadduser.Show
End Sub

Private Sub inquire_Click()
Load frminquire
frminquire.Show

End Sub

Private Sub message_Click()
'系统信息
Load frmAbout
frmAbout.Show
End Sub

Private Sub modifypassword_Click()
Load frmmodifyid
frmmodifyid.Show
End Sub

Private Sub online_Click()
'网上服务
Load frmBrowse
frmBrowse.Show
End Sub

Private Sub presstable_Click()
Load DataReport1
DataReport1.Show
End Sub

Private Sub presstable1_Click()
DataReport1.Show

End Sub

Private Sub sell_Click()
'销售管理
Load Frmsell
Frmsell.Show
End Sub

Private Sub stock_Click()
'进货管理
Load add
add.Show
End Sub
Private Sub bossmanage_Click()
'老板管理
Set conn = New ADODB.Connection
              conn.Open "DSN=电脑经营系统", ";pwd=14813808"
              Set adoch = New ADODB.Recordset
              adoch.Open "select * from 用户注册 where 姓名= '" & Trim(xingming) & "'", conn, 3, 2
         If adoch("标记") = False Then
         MsgBox "对不起,您不是老板!", vbDefaultButton1 + vbExclamation, "系统提示"
            Exit Sub
        Else
Me.Hide
Load frmadm
frmadm.Show
End If

End Sub

Private Sub supplier_Click()
Load frmsupplier
frmsupplier.Show
End Sub

Private Sub yeji_Click()
DataReport2.Show

End Sub
Private Sub customer_Click()
Load frmcustomer
frmcustomer.Show

End Sub

⌨️ 快捷键说明

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