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

📄 cooperatedrowmaterdao.cls

📁 即时通讯
💻 CLS
📖 第 1 页 / 共 2 页
字号:
    With recSet
        If Not .EOF Then
            FindAll = True
        Else
            FindAll = False
        End If
    End With
    
    Exit Function
    
Cwcl:
    FindAll = False
    Exit Function
End Function
'**************************************
'*    功 能 描 述 :根据发料编号取得所有发料的列表
'*    输 入 参 数 :无
'*    输 出 能 数 :True           -  数据库连接成功
'*                 False          -  数据库连接失败
'**************************************
Public Function cooperate_findid1(recSet As ADODB.Recordset, cdmid As String) As Boolean
    
    Dim cmdProc As ADODB.Command          ' 执行存储过程的命令
    
    cooperate_findid1 = False
    Set cmdProc = New ADODB.Command
    Set cmdProc.ActiveConnection = MainForm.g_application.m_databaseCon.m_adoConnection
    
    ' 执行存储过程的命令的设置
    cmdProc.CommandText = "cooperatedrowmaterial_findaid1"     ' 指定存储过程的名子
    cmdProc.CommandType = adCmdStoredProc
    cmdProc.Parameters.Refresh
    cmdProc.Parameters(1) = cdmid             ' 参数
    
    On Error GoTo Cwcl
    
    ' 执行命令 把查询到的结果放在recSet中
    With recSet
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open cmdProc
    End With
    
    With recSet
        If Not .EOF Then
            cooperate_findid1 = True
        Else
            cooperate_findid1 = False
        End If
    End With
    
    Exit Function
    
Cwcl:
    cooperate_findid1 = False
    Exit Function
End Function

'**************************************
'*    功 能 描 述 :根据发料ID取得该领料的列表
'*    输 入 参 数 :无
'*    输 出 能 数 :True           -  数据库连接成功
'*                 False          -  数据库连接失败
'**************************************
Public Function FindById(recSet As ADODB.Recordset, cdmid As String) As Boolean
    
    Dim cmdProc As ADODB.Command          ' 执行存储过程的命令
    
    FindById = False
    Set cmdProc = New ADODB.Command
    Set cmdProc.ActiveConnection = MainForm.g_application.m_databaseCon.m_adoConnection
    
    ' 执行存储过程的命令的设置
    cmdProc.CommandText = "cooperatedrowmaterial_findid"     ' 指定存储过程的名子
    cmdProc.CommandType = adCmdStoredProc
    cmdProc.Parameters.Refresh
    cmdProc.Parameters(1) = cdmid             ' 参数
    
    On Error GoTo Cwcl
    
    ' 执行命令 把查询到的结果放在recSet中
    With recSet
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open cmdProc
    End With
    
    With recSet
        If Not .EOF Then
            FindById = True
        Else
            FindById = False
        End If
    End With
    
    Exit Function
    
Cwcl:
    FindById = False
    Exit Function
End Function
'**************************************
'*    功 能 描 述 :查找仓库名称列表
'*    输 入 参 数 :无
'*    输 出 参 数 :true             -查找成功
'*                 false            -查找失败
'**************************************
Public Function cooperate_warehouse1(recSet As ADODB.Recordset, warehouseid As String) As Boolean
    
    Dim cmdProc As ADODB.Command             ' 执行存储过程的命令
    
    cooperate_warehouse1 = False
    Set cmdProc = New ADODB.Command
    Set cmdProc.ActiveConnection = MainForm.g_application.m_databaseCon.m_adoConnection
    
                                              ' 执行存储过程的命令的设置
    cmdProc.CommandText = "position_show1"     ' 指定存储过程的名子
    cmdProc.CommandType = adCmdStoredProc
    cmdProc.Parameters.Refresh
    cmdProc.Parameters(1) = warehouseid
    
    On Error GoTo Cwcl
    
                                             ' 执行命令 把查询到的结果放在recSet中
    With recSet
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open cmdProc
    End With
    
    With recSet
        If Not .EOF Then
            cooperate_warehouse1 = True
        Else
            cooperate_warehouse1 = False
        End If
    End With
    
    Exit Function
    
Cwcl:
    cooperate_warehouse1 = False
    Exit Function
End Function
Public Function FindidAll(recSet As ADODB.Recordset, cooperateId As String) As Boolean
    
    Dim cmdProc As ADODB.Command          ' 执行存储过程的命令
    
    FindidAll = False
    Set cmdProc = New ADODB.Command
    Set cmdProc.ActiveConnection = MainForm.g_application.m_databaseCon.m_adoConnection
    
    ' 执行存储过程的命令的设置
    cmdProc.CommandText = "cooperatedrowmaterial_findidall"     ' 指定存储过程的名子
    cmdProc.CommandType = adCmdStoredProc
    cmdProc.Parameters.Refresh
    cmdProc.Parameters(1) = cooperateId
    
    On Error GoTo Cwcl
    
    ' 执行命令 把查询到的结果放在recSet中
    With recSet
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open cmdProc
    End With
    
    With recSet
        If Not .EOF Then
            FindidAll = True
        Else
            FindidAll = False
        End If
    End With
    
    Exit Function
    
Cwcl:
    FindidAll = False
    Exit Function
End Function
Public Function Findidmax(recSet As ADODB.Recordset, cooperateId As String, bomId As String) As Boolean
    
    Dim cmdProc As ADODB.Command          ' 执行存储过程的命令
    
    Findidmax = False
    Set cmdProc = New ADODB.Command
    Set cmdProc.ActiveConnection = MainForm.g_application.m_databaseCon.m_adoConnection
    
    ' 执行存储过程的命令的设置
    cmdProc.CommandText = "cooperatedrowmaterial_findidmax"     ' 指定存储过程的名子
    cmdProc.CommandType = adCmdStoredProc
    cmdProc.Parameters.Refresh
    cmdProc.Parameters(1) = cooperateId
    cmdProc.Parameters(2) = bomId
    
    On Error GoTo Cwcl
    
    ' 执行命令 把查询到的结果放在recSet中
    With recSet
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open cmdProc
    End With
    
    With recSet
        If Not .EOF Then
            Findidmax = True
        Else
            Findidmax = False
        End If
    End With
    
    Exit Function
    
Cwcl:
    Findidmax = False
    Exit Function
End Function
'**************************************
'*    功 能 描 述 :查询取得所有发料单的列表
'*    输 入 参 数 :无
'*    输 出 能 数 :True           -  数据库连接成功
'*                 False          -  数据库连接失败
'**************************************
Public Function cooperatedrowmaterial_findidList(recSet As ADODB.Recordset) As Boolean
    
    Dim cmdProc As ADODB.Command          ' 执行存储过程的命令
    
    cooperatedrowmaterial_findidList = False
    Set cmdProc = New ADODB.Command
    Set cmdProc.ActiveConnection = MainForm.g_application.m_databaseCon.m_adoConnection
    
    ' 执行存储过程的命令的设置
    cmdProc.CommandText = "cooperatedrowmaterial_findidList"     ' 指定存储过程的名子
    cmdProc.CommandType = adCmdStoredProc
    
    On Error GoTo Cwcl
    
    ' 执行命令 把查询到的结果放在recSet中
    With recSet
        .CursorLocation = adUseClient
        .CursorType = adOpenDynamic
        .LockType = adLockOptimistic
        .Open cmdProc
    End With
    
    With recSet
        If Not .EOF Then
            cooperatedrowmaterial_findidList = True
        Else
            cooperatedrowmaterial_findidList = False
        End If
    End With
    
    Exit Function
    
Cwcl:
    cooperatedrowmaterial_findidList = False
    Exit Function
End Function

⌨️ 快捷键说明

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