ExamManage/DanEdit.aspx.cs

(开头部分) 2KB

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

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

public partial class ExamManage_DanEdit : 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 = 21;
            if (myauthority.QXExists(RoleID, ModuleID))
            {
               
                if (!IsPostBack)
                {
                    //显示数据
                    int cid = Convert.ToInt16(Request.QueryString["id"].ToString());
                    DanQuestions my = new DanQuestions();
                    my.GetModel(cid);
                    this.txtName.Text = my.Subject;

                    this.txtOptionA.Text = my.OptionA;
                    this.txtOptionB.Text = my.OptionB;
                    this.txtOptionC.Text = my.OptionC;
                    this.txtOptionD.Text = my.OptionD;
                    this.txtNote.Text = my.Note;
                     this.droplist_Answer.SelectedValue =my.Answer;
                    this.droplist_LessonID.SelectedValue = my.LessonID.ToString() ;
                }
            }
            else
            {
                MessageBox.ShowAndRedirect(this.Page, "对不起!您无权操作此版块。", "../Main.aspx");
            }
        }
        else
        {
            MessageBox.ShowAndRedirect(this.Page, "对不起!您还没有登录系统。", "../Logout.aspx");
        }
    }



    protected void butAdd_Click(object sender, ImageClickEventArgs e)
    {
        int cid = Convert.ToInt16(Request.QueryString["id"].ToString());
        DanQuestions my = new DanQuestions();
        my.ID = cid;
        my.Subject = this.txtName.Text;

        my.OptionA = this.txtOptionA.Text;
        my.OptionB = this.txtOptionB.Text;
        my.OptionC = this.txtOptionC.Text;
        my.OptionD = this.txtOptionD.Text;
        my.Note = this.txtNote.Text;
        my.JoinTime = DateTime.Now;
        my.Answer = this.droplist_Answer.SelectedValue;
后面还有 6 行代码,购买后查看完整代码

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

AI 解读 AI

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

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