以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 乘以控件的值 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=137275) |
-- 作者:有点蓝 -- 发布时间:2019/7/2 14:19:00 -- dim v1 as integer = val(e.form.controls("水的比例1").Text) Dim vl As Integer = dr1("需求数量") * v1/(1+v1) |
-- 作者:有点蓝 -- 发布时间:2019/7/2 15:35:00 -- Dim dic As new Dictionary(of String,Integer) DataTables("切削液勾兑_BOM分析表").DataRows.Clear() Dim v2 As Integer = val(e.form.controls("水的比例1").Text) For Each dr1 As DataRow In DataTables("切削液勾兑_生产在制").DataRows For Each dr2 As DataRow In DataTables("BOM基础数据").SQLSelect("[成品编码] = \'" & dr1("成品编码") & "\' and 材料类型 = \'油类\'") Dim nm As String = dr1("添加批次") & "|" & dr2("材料编码") & "|" & dr2("材料描述") & "|" & dr2("供应商编码") & "|" & dr2("库位") Dim vl As Integer If dr2("用量") = 0 Then vl = dr1("需求数量") * v2/(1+v2) Else vl = dr1("需求数量") * dr2("用量")/(1+v2) End If If dic.ContainsKey(nm) = False dic.Add(nm,vl) Else dic(nm) = dic(nm)+ vl End If Next Next
|