private void BindTree()
    {
        try
        {
            string TypeFlag = Request["TypeFlag"].ToString();
            if (!string.IsNullOrEmpty(TypeFlag))
            {
                DataTable dt = ApprovalFlowSetBus.GetBillTypeByType(TypeFlag);
                if (dt != null && dt.Rows.Count > 0)
                {
                    TreeNode node = new TreeNode();
                    node.Value       = dt.Rows[0]["TypeFlag"].ToString();
                    node.Text        = dt.Rows[0]["ModuleName"].ToString();
                    node.NavigateUrl = string.Format("javascript:javascript:void(0)");
                    BindTreeChildNodes(node);
                    Tree_BillTpye.Nodes.Add(node);
                    node.Expanded = true;
                }

                Tree_BillTpye.DataBind();
                Tree_BillTpye.Nodes[0].Selected = true;
            }
        }
        catch (Exception)
        {
            throw;
        }
    }
Beispiel #2
0
    private void BindTree()
    {
        string   TypeFlag     = "3";
        TreeNode BillTypeNode = new TreeNode();

        BillTypeNode.Text  = "单据类型";
        BillTypeNode.Value = "0";
        Tree_BillTpye.Nodes.Add(BillTypeNode);
        BindTreeChildNodes(BillTypeNode, TypeFlag);
        Tree_BillTpye.DataBind();
    }