ExamManage/LessonManage.aspx.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ExamManage_LessonManage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Cookies["roleid"] != null)
        {
            Authority myauthority = new Authority();
            int RoleID = Convert.ToInt16(Server.HtmlEncode(Request.Cookies["roleid"].Value));
            int ModuleID = 20;
            if (myauthority.QXExists(RoleID, ModuleID))
            {
                if (!IsPostBack)
                {

                    binddr();
                }

            }
            else
            {
                MessageBox.ShowAndRedirect(this.Page, "对不起!您无权操作此版块。", "../Main.aspx");
            }
        }
        else
        {
            MessageBox.ShowAndRedirect(this.Page, "对不起!您还没有登录系统。", "../Logout.aspx");
        }
    }
    //绑定记录
    public void binddr()
    {
        Lesson my = new Lesson();
        string sqlstr = "1=1 ";
        sqlstr = sqlstr + " order by Num  ";
        DataView dv = my.GetList(sqlstr).Tables[0].DefaultView;
        PagedDataSource pds = new PagedDataSource();
        AspNetPager1.RecordCount = dv.Count;
        pds.DataSource = dv;
        pds.AllowPaging = true;
        pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
        pds.PageSize = AspNetPager1.PageSize;
        repCategory.DataSource = pds;
        repCategory.DataBind();
    }
    // 分页
    protected void AspNetPager1_PageChanged(object src, EventArgs e)
    {
        binddr();
    }

    // 删除
    protected void lbtnDelCa_Click(object sender, EventArgs e)
    {
        // 当前点击的按钮
        LinkButton lb = (LinkButton)sender;
后面还有 26 行代码,购买后查看完整代码

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

AI 解读 AI

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

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