Web/Admin/roleAdmin/roleUpdate.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Admin_roleAdmin_roleUpdate :basePage
{
    Bll.RolesBll ro = new Bll.RolesBll();
    Model.tab_roles Mro = new Model.tab_roles();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            //this.CheckUser();
            powClass();
            string rID = Request.QueryString["rid"].ToString();
            Mro.RoleID = Convert.ToInt32(rID);
            DataTable dr =ro.GetAny(Mro);
            ViewState["rid"] = rID;

            this.TextBox1.Text = dr.Rows[0]["roleName"].ToString();
            this.TextBox4.Text = dr.Rows[0]["roleContent"].ToString();

            string[] pows = dr.Rows[0]["roleInfo"].ToString().Split('|');

            for (int j = 0; j < this.Repeater1.Items.Count; j++)
            {
                CheckBoxList ck = (CheckBoxList)this.Repeater1.Items[j].FindControl("CheckBoxList1");
                for (int k = 0; k < ck.Items.Count; k++)
                {
                    for (int i = 0; i < pows.Length; i++)
                    {
                        if (ck.Items[k].Value == pows[i])
                        {
                            ck.Items[k].Selected = true;
                        }
                    }
                }
            }
        }

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string pows = string.Empty;
        for (int i = 0; i < this.Repeater1.Items.Count; i++)
        {
            CheckBoxList ck = (CheckBoxList)this.Repeater1.Items[i].FindControl("CheckBoxList1");
            for (int j = 0; j < ck.Items.Count; j++)
            {
                if (ck.Items[j].Selected)
                {
                    pows += ck.Items[j].Value + "|";
                }
后面还有 27 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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