?? frmmain.frm
字號(hào):
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 = "公司業(yè)務(wù)情況"
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 = "刷新數(shù)據(jù)"
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=電腦經(jīng)營(yíng)系統(tǒng)"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "電腦經(jīng)營(yíng)系統(tǒng)"
OtherAttributes = ""
UserName = ""
Password = "14813808"
RecordSource = "公司業(yè)務(wù)情況"
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= "型號(hào)和名稱"
_Band(0)._MapCol(0)._RSIndex= 0
_Band(0)._MapCol(1)._Name= "價(jià)格"
_Band(0)._MapCol(1)._RSIndex= 1
_Band(0)._MapCol(1)._Alignment= 7
_Band(0)._MapCol(2)._Name= "庫(kù)存量"
_Band(0)._MapCol(2)._RSIndex= 2
_Band(0)._MapCol(2)._Alignment= 7
_Band(0)._MapCol(3)._Name= "供應(yīng)商"
_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 = "供應(yīng)商"
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 = "價(jià)格(元)"
ForeColor = &H00800000&
Height = 375
Left = 2760
TabIndex = 5
Top = 840
Width = 975
End
Begin VB.Label Label2
BackColor = &H00808080&
Caption = "圖書(shū)名稱"
ForeColor = &H00800000&
Height = 255
Left = 720
TabIndex = 4
Top = 840
Width = 1095
End
Begin VB.Label Label1
BackColor = &H00808080&
Caption = "歡 迎 查 看 公 司 信 息 表"
BeginProperty Font
Name = "隸書(shū)"
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 = "系統(tǒng)"
Begin VB.Menu adduser
Caption = "增加用戶"
End
Begin VB.Menu modifypassword
Caption = "修改密碼"
End
Begin VB.Menu exit
Caption = "退出"
End
End
Begin VB.Menu sellandstock
Caption = "進(jìn)銷管理"
Begin VB.Menu stock
Caption = "進(jìn)貨管理"
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 = "報(bào)表打印"
Begin VB.Menu presstable1
Caption = "公司業(yè)務(wù)情況"
End
Begin VB.Menu yeji
Caption = "員工業(yè)績(jī)"
End
End
Begin VB.Menu help
Caption = "幫助"
Begin VB.Menu message
Caption = "系統(tǒng)信息"
End
Begin VB.Menu online
Caption = "網(wǎng)上服務(wù)"
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 = "供應(yīng)商信息查看與修改"
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()
'數(shù)據(jù)刷新
Adodc1.Refresh
MSHF.Refresh
End Sub
Private Sub exit_Click()
'退出系統(tǒng)
HXFYN = MsgBox("是否退出系統(tǒng)?", 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("是否退出系統(tǒng)?", 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=電腦經(jīng)營(yíng)系統(tǒng)", ";pwd=14813808"
Set ado = New ADODB.Recordset
ado.Open "select * from 公司業(yè)務(wù)情況", conn, adOpenStatic, adLockOptimistic
ado.Update
Set ado1 = New ADODB.Recordset
ado1.Open "select * from 用戶注冊(cè)", conn, adOpenStatic, adLockOptimistic
ado1.Update
Set ado2 = New ADODB.Recordset
ado2.Open "select * from 統(tǒng)計(jì)", 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()
'系統(tǒng)信息
Load frmAbout
frmAbout.Show
End Sub
Private Sub modifypassword_Click()
Load frmmodifyid
frmmodifyid.Show
End Sub
Private Sub online_Click()
'網(wǎng)上服務(wù)
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()
'進(jìn)貨管理
Load add
add.Show
End Sub
Private Sub bossmanage_Click()
'老板管理
Set conn = New ADODB.Connection
conn.Open "DSN=電腦經(jīng)營(yíng)系統(tǒng)", ";pwd=14813808"
Set adoch = New ADODB.Recordset
adoch.Open "select * from 用戶注冊(cè) where 姓名= '" & Trim(xingming) & "'", conn, 3, 2
If adoch("標(biāo)記") = False Then
MsgBox "對(duì)不起,您不是老板!", vbDefaultButton1 + vbExclamation, "系統(tǒng)提示"
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
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -