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

📄 frmmain.frm

📁 一个简单的用vb制作的公司贸易管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:

Private Sub menuAddLinkman1_Click()
    gintAmode = 1
    frmLinkman4.Show
    frmLinkman4.ZOrder 0
    frmLinkman4.txtItem(3).Text = frmProvider1.txtItem(0).Text
    frmLinkman4.Combo1.Text = frmProvider1.txtItem(0).Text
End Sub

Public 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
    FrmRKD.Show
    FrmRKD.ZOrder 0
End Sub

Private Sub menuAdduser_Click()

    frmAdduser.Show vbModal

End Sub

Private Sub menucompanyinfo_Click()

    frmCompany_info.Show 1

End Sub

Public 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

Public 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

    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 menuDeleteLinkman_Click()
    Dim txtsql As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim Msgtext As String

    If flagLedit Then
        If frmLinkman.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmLinkman.msgList.Row
                txtsql = "delete from 公司联系人 where 联系人ID ='" & Trim(frmLinkman.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtsql, Msgtext)

                Unload frmLinkman
                frmLinkman.txtsql = "select * from 公司联系人"
                frmLinkman.Show
            End If
        End If
    End If
End Sub

Private Sub menuDeleteLinkman1_Click()
    Dim txtsql As String
    Dim intCount As Integer
    Dim mrc As ADODB.Recordset
    Dim Msgtext As String

    If flagAedit Then
        If frmLinkman3.msgList.Rows > 1 Then
            If MsgBox("真的要删除这条文件记录么?", vbOKCancel + vbExclamation, "警告") = vbOK Then
                intCount = frmLinkman3.msgList.Row
                txtsql = "delete from 工厂联系人 where 联系人ID ='" & Trim(frmLinkman3.msgList.TextMatrix(intCount, 1)) & "'"
                Set mrc = ExecuteSQL(txtsql, Msgtext)

                Unload frmLinkman3
                frmLinkman3.txtsql = "select * from 工厂联系人"
                frmLinkman3.Show
            End If
        End If
    End If
End Sub

Public 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()
    End

End Sub

Public Sub menuInquirecustomer_Click()
    frmCustomer2.Show
End Sub

Public Sub menuInquiregoods_Click()
    frmProduct1.Show
End Sub

Private Sub menuInquireLinkman_Click()
    frmLinkman2.Show

End Sub

Private Sub menuInquireLinkman1_Click()
    frmLinkman5.Show
End Sub

Public Sub menuInquireprovider_Click()
    frmProvider2.Show
End Sub

'Private Sub menuInquiresell_Click()
'    frmSell2.Show
'End Sub
'
'Private Sub menuInquirestock_Click()
'    frmStock2.Show
'End Sub

Public 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

Public 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 menuModifyLinkman_Click()
    Dim intCount As Integer
    If flagLedit Then
        If frmLinkman.msgList.Rows > 1 Then
            gintLmode = 2
            intCount = frmLinkman.msgList.Row
            frmLinkman1.txtsql = "select * from 公司联系人  where 联系人ID ='" & Trim(frmLinkman.msgList.TextMatrix(intCount, 1)) & "'"
            frmLinkman1.Show
        Else
            Call menuAddLinkman_Click
        End If
    Else
        frmLinkman.txtsql = "select * from 公司联系人"
        frmLinkman.Show
    End If
End Sub

Private Sub menuModifyLinkman1_Click()
    Dim intCount As Integer
    If flagAedit Then
        If frmLinkman3.msgList.Rows > 1 Then
            gintAmode = 2
            intCount = frmLinkman3.msgList.Row
            frmLinkman4.txtsql = "select * from 工厂联系人  where 联系人ID ='" & Trim(frmLinkman3.msgList.TextMatrix(intCount, 1)) & "'"
            frmLinkman4.Show
        Else
            Call menuAddLinkman1_Click
        End If
    Else
        frmLinkman3.txtsql = "select * from 工厂联系人"
        frmLinkman3.Show
    End If
End Sub

Public 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()
    frmPsw.Show vbModal

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 menuQdOrder_Click()
    FrmRKHZ.Show 1
End Sub

Private Sub menuQdsell_Click()
    FrmFPHZ.Show 1

End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
      Case Is = "sell"
        FrmSELL.Show 1
      Case Is = "rkd"
        FrmRKD.Show 1
      Case Is = "product"
        'Call menuModifygoods_Click
        frmProduct.txtsql = "select * from products"
        frmProduct.Show
      Case Is = "customer"
        'Call menuModifycustomer_Click
        frmCustomer.txtsql = "select * from customers"
        frmCustomer.Show
      Case Is = "provider"
        'Call menuModifyprovider_Click
        frmProvider.txtsql = "select * from suppliers"
        frmProvider.Show
      Case Is = "Exit"
        Unload Me
    End Select
End Sub

⌨️ 快捷键说明

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