以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  [求助]fill 不能删除问题  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=75230)

--  作者:blsu33
--  发布时间:2015/9/30 16:33:00
--  [求助]fill 不能删除问题
红袍老师,
AR窗口的table5 由下面数据Fill 生成
Tables("ar_table5").Fill("Select * F rom {Jobcard明细表}","user",False)
Tables("ar_table5").Sort=("年度 DESC")
Tables("ar_table5").AllowEdit=True
For Each st As Row In Tables("ar_table5").Rows
    st.Locked=True
Next

AR窗口有一个DELL删除按钮

If Tables("ar_table5").Current IsNot Nothing Then
    If MessageBox.Show("删除后将不能恢复,请确认是否删除?","提示",MessageBoxButtons.YesNo)=DialogResult.Yes Then
        Tables("ar_table5").Current.Locked=False
        Tables("ar_table5").Current.Delete
        Tables("ar_table5").Current.Save
    End If
End If

为何删除后退出 删除的行还存在



--  作者:大红袍
--  发布时间:2015/9/30 16:52:00
--  
If Tables("ar_table5").Current IsNot Nothing Then
    If MessageBox.Show("删除后将不能恢复,请确认是否删除?","提示",MessageBoxButtons.YesNo)=DialogResult.Yes Then
        Tables("ar_table5").Current.Locked=False
        Tables("ar_table5").Current.Delete
        Tables("ar_table5").Save
    End If
End If