-- 作者:syjylyq
-- 发布时间:2018/8/22 9:16:00
--
查询插件类似以下代码
订单管理_工单号_ValueChanged
Tables("订单信息").Filter
= "工单号 = \'" & e.Sender.Value & "\'"
Tables("订单信息").Sort
= "工单号"
保存并关闭 If Tables("成本录入窗口_成本明细表").Rows.Count
> 0 Then Functions.Execute("保存更新","成本录入窗口_成本明细表","成本明细表") Functions.Execute("成本报交") Functions.Execute("保存更新单行","成本核算_订单信息","订单信息") End If
e.Form.Close
保存更新的内部函数
Dim a As String =
Args(0) Dim b As String =
Args(1) For Each r As Row
In Tables(a).rows Dim p As String = IIF(r.DataRow.RowState =
DataRowState.Added, "A#", "U#") r.Save() Dim msg As String = p & b &
"#" & r("_Identify") For Each bd As QQBuddy In QQClient.Buddies If bd.Online Then QQClient.Send(bd.name, msg) End If Next
Next
成本报交的内部函数:
Dim r As Row =
Tables("成本核算_订单信息").Current Dim nms() As
String = {"胚成本_原料费","胚成本_加工费","胚成本_其他","胚成本_原料费1","胚成本_加工费1","胚成本_其他1","制造成本_原料费","制造成本_染色费","制造成本_定型费","制造成本_车工费","制造成本_装饰费","制造成本_其他","包装成本_原料费","包装成本_辅料费","包装成本_加工费","包装成本_包装费","非人工成本费","包装成本_其他","管理费","包装成本_出运费","报关费","异常支出"} For Each nm As
String In nms r(nm) = Nothing Next Dim s As List (of
String) = DataTables("成本明细表").GetValues("项目名称","工单号 =
\'" & r("工单号") & "\'") If s.Count > 0
Then For i As Integer = 0 To s.Count - 1 r(s(i)) = DataTables("成本明细表").Compute("sum(金额)","工单号
= \'" & r("工单号") & "\' and 项目名称 = \'" & s(i)
& "\'") Next End If
保存更新单行的内部函数 Dim a As String =
Args(0) Dim b As String =
Args(1) Dim r As Row =
Tables(a).Current Dim p As String =
IIF(r.DataRow.RowState = DataRowState.Added, "A#", "U#") r.Save() Dim msg As String
= p & b & "#" & r("_Identify") For Each bd As
QQBuddy In QQClient.Buddies If bd.Online Then QQClient.Send(bd.name, msg) End If
Next
|