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

📄 checkoption.frm

📁 即时通讯
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":2ED2
            Key             =   "first"
         EndProperty
         BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":326C
            Key             =   "prev"
         EndProperty
         BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":3606
            Key             =   "next"
         EndProperty
         BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":39A0
            Key             =   "last"
         EndProperty
         BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":3D3A
            Key             =   "xx"
         EndProperty
         BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":40D4
            Key             =   "define"
         EndProperty
         BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":446E
            Key             =   "exec"
         EndProperty
         BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":4808
            Key             =   "xz"
         EndProperty
         BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":4BA2
            Key             =   "sc"
         EndProperty
         BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":4F3C
            Key             =   "sx"
         EndProperty
         BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":52D6
            Key             =   "cx"
         EndProperty
         BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":5670
            Key             =   "zd"
         EndProperty
         BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":5A0A
            Key             =   "dz"
         EndProperty
         BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":5DA4
            Key             =   "ph"
         EndProperty
         BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":613E
            Key             =   "fz"
         EndProperty
         BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":64D8
            Key             =   "Locate"
         EndProperty
         BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":6872
            Key             =   "hf"
         EndProperty
         BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":6C0C
            Key             =   "pz"
         EndProperty
         BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":6FA6
            Key             =   "check"
         EndProperty
         BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":7340
            Key             =   "Sum"
         EndProperty
         BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":76DA
            Key             =   "Total"
         EndProperty
         BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":7A74
            Key             =   "Detail"
         EndProperty
         BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "checkoption.frx":7E0E
            Key             =   "Order"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "checkoption"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'*    模 块 名 称 :检验产品项目管理用户操作界面
'*    功 能 描 述 :检验产品项目管理用户操作界面
'*    程序员姓名  : 黄朝和
'*    最后修改人  : 黄朝和
'*    最后修改时间:2005/09/19
'**************************************
Option Explicit
Public c_rowname As String
Private m_checkoptionDAO As checkoptionDAO
Private m_recordset As ADODB.Recordset
Dim ret As Boolean
Dim currentrow As Integer
Dim q As Integer
Private m_idList As String                      ' 在执行查询时查询到的ID列表字符串

Private Sub Form_Load()
    Set m_recordset = New ADODB.Recordset
    Set m_checkoptionDAO = New checkoptionDAO
    SetToCenter Me
    sxjl
End Sub


Private Sub Form_Resize()
    MSHFlexGrid1.Height = Me.Height - 1400
    MSHFlexGrid1.Width = Me.Width - 350
    
'    Image1.Stretch = False
    
    If (MSHFlexGrid1.Height > MSHFlexGrid1.Height - 300) Or (MSHFlexGrid1.Width > MSHFlexGrid1.Width - 200) Then
        MSHFlexGrid1.Height = MSHFlexGrid1.Height + 400
        MSHFlexGrid1.Width = MSHFlexGrid1.Width + 200
'
'        Image1.Stretch = True
    End If
End Sub

Private Sub MSHFlexGrid1_DblClick()
    checkoptionlist.c_type = 0                                                                   ' 传递参数--表示修改商品记录
    If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
        c_rowname = MSHFlexGrid1.RowSel                                              ' 选取MSHFlexGrid1的某一行的商品编号
        checkoptionlist.show 1
        If q = 1 Then
            RefreshQueryList
        Else
            sxjl
        End If
    Else
        MainForm.g_msgText = "对不起您的操作有误,请重试!!"
        Call HMsgBox(MainForm.g_msgText, 0, 1)
    End If
End Sub

Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Key
            Case "xz"
                checkoptionlist.c_type = 1                                                                      ' 参数---表示增加商品记录
                checkoptionlist.show 1
                sxjl
            Case "sx"
                q = 0
                Call sxjl
            Case "cx"
                Call cxjl
            Case "sc"
                Call delete
                Call sxjl
            Case "tc"
                Unload Me
'            Case "fq"
'                productcheckrecord.show 1
            Case "yl"
                checkoptionlist.c_type = 0                                                                   ' 传递参数--表示修改商品记录
                If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
                    c_rowname = MSHFlexGrid1.RowSel                                              ' 选取MSHFlexGrid1的某一行的商品编号
                    checkoptionlist.show 1
                    If q = 1 Then
                        RefreshQueryList
                    Else
                        sxjl
                    End If
 
                Else
                    MainForm.g_msgText = "对不起您的操作有误,请重试!!"
                    Call HMsgBox(MainForm.g_msgText, 0, 1)
                End If
    End Select
End Sub
Private Sub showform()
    MSHFlexGrid1.TextMatrix(0, 0) = "产品检验编号"
    MSHFlexGrid1.TextMatrix(0, 1) = "产品检验名称"
    MSHFlexGrid1.TextMatrix(0, 2) = "备注"
                        '设置列对齐方式  7-右对齐 5-居中对齐 2-左对齐
    MSHFlexGrid1.ColAlignment(0) = 2
    MSHFlexGrid1.ColAlignment(1) = 2
    MSHFlexGrid1.ColAlignment(2) = 2
    
    MSHFlexGrid1.ColWidth(0) = 5
    MSHFlexGrid1.ColWidth(1) = 1500
    MSHFlexGrid1.ColWidth(2) = 1500
End Sub

Private Sub sxjl()
    ret = m_checkoptionDAO.checkoption_show(m_recordset)
    MSHFlexGrid1.clear
    MSHFlexGrid1.Rows = 2
    Call showform
    
    GetRecordToList m_recordset

     m_recordset.Close
End Sub

Private Sub cxjl()
    q = 1
    QueryFom.m_currentQuery = QUERY_CHECKOPTION
    QueryFom.m_operateType = 1
    QueryFom.show 1
    ' 如果此原料已有BOM记录,则调出些条BOM的信息
    m_idList = MainForm.g_application.m_queryResultId
    
    RefreshQueryList       ' 显示查询到的结果
End Sub

Private Sub delete()                                                                        '  根据商品编号删除记录
    If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) = "" Then
        MainForm.g_msgText = "请选择一条记录!!"
        Call HMsgBox(MainForm.g_msgText, 0, 1)
        Exit Sub
    End If
    MainForm.g_msgText = "确定删除这条记录吗?"
    Dim f As String
    f = HMsgBox(MainForm.g_msgText, 2, 1)
    If f = 1 Then
        ret = m_checkoptionDAO.checkoption_delete(m_recordset, Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)))
    End If
End Sub
Private Sub RefreshQueryList()
    Dim ret As Boolean
    
    ' 显示查询到的结果
    On Error GoTo EXITFUN
    MainForm.g_application.m_databaseCon.m_adoConnection.BeginTrans    ' 开始事务
    
    InsertQueryIdList m_idList                             ' 把要显示的记录ID列表插入临时表
    ret = m_checkoptionDAO.checkoption_findbyidList(m_recordset)     ' 查找记录
    
    MainForm.g_application.m_databaseCon.m_adoConnection.CommitTrans   ' 提交事务
    
    MSHFlexGrid1.clear
    MSHFlexGrid1.Rows = 2
    showform
    If ret Then
        GetRecordToList m_recordset
    End If
    Text1.text = Trim(m_recordset.RecordCount)
    m_recordset.Close
    Exit Sub
    
EXITFUN:
    MainForm.g_application.m_databaseCon.m_adoConnection.RollbackTrans  ' 回滚事务
End Sub
'**************************************
'*    功 能 描 述 :从数据集中取出记录在列表中显示
'*    输 入 参 数 :无
'*    输 出 能 数 :无
'**************************************
Private Sub GetRecordToList(recSet As ADODB.Recordset)
    Dim currentrow As Integer
    
    With m_recordset
    '        hfg_houseList.Rows = m_recordset.RecordCount
        currentrow = 1
        Do While Not .EOF
            If currentrow > MSHFlexGrid1.Rows - 1 Then
                MSHFlexGrid1.AddItem ""
            End If
            
            '[>>自定义填充内容
                MSHFlexGrid1.TextMatrix(currentrow, 0) = Trim(.Fields("checkoptionid"))
                MSHFlexGrid1.TextMatrix(currentrow, 1) = Trim(.Fields("name"))
                MSHFlexGrid1.TextMatrix(currentrow, 2) = Trim(.Fields("memo"))
            '<<]
            '设置数据行高度(Fixed)
                MSHFlexGrid1.RowHeight(currentrow) = 300
     
            '动态集指针加1,同时将计数器加1(Fixed)
            .MoveNext
            currentrow = currentrow + 1
        Loop
    End With
    Text1.text = Trim(m_recordset.RecordCount)
End Sub

⌨️ 快捷键说明

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