If e.DataCol.Name = "配送公司_名称" Then
Dim Result As DialogResult
Dim gs As String=e.NewValue
If gs = Nothing Then
MessageBox.Show("没有选中配送公司!", "提示")
Else
Dim zz As DataRow =DataTables("配送公司资质").Find( gs & "= '有' And 分类目录编号='" & e.DataRow("医疗器械分类目录代码") & "'")
If zz IsNot Nothing Then
MessageBox.Show(gs &" 有配送资质,可以配送!", "提示")
e.DataRow("配送公司_名称")=e.NewValue
Else
Result=MessageBox.Show(gs &" 无配送资质,确定由它配送吗?", "提示",MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.No Then
e.Cancel = True
Else
e.DataRow("配送公司_名称")=e.NewValue
End If
End If
End If
End If