标题:asp.net 读代码
只看楼主
洗洗梦晨
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2016-6-23
结帖率:0
已结贴  问题点数:20 回复次数:1 
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
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:396
帖 子:11713
专家分:43267
注 册:2006-5-13
得分:20 
抱歉!.net的代码我还没有接触过,替你转到相应的版块吧。

活到老,学到老! http://www. E-mail:hu-jj@
2016-06-24 07:00



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-466300-1-1.html




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

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