以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 未找到类型“String”的公共成员“Else”。 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=154656) |
-- 作者:edisontsui -- 发布时间:2020/9/22 11:13:00 -- 未找到类型“String”的公共成员“Else”。 \'自动输入物料资料 If e.DataCol.Name = "物料编号" Then Dim dr As DataRow dr = DataTables("物料字典").Find("物料编号 = \'" & e.DataRow("物料编号") & "\'" ) If dr IsNot Nothing e.DataRow("铜铝") = dr("细分一") e.DataRow("单位") = dr("库存单位") e.DataRow("宽度类型") = dr("宽度类型") e.DataRow("物料名称") = dr("物料名称") e.DataRow("字头") = e.DataRow("物料编号").substring(0,3) e.DataRow("单重") = dr("单重") End If If e.DataRow("物料编号").Endswith("SL") Then e.DataRow("简化物料编号") = e.DataRow("物料编号"). Else If e.DataRow("物料编号").Endswith("S") Then e.DataRow("简化物料编号") = e.DataRow("物料编号").replace("S", "") ElseIf e.DataRow("物料编号").Endswith("A") Then e.DataRow("简化物料编号") = e.DataRow("物料编号").replace("A", "") ElseIf e.DataRow("物料编号").Endswith("B") Then e.DataRow("简化物料编号") = e.DataRow("物料编号").replace("B", "") ElseIf e.DataRow("物料编号").Endswith("C") Then e.DataRow("简化物料编号") = e.DataRow("物料编号").replace("C", "") ElseIf e.DataRow("物料编号").Endswith("D") Then e.DataRow("简化物料编号") = e.DataRow("物料编号").replace("D", "") ElseIf e.DataRow("物料编号").Endswith("E") Then e.DataRow("简化物料编号") = e.DataRow("物料编号").replace("E", "") ElseIf e.DataRow("物料编号").Endswith("L") Then e.DataRow("简化物料编号") = e.DataRow("物料编号").replace("L", "") Else e.DataRow("简化物料编号") = e.DataRow("物料编号") End If End If End If 我的上述代码运行时会出现如下警告,请问是哪里的问题?谢谢。 .NET Framework 版本:4.0.30319.34209 Foxtable 版本:2020.5.29.8 错误所在事件:表,铝巴送货单, DataColChanged 详细错误信息: 调用的目标发生了异常。 未找到类型“String”的公共成员“Else”。 |
-- 作者:有点蓝 -- 发布时间:2020/9/22 11:21:00 -- If e.DataRow("物料编号").Endswith("SL") Then e.DataRow("简化物料编号") = e.DataRow("物料编号"). 多了一个点 Else
|