Ejemplo n.º 1
0
        private void Tree_DataBind()
        {
            List <string> list = new List <string>();

            foreach (RadTreeNode node in Tree.GetAllNodes())
            {
                if (node.Expanded)
                {
                    list.Add(node.Value);
                }
            }

            ConfigurationDataSet.ActionDataTable table = ActionProvider.GetActionsTree() as ConfigurationDataSet.ActionDataTable;
            table.DefaultView.Sort = string.Format(CultureInfo.InvariantCulture, "{0},{1},{2}", table.ParentActionIdColumn.ColumnName, table.OrderNumberColumn.ColumnName, table.NameColumn.ColumnName);

            Tree.DataSource = table;
            Tree.DataBind();

            foreach (RadTreeNode node in Tree.GetAllNodes())
            {
                if (list.Contains(node.Value))
                {
                    node.Expanded = true;
                }
            }
        }
        private void Atv_DataBind(Guid groupId, Guid instanceId)
        {
            Guid roleId = GroupProvider.GetGroupInstanceRole(UserContext.Current.OrganizationId, groupId, instanceId);

            m_ActionIdList  = GroupProvider.GetActionIdList(groupId, instanceId, roleId);
            m_StartActionId = RoleProvider.GetStartActionId(roleId);

            Atv.DataSource = ActionProvider.GetActionsTree();
            Atv.DataBind();
        }
Ejemplo n.º 3
0
        private void ActionsTree_DataBind()
        {
            Guid startActionId = Guid.Empty;

            if (this.RoleId != Guid.Empty)
            {
                startActionId  = Micajah.Common.Bll.Providers.RoleProvider.GetStartActionId(RoleId);
                m_ActionIdList = Micajah.Common.Bll.Providers.ActionProvider.GetActionIdListByRoleId(RoleId);
            }

            ActionsTree.DataSource = ActionProvider.GetActionsTree();
            ActionsTree.DataBind();

            if (this.RoleId != Guid.Empty)
            {
                RadTreeNode node = ActionsTree.FindNodeByValue(startActionId.ToString());
                if (node != null)
                {
                    node.Selected = true;
                    node.ExpandParentNodes();
                    node.ToolTip = Resources.RoleEditControl_StartAction_ToolTip;
                }
            }
        }