?? frmmain.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain
BackColor = &H00FFFFC0&
Caption = "營銷管理系統"
ClientHeight = 5295
ClientLeft = 1665
ClientTop = 2415
ClientWidth = 7335
Icon = "frmMain.frx":0000
LinkTopic = "MDIForm1"
StartUpPosition = 2 '屏幕中心
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 0
Top = 5025
Width = 7335
_ExtentX = 12938
_ExtentY = 476
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 7250
Text = "Status"
TextSave = "Status"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
AutoSize = 2
TextSave = "03-11-10"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 2
TextSave = "17:03"
EndProperty
EndProperty
End
Begin VB.Menu menuSystem
Caption = "系統"
Begin VB.Menu menuModifypwd
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 Print
Caption = "打印(&P)"
Begin VB.Menu Printcustomerinfo
Caption = "顧客信息打印"
End
Begin VB.Menu Printsupplierinfo
Caption = "供應商信息打印"
End
Begin VB.Menu Printproductinfo
Caption = "商品信息打印"
End
Begin VB.Menu Printsstockinfo
Caption = "進貨信息打印"
End
Begin VB.Menu Printorderinfo
Caption = "銷售信息打印"
End
End
Begin VB.Menu mnuWindow
Caption = "窗口(&W)"
Begin VB.Menu mnuWindowCascade
Caption = "層疊(&C)"
End
Begin VB.Menu mnuWindowTileHorizontal
Caption = "橫向平鋪(&H)"
End
Begin VB.Menu mnuWindowTileVertical
Caption = "縱向平鋪(&V)"
End
Begin VB.Menu mnuWindowArrangeIcons
Caption = "排列圖標(&A)"
End
Begin VB.Menu mnurecentfile
Caption = "-"
Index = 0
End
Begin VB.Menu mnurecentfile
Caption = "產品信息列表"
Index = 1
End
Begin VB.Menu mnurecentfile
Caption = "供應商信息列表"
Index = 2
End
Begin VB.Menu mnurecentfile
Caption = "銷售信息列表"
Index = 3
End
Begin VB.Menu mnurecentfile
Caption = "進貨信息列表"
Index = 4
End
Begin VB.Menu mnurecentfile
Caption = "顧客信息列表"
Index = 5
End
End
Begin VB.Menu menuHelp
Caption = "幫助"
Begin VB.Menu menuAbout
Caption = "關于"
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)
'設置窗口的動態菜單
mnurecentfile(1).Visible = False
mnurecentfile(2).Visible = False
mnurecentfile(3).Visible = False
mnurecentfile(4).Visible = False
mnurecentfile(5).Visible = False
If grd2 = True Or grd3 = True Then
menuModifypwd.Enabled = False
MsgBox ("不是SUPERUSER,不能修改用戶及密碼!")
Else
menuModifypwd.Enabled = True
End If
If grd3 = True Then
menuModifyprovider.Enabled = False
menuDeleteprovider.Enabled = False
menuModifycustomer.Enabled = False
menuDeletecustomer.Enabled = False
menuModifygoods.Enabled = False
menuDeletegoods.Enabled = False
menuModifysell.Enabled = False
menuDeletesell.Enabled = False
menuModifystock.Enabled = False
menuDeletestock.Enabled = False
Else
menuModifyprovider.Enabled = True
menuDeleteprovider.Enabled = True
menuModifycustomer.Enabled = True
menuDeletecustomer.Enabled = True
menuModifygoods.Enabled = True
menuDeletegoods.Enabled = True
menuModifysell.Enabled = True
menuDeletesell.Enabled = True
menuModifystock.Enabled = True
menuDeletestock.Enabled = True
End If
PrintDE.Connection1.ConnectionString = ConnectString
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 menuAbout_Click()
frmAbout.Show
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
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -