public DbObjectEditorPages(GrtManager GrtManager, DBObjectEditorWrapper DbObjectEditorBE) : this() { grtManager = GrtManager; dbObjectEditorBE = DbObjectEditorBE; // initialize roles based on passed object roleTreeBE = new RoleTreeBE(DbObjectEditorBE.get_catalog()); roleTreeModel = new SimpleGrtTreeModel(allRolesTreeView, roleTreeBE, false); roleTreeModel.AddColumn(allRolesNameNodeControl, (int)RoleTreeBE.Columns.Name, false); allRolesTreeView.Model = roleTreeModel; objectRoleListBE = new ObjectRoleListWrapper(dbObjectEditorBE); objectRoleListModel = new SimpleGrtListModel(rolesTreeView, objectRoleListBE, false); objectRoleListModel.AddColumn(roleNameNodeControl, (int)ObjectRoleListWrapper.Columns.Name, false); rolesTreeView.Model = objectRoleListModel; objectPrivsListBE = objectRoleListBE.get_privilege_list(); RefreshPrivilegesList(); }
public override bool ReinitWithArguments(GrtValue value) { InitializingControls = true; try { Backend = new RoleEditorBE(GrtManager, value); // (Re) Initialize backend. roleTreeBE = RoleEditorBackend.get_role_tree(); roleTreeBE.refresh(); roleObjectListWrapper = RoleEditorBackend.get_object_list(); roleObjectListWrapper.refresh(); rolePrivilegeListWrapper = RoleEditorBackend.get_privilege_list(); rolePrivilegeListWrapper.refresh(); if (roleTreeModel != null) roleTreeModel.DetachEvents(); roleTreeModel = new SimpleGrtTreeModel(rolesTreeView, roleTreeBE, false); roleTreeModel.AddColumn(roleNameNodeControl, (int)RoleTreeBE.Columns.Name, false); rolesTreeView.Model = roleTreeModel; if (roleObjectListModel != null) roleObjectListModel.DetachEvents(); roleObjectListModel = new SimpleGrtListModel(roleObjectsTreeView, roleObjectListWrapper, objectIconNodeControl, false); roleObjectListModel.AddColumn(objectNameNodeControl, (int)RoleObjectListWrapper.Columns.Name, false); roleObjectsTreeView.Model = roleObjectListModel; RefreshFormData(); } finally { InitializingControls = false; } Invalidate(); return true; }