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

📄 frmmain.frm

📁 用VB编程语言,SQL2000数据库 连接开发系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
    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 + -