订单信息表中有车间名,如何根据车间输入工价之后在“生产车间”这一列输入相关的车间,比如一个订单涉及到一车间、二车间、四车间,“生产车间”这一单元格中填入:一.二.四.
以下代码对吗?应该写在哪个事件中?
Dim nms() As String = {"横机","半圆机","一","二","三","定型","四","五","手缝","整烫","四包","五包","六","七"}
Dim r As DataRow = DataTables("订单信息").Current.DataRow
e.DataRow("生产车间")= IIF(r.isnull(nms(0) = False,"横机.") & IIF(r.isnull(nms(1)) = False,"半圆.") & IIF(r.Isnull(nms(2)) = False,"一.") & IIF(r.isnull(nms(3)) = False,"二.") & IIF(r.isnull(nms(4)) = False,"三.") & IIF(r.isnull(nms(5)) = False,"定.") & IIF(r.isnull(nms(6)) = False,"四.") & IIF(r.isnull(nms(7)) = False,"五.") & IIF(r.isnull(nms(8)) = False,"手.") & IIF(r.isnull(nms(9)) = False,"蒸.") & IIF(r.isnull(nms(10)) = False,"4包.") & IIF(r.isnull(nms(11)) = False,"5包.") & IIF(r.isnull(nms(12)) = False,"6.") & IIF(r.isnull(nms(13)) = False,"7.")