以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]这代码有错吗?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=79270)

--  作者:huhu
--  发布时间:2015/12/28 10:41:00
--  [求助]这代码有错吗?
Dim r As Row = Tables("仓库管理").Current
If r("数量") IsNot Nothing Then
    MessageBox.Show("库位编码有货,不能删除","提示库管员",MessageBoxButtons.OK,MessageBoxIcon.Error)
    r.Save
ElseIf r.IsNull("数量") Then
    r.Delete    
End If

--  作者:水青树叶
--  发布时间:2015/12/28 10:50:00
--  
else
r.delete
end if

--  作者:大红袍
--  发布时间:2015/12/28 11:17:00
--  
Dim r As Row = Tables("仓库管理").Current
If r.IsNull("数量") = False Then
    MessageBox.Show("库位编码有货,不能删除","提示库管员",MessageBoxButtons.OK,MessageBoxIcon.Error)
    r.Save
Else
    r.Delete    
End If