If e.DataCol.Name = "cord" Then '如果内容发生变动的是产品列
Dim dr As DataRow
dr = DataTables("product").Find("[cord] = '" & e.NewValue & "'")
If dr IsNot Nothing Then '如果找到了同名的产品行,也就是dr不是Nothing
e.DataRow("name") = dr("shangpinming")
e.DataRow("markprice") = dr("markprice")
Else
If dr Is Nothing Then
想在这个地方价格条件
等输入完 name 字段后在 执行 后面的内容 请指点啊@@
Dim idxs As String = ""
For i As Integer = Tables("xiaoshoudanhao.xiaoshou").TopPosition To Tables("xiaoshoudanhao.xiaoshou").BottomPosition
idxs &= Tables("xiaoshoudanhao.xiaoshou").Rows(i)("_Identify")
Next
Dim f As New Filler
f.Filter = "_Identify in (" & idxs.Trim(",") & ")"
f.SourceTable = DataTables("xiaoshou") '指定数据来源
f.SourceCols = "cord,name,markprice" '指定数据来源列
f.DataTable = DataTables("product") '指定数据接收表
f.DataCols = "cord,shangpinming,markprice" '指定数据接收列
f.Fill() '填充数据
DataTables("product").save()
End If
End If
End If
SystemReady = False
If e.DataCol.name ="dc" Then
e.DataRow("price")=e.DataRow("dc") *e.DataRow("markprice")/100
Else If e.DataCol.name ="price"
e.DataRow("dc") =e.DataRow("price")/ e.DataRow("markprice")
End If
SystemReady = True