以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 动态显示不同表内容 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=188992) |
-- 作者:creastzh -- 发布时间:2023/11/3 16:50:00 -- 动态显示不同表内容 |
-- 作者:有点蓝 -- 发布时间:2023/11/3 16:59:00 -- 没看懂 |
-- 作者:creastzh -- 发布时间:2023/11/3 17:02:00 -- 我需要实现上面这张图的要求: 1 数据刷新功能 1) 上方输入零件号的关键词,完成表1 包含该关键词的工单明细; 2) 点击表1中箭头行,希望刷新表2(含该工单号的所有关联行);
以上两项已经正常实现 2 数据行选择确认问题: 功能1:拟点击表1选中行:
0) 表2完成选定行的行刷新
1) 表3能完成表1该数据行对应工单的入库行信息;条件为工单号
2) 图片刷新;条件为零件号
3) 表4刷新,条件为工单号
4) 表5刷新,条件为工单号
5) 表6刷新,条件为工单号 功能2:拟点击表2某行,实现:
1) 表3能按表2选定行的工单号显示入库信息
2) 图片按表2行对应零件号显示
3) 表4刷新,条件为工单号
4) 表5刷新,条件为工单号
5) 表6刷新,条件为工单号 现在的问题是,由于表2的首行会自动随表1选定而变化,导致实际全部按功能2进行,而无法按功能1进行. 我在表1的CurrentChanged设置了 SystemReady=False, 但实际仍然按功能进行显示, 不知如何处理. 谢谢! [此贴子已经被作者于2023/11/3 17:03:32编辑过]
|
-- 作者:creastzh -- 发布时间:2023/11/3 17:05:00 -- 蓝老师, 由于截图可能有点大,编辑文字后无法上传,所以我分开来描述我的问题了,抱歉给您带来不便 |
-- 作者:creastzh -- 发布时间:2023/11/3 17:06:00 -- 表1 的CurrentChanged代码: If e.Table.Position = -1 OrElse e.Table.Rows.Count = 0 Then Return SystemReady = False Dim r As Row = e.Table.Current Dim PN As String = r("PartNumber") Dim Pbx As WinForm.PictureBox = e.Form.Controls("PictureBox1") Dim fpf As String Dim fp As String = "P:\\General documents\\Setup\\Pic\\" fpf = fp & PN & ".jpg" If FileSys.FileExists(fpf) = False Then fp = "T:\\ME\\ME Documentation\\Picture\\" fpf = fp & PN & ".jpg" If FileSys.FileExists(fpf) = False Then fpf = "P:\\General documents\\Setup\\Pic\\Error.jpg" End If End If pbx.ImageFile = fpf pbx.SizeMode = ImageSizeMode.Zoom Dim WO As String = r("WO") \'工单发料明细更新 DataTables("INI_RMReleaseToWO").LoadFilter = "WO = \'" & WO & "\'" DataTables("INI_RMReleaseToWO").Load DataTables("INIWO_Receive").LoadFilter = "WO = \'" & WO & "\'" DataTables("INIWO_Receive").Load DataTables("ProductionIssue").LoadFilter = "WO = \'" & WO & "\'" DataTables("ProductionIssue").Load DataTables("WorkOrderStatus").LoadFilter = "WO = \'" & WO & "\'" DataTables("WorkOrderStatus").Load DataTables("Production_List").LoadFilter = "WO = \'" & WO & "\'" DataTables("Production_List").Load SystemReady = True [此贴子已经被作者于2023/11/3 17:06:52编辑过]
|
-- 作者:有点蓝 -- 发布时间:2023/11/3 17:07:00 -- 相关代码全部发上来看看 |
-- 作者:creastzh -- 发布时间:2023/11/3 17:17:00 -- 上方按关键词输入的零件号 事件ValueChanged代码: Dim PN As String = e.Form.Controls("CBox_PN").Value If PN = "" Then Return DataTables("WOReleaseSchedule").LoadFilter = "PartNumber like \'%" & PN & "%\'" DataTables("WOReleaseSchedule").Load e.Form.Controls("CBox_WO").Value = "" e.Form.Controls("CBox_BatchNo").Value = "" 表1 的CurrentChanged 事件代码: If e.Table.Position = -1 OrElse e.Table.Rows.Count = 0 Then Return SystemReady = False Dim r As Row = e.Table.Current Dim PN As String = r("PartNumber") Dim Pbx As WinForm.PictureBox = e.Form.Controls("PictureBox1") Dim fpf As String Dim fp As String = "P:\\General documents\\Setup\\Pic\\" fpf = fp & PN & ".jpg" If FileSys.FileExists(fpf) = False Then fp = "T:\\ME\\ME Documentation\\Picture\\" fpf = fp & PN & ".jpg" If FileSys.FileExists(fpf) = False Then fpf = "P:\\General documents\\Setup\\Pic\\Error.jpg" End If End If pbx.ImageFile = fpf pbx.SizeMode = ImageSizeMode.Zoom Dim WO As String = r("WO") \'工单发料明细更新 DataTables("INI_RMReleaseToWO").LoadFilter = "WO = \'" & WO & "\'" DataTables("INI_RMReleaseToWO").Load DataTables("INIWO_Receive").LoadFilter = "WO = \'" & WO & "\'" DataTables("INIWO_Receive").Load DataTables("ProductionIssue").LoadFilter = "WO = \'" & WO & "\'" DataTables("ProductionIssue").Load DataTables("WorkOrderStatus").LoadFilter = "WO = \'" & WO & "\'" DataTables("WorkOrderStatus").Load DataTables("Production_List").LoadFilter = "WO = \'" & WO & "\'" DataTables("Production_List").Load SystemReady = True 表2 CurrentChaged 事件代码: If e.Table.Position = -1 OrElse e.Table.Rows.Count = 0 Then Return Dim r As Row = e.Table.Current Dim FG As String = r("BatchNumber") Dim dr As DataRow = DataTables("INIWO_Receive").SQLFind("BatchNumber=\'" & FG & "\'") Dim PN As String If dr IsNot Nothing Then PN = dr("PartNumber") Dim wo As String = dr("WO") Dim FL As String = "WO =\'" & wo & "\'" \'基于发料批次号确认其入库时该批次号对应工单号写入 入库表中 If FG > "" Then DataTables("INIWO_Receive").LoadFilter = "BatchNumber =\'" & FG & "\'" DataTables("INIWO_Receive").Load \'MessageBox.Show(FG) End If DataTables("ProductionIssue").LoadFilter = FL DataTables("ProductionIssue").Load DataTables("WorkOrderStatus").LoadFilter = FL DataTables("WorkOrderStatus").Load DataTables("Production_List").LoadFilter = FL DataTables("Production_List").Load Tables("WOQuery_Table3").Filter = FL Tables("WOQuery_Table4").Filter = FL Tables("WOQuery_Table5").Filter = FL Tables("WOQuery_Table6").Filter = FL End If Dim Pbx As WinForm.PictureBox = e.Form.Controls("PictureBox1") Dim fpf As String Dim fp As String = "P:\\General documents\\Setup\\Pic\\" fpf = fp & PN & ".jpg" If FileSys.FileExists(fpf) = False Then fp = "T:\\ME\\ME Documentation\\Picture\\" fpf = fp & PN & ".jpg" If FileSys.FileExists(fpf) = False Then fpf = "P:\\General documents\\Setup\\Pic\\Error.jpg" End If End If pbx.ImageFile = fpf pbx.SizeMode = ImageSizeMode.Zoom [此贴子已经被作者于2023/11/3 17:17:18编辑过]
|
-- 作者:有点蓝 -- 发布时间:2023/11/3 17:22:00 -- 哪个名称是表1?哪个名称是表2? |
-- 作者:creastzh -- 发布时间:2023/11/3 17:28:00 -- 表1 WOReleaseSchedule 表2 INI_RMReleaseToWO 表3 INIWO_Receive 表4 ProductionIssue 表5 WorkOrderStatus 表6 Production_List |
-- 作者:有点蓝 -- 发布时间:2023/11/3 17:42:00 -- 这应该是个bug,我反馈一下 |