using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace VRS.Management.Exam { public partial class ResultDetailPicture : BasePage { DataService.BLL.exam_result_match bll_match = new DataService.BLL.exam_result_match(); DataService.BLL.exam_result_detail bll_exam_result_detail = new DataService.BLL.exam_result_detail(); protected override void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataLoad(); } } protected void DataLoad() { string Id = Request.Params["Id"]; if (!string.IsNullOrWhiteSpace(Id)) { var model = bll_exam_result_detail.GetModel(Id); //name.Text = model.subject; lb_no.Text = model.no.ToString(); lb_type.Text = model.questionType; if (!string.IsNullOrEmpty(model.r1)) { imgTopic.ImageUrl = model.r1; } if (!string.IsNullOrEmpty(model.r2)) { imgTopic2.ImageUrl = model.r2; } //pic_score.Text = model.pic_score.HasValue ? model.pic_score.Value.ToString() : ""; } else { OnError(null); } } protected void btnSure_Click(object sender, EventArgs e) { decimal value = 0; if (!decimal.TryParse(pic_score.Text, out value)) { RadAjaxManager1.Alert("分值数值不合法!"); return; } DataService.Model.exam_result_match model = bll_match.GetModel(Request.Params["Id"]); model.pic_score = value; model.sum_score = model.score + model.pic_score; if (bll_match.Update(model)) { //log.write_log("修改素材成功。" + "素材名称:" + name.Text.Trim() + ",ID:" + model.material_id); RadAjaxManager1.ResponseScripts.Add("alert('修改成功!');CloseAndRebind();"); } else RadAjaxManager1.Alert("修改失败!"); } } }