Ejemplo n.º 1
0
 public ActionResult SubmitExam(SubmitExamDTO dto)
 {
     try
     {
         var answerDetail = Request.Params["answerDetail"] ?? Request.Params["AnswerDetail"];
         if (answerDetail.IsNullOrEmpty())
         {
             throw new ArgumentNullException("answerDetail", "参数不能为空");
         }
         dto.AnswerDetail = JsonHelper.FromJson <Answerdetail[]>(answerDetail);
         var res = _examRecordContract.SubmitExam(dto);
         return(Json(res));
     }
     catch (Exception e)
     {
         return(Json(OperationResult.Error(e.Message)));
     }
 }
Ejemplo n.º 2
0
        public ActionResult SubmitExam(SubmitExamDTO dto)
        {
            var res = _examRecordContract.SubmitExam(dto);

            return(Json(res));
        }