If Tables("入库").Current IsNot Nothing Then
If Tables("入库明细").Current IsNot Nothing Then
If MessageBox.Show("明细数据删除?", "请确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
Dim s As String = DataTables("入库明细").GetComboListString("入库明细单号", "[入库单号] =\'" & Tables("入库").current("入库单号") & "\'")
DataTables("入库明细码单").DeleteFor("[入库明细单号] in (\'" & s.replace("|", "\',\'") & "\')")
Tables("入库明细").Current.Delete
End If
End If
If MessageBox.Show("是否删除整张单据?", "请确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
DataTables("入库明细").DeleteFor("[入库单号] =\'" & Tables("入库").current("入库单号") & "\'")
Tables("入库").Current.Delete
End If
End If