/// <summary>
        /// 邦定部门列表
        /// </summary>
        private void BindTreeView()
        {
            tvOU.ClearAll();
            DataTable dt = null;

            Infragistics.WebUI.UltraWebNavigator.Node tn1;
            Infragistics.WebUI.UltraWebNavigator.Node tn2;

            //一层
            dt = new CodeGroupQuery().GetAllCodeGroup();

            tn1          = new Infragistics.WebUI.UltraWebNavigator.Node();
            tn1.Text     = "系统代码组";
            tn1.DataKey  = "0";
            tn1.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.False;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                tn2           = new Infragistics.WebUI.UltraWebNavigator.Node();
                tn2.Text      = dt.Rows[i]["CodeGroupName"].ToString();
                tn2.DataKey   = dt.Rows[i]["CodeGroupID"].ToString();
                tn2.CheckBox  = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                tn2.TargetUrl = "javascript:window.parent.frames['Code'].location.href = 'Code.aspx?ID=" + tn2.DataKey.ToString() + "';";
                tn1.Nodes.Add(tn2);
            }
            tvOU.Nodes.Add(tn1);

            tvOU.ExpandAll();
        }
Beispiel #2
0
 private void webTree_NodeBound(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
 {
     if (e.Node.Parent != null)
     {
         e.Node.Text = e.Node.Text;
         if (e.Node.Parent.Checked)
         {
             e.Node.Checked  = true;
             e.Node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.False;
         }
         else
         {
             e.Node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
         }
         if (e.Node.Checked)
         {
             Infragistics.WebUI.UltraWebNavigator.Node p = e.Node.Parent;
             while (p != null)
             {
                 if (p.Level > 0)
                 {
                     //p.Expand(false);
                     p = p.Parent;
                 }
                 else
                 {
                     p = null;
                 }
             }
         }
     }
 }
Beispiel #3
0
        /// <summary>
        /// toolbar事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void toolbar_MenuItemClick(object sender, MenuEventArgs e)
        {
            long ID = 0;

            switch (e.Item.Value)
            {
            case "Delete":
                if (e.Item.Value == "Delete")
                {
                    for (int i = 0; i < tvOU.CheckedNodes.Count; i++)
                    {
                        Infragistics.WebUI.UltraWebNavigator.Node tn = (Infragistics.WebUI.UltraWebNavigator.Node)tvOU.CheckedNodes[i];
                        if (tn.Nodes.Count > 0)
                        {
                            PageHelper.ShowExceptionMessage("选择删除的部门中不能包含有下级部门!");
                            return;
                        }

                        if (UserQuery.IsHavePerson(NDConvert.ToInt64(tn.DataKey.ToString())))
                        {
                            PageHelper.ShowExceptionMessage("选择删除的部门中有人员,请先删除人员后再删除部门!");
                            return;
                        }
                    }

                    for (int j = 0; j < tvOU.CheckedNodes.Count; j++)
                    {
                        Infragistics.WebUI.UltraWebNavigator.Node tn = (Infragistics.WebUI.UltraWebNavigator.Node)tvOU.CheckedNodes[j];
                        OUEntity entity = new OUEntity(NDConvert.ToInt64(tn.DataKey.ToString()));
                        entity.UpdateDate = DateTime.Now;
                        entity.IsDeleted  = true;
                        new OURule().Update(entity);
                    }
                    BindTreeView();
                    PageHelper.ShowMessage("删除成功!");
                }
                break;

            case "Add":
                if (tvOU.CheckedNodes.Count > 0)
                {
                    int tnLevel = ((Infragistics.WebUI.UltraWebNavigator.Node)tvOU.CheckedNodes[0]).Level;
                    if (tnLevel >= 3)
                    {
                        PageHelper.ShowExceptionMessage("此处部门树视图只支持到4层!");
                        return;
                    }
                    ID = NDConvert.ToInt64(((Infragistics.WebUI.UltraWebNavigator.Node)tvOU.CheckedNodes[0]).DataKey.ToString());
                }
                Page.ClientScript.RegisterStartupScript(this.GetType(), "add", "showModalWindow('OUDetailLY', '添加',600, 450, '../../web/SysManager/OUDetail.aspx?Operation=1&ID=' + " + ID + ");", true);
                break;

            case "Update":
                ID = NDConvert.ToInt64(((Infragistics.WebUI.UltraWebNavigator.Node)tvOU.CheckedNodes[0]).DataKey.ToString());
                Page.ClientScript.RegisterStartupScript(this.GetType(), "update", "showModalWindow('OUDetailLY', '修改',600, 450, '../../web/SysManager/OUDetail.aspx?Operation=2&ID=' + " + ID + ");", true);
                break;
            }
        }
Beispiel #4
0
    private void webTree_NodeBound(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
    {
        if (e.Node != null)
        {
            string sItemId = e.Node.DataKey.ToString();
            e.Node.Text     = e.Node.Text + " [#" + e.Node.DataKey.ToString() + "]";
            e.Node.DataPath = sItemId;

            // Retrieve the count of children, if the count is positive then the current node can be expanded
            e.Node.ShowExpand = Utils.GetCount(dbObj, String.Format("SELECT COUNT(*) FROM Items WHERE ParentId = {0}", sItemId)) > 0;

            using (HyperCatalog.Business.Item currentItem = HyperCatalog.Business.Item.GetByKey(Convert.ToInt64(sItemId)))
            {
                // Update checkbox
                if (user != null && user.HasItemInScope(currentItem.Id))
                {
                    e.Node.Checked = true;
                }

                if (e.Node.Parent != null)
                {
                    Infragistics.WebUI.UltraWebNavigator.Node p = e.Node.Parent;
                    if (p.Checked)
                    {
                        e.Node.Checked  = true;
                        e.Node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.False;
                    }
                    else
                    {
                        e.Node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                    }
                    if (e.Node.Checked)
                    {
                        while (p != null)
                        {
                            if (p.Level > 0)
                            {
                                p = p.Parent;
                            }
                            else
                            {
                                p = null;
                            }
                        }
                    }
                }

                if ((currentItem != null) && (currentItem.Level.SkuLevel))
                {
                    // Update Icon
                    e.Node.ImageUrl = "/hc_v4/img/type_" + currentItem.TypeId + ".png";
                }
            }
        }
    }
        /// <summary>
        /// 绑定树状结构
        /// </summary>
        private void BindTreeView()
        {
            tvMenu.ClearAll();
            DataTable dt = null;

            Infragistics.WebUI.UltraWebNavigator.Node tn1;
            Infragistics.WebUI.UltraWebNavigator.Node tn2;
            Infragistics.WebUI.UltraWebNavigator.Node tn3;

            //一层
            dt = new MenuQuery().GetMenuTop();

            tn1          = new Infragistics.WebUI.UltraWebNavigator.Node();
            tn1.Text     = "系统菜单";
            tn1.DataKey  = "0";
            tn1.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.False;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                tn2          = new Infragistics.WebUI.UltraWebNavigator.Node();
                tn2.Text     = dt.Rows[i]["MenuName"].ToString();
                tn2.DataKey  = dt.Rows[i]["MenuID"].ToString();
                tn2.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                if (dt.Rows[i]["IsDisplay"].ToString() == "0")
                {
                    tn2.Style.Font.Bold = true;
                }
                //tn2.TargetUrl = "javascript:window.parent.frames['Code'].location.href = 'Code.aspx?ID=" + tn2.DataKey.ToString() + "';";
                tn1.Nodes.Add(tn2);
                //二层
                DataTable dtChild = new MenuQuery().GetMenuChild(NDConvert.ToInt64(dt.Rows[i]["MenuID"].ToString()));
                for (int j = 0; j < dtChild.Rows.Count; j++)
                {
                    tn3          = new Infragistics.WebUI.UltraWebNavigator.Node();
                    tn3.Text     = dtChild.Rows[j]["MenuName"].ToString();
                    tn3.DataKey  = dtChild.Rows[j]["MenuID"].ToString();
                    tn3.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                    if (dtChild.Rows[j]["IsDisplay"].ToString() == "False")
                    {
                        tn3.Style.ForeColor = System.Drawing.Color.Blue;
                    }
                    tn3.TargetUrl = "javascript:window.parent.frames['MenuFunction'].location.href = 'MenuFunction.aspx?ID=" + tn3.DataKey.ToString() + "';";
                    tn2.Nodes.Add(tn3);
                }
            }
            tvMenu.Nodes.Add(tn1);

            tvMenu.ExpandAll();
        }
        /// <summary>
        /// toolbar事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void toolbar_MenuItemClick(object sender, MenuEventArgs e)
        {
            long ID = 0;

            switch (e.Item.Value)
            {
            case "Delete":
                if (e.Item.Value == "Delete")
                {
                    int    succeed        = 0;
                    string CodeGroupNames = "";
                    for (int j = 0; j < tvOU.CheckedNodes.Count; j++)
                    {
                        Infragistics.WebUI.UltraWebNavigator.Node tn = (Infragistics.WebUI.UltraWebNavigator.Node)tvOU.CheckedNodes[j];
                        long CodeGroupID = NDConvert.ToInt64(tn.DataKey.ToString());

                        CodeGroupEntity entity = new CodeGroupEntity(CodeGroupID);
                        if (!CodeQuery.IsExistCode(CodeGroupID))
                        {
                            entity.IsDeleted = true;
                            new CodeGroupRule().Update(entity);
                            succeed++;
                        }
                        else
                        {
                            CodeGroupNames += "[" + entity.CodeGroupName + "]";
                        }
                    }
                    if (succeed > 0)
                    {
                        BindTreeView();
                        PageHelper.ShowMessage("删除成功!");
                    }
                    if (CodeGroupNames != "")
                    {
                        string msgErr = "代码组名称为" + CodeGroupNames + "的记录不可删除!\\n\\n" +
                                        "可先删除代码组中包含的代码记录后再删除该代码组!";
                        PageHelper.ShowExceptionMessage(msgErr);
                    }
                }
                break;

            case "Update":
                ID = NDConvert.ToInt64(((Infragistics.WebUI.UltraWebNavigator.Node)tvOU.CheckedNodes[0]).DataKey.ToString());
                Page.ClientScript.RegisterStartupScript(this.GetType(), "更新", "showModalWindow('CodeGroupEditLY', '修改',750, 220, '../../web/SysManager/CodeGroupEdit.aspx?Operation=2&ID=' + " + ID + ");", true);
                break;
            }
        }
    private void webTree_NodeBound(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
    {
        if (e.Node != null)
        {
            e.Node.ShowExpand = Utils.GetCount(dbObj, "SELECT COUNT(*) FROM Items WHERE ParentId = " + e.Node.DataKey.ToString()) > 0;
            if (e.Node.Parent != null)
            {
                if (e.Node.Parent.Checked)
                {
                    // remove checkbox
                    e.Node.Checked  = true;
                    e.Node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.False;
                }
                else
                {
                    // add checkbox
                    e.Node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                }

                if (e.Node.Checked)
                {
                    Infragistics.WebUI.UltraWebNavigator.Node p = e.Node.Parent;
                    while (p != null)
                    {
                        if (p.Level > 0)
                        {
                            p = p.Parent;
                        }
                        else
                        {
                            p = null;
                        }
                    }
                }
            }

            // Update image
            e.Node.ImageUrl = "/hc_v4/ig/s_l.gif";

            HyperCatalog.Business.Item currentItem = HyperCatalog.Business.Item.GetByKey(Convert.ToInt64(e.Node.DataKey));
            if ((currentItem != null) && (currentItem.Level.SkuLevel))
            {
                // Update Icon
                e.Node.ImageUrl = "/hc_v4/img/type_" + currentItem.TypeId + ".png";
            }
        }
    }
Beispiel #8
0
 private void ExpandNode(string nodeId)
 {
     Infragistics.WebUI.UltraWebNavigator.Node n = Utils.FindNodeInTree(webTree.Nodes, nodeId);
     if (n != null && !n.Expanded)
     {
         using (dbObj = Utils.GetMainDB())
         {
             // Retrieve all children
             DataSet ds = dbObj.RunSPReturnDataSet("dbo._User_ScopeGetTV", "Items",
                                                   new SqlParameter("@UserId", -1),
                                                   new SqlParameter("@ParentId", nodeId));
             n.DataBind(ds.Tables[0].DefaultView, "Items");
             dbObj.CloseConnection();
         }
         n.Expanded = true;
     }
 }
    private void ExpandNodes()
    {
        using (dbObj = Utils.GetMainDB())
        {
            using (DataSet ds = dbObj.RunSPReturnDataSet("dbo._LinkType_GetItems", "Items",
                                                         new SqlParameter("@LinkTypeId", linkTypeId),
                                                         new SqlParameter("@LinkFromTo", Convert.ToByte(!linkFrom)),
                                                         new SqlParameter("@Company", SessionState.CompanyName)))
            {
                dbObj.CloseConnection();

                if (dbObj.LastError.Length > 0)
                {
                    lbError.CssClass = "hc_error";
                    lbError.Text     = dbObj.LastError;
                    lbError.Visible  = true;
                }
                else
                {
                    if (ds != null)
                    {
                        foreach (DataRow dr in ds.Tables[0].Rows)
                        {
                            long currentItemId = Convert.ToInt64(dr["ItemId"]);
                            Infragistics.WebUI.UltraWebNavigator.Node n = Utils.FindNodeInTree(webTree.Nodes, currentItemId.ToString());

                            if (n == null)
                            {
                                DataSet parentsDS = dbObj.RunSPReturnDataSet("dbo.QDE_GetParents", "Parents", new SqlParameter("@ItemId", currentItemId));
                                dbObj.CloseConnection();
                                for (int i = 0; i < parentsDS.Tables["Parents"].Rows.Count; i++)
                                {
                                    ExpandNode(parentsDS.Tables["Parents"].Rows[i]["ItemId"].ToString());
                                }
                                parentsDS.Dispose();
                                n = Utils.FindNodeInTree(webTree.Nodes, currentItemId.ToString());
                            }
                        }
                        ds.Dispose();
                    }
                }
            }
        }
    }
Beispiel #10
0
 private void RecurseNodes(Infragistics.WebUI.UltraWebNavigator.Node n, bool check)
 {
     foreach (Infragistics.WebUI.UltraWebNavigator.Node node in n.Nodes)
     {
         if (check)
         {
             if (node.Checked)
             {
                 RemoveItem(node.DataKey.ToString());
             }
             node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.False;
         }
         else
         {
             node.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
         }
         RecurseNodes(node, check);
         node.Checked = check;
     }
 }
Beispiel #11
0
 private void RecurseNodes(Infragistics.WebUI.UltraWebNavigator.Node n, bool check)
 {
     for (int i = 0; i < n.Nodes.Count; i++)
     {
         if (check)
         {
             if (n.Nodes[i].Checked)
             {
                 RemoveMenuFromScope(n.Nodes[i].DataKey.ToString());
             }
             n.Nodes[i].CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.False;
         }
         else
         {
             n.Nodes[i].CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
         }
         RecurseNodes(n.Nodes[i], check);
         n.Nodes[i].Checked = check;
     }
 }
Beispiel #12
0
 private void ExpandNode(string nodeId)
 {
     Infragistics.WebUI.UltraWebNavigator.Node n = Utils.FindNodeInTree(webTree.Nodes, nodeId);
     if (n != null)
     {
         using (dbObj = Utils.GetMainDB())
         {
             using (DataSet ds = dbObj.RunSPReturnDataSet("dbo._LinkType_GetTv", "Items",
                                                          new SqlParameter("@LinkTypeId", linkTypeId),
                                                          new SqlParameter("@ParentId", nodeId),
                                                          new SqlParameter("@LinkFromTo", Convert.ToByte(!linkFrom)),
                                                          new SqlParameter("@Company", SessionState.CompanyName)))
             {
                 dbObj.CloseConnection();
                 n.DataBind(ds.Tables[0].DefaultView, "Items");
                 ds.Dispose();
                 n.Expanded = true;
             }
         }
     }
 }
        /// <summary>
        /// toolbar
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void toolbar_MenuItemClick(object sender, MenuEventArgs e)
        {
            switch (e.Item.Value)
            {
            case "Delete":
                if (e.Item.Value == "Delete")
                {
                    for (int j = 0; j < tvMenu.CheckedNodes.Count; j++)
                    {
                        Infragistics.WebUI.UltraWebNavigator.Node tn = (Infragistics.WebUI.UltraWebNavigator.Node)tvMenu.CheckedNodes[j];
                        MenuEntity entity = new MenuEntity(NDConvert.ToInt64(tn.DataKey.ToString()));
                        entity.IsDeleted = true;
                        new MenuRule().Update(entity);
                    }
                    BindTreeView();
                    PageHelper.ShowMessage("删除成功!");
                }
                break;

            case "Add":
                this.MenuID = 0;
                if (tvMenu.CheckedNodes.Count != 0)
                {
                    this.MenuID = NDConvert.ToInt64(((Infragistics.WebUI.UltraWebNavigator.Node)tvMenu.CheckedNodes[0]).DataKey.ToString());
                }
                MenuEntity entity1 = new MenuEntity(this.MenuID);
                if (entity1.ParentMenuID != 0)
                {
                    PageHelper.ShowExceptionMessage("此菜单下不能再添加子菜单!");
                    return;
                }
                Page.ClientScript.RegisterStartupScript(this.GetType(), "新增", "showModalWindow('MenuDetailLY', '新增',750, 220, '../../web/SysManager/MenuDetail.aspx?Operation=1&ID=' + " + this.MenuID + ");", true);
                break;

            case "Update":
                this.MenuID = NDConvert.ToInt64(((Infragistics.WebUI.UltraWebNavigator.Node)tvMenu.CheckedNodes[0]).DataKey.ToString());
                Page.ClientScript.RegisterStartupScript(this.GetType(), "更新", "showModalWindow('MenuDetailLY', '修改',750, 220, '../../web/SysManager/MenuDetail.aspx?Operation=2&ID=' + " + this.MenuID + ");", true);
                break;
            }
        }
Beispiel #14
0
 private void AddNode(Infragistics.WebUI.UltraWebNavigator.Node entryNode, HyperCatalog.Business.Menu m)
 {
     if (m.Active)
     {
         bool isChecked = false;
         foreach (HyperCatalog.Business.Menu cMenu in capability.Menus)
         {
             if (cMenu.Id == m.Id)
             {
                 isChecked = true;
                 break;
             }
         }
         Infragistics.WebUI.UltraWebNavigator.Node n = new Infragistics.WebUI.UltraWebNavigator.Node();
         n.DataKey   = m.Id;
         n.Text      = m.Text;
         n.Checked   = isChecked;
         n.TargetUrl = "javascript://";
         if (entryNode == null)
         {
             entryNode = uwMenu.Nodes.Add(n);
         }
         else
         {
             if (m.Icon != string.Empty)
             {
                 n.ImageUrl = "/hc_v4/img/" + m.Icon;
             }
             entryNode = entryNode.Nodes.Add(n);
         }
         foreach (HyperCatalog.Business.Menu subMenu in m.Childs)
         {
             if (m.Active)
             {
                 AddNode(entryNode, subMenu);
             }
         }
     }
 }
Beispiel #15
0
        /// <summary>
        /// 邦定部门列表
        /// </summary>
        private void BindTreeView()
        {
            tvOU.ClearAll();
            DataTable dt  = null;
            DataTable dt1 = null;
            DataTable dt2 = null;
            DataTable dt3 = null;

            Infragistics.WebUI.UltraWebNavigator.Node tn1;
            Infragistics.WebUI.UltraWebNavigator.Node tn2;
            Infragistics.WebUI.UltraWebNavigator.Node tn3;
            Infragistics.WebUI.UltraWebNavigator.Node tn4;

            //一层
            dt = new OUQuery().GetOU(0);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                tn1          = new Infragistics.WebUI.UltraWebNavigator.Node();
                tn1.Text     = dt.Rows[i]["OUName"].ToString();
                tn1.DataKey  = dt.Rows[i]["OUID"].ToString();
                tn1.CheckBox = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;

                if (new OUQuery().IsOUParent(NDConvert.ToInt64(tn1.DataKey)) == false)
                {
                    tn1.TargetUrl = "javascript:window.parent.frames['PersonManager'].location.href = 'UserManager.aspx?OUID=" + tn1.DataKey.ToString() + "';";
                }

                //二层
                dt1 = new OUQuery().GetOU(NDConvert.ToInt64(tn1.DataKey));
                for (int j = 0; j < dt1.Rows.Count; j++)
                {
                    tn2           = new Infragistics.WebUI.UltraWebNavigator.Node();
                    tn2.Text      = dt1.Rows[j]["OUName"].ToString();
                    tn2.DataKey   = dt1.Rows[j]["OUID"].ToString();
                    tn2.CheckBox  = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                    tn2.TargetUrl = "javascript:window.parent.frames['PersonManager'].location.href = 'UserManager.aspx?OUID=" + tn2.DataKey.ToString() + "';";
                    tn1.Nodes.Add(tn2);

                    //三层
                    dt2 = new OUQuery().GetOU(NDConvert.ToInt64(tn2.DataKey));
                    for (int m = 0; m < dt2.Rows.Count; m++)
                    {
                        tn3           = new Infragistics.WebUI.UltraWebNavigator.Node();
                        tn3.Text      = dt2.Rows[m]["OUName"].ToString();
                        tn3.DataKey   = dt2.Rows[m]["OUID"].ToString();
                        tn3.CheckBox  = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                        tn3.TargetUrl = "javascript:window.parent.frames['PersonManager'].location.href = 'UserManager.aspx?OUID=" + tn3.DataKey.ToString() + "';";
                        tn2.Nodes.Add(tn3);

                        //四层
                        dt3 = new OUQuery().GetOU(NDConvert.ToInt64(tn3.DataKey));
                        for (int n = 0; n < dt3.Rows.Count; n++)
                        {
                            tn4           = new Infragistics.WebUI.UltraWebNavigator.Node();
                            tn4.Text      = dt3.Rows[n]["OUName"].ToString();
                            tn4.DataKey   = dt3.Rows[n]["OUID"].ToString();
                            tn4.CheckBox  = Infragistics.WebUI.UltraWebNavigator.CheckBoxes.True;
                            tn4.TargetUrl = "javascript:window.parent.frames['PersonManager'].location.href = 'UserManager.aspx?OUID=" + tn4.DataKey.ToString() + "';";
                            tn3.Nodes.Add(tn4);
                        }
                    }
                }
                tvOU.Nodes.Add(tn1);
            }
            tvOU.ExpandAll();
        }
        /// <summary>
        /// �Զ������Ӳ˵���
        /// �ݹ����
        /// </summary>
        /// <param name="ParentNode"></param>
        /// <param name="ModuleCode"></param>
        /// <param name="moduleType"></param>
        /// <returns></returns>
        private Infragistics.WebUI.UltraWebNavigator.Node BindSubTree(Infragistics.WebUI.UltraWebNavigator.Node ParentNode, string ModuleCode)
        {
            Infragistics.WebUI.UltraWebNavigator.Node ftemp = new Infragistics.WebUI.UltraWebNavigator.Node();

            DataRow[] drSub = dtModuleHaveRight.Select("len(ModuleCode)=" + (ModuleCode.Length + 4) + "   and  ModuleCode like '" + ModuleCode + "%' AND ISENABLE='1'", "OrderNum desc"); ;

            string moduleName = "";
            string strTmpModUrl = "";

            for (int i = 0; i < drSub.Length; i++)
            {
                string ModuleTag = drSub[i]["MODULECODE"].ToString();
                if (Convert.ToString(Session["DEVTYPE"]) == "TEST" || (ModuleTag != "" && Convert.ToString(Session["FunCollection"]).IndexOf(ModuleTag) != -1) || ModuleTag == "ToAll")
                //if ((ModuleTag != "" && ModuleTag.IndexOf(Convert.ToString(Session["UserName"])) != -1) || ModuleTag == "ToAll")
                {
                    ftemp = new Infragistics.WebUI.UltraWebNavigator.Node();
                    ftemp.ImageUrl = "../Images/ModuleImages/SmallIcon/" + GetSmallImgUrl(drSub[i]["SmallIconAddress"].ToString());
                    strTmpModUrl = drSub[i]["ModuleUrl"].ToString();

                    ftemp.TargetUrl = strTmpModUrl;

                    ftemp.TargetFrame = "PageFrame";
                    ftemp.Style.Cursor = Infragistics.WebUI.Shared.Cursors.Hand;
                    ftemp.Style.CssClass = "OutLook2003Nod";

                    moduleName = Convert.ToString(drSub[i]["moduleName"]);
                    if (Convert.ToInt16(drSub[i]["isBlank"]) == 1)
                    {
                        ftemp.Text = "<span onclick='OpenMenuWin(\"" + strTmpModUrl + "\")';>" + moduleName + "</span>";
                        ftemp.TargetFrame = "_blank";
                    }
                    else
                    {
                        ftemp.Text = moduleName;
                        ftemp.TargetFrame = "PageFrame";
                    }

                    BindSubTree(ftemp, drSub[i]["ModuleCode"].ToString());
                    ParentNode.Nodes.Add(ftemp);
                }
            }
            return ParentNode;
        }
        /// <summary>
        /// �����˵���Table
        /// </summary>
        /// <param name="dTable"></param>
        /// <param name="ModuleCode"></param>
        private void BindTable(Table dTable, string ModuleCode)
        {
            TableRow rows;
            TableCell Newcell;
            DataRow[] drSub = dtModuleHaveRight.Select("len(ModuleCode)=" + (ModuleCode.Length + 4) + "   and  ModuleCode like '" + ModuleCode + "%' AND ISENABLE='1'", "OrderNum desc"); ;
            string moduleName = "";
            string strTmpModUrl = "";

            for (int i = 0; i < drSub.Length; i++)
            {
                string ModuleTag = drSub[i]["MODULECODE"].ToString();
                if (Convert.ToString(Session["DEVTYPE"]) == "TEST" || (ModuleTag != "" && Convert.ToString(Session["FunCollection"]).IndexOf(ModuleTag) != -1) || ModuleTag == "ToAll")
                //if (Convert.ToString(Session["DEVTYPE"]) == "TEST" || (ModuleTag != "" && ModuleTag.IndexOf(Convert.ToString(Session["UserName"])) != -1) || ModuleTag == "ToAll")
                {
                    fnode = new Infragistics.WebUI.UltraWebNavigator.Node();

                    moduleName = "<img src='../Images/ModuleImages/BigIcon/" + GetBigImgUrl(drSub[i]["bigIconAddress"].ToString()) + "' border='0'>";
                    moduleName += "<br>" + Convert.ToString(drSub[i]["moduleName"]);

                    strTmpModUrl = drSub[i]["ModuleUrl"].ToString();
                    if (strTmpModUrl.IndexOf(";") > -1)
                    {
                        strTmpModUrl = strTmpModUrl.Substring(0, strTmpModUrl.IndexOf(";"));
                    }

                    if (Convert.ToInt16(drSub[i]["isBlank"]) == 1)
                        moduleName = "<div onMouseOver='OverItems(this)' class='OutLookItemBg'  onMouseOut='OutItems(this)'  style=\"cursor:pointer;\" onclick='OpenMenuWin(\"" + strTmpModUrl + "\")'>" + moduleName + "</div>";
                    else
                        moduleName = "<div onMouseOver='OverItems(this)' class='OutLookItemBg'  onMouseOut='OutItems(this)'  style=\"cursor:pointer;\" onclick='OpenWinSelf(\"" + strTmpModUrl + "\",\"" + Convert.ToString(drSub[i]["moduleName"]) + "\")'>" + moduleName + "</div>";

                    rows = new TableRow();
                    rows.HorizontalAlign = HorizontalAlign.Center;
                    Newcell = new TableCell();
                    Newcell.Text = moduleName;
                    rows.Cells.Add(Newcell);
                    dTable.Rows.Add(rows);
                }
            }
        }
        /// <summary>
        /// �������˵�
        /// </summary>
        /// <param name="uTree"></param>
        /// <param name="ModuleCode"></param>
        private void BindTree(Infragistics.WebUI.UltraWebNavigator.UltraWebTree uTree, string ModuleCode)
        {
            uTree.Font.Size = FontUnit.Smaller;
            uTree.Font.Name = "Tahoma";
            uTree.Cursor = Infragistics.WebUI.Shared.Cursors.Hand;
            uTree.ExpandImage = "../Images/outlook2003/col.gif";
            uTree.CollapseImage = "../Images/outlook2003/exp.gif";
            uTree.Indentation = 20;
            //  uTree.ImageDirectory = "/ig_common/images/";

            DataRow[] drSub = dtModuleHaveRight.Select("len(ModuleCode)=" + (ModuleCode.Length + 4) + "   and  ModuleCode like '" + ModuleCode + "%' AND ISENABLE='1'", "OrderNum desc"); ;
            string submoduleCode = "";
            string moduleName = "";
            string strTmpModUrl = "";

            for (int i = 0; i < drSub.Length; i++)
            {
                string ModuleTag = drSub[i]["MODULECODE"].ToString();
                //if (Convert.ToString(Session["DEVTYPE"]) == "TEST" || (ModuleTag != "" && ModuleTag.IndexOf(Convert.ToString(Session["UserName"])) != -1) || ModuleTag == "ToAll")
                if (Convert.ToString(Session["DEVTYPE"]) == "TEST" || (ModuleTag != "" && Convert.ToString(Session["FunCollection"]).IndexOf(ModuleTag) != -1) || ModuleTag == "ToAll")
                {
                    fnode = new Infragistics.WebUI.UltraWebNavigator.Node();

                    fnode.ImageUrl = "../Images/ModuleImages/SmallIcon/" + GetSmallImgUrl(drSub[i]["SmallIconAddress"].ToString());
                    strTmpModUrl = drSub[i]["ModuleUrl"].ToString();
                    if (strTmpModUrl.IndexOf(";") > -1)
                    {
                        strTmpModUrl = strTmpModUrl.Substring(0, strTmpModUrl.IndexOf(";"));
                    }
                    fnode.TargetUrl = strTmpModUrl;// dvSub[i]["ModuleUrl"].ToString();

                    fnode.Style.CssClass = "OutLook2003Nod";
                    fnode.Style.Cursor = Infragistics.WebUI.Shared.Cursors.Hand;

                    moduleName = Convert.ToString(drSub[i]["moduleName"]);
                    if (Convert.ToInt32(drSub[i]["isBlank"]) == 1)
                    {
                        fnode.Text = "<span onclick='OpenMenuWin(\"" + strTmpModUrl + "\")'>" + moduleName + "</span>";
                        fnode.TargetFrame = "_blank";
                    }
                    else
                    {
                        fnode.Text = moduleName;
                        fnode.TargetFrame = "PageFrame";
                    }

                    submoduleCode = drSub[i]["ModuleCode"].ToString();
                    fnode = BindSubTree(fnode, drSub[i]["ModuleCode"].ToString());

                    //���ؽڵ�
                    uTree.Nodes.Add(fnode);
                }
            }
        }