예제 #1
0
        private void PopulateRootLevel()
        {
            DataTable dt = new DataTable();

            TreeDevice.SelectMethod = "GetAll";
            DataView dv = (DataView)TreeDevice.Select();

            dt = dv.Table;

            PopulateNodes(dt, TreeView1.Nodes);
        }
예제 #2
0
        private void PopulateRootLevel_Update()
        {
            DataTable dt = new DataTable();

            TreeDevice.SelectMethod = "GetAll";
            TreeDevice.SelectParameters.Clear();
            TreeDevice.SelectParameters.Add("ID_Unit", FiltrRadioUnit.SelectedValue);
            DataView dv = (DataView)TreeDevice.Select();

            dt = dv.Table;
            PopulateNodes_Update(dt, TreeViewUpdate.Nodes);
        }
예제 #3
0
        private void PopulateSubLevel(int parent_id, TreeNode parentNode)
        {
            DataTable dt = new DataTable();

            TreeDevice.SelectMethod = "GetAllParent";
            TreeDevice.SelectParameters.Clear();
            TreeDevice.SelectParameters.Add("Parent_ID", parent_id.ToString());
            DataView dv = (DataView)TreeDevice.Select();

            dt = dv.Table;
            PopulateNodes(dt, parentNode.ChildNodes);
        }
예제 #4
0
        private void PopulateRootLevel(int i)
        {
            DataTable dt = new DataTable();

            TreeDevice.SelectMethod = "GetAll";
            TreeDevice.SelectParameters.Clear();
            TreeDevice.SelectParameters.Add("ID_Unit", "");
            DataView dv = (DataView)TreeDevice.Select();

            dt = dv.Table;

            TreeView TreeView1 = new TreeView();

            TreeView1.ID = "TreeView1";
            TreeView1.Attributes.Add("TreeNodePopulate", "TreeNodePopulate");
            TreeView1.EnableViewState    = true;
            TreeView1.EnableClientScript = true;
            CheckBoxImage.Items[i].FindControl("TDControl").Controls.Add(TreeView1);

            PopulateNodes(dt, TreeView1.Nodes);
        }