📄 checkoptiongroup.frm
字号:
Key = "last"
EndProperty
BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":3D3A
Key = "xx"
EndProperty
BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":40D4
Key = "define"
EndProperty
BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":446E
Key = "exec"
EndProperty
BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":4808
Key = "xz"
EndProperty
BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":4BA2
Key = "sc"
EndProperty
BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":4F3C
Key = "sx"
EndProperty
BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":52D6
Key = "cx"
EndProperty
BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":5670
Key = "zd"
EndProperty
BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":5A0A
Key = "dz"
EndProperty
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":5DA4
Key = "ph"
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":613E
Key = "fz"
EndProperty
BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":64D8
Key = "Locate"
EndProperty
BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":6872
Key = "hf"
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":6C0C
Key = "pz"
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":6FA6
Key = "check"
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":7340
Key = "Sum"
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":76DA
Key = "Total"
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":7A74
Key = "Detail"
EndProperty
BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "CheckOptionGroup.frx":7E0E
Key = "Order"
EndProperty
EndProperty
End
End
Attribute VB_Name = "CheckOptionGroup"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**************************************
'* 模 块 名 称 :检验产品项目组管理用户操作界面
'* 功 能 描 述 :检验产品项目组管理用户操作界面
'* 程序员姓名 : 黄朝和
'* 最后修改人 : 黄朝和
'* 最后修改时间:2005/09/19
'**************************************
Option Explicit
Public z_rowname As String
Private m_checkoptiongroupDAO As checkoptiongroupDAO
Private m_recordset As ADODB.Recordset
Dim ret As Boolean
Dim currentrow As Integer
Public j_rowname As String
Private q As Integer
Private m_idList As String ' 在执行查询时查询到的ID列表字符串
Private Sub Form_Load()
Set m_recordset = New ADODB.Recordset
Set m_checkoptiongroupDAO = New checkoptiongroupDAO
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()
checkoptiongrouplist.z_type = 0 ' 传递参数--表示修改商品记录
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
z_rowname = MSHFlexGrid1.RowSel ' 选取MSHFlexGrid1的某一行的商品编号
checkoptiongrouplist.show 1
If q = 1 Then
RefreshQueryList
Else
sxjl
End If
Else
MainForm.g_msgText = "对不起您的操作有误,请重试!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
End If
End Sub
Private Sub Tlb_Action_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "xz"
checkoptiongrouplist.z_type = 1 ' 参数---表示增加商品记录
checkoptiongrouplist.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"
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
Dim rec As ADODB.Recordset
Set rec = New ADODB.Recordset
m_checkoptiongroupDAO.CheckOptionGroup_findbyjybj rec, Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.RowSel, 0))
Do While Not rec.EOF
If Trim(rec.Fields("检验标记")) = "1" Or Trim(rec.Fields("检验标记")) = "2" Or Trim(rec.Fields("检验标记")) = "3" Or Trim(rec.Fields("检验标记")) = "4" Or Trim(rec.Fields("检验标记")) = "5" Then
MainForm.g_msgText = "已经被质量检验用过了,不能修改!"
Call HMsgBox(MainForm.g_msgText, 0, 4)
CheckOptionGroupDetail.judge = 1
j_rowname = MSHFlexGrid1.RowSel
CheckOptionGroupDetail.show 1
Exit Sub
End If
rec.MoveNext
Loop
Set rec = Nothing
CheckOptionGroupDetail.judge = 0
j_rowname = MSHFlexGrid1.RowSel
CheckOptionGroupDetail.show 1
Else
MainForm.g_msgText = "对不起您的操作有误,请重试!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
End If
Case "yl"
checkoptiongrouplist.z_type = 0 ' 传递参数--表示修改商品记录
If Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)) <> "" Then
z_rowname = MSHFlexGrid1.RowSel ' 选取MSHFlexGrid1的某一行的商品编号
checkoptiongrouplist.show 1
If q = 1 Then
RefreshQueryList
Else
sxjl
End If
Else
MainForm.g_msgText = "对不起您的操作有误,请重试!!"
Call HMsgBox(MainForm.g_msgText, 0, 1)
Exit Sub
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) = 2500
End Sub
Private Sub sxjl()
ret = m_checkoptiongroupDAO.CheckOptionGroup_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_CHECKOPTIONGROUP
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_checkoptiongroupDAO.CheckOptionGroupid_delete(m_recordset, Trim(MSHFlexGrid1.TextMatrix(MSHFlexGrid1.row, 0)))
End If
End Sub
Private Sub RefreshQueryList()
' 显示查询到的结果
On Error GoTo EXITFUN
MainForm.g_application.m_databaseCon.m_adoConnection.BeginTrans ' 开始事务
InsertQueryIdList m_idList ' 把要显示的记录ID列表插入临时表
ret = m_checkoptiongroupDAO.CheckOptionGroup_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
currentrow = 1
Do While Not .EOF
If currentrow > MSHFlexGrid1.Rows - 1 Then
MSHFlexGrid1.AddItem ""
End If
'[>>自定义填充内容
MSHFlexGrid1.TextMatrix(currentrow, 0) = Trim(.Fields("checkoptiongroupid")) '商品名称
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 + -