以文本方式查看主题 - 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=122238) |
-- 作者:y2287958 -- 发布时间:2018/7/21 11:36:00 -- 这是判断语句,符合条件后显示相应的内容,不一定有问题。 |
-- 作者:有点蓝 -- 发布时间:2018/7/21 11:45:00 -- If e.DataCol.Name = "生产批次" OrElse e.DataCol.Name = "生产日期" OrElse e.DataCol.Name = "成品编码" OrElse e.DataCol.Name = "加工工序" OrElse e.DataCol.Name = "使用设备" Then \'如果内容发生变动的是产品列 MessageBox.Show(1) If e.DataRow.Isnull(e.DataCol.Name) Then \'如果新值是空白,也就是产品列的内容为空 MessageBox.Show(2) e.DataRow("实际调机员") = Nothing \'那么清空此行单价列的内容 MessageBox.Show(3) Else Dim dr As DataRow \'否则在产品表查找同名的产品行,将找到的行赋值给变量dr dr = DataTables("开机任务表").sqlFind("[生产批次] = \'" & e.DataRow("生产批次") & "\' And [生产日期] = \'" & 参考前面自己改改 & "\' And [成品编码] = \'" & 参考前面自己改改 & "\'And [加工工序] = \'" & 参考前面自己改改 & "\' And [使用设备] = \'" & 参考前面自己改改 & "\'" ) MessageBox.Show(4) If dr IsNot Nothing Then \'如果找到了同名的产品行,也就是dr不是Nothing MessageBox.Show(5) e.DataRow("实际调机员") = dr("实际调机员") MessageBox.Show(6) End If End If End If
|
-- 作者:有点蓝 -- 发布时间:2018/7/21 14:10:00 -- 重置列,或者改变一下这些列的内容 |