kms_showdoc.srf 828 B

12345678910111213141516171819202122232425262728293031323334353637
  1. $PBExportHeader$kms_showdoc.srf
  2. global type kms_showdoc from function_object
  3. end type
  4. forward prototypes
  5. global subroutine kms_showdoc (string arg_doccode)
  6. end prototypes
  7. global subroutine kms_showdoc (string arg_doccode);string ls_token
  8. ls_token = kms_gettoken()
  9. uo_comhelper lo_helper
  10. lo_helper = Create uo_comhelper
  11. oleobject lo_p1client
  12. string arg_msg_tmp
  13. lo_p1client = lo_helper.uf_get_p1clientcom(Ref arg_msg_tmp)
  14. Destroy lo_helper
  15. s_kms_msg s_rslt
  16. IF NOT ISVALID(lo_p1client) THEN
  17. s_rslt.Msg = '未知异常>获取业务后台连接失败: ' + arg_msg_tmp
  18. MessageBox('Error', s_rslt.Msg)
  19. RETURN
  20. END IF
  21. string ls_url
  22. ls_url = sys_kms_root + "/knowledge/view/docview?code=" + arg_doccode
  23. IF ls_token <> "" THEN
  24. ls_url += "&token="+ls_token
  25. END IF
  26. lo_p1client.openurlbydefaultbrowser(ls_url)
  27. end subroutine