以文本方式查看主题 - Foxtable(狐表) (http://www.foxtable.com/bbs/index.asp) -- 专家坐堂 (http://www.foxtable.com/bbs/list.asp?boardid=2) ---- [求助]新版本更新后发布的版本运行报错 (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=138489) |
-- 作者:紫色幽魂 -- 发布时间:2019/8/1 16:34:00 -- [求助]新版本更新后发布的版本运行报错 新版本2019.8.1更新后在自己电脑运行没有问题,发布出去后再别的电脑运行有问题了,是什么情况 ![]() ![]() |
-- 作者:有点蓝 -- 发布时间:2019/8/1 16:57:00 -- 第二张图datacolchanged事件写了什么代码? |
-- 作者:紫色幽魂 -- 发布时间:2019/8/1 18:47:00 -- 回复:(有点蓝)第二张图datacolchanged事件写了什么... 可能是前面部分除了问题,我自己电脑上开发版没有问题,发布出去后同一台电脑也有问题 Dim dr1 As DataRow = DataTables("无损_现场检测计划").Find("内容 = \'累计检测_条/处\' and 检验批编号 = \'"& e.DataRow("检验批编号") &"\'") \'现场 Dim dr1_1 As DataRow = DataTables("无损_工厂检测计划").Find("内容 = \'累计检测_条/处\' and 检验批编号 = \'"& e.DataRow("检验批编号") &"\'") \'工厂 Select Case e.DataCol.Name \'共用部分 \'提取工程名称首字母 Case "工程名称" If e.NewValue <> "" Then Dim py1 As String = py.GetPY(e.NewValue, True,3) e.DataRow("工程名称首字母") = py1.SubString(0,1) Else If e.NewValue = "" Then e.DataRow("工程名称首字母") = "" End If End If \'修改现场无损检测计划累计数据 Case "检测量_单位1" Dim sz As List(of DataRow) = DataTables("无损_现场检测计划").Select("检验批编号 = \'"& e.DataRow("检验批编号") &"\'") If sz.Count > 0 \'返回到射线检测部位-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If e.DataRow("检测方法") = "RT" Dim tj1() As String = {"顶纵","顶横","顶交叉","底纵","底横","底交叉","腹纵","腹横","腹交叉","其他拍片部位"} Dim jh1 As new List(of String) jh1.AddRange(tj1) Dim z1 As String = e.DataRow("检测部位") Dim qh1 As Double = DataTables("无损_检测明细").Compute("sum(检测量_单位1)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 检测部位 = \'"& z1 &"\'") If jh1.Contains(z1) Then dr1("RT_"& z1) = qh1 End If \'返回到UT/MT-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ElseIf e.DataRow("检测方法") = "UT" Dim qh2 As Double = DataTables("无损_检测明细").Compute("sum(检测量_单位1)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'UT\'") dr1("UT_条") = qh2 ElseIf e.DataRow("检测方法") = "MT" Dim qh3 As Double = DataTables("无损_检测明细").Compute("sum(检测量_单位1)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'MT\'") dr1("MT_条") = qh3 End If End If Case "首检_检测长度" Dim sz As List(of DataRow) = DataTables("无损_现场检测计划").Select("检验批编号 = \'"& e.DataRow("检验批编号") &"\'") Dim sz_1 As List(of DataRow) = DataTables("无损_工厂检测计划").Select("检验批编号 = \'"& e.DataRow("检验批编号") &"\'") Dim dr2 As DataRow = DataTables("无损_现场检测计划").Find("内容 = \'累计检测_张\' and 检验批编号 = \'"& e.DataRow("检验批编号") &"\'") Dim dr3 As DataRow = DataTables("无损_现场检测计划").Find("内容 = \'累计检测_条/处\' and 检验批编号 = \'"& e.DataRow("检验批编号") &"\'") Dim dr2_1 As DataRow = DataTables("无损_工厂检测计划").Find("内容 = \'累计检测_张\' and 检验批编号 = \'"& e.DataRow("检验批编号") &"\'") Dim dr3_1 As DataRow = DataTables("无损_工厂检测计划").Find("内容 = \'累计检测_条/处\' and 检验批编号 = \'"& e.DataRow("检验批编号") &"\'") \'返回到RT(张),螺栓,涂层厚度-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- If e.DataRow("检测方法") = "RT" If sz.Count > 0 Or sz_1.Count > 0 Dim tj1() As String = {"顶纵","顶横","顶交叉","底纵","底横","底交叉","腹纵","腹横","腹交叉","其他拍片部位"} Dim jh1 As new List(of String) jh1.AddRange(tj1) Dim z1 As String = e.DataRow("拍片_部位") Dim z1_1 As String = e.DataRow("检测部位") Dim qh2 As Double = DataTables("无损_检测明细").Compute("sum(首检_检测长度)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 拍片_部位 = \'"& z1 &"\'") \'现场 Dim qh4 As Double = DataTables("无损_检测明细").Compute("sum(检测量_单位1)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 拍片_部位 = \'"& z1 &"\'") \'现场 Dim qh2_1 As Double = DataTables("无损_检测明细").Compute("sum(首检_检测长度)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 检测部位 = \'"& z1_1 &"\'") \'工厂 Dim qh4_1 As Double = DataTables("无损_检测明细").Compute("sum(首检_焊缝条数)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 检测部位 = \'"& z1_1 &"\'") \'工厂 If e.DataRow("检验批编号").Contains("XC") \'现场 If jh1.Contains(z1) Then dr2("RT_"& z1) = qh2 dr3("RT_"& z1) = qh4 End If Else If jh1.Contains(z1_1) Then dr2_1("RT_"& z1_1) = qh2_1 dr3_1("RT_"& z1_1) = qh4_1 End If End If \'返回到计划表各板厚列 Dim tj2() As String = {"10","12","14","16","18","20","22","24","25","26","28","30","32","34","35","36","38","40","42","44","45","46","48","50"} Dim jh2 As new List(of String) jh2.AddRange(tj2) Dim qh3 As Double = DataTables("无损_检测明细").Compute("sum(首检_检测长度)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 拍片_板厚 = \'"& e.DataRow("拍片_板厚") &"\'") \'现场 Dim qh6 As Double = DataTables("无损_检测明细").Compute("sum(检测量_单位1)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 拍片_板厚 = \'"& e.DataRow("拍片_板厚") &"\'") \'现场 Dim qh3_1 As Double = DataTables("无损_检测明细").Compute("sum(首检_检测长度)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 板厚 = \'"& e.DataRow("板厚") &"\'") \'工厂 Dim qh6_1 As Double = DataTables("无损_检测明细").Compute("sum(首检_焊缝条数)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'RT\' and 板厚 = \'"& e.DataRow("板厚") &"\'") \'工厂 If e.DataRow("检验批编号").Contains("XC") \'现场 If jh2.Contains(e.DataRow("拍片_板厚")) Then dr2("RT_拍片板厚_"& e.DataRow("拍片_板厚")) = qh3 dr3("RT_拍片板厚_"& e.DataRow("拍片_板厚")) = qh6 End If Else If jh2.Contains(e.DataRow("板厚")) Then dr2_1("RT_拍片板厚_"& e.DataRow("板厚")) = qh3_1 dr3_1("RT_拍片板厚_"& e.DataRow("板厚")) = qh6_1 End If End If End If ElseIf e.DataRow("检测方法") = "螺栓" If sz.Count > 0 Or sz_1.Count > 0 Dim qh4 As Double = DataTables("无损_检测明细").Compute("sum(首检_检测长度)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'螺栓\'") dr1("螺栓_套") = qh4 End If ElseIf e.DataRow("检测方法") = "涂层厚度" If sz.Count > 0 Or sz_1.Count > 0 Dim qh5 As Double = DataTables("无损_检测明细").Compute("sum(首检_检测长度)","检验批编号 = \'"& e.DataRow("检验批编号") &"\' And 检测方法 = \'涂层厚度\'") dr1("涂层_点") = qh5 End If End If End Select \'继承构件清单主表字段名称填充 If MainTable.Name = "无损_构件清单" Or Forms("检验批信息录入").Opened Select Case e.DataCol.Name Case "构件代号" If e.NewValue Is Nothing Then e.DataRow("工程名称首字母") = Nothing e.DataRow("工程编号") = Nothing e.DataRow("单项工程编号") = Nothing e.DataRow("检验批编号") = Nothing e.DataRow("构件代号") = Nothing e.DataRow("工程名称") = Nothing e.DataRow("单项工程") = Nothing e.DataRow("检验批") = Nothing e.DataRow("检测范围") = Nothing e.DataRow("构件编号") = Nothing Else Dim dr As DataRow dr = DataTables("无损_构件清单").Find("[构件代号] = \'" & e.NewValue & "\'") If dr IsNot Nothing e.DataRow("工程名称首字母") = dr("工程名称首字母") e.DataRow("工程编号") = dr("工程编号") e.DataRow("单项工程编号") = dr("单项工程编号") e.DataRow("检验批编号") = dr("检验批编号") e.DataRow("构件代号") = dr("构件代号") e.DataRow("工程名称") = dr("工程名称") e.DataRow("单项工程") = dr("单项工程") e.DataRow("检验批") = dr("检验批") e.DataRow("检测范围") = dr("检测范围") e.DataRow("构件编号") = dr("构件编号") End If End If End Select End If \'计算焊缝是否检测合格 Select Case e.DataCol.Name Case "首检_返修长度","一次复检_返修长度","二次复检_返修长度","三次复检_返修长度" If e.DataRow("首检_返修长度") - e.DataRow("一次复检_检测长度") + e.DataRow("一次复检_返修长度") - e.DataRow("二次复检_检测长度") + e.DataRow("二次复检_返修长度") - e.DataRow("三次复检_检测长度") + e.DataRow("三次复检_返修长度") = 0 e.DataRow("合格") = "合格" End If End Select \'更新"无损_构件清单"表已检构件 Select Case e.DataCol.Name Case "构件数" Dim pr As DataRow = e.DataRow.GetParentRow("无损_构件清单") Dim dt1 As DataTable =DataTables("无损_检测明细") Dim F1 As String = "构件代号 = \'" & e.DataRow("构件代号") & "\'" If e.DataRow("构件数") IsNot Nothing Then pr("已检构件") = dt1.Compute("max(构件数)",F1) Else pr("已检构件") = "" End If End Select |
-- 作者:狐狸爸爸 -- 发布时间:2019/8/1 19:55:00 -- 是一个bug,下次更新会改进。 |