<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      DevExpress XAF 獲取當前用戶

      代碼

      1 Owner = Session.GetObjectByKey<PermissionPolicyUser>(SecuritySystem.CurrentUserId);

      用戶屬性

        應用程序的功能可能取決于當前用戶。因此,需要獲取用戶名、用戶ID或者整個用戶對象。以下是SecuritySystem類公開的屬性。

      • SecuritySystem.CurrentUserName      --當前用戶名
      • SecuritySystem.CurrentUserId            --當前用戶ID
      • SecuritySystem.UserType                   --當前用戶類型
      • SecuritySystem.CurrentUser               --當前用戶

      SecuritySystem.CurrentUser屬性

       1 using DevExpress.ExpressApp;
       2 using DevExpress.ExpressApp.Actions;
       3 using DevExpress.Persistent.Base;
       4 // ... 
       5 public class ShowCurrentUserController : WindowController {
       6     public ShowCurrentUserController() {
       7         PopupWindowShowAction showCurrentUserAction = new PopupWindowShowAction(
       8         this, "ShowCurrentUser", PredefinedCategory.Edit);
       9         showCurrentUserAction.CustomizePopupWindowParams += ShowCurrentUserAction_CustomizePopupWindowParams;
      10     }
      11 
      12     private void ShowCurrentUserAction_CustomizePopupWindowParams(
      13         object sender, CustomizePopupWindowParamsEventArgs e) {
      14         IObjectSpace newObjectSpace = Application.CreateObjectSpace(SecuritySystem.CurrentUser.GetType());
      15         object currentUser = newObjectSpace.GetObject(SecuritySystem.CurrentUser);
      16         e.View = Application.CreateDetailView(newObjectSpace, currentUser);
      17     }
      18 }

       訪問標準當前用戶

        當需要在篩選條件中使用當前用戶時,請使用CurrentUserId函數criteria操作符。

      初始化對象所有者

        將當前對象引用分配給Owner對象。

      1 void IXafEntityObject.OnCreated() {
      2     Owner = objectSpace.GetObjectByKey<PermissionPolicyUser>(SecuritySystem.CurrentUserId);
      3 }

         XPO對象

      1 public override void AfterConstruction() {
      2     base.AfterConstruction();
      3     if (SecuritySystem.CurrentUser != null) {
      4         Owner = Session.GetObjectByKey<PermissionPolicyUser>(SecuritySystem.CurrentUserId);
      5     }
      6 }

       根據對象那個所有者配置權限  

        為要篩選的對象類型添加類型權限,并將其AllowRead屬性設置為false。

        向該類型權限添加對象權限,將其AllowRead屬性設置為true,將Criteria屬性設置為“Owner”。Oid = CurrentUserId ()”。

      參考網址

        [1] https://documentation.devexpress.com/eXpressAppFramework/113152/Task-Based-Help/Security/How-to-Get-the-Current-User-in-Code

      posted @ 2019-09-09 00:22  陸陸無為而治者  閱讀(597)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 亚洲精品国产字幕久久麻豆| 翘臀少妇被扒开屁股日出水爆乳| 国产精品污www在线观看| 四虎永久在线精品8848a| 深田えいみ禁欲后被隔壁人妻| 成人午夜福利视频后入| 视频一区二区三区刚刚碰| 国产不卡一区二区在线| 黔江区| 色悠悠久久精品综合视频| 国产一区二区日韩经典| 亚洲成av人片天堂网老年人| 一区二区三区四区黄色片| 伊人久久大香线蕉AV网禁呦| 白沙| 色噜噜一区二区三区| 少妇太爽了在线观看免费视频| 亚洲精品一区二区妖精| 一区二区丝袜美腿视频| 欧洲亚洲国内老熟女超碰| 四虎永久精品免费视频| 国产一区二区三区色老头| 亚洲综合无码一区二区| 最新的国产成人精品2020| 国产午夜福利av在线麻豆| 成人国产精品日本在线观看| 亚洲码国产精品高潮在线| 中文字幕日韩国产精品| 免费人成年激情视频在线观看| 成人午夜大片免费看爽爽爽| 成年女人片免费视频播放A| 霍州市| 国产亚洲精品在av| 又长又粗又爽又高潮的视频| 18禁无遮挡啪啪无码网站破解版| 色悠悠国产精品免费在线| 暖暖影院日本高清...免费| 天堂网av一区二区三区| 亚洲第一极品精品无码久久| 乌苏市| 内射视频福利在线观看|