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;
        }
    }
Esempio n. 2
0
    /// <summary>
    /// 绑定用户
    /// </summary>
    private void BindDplUsreInfo()
    {
        DataTable userList = XBase.Business.Office.SystemManager.UserInfoBus.GetUserList();

        //string companycd = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        string companycd = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).CompanyCD;
        string userid    = ((UserInfoUtil)SessionUtil.Session["UserInfo"]).UserID;

        this.hfuserid.Value = userid;
        TreeNode node = new TreeNode();

        node.Text        = "用户列表";
        node.NavigateUrl = string.Format("javascript:javascript:void(0)");

        DataRow[] rows = userList.Select("CompanyCD='" + companycd + "'");
        foreach (DataRow row in rows)//.GetEnumerator())
        {
            if (row["UserID"].ToString() != userid)
            {
                if (row["IsRoot"].ToString() != "1")
                {
                    TreeNode  node2 = new TreeNode(row["UserID"].ToString());
                    DataTable dt    = UserInfoBus.GetUserInfoByID(row["UserID"].ToString(), companycd);
                    if (dt.Rows.Count > 0)
                    {
                        hfcommanycd.Value = dt.Rows[0]["CompanyCD"].ToString();
                    }
                    node2.NavigateUrl = string.Format("javascript:SelectedNodeChanged('{0}');", node2.Text);
                    node.ChildNodes.Add(node2);
                }
            }
        }
        this.Tree_BillTpye.Nodes.Add(node);
        Tree_BillTpye.ExpandAll();
    }
Esempio n. 3
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();
    }