public Response <ExamScore> SubmitExam(SubmitExamDTO submitExamDTO) { IRestResponse response = REST.RestClient.Instance.SubmitExam(submitExamDTO); Response <ExamScore> responseData = ResponseHelper.GetResponse <ExamScore>(response); return(responseData); }
public RestSharp.IRestResponse SubmitExam(SubmitExamDTO submitExamDTO) { RestSharp.RestRequest request = new RestSharp.RestRequest("exam", RestSharp.Method.PUT); request.JsonSerializer = new NewtonsoftJsonSerializer(); request.AddJsonBody(submitExamDTO); RestSharp.IRestResponse response = Execute(request); return(response); }
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))); } }
public ActionResult SubmitExam(SubmitExamDTO dto) { var res = _examRecordContract.SubmitExam(dto); return(Json(res)); }