Select Case e.DataCol.name
Case "商品简码" '根据商品简码提取商品信息作为仓库账簿的基础数据
Dim dr As DataRow = DataTables("商品信息").Find("商品简码 = '" & e.DataRow("商品简码") & "'")
If dr IsNot Nothing
e.DataRow("商品名称") = dr("商品名称")
e.DataRow("商品编码") = dr("商品编码")
e.DataRow("商品类别") = dr("商品类别")
e.DataRow("品牌") = dr("品牌")
e.DataRow("规格") = dr("规格")
e.DataRow("单位") = dr("单位")
End If
Dim dr1 As DataRow = DataTables("盘点单").Find("商品简码 = '" & e.DataRow("商品简码") & "'")
If dr1 IsNot Nothing
e.DataRow("期初库存_箱数") = dr1("箱数")
e.DataRow("期初库存_数量") = dr1("数量")
e.DataRow("期初库存_金额") = dr1("金额")
End If
End Select