PLM之家PLMHome-工业软件践行者

Teamcenter二次开发源码分享;判断当前用户是否为DBA

[复制链接]

2020-2-8 09:35:45 2083 0

admin 发表于 2020-2-8 09:35:45 |阅读模式

admin 楼主

2020-2-8 09:35:45

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
: {# j: x4 E1 e. B# z0 B7 w, j

: s( C0 d1 N6 `# v% pTeamcenter二次开发源码分享;判断当前用户是否为DBA
1 ]/ q, a4 [0 g/ j
$ R  T: B4 ?+ z- Y3 E* h9 a9 ]1 k[mw_shl_code=cpp,true]#include <TC/LoggedInUser.hxx>
8 K; v/ _- N1 z; o) v+ {+ z# G0 j* ]0 {: l. n, g
using namespace std;/ V& P5 E* o' W, e4 u- u$ D1 D
using namespace Teamcenter::Core;0 K$ t0 O0 ?) j% R
6 g* @* h# Q. e/ l. C& S
static logical isCurrentUserDba()
& I  o( G1 K2 u' I* e{# T: a, M* w6 L1 D
    LoggedInUser* loggedInUser = LoggedInUser::getInstance();
. Q, a1 r) m2 q3 j. L) B) x" ]( `3 m& p8 n/ |' H
    logical isDba = loggedInUser->isUserSystemAdministrator();+ k' R0 v0 p! ?0 P: Z  Y( u
    if(isDba == TRUE) cout << "    User is dba member "<< endl;
5 r+ Q6 J6 w5 j9 {/ v( S0 A' M    if(isDba == FALSE) cout << "    User is not dba member "<< endl;. F* n4 N' A- d3 f, k' b% ^
    - @9 j) M. O& h# }; g! T/ S3 c
    return isDba;
8 p: i: K2 U" A) S& |6 A}[/mw_shl_code]
2 {6 _6 W2 r7 {$ Z$ M
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了