Web/Admin/Paper/AddPaperByManualSelection.aspx.cs

(开头部分) 4KB

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

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

using Entity;
using BLL;

public partial class Admin_Paper_AddPaperByManualSelection : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        RoleCheck.DenyLogin();
        string sql = "select * from T_Department where deptName<>'管理员'";
        DataSet ds = SqlHelper.ExecuteDataSet(sql);
        drlDeptList.DataTextField = "deptName";
        drlDeptList.DataValueField = "deptID";
        drlDeptList.DataSource = ds.Tables[0].DefaultView;
        drlDeptList.DataBind();
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        PaperByManualSelection paper = new PaperByManualSelection();
        paper.PaperName = txtPaperName.Text;
        paper.PaperType.DeptID = Convert.ToInt16(drlDeptList.SelectedValue);
        paper.PaperType.DeptName = drlDeptList.SelectedItem.Text;
        paper.Creator.Name = SessionClass.GetLoginUser().Name;
        paper.CreatedTime = DateTime.Now;
        paper.FillBlankList = SessionClass.GetFillBlankList();
        paper.JudgeList = SessionClass.GetJudgeList();
        paper.SingleSelectionList = SessionClass.GetSingleSelection();
        paper.MultiSelectionList = SessionClass.GetMultiSelection();
        paper.SimpleAnswerList = SessionClass.GetSimpleAnswer();

        new BLLPaperByManuaSelection().CreatePaper(paper);

        SessionClass.SetFillBlankList(null);
        SessionClass.SetJudgeList(null);
        SessionClass.SetSingleSelection(null);
        SessionClass.SetMultiSelection(null);
        SessionClass.SetSimpleAnswer(null);

        Response.Redirect("PaperByManualSelectionList.aspx");
    }

    protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        List<SubjectOfFillBlank> list = (List<SubjectOfFillBlank>)e.ReturnValue;
        if (list == null || list.Count == 0)
        {
            Label1.Visible = true;
        }
后面还有 63 行代码,购买后查看完整代码

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

AI 解读

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

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