Esempio n. 1
0
        protected override void Data_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            string pid = e.Parameters["ParentID"];

            Store1.DataSource = CurrentData.Where(p => p.ParentID == pid);
            Store1.DataBind();
        }
Esempio n. 2
0
        private Ext.Net.TreeNodeCollection getNodes(string pid)
        {
            Ext.Net.TreeNodeCollection nodes = new Ext.Net.TreeNodeCollection();
            IEnumerable <sysprog>      list2 = CurrentData.Where(prog => prog.ParentID == pid);

            foreach (sysprog item in list2)
            {
                Ext.Net.TreeNode node = new Ext.Net.TreeNode(item.ProgName)
                {
                    NodeID = item.id
                };
                if (item.IsGroup != "1")
                {
                    node.Leaf = true;
                }
                nodes.Add(node);
            }
            return(nodes);
        }