Example #1
0
    private void BindTree(TreeNodeCollection TNC, int SuperID)
    {
        AC_AccountTitleBLL      _bll       = new AC_AccountTitleBLL();
        IList <AC_AccountTitle> _modellist = _bll._GetModelList("SuperID=" + SuperID.ToString());

        foreach (AC_AccountTitle _model in _modellist)
        {
            TreeNode tn = new TreeNode();
            tn.Text  = _model.Name;
            tn.Value = _model.ID.ToString();
            TNC.Add(tn);
            if (_model.ID == 1)
            {
                BindTree(tn.ChildNodes, _model.ID);
            }
        }
    }
    private void BindTree(TreeNodeCollection TNC, int SuperID)
    {
        AC_AccountTitleBLL _bll = new AC_AccountTitleBLL();
        IList<AC_AccountTitle> _modellist = _bll._GetModelList("SuperID=" + SuperID.ToString());

        foreach (AC_AccountTitle _model in _modellist)
        {
            TreeNode tn = new TreeNode();
            tn.Text = _model.Name;
            tn.Value = _model.ID.ToString();
            TNC.Add(tn);
            if (_model.ID == 1)
                BindTree(tn.ChildNodes, _model.ID);

        }
    }