以文本方式查看主题

-  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=109861)

--  作者:有点蓝
--  发布时间:2017/11/21 20:19:00
--  
If e.DataCol.Name = "合格品" Then
    Dim pr As DataRow
    pr = DataTables("生产排产表").Find("加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码") & "\' and 生产批次 = \'" & e.DataRow("生产批次") & "\'")
    If pr IsNot Nothing Then
        pr("合格品")= e.DataTable.Compute("sum(合格品)", "加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码") & "\' and _Identify <> " & e.DataRow("_Identify") & " and 生产批次 = \'" & e.DataRow("生产批次") & "\'") + e.DataRow("合格品")
    End If
End If
--  作者:有点蓝
--  发布时间:2017/11/21 20:54:00
--  
e.Sender.combolist = DataTables("异常类型").GetComboListString("类型原因","不良类型=\'" & e.Form.controls("不良类型1").text & "\'")
--  作者:有点蓝
--  发布时间:2017/11/21 22:05:00
--  
看懂2楼的用法
--  作者:有点蓝
--  发布时间:2017/11/21 23:17:00
--  
写一个出来看看,什么地方不懂?条件的用法都是一样的

DataTables("生产排产表").Find("加工工序 = \'" & e.DataRow("加工工序") & "\' and 成品编码 = \'" & e.DataRow("成品编码") & "\' and 生产批次 = \'" & e.DataRow("生产批次") & "\'")

DataTables("生产排产表").Find("加工工序 = \'" & xxx值1 & "\' and 成品编码 = \'" & xxx值2 & "\' and 生产批次 = \'" & xxx值3 & "\'")
[此贴子已经被作者于2017/11/21 23:17:36编辑过]

--  作者:有点甜
--  发布时间:2017/11/22 16:37:00
--  

编写enter事件

 

dim t as table = tables("临时表")
dim filter as string = "加工工序 = \'" & t.current("加工工序") & "\' and 成品编码 = \'" & t.current("成品编码") & "\' and 生产批次 = \'" & t.current("生产批次") & "\'"
e.Sender.ComboList = DataTables("某表").GetComboListString("某列", filter)
 

[此贴子已经被作者于2017/11/22 18:17:56编辑过]

--  作者:有点甜
--  发布时间:2017/11/22 18:18:00
--  

Dim t As Table = Tables("临时表")
Dim filter As String = "加工工序 = \'" & t.current("加工工序") & "\' and 成品编码 = \'" & t.current("成品编码") & "\' and 生产批次 = \'" & t.current("生产批次") & "\'"
e.Sender.ComboList = DataTables("生产排产表").GetComboListString("使用设备", filter)