Sry.Solution.UI/View/ORoleo.aspx.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data;
using Sry.Framework.Dal;
using Sry.Solution.Components;
using Sry.Entity;
using Sry.Data;

namespace Sry.Solution.UI.View
{
    public partial class ORoleo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request.QueryString["vname"]))
                {
                    spRole.InnerHtml = "当前角色:" + PublicMethod.ConvertTo<string>(Request.QueryString["vname"],"");
                }
                bindTree(tvList.Nodes, 0);

                if (!String.IsNullOrEmpty(Request.QueryString["vid"]))
                { 
                    //**设置原来的选中的

                }
            }
            //**用于通过后台代码实现复选框
            //tvList.Attributes.Add("onclick", "postBackByObject()");

            //**动态注册事件
            btnSave.ServerClick += new EventHandler(btnSave_Click);
        }
        public void bindTree(TreeNodeCollection nds, int IDStr)
        {
            Roles_Purview_Realations mode = new Roles_Purview_Realations() { rpr_RolesID = PublicMethod.ConvertTo<int>(Request.QueryString["vid"], 0) };
            Roles_Purview_Realations res = new Roles_Purview_RealationsData().Get(mode, 0);
            string purview = res != null ? PublicMethod.ConvertTo<string>(res.rpr_PurviewID, "") : "";
            nds.Clear();
            StringBuilder sbStr = new StringBuilder();
            sbStr.Append(@"SELECT [pur_ID]
                          ,[pur_FatherID]
                          ,[pur_Name]
                          ,[pur_MenuURL]
                      FROM [dbo].[Purviews] where [pur_FatherID]=" + IDStr.ToString());
            DataSet MYDT = SqlHelper.ExecuteDataset(SQLConfig.MainLink, CommandType.Text, sbStr.ToString());
            DataTable MyTable = MYDT.Tables[0];
            for (int i = 0; i < MyTable.Rows.Count; i++)
            {
                TreeNode ONode = new TreeNode();
                //**菜单名
                string menuName = MyTable.Rows[i]["pur_Name"].ToString();

后面还有 85 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。