If e.DataCol.name = "存储_存储编号" Then
If e.DataRow.IsNull("存储_存储编号") = False Then
Dim hh As String = e.DataRow("存储_存储编号")
Dim dr As DataRow = DataTables("存储").Find("存储编号 ='" & hh & "'")
If dr.IsNull("数量") OrElse dr("数量") <= 0
dr("器件编号") = e.DataRow("器件编号")
dr("规格型号") = e.DataRow("规格型号")
dr("器件特性") = e.DataRow("器件特性")
If Vars("qjsr01") > "" Then
Dim qdr As DataRow = DataTables("存储").Find("存储编号 ='" & Vars("qjsr01") & "'")
qdr("器件编号") = Nothing
qdr("规格型号") = Nothing
qdr("器件特性") = Nothing
dr("数量") = qdr ("数量")
qdr("数量") = Nothing
End If
ElseIf dr("器件编号") <> e.DataRow("器件编号")
Dim Result As DialogResult
Result = MessageBox.Show("此物料位已存有不同元件,请另存别处!","入库出错啦!!")
If Result = DialogResult.OK Then
'Do
CurrentTable.Select(CurrentTable.Position,6,CurrentTable.Position,8)
CurrentTable.EditDelete
'Loop While e.DataRow("存储_格号") <> Nothing
End If
End If
End If
End If