Select Case e.DataCol.name Case "样品编号" Dim dr As DataRow = DataTables("出入库登记表").Find("样品编号 = '" & e.OldValue & "'") If dr Is Nothing Then dr = DataTables("出入库登记表").AddNew() 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("委托日期") Case "委托编号","样品名称","受检单位","随样附件","样品数量","保存条件","样品状态","委托日期" Dim dr As DataRow = DataTables("出入库登记表").Find("样品编号 = '" & e.DataRow("样品编号") & "'") If dr IsNot Nothing Then dr(e.DataCol.Name) = e.DataRow(e.DataCol.Name) End If End Select
|