protected override void OnInit(EventArgs e) { base.OnInit(e); var resourceManager = GetResourceManager(typeof(ResourceIdentifier)); AllPermisionsMenu.MenuItems.Add( new WebMenuItem { ItemID = c_clearAllMenuItemID, Text = resourceManager.GetString(ResourceIdentifier.AllPermissionsMenu_ClearAllPermissions_Text), Icon = new IconInfo(GetIconUrl("PermissionUndefined.gif").GetUrl()) }); AllPermisionsMenu.MenuItems.Add( new WebMenuItem { ItemID = c_grantAllMenuItemID, Text = resourceManager.GetString(ResourceIdentifier.AllPermissionsMenu_GrantAllPermissions_Text), Icon = new IconInfo(GetIconUrl("PermissionGranted.gif").GetUrl()) }); AllPermisionsMenu.MenuItems.Add( new WebMenuItem { ItemID = c_denyAllMenuItemID, Text = resourceManager.GetString(ResourceIdentifier.AllPermissionsMenu_DenyAllPermissions_Text), Icon = new IconInfo(GetIconUrl("PermissionDenied.gif").GetUrl()) }); AllPermisionsMenu.EventCommandClick += AllPermisionsMenu_EventCommandClick; if (string.IsNullOrEmpty(SpecificTenantField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(SpecificTenantField); } if (string.IsNullOrEmpty(SpecificGroupField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(SpecificGroupField); } if (string.IsNullOrEmpty(SpecificUserField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(SpecificUserField); } if (string.IsNullOrEmpty(SpecificGroupTypeField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(SpecificGroupTypeField); } if (string.IsNullOrEmpty(SpecificPositionField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(SpecificPositionField); } if (string.IsNullOrEmpty(SpecificAbstractRoleField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(SpecificAbstractRoleField); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); _parentField = GetControl <BocAutoCompleteReferenceValue> ("ParentField", "Parent"); if (string.IsNullOrEmpty(_parentField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(_parentField); } }
protected virtual IBusinessObjectBoundEditableWebControl CreateBocAutoCompleteReferenceValue(IBusinessObjectPropertyPath propertyPath) { ArgumentUtility.CheckNotNull("propertyPath", propertyPath); var control = new BocAutoCompleteReferenceValue(); SecurityManagerSearchWebService.BindServiceToControl(control); if (Is <User> (propertyPath) || Is <Group> (propertyPath)) { control.PreRender += delegate { BasePage page = (BasePage)control.Page; control.Args = page.CurrentFunction.TenantHandle.AsArgument(); }; } return(control); }
protected override void OnInit(EventArgs e) { base.OnInit(e); _owningGroupField = GetControl <BocAutoCompleteReferenceValue> ("OwningGroupField", "OwningGroup"); if (string.IsNullOrEmpty(_owningGroupField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(_owningGroupField); } var bocListInlineEditingConfigurator = ServiceLocator.GetInstance <BocListInlineEditingConfigurator>(); SubstitutedByList.EditModeControlFactory = ServiceLocator.GetInstance <UserSubstitedByListEditableRowControlFactory>(); bocListInlineEditingConfigurator.Configure(SubstitutedByList, Substitution.NewObject); RolesList.EditModeControlFactory = ServiceLocator.GetInstance <UserRolesListEditableRowControlFactory>(); bocListInlineEditingConfigurator.Configure(RolesList, Role.NewObject); }
protected override void OnInit(EventArgs e) { base.OnInit(e); _parentField = GetControl <BocAutoCompleteReferenceValue> ("ParentField", "Parent"); _groupTypeField = GetControl <BocAutoCompleteReferenceValue> ("GroupTypeField", "GroupType"); _groupTypeField.SelectionChanged += GroupTypeField_SelectionChanged; _groupTypeField.TextBoxStyle.AutoPostBack = true; var bocListInlineEditingConfigurator = ServiceLocator.GetInstance <BocListInlineEditingConfigurator>(); RolesList.EditModeControlFactory = ServiceLocator.GetInstance <GroupRolesListEditableRowControlFactory>(); bocListInlineEditingConfigurator.Configure(RolesList, Role.NewObject); if (string.IsNullOrEmpty(_parentField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(_parentField); } if (string.IsNullOrEmpty(_groupTypeField.SearchServicePath)) { SecurityManagerSearchWebService.BindServiceToControl(_groupTypeField); } }