?? frmmain.frm
字號:
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 menuExit_Click()
Unload Me
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 menuModifypwd_Click()
frmuser.Show
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
Private Sub mnurecentfile_Click(Index As Integer)
Select Case Index
Case 1
frmProduct.ZOrder
Case 2
frmProvider.ZOrder
Case 3
frmSell.ZOrder
Case 4
frmStock.ZOrder
Case 5
frmCustomer.ZOrder
End Select
End Sub
Private Sub Printcustomerinfo_Click()
Dim i As Integer
'判斷是否已瀏覽顧客信息,如果沒有就打印全部信息
If frmCustomer.txtSQL = "" Then
frmCustomer.txtSQL = "select * from customers"
End If
'在多次打印,查詢變化時,對數據環境內的子命令更新
If PrintDE.rscustomercmd.State = 1 Then '1 為打開
PrintDE.rscustomercmd.Close
End If
PrintDE.rscustomercmd.Open frmCustomer.txtSQL
Set customerrpt.DataSource = PrintDE
customerrpt.Sections(2).Controls(1).Caption = "公司名稱"
customerrpt.Sections(2).Controls(2).Caption = "聯系人姓名"
customerrpt.Sections(2).Controls(3).Caption = "聯系地址"
customerrpt.Sections(2).Controls(4).Caption = "郵政編碼"
customerrpt.Sections(2).Controls(5).Caption = "電話號碼"
customerrpt.Sections(2).Controls(6).Caption = "傳真號碼"
customerrpt.Sections(2).Controls(7).Caption = "備注信息"
customerrpt.Show
End Sub
Private Sub Printorderinfo_Click()
Dim i As Integer
'判斷是否已瀏覽銷售信息,如果沒有就打印全部信息
If frmSell.txtSQL = "" Then
frmSell.txtSQL = "select * from orders"
End If
'在多次打印,查詢變化時,對數據環境內的子命令更新
If PrintDE.rsordercmd.State = 1 Then '1 為打開
PrintDE.rsordercmd.Close
End If
PrintDE.rsordercmd.Open frmSell.txtSQL
Set orderrpt.DataSource = PrintDE
orderrpt.Sections(2).Controls(1).Caption = "顧客名稱"
orderrpt.Sections(2).Controls(2).Caption = "商品名稱"
orderrpt.Sections(2).Controls(3).Caption = "商品規格"
orderrpt.Sections(2).Controls(4).Caption = "商品單位"
orderrpt.Sections(2).Controls(5).Caption = "商品數量"
orderrpt.Sections(2).Controls(6).Caption = "商品單價"
orderrpt.Sections(2).Controls(7).Caption = "銷售日期"
orderrpt.Show
End Sub
Private Sub Printproductinfo_Click()
Dim i As Integer
'判斷是否已瀏覽商品信息,如果沒有就打印全部信息
If frmProduct.txtSQL = "" Then
frmProduct.txtSQL = "select * from products"
End If
'在多次打印,查詢變化時,對數據環境內的子命令更新
If PrintDE.rsproductcmd.State = 1 Then '1 為打開
PrintDE.rsproductcmd.Close
End If
PrintDE.rsproductcmd.Open frmProduct.txtSQL
Set productrpt.DataSource = PrintDE
productrpt.Sections(2).Controls(1).Caption = "商品名稱"
productrpt.Sections(2).Controls(2).Caption = "商品規格"
productrpt.Sections(2).Controls(3).Caption = "商品單位"
productrpt.Sections(2).Controls(4).Caption = "備注信息"
productrpt.Show
End Sub
Private Sub Printsstockinfo_Click()
Dim i As Integer
'判斷是否已瀏覽進貨信息,如果沒有就打印全部信息
If frmStock.txtSQL = "" Then
frmStock.txtSQL = "select * from sstock"
End If
'在多次打印,查詢變化時,對數據環境內的子命令更新
If PrintDE.rssstockcmd.State = 1 Then '1 為打開
PrintDE.rssstockcmd.Close
End If
PrintDE.rssstockcmd.Open frmStock.txtSQL
Set sstockrpt.DataSource = PrintDE
sstockrpt.Sections(2).Controls(1).Caption = "供應商名稱"
sstockrpt.Sections(2).Controls(2).Caption = "商品名稱"
sstockrpt.Sections(2).Controls(3).Caption = "商品規格"
sstockrpt.Sections(2).Controls(4).Caption = "商品單位"
sstockrpt.Sections(2).Controls(5).Caption = "商品數量"
sstockrpt.Sections(2).Controls(6).Caption = "商品單價"
sstockrpt.Sections(2).Controls(7).Caption = "進貨日期"
sstockrpt.Sections(2).Controls(8).Caption = "備注信息"
sstockrpt.Show
End Sub
Private Sub Printsupplierinfo_Click()
Dim i As Integer
'判斷是否已瀏覽供應商信息,如果沒有就打印全部信息
If frmProvider.txtSQL = "" Then
frmProvider.txtSQL = "select * from suppliers"
End If
'在多次打印,查詢變化時,對數據環境內的子命令更新
If PrintDE.rssuppliercmd.State = 1 Then '1 為打開
PrintDE.rssuppliercmd.Close
End If
PrintDE.rssuppliercmd.Open frmProvider.txtSQL
Set supplierrpt.DataSource = PrintDE
supplierrpt.Sections(2).Controls(1).Caption = "供應商名稱"
supplierrpt.Sections(2).Controls(2).Caption = "聯系人姓名"
supplierrpt.Sections(2).Controls(3).Caption = "聯系地址"
supplierrpt.Sections(2).Controls(4).Caption = "郵政編碼"
supplierrpt.Sections(2).Controls(5).Caption = "電話號碼"
supplierrpt.Sections(2).Controls(6).Caption = "傳真號碼"
supplierrpt.Sections(2).Controls(7).Caption = "備注信息"
supplierrpt.Show
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -