⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 submitpaper.ashx

📁 本在线考试系统采用了面向对象的分析和设计
💻 ASHX
字号:
<%@ WebHandler Language="C#" Class="SubmitPaper" %>

using System;
using System.Web;
using ExaminationSystem.BLL.Domain;
using ExaminationSystem.BLL.Service;

public class SubmitPaper : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {

        try
        {
           
            Student student = new StudentService().GetById(long.Parse(context.Request.Form["ID"].ToString()));
             //保存试卷
            PaperHelper.SaveAnswer(context);
            //交卷

            new ExaminationService().SubmitPaper(student);
      
            context.Response.Write("交卷成功!");

        }
        catch (Exception e)
        {
            context.Response.Write(e.Message);
        } 
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -