f_mysave.srf 628 B

12345678910111213141516171819202122232425
  1. $PBExportHeader$f_mysave.srf
  2. $PBExportComments$数据窗口存盘--函数
  3. global type f_mysave from function_object
  4. end type
  5. forward prototypes
  6. global function integer f_mysave (datawindow f_dw, transaction f_tr, integer f_err)
  7. end prototypes
  8. global function integer f_mysave (datawindow f_dw, transaction f_tr, integer f_err);f_dw.accepttext()
  9. if f_dw.ModifiedCount()+f_dw.DeletedCount()>0 then
  10. if f_dw.update()=1 then
  11. commit using f_tr;
  12. return 1
  13. else
  14. rollback using f_tr;
  15. if f_err=1 then
  16. MessageBox("出错信息","数据保存失败!",Information!)
  17. end if
  18. return 0
  19. end if
  20. end if
  21. return 1
  22. end function