Select Case e.DataCol.name
Case "物资名称"
Dim dr As DataRow = DataTables("库存").Find("物资名称 = '" & e.OldValue & "'")
If dr Is Nothing Then
dr = DataTables("库存").Find("物资名称 = '" & e.NewValue & "'")
If dr Is Nothing Then
dr = DataTables("库存").AddNew()
dr("物资名称") = e.DataRow("物资名称")
End If
dr("物资分类") = e.DataRow("物资分类")
dr("物资品牌") = e.DataRow("物资品牌")
dr("规格型号") = e.DataRow("规格型号")
dr("物资类别") = e.DataRow("物资类别")
dr("物资单价") = e.DataRow("物资单价")
dr("固定资产") = e.DataRow("固定资产")
dr("生产日期") = e.DataRow("生产日期")
dr("保质天数") = e.DataRow("保质天数")
dr("经费来源") = e.DataRow("经费来源")
dr("入账方向") = e.DataRow("入账方向")
dr("购置时间") = e.DataRow("购置时间")
dr("审批人") = e.DataRow("审批人")
dr("经办人") = e.DataRow("经办人")
dr("管理员") = e.DataRow("管理员")
dr("单位主管") = e.DataRow("单位主管")
dr("物资图片") = e.DataRow("物资图片")
dr("备注") = e.DataRow("备注")
dr("物资来源") = e.DataRow("物资来源")
dr("仓库") = e.DataRow("仓库")
dr("货架") = e.DataRow("货架")
Else
dr("物资名称") = e.NewValue
End If
Case "物资分类","物资名称","物资品牌","规格型号","物资类别","物资单价","固定资产","生产日期","保质天数","经费来源","入账方向","购置时间","审批人","经办人","管理员","单位主管","物资图片","备注","物资来源","仓库","货架"
Dim dr As DataRow = DataTables("库存").Find("物资名称 = '" & e.DataRow("物资名称") & "'")
If dr IsNot Nothing Then
dr(e.DataCol.Name) = e.NewValue
End If
End Select