示例#1
0
        private void Init()
        {
            tvData.CreateNodes(FReport.Dictionary);

            // remove existing business objects nodes
            for (int i = 0; i < tvData.Nodes.Count; i++)
            {
                if (tvData.Nodes[i].Tag is BusinessObjectDataSource)
                {
                    tvData.Nodes.RemoveAt(i);
                    i--;
                }
            }

            // create nodes using BOConverter
            BusinessObjectConverter conv = new BusinessObjectConverter(FReport.Dictionary);

            foreach (DataSourceBase data in FReport.Dictionary.DataSources)
            {
                if (data is BusinessObjectDataSource)
                {
                    conv.CreateTree(tvData.Nodes, data);
                }
            }
        }
示例#2
0
        private void Done()
        {
            CheckEnabled(tvData.Nodes);
            FReport.Dictionary.UpdateRelations();

            // create business objects based on tree
            BusinessObjectConverter conv = new BusinessObjectConverter(FReport.Dictionary);

            foreach (TreeNode node in tvData.Nodes)
            {
                if (node.Tag is BusinessObjectDataSource)
                {
                    conv.CreateDataSource(node);
                }
            }
        }
示例#3
0
        private void tvData_AfterCheck(object sender, TreeViewEventArgs e)
        {
            TreeNode node = e.Node;

            if (IsBusinessObjectNode(node))
            {
                BusinessObjectConverter conv = new BusinessObjectConverter(FReport.Dictionary);
                conv.CheckNode(node);
            }
            else
            {
                DataComponentBase data = node.Tag as DataComponentBase;
                if (node.Checked && data is Relation)
                {
                    EnableItem(tvData.Nodes, (data as Relation).ParentDataSource);
                }
            }
        }