📄 admin_answercheck.aspx.cs
字号:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ExamModel.Auto_Generated_Code;
using ExamBLL.Auto_Generated_Code;
public partial class Admin_admin_answerCheck : System.Web.UI.Page
{
Score score;
int scoreid;
Answer answer = new Answer();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
scoreid = Convert.ToInt32(Request.QueryString["ScoreID"]);
}
catch
{
scoreid = -1;
}
score = ScoreManager.GetScoreById(scoreid);
Label1.Text = score.UID.UID;
Label2.Text = score.PaperID.PaperName;
InitData();
}
}
protected void InitData()
{
string uid=score.UID.UID;
int paperid=score.PaperID.PaperId;
DataSet ds5 = AnswerManager.GetAnswerByuidPaperid(uid, paperid);
GridView5.DataSource = ds5;
GridView5.DataBind();
//DataSet ds5 = PaperDetailManager.GetAllPaperDetailByPaperId(paper.PaperId, "简答题");
//GridView5.DataSource = ds5;
//GridView5.DataBind();
//((Label)GridView5.HeaderRow.FindControl("Label13")).Text = ((Label)GridView5.Rows[0].FindControl("Label35")).Text;
}
protected void Button1_Click(object sender, EventArgs e)
{
//更新分数
scoreid = Convert.ToInt32(Request.QueryString["ScoreID"]);
Score score = ScoreManager.GetScoreById(scoreid);
score.BackScore = int.Parse(this.txtMark.Text.ToString());
score.TotleScore = score.FrontScore + score.BackScore;
if (ScoreManager.UpdateMark(score))
{
this.Label3.Text = "修改完成";
Response.Redirect("~/Admin/admin_ScoreList.aspx");
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -