protected override void OnDeactivated() { // Unsubscribe from previously subscribed events and release other references and resources. if (exportCtrl != null) { exportCtrl.Active.RemoveItem(Key); exportCtrl = null; } if (webExportCtrl != null) { webExportCtrl.Active.RemoveItem(Key); webExportCtrl = null; } base.OnDeactivated(); }
protected override void OnActivated() { base.OnActivated(); // Perform various tasks depending on the target View. exportCtrl = Frame.GetController <ExportController>(); webExportCtrl = Frame.GetController <WebExportController>(); //ist der aktuelle Benutze admin?? curUser = (PermissionPolicyUser)SecuritySystem.CurrentUser; int adminQuery = curUser.Roles.Where(t => t.IsAdministrative).Count(); if (adminQuery <= 0) { if (exportCtrl != null) { exportCtrl.Active[Key] = false; } if (webExportCtrl != null) { webExportCtrl.Active[Key] = false; } } }
protected override void OnActivated() { base.OnActivated(); webExportController = Frame.GetController <WebExportController>(); webExportController.CustomExport += webExportController_CustomExport; }