Select Case e.DataCol.Name Case "cord" Dim dr As DataRow=e.DataRow.getparentrow("product") 'Dim dr As DataRow = DataTables("product").Find("[cord] = '" & e.NewValue & "'") If dr IsNot Nothing Then If dr("sell") > 0 Then e.DataRow("name") = dr("shangpinming") e.DataRow("markprice") = dr("markprice") Else messagebox.show("无库存") End If Else messagebox.show("没有此商品") forms("入库").open End If End Select
|