📄 submitpaper.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 + -