protected override ActionResult DoTask(string data)
            {
                string[] param = StringUtility.Split(data, "%27");
                int historyId = Convert.ToInt32(Request.QueryString["history"]);
                int score = 0;
                int singscore = 0;
                int multiscore = 0;
                int julgscore = 0;

                DefaultEntity defaultEntity = new DefaultEntity();
                defaultEntity.DefaultType = DefaultTypeEnum.SingleSelect;
                defaultEntity.Fill();
                singscore = defaultEntity.DefaultScore;

                defaultEntity.DefaultType = DefaultTypeEnum.MultiSelect;
                defaultEntity.Fill();
                multiscore = defaultEntity.DefaultScore;

                defaultEntity.DefaultType = DefaultTypeEnum.JudgeSelect;
                defaultEntity.Fill();
                julgscore = defaultEntity.DefaultScore;

                foreach (string val in param)
                {
                    string txt = (val ?? string.Empty).Trim();
                    if (string.IsNullOrEmpty(txt))
                        continue;
                    string[] idandanswer = StringUtility.Split(txt, "%22");
                    QuestionEntity entity = new QuestionEntity();
                    entity.QuestionId = Convert.ToInt32(Escape.JsUnEscape(idandanswer[0]));
                    entity.Fill();
                    int itemScore = 0;
                    if (entity.QuestionAnswer.Equals(Escape.JsUnEscape(idandanswer[1])))
                        itemScore = entity.QuestionScore;
                    if (itemScore == 0)
                    {
                        switch (entity.QuestionType)
                        {
                            case QuestionTypeEnum.SingleSelect:
                                itemScore = singscore;
                                break;
                            case QuestionTypeEnum.JudgeSelect:
                                itemScore = julgscore;
                                break;
                            case QuestionTypeEnum.MultiSelect:
                                itemScore = multiscore;
                                break;
                        }
                    }
                    score = score + itemScore;
                }
                HistoryEntity history = new HistoryEntity();
                history.HistoryId = historyId;
                history.Fill();
                history.HistoryEndTime = DateTime.Now;
                history.HistoryScore = score;
                history.Save();

                ActionResult result = new ActionResult();
                result.IsSuccess = true;
                StringBuilder response = new StringBuilder();
                response.Append(string.Format("TmpStr='{0}';", score));
                result.ResponseData = response.ToString();
                return result;
            }
        protected void Page_Init(object sender, EventArgs e)
        {
            if (SessionManager.User != null)
            {
                if (!SessionManager.User.DoTest)
                {
                    Response.ClearContent();
                    Response.Write(@"
                        <html><head></head><body bgcolor='#cad7f7'>
                            <script>alert('对不起!您没有网络答卷的权限,可能您已经答过试卷');history.go(-1);</script>
                        </body></html>
                    ");
                    Response.End();
                    return;
                }
                UserEntity currentUser = SessionManager.User;
                currentUser.DoTest = false;
                currentUser.Save();

                HistoryEntity history = new HistoryEntity();
                history.HistoryStartTime = DateTime.Now;
                history.HistoryIp = SessionManager.ClientIp;
                history.HistoryUserId = currentUser.UserId;
                history.Save();
                currentHistoryId = history.HistoryId;

                //TempExamineCollection tempExamine = new TempExamineCollection();
                //tempExamine.SchemaName = string.Format("es_{0}_tmp", currentUser.UserId);
                //tempExamine.CreateSchemaHost();
            }
        }