| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3315 人关注过本帖
标题:asp.net 读代码
取消只看楼主 加入收藏
洗洗梦晨
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2016-6-23
结帖率:0
收藏
已结贴  问题点数:20 回复次数:0 
asp.net 读代码
protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["UsersId"] != null)
                {
                    BLL.Users users = new BLL.Users();
                    Model.Users user = users.GetModel((int)Session["UsersId"]);
                    BLL.Roles roles =new BLL.Roles();
                    Model.Roles role = roles.GetModel(user.Fk_Roles_Id.Value);
                    BLL.PermisssionsNodes permisssionsNodes = new BLL.PermisssionsNodes();

                    List<Model.PermisssionsNodes> permisssionsNodesList = permisssionsNodes.GetModelList("Fk_Permissions_Id='" + role.Fk_Permissions_Id + "'");
                    List<Model.Nodes> nodes = new List<Model.Nodes>();
                    foreach (Model.PermisssionsNodes pn in permisssionsNodesList)
                    {
                        BLL.Nodes nodesBLL = new BLL.Nodes();
                        Model.Nodes node = nodesBLL.GetModel(pn.Fk_Nodes_Id.Value);
                        if (node != null)
                        {
                            if (node.ParentId == 0 && node.IsVisible == true)
                            {
                                nodes.Add(node);
                            }
                        }
                    }
                    Repeater1.DataSource = nodes.OrderBy(p=>p.Orders).ToList();
                    Repeater1.DataBind();
搜索更多相关主题的帖子: null 
2016-06-23 23:16
快速回复:asp.net 读代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.038772 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved