Exemple #1
0
 public JsonResult SaveData()
 {
     if (IsPreview == false)
     {
         List <QuestionAnswerViewModel> q = AccountController.GetQuestionAnswer();
         RespondentViewModel            r = AccountController.GetRespondent();
         if (q != null)
         {
             foreach (var item in q)
             {
                 item.AddQuestionAnswer(item);
             }
         }
         if (r != null)
         {
             r.AddRespondent(r);
             foreach (var item in r.Responses)
             {
                 item.AddResponse(item);
             }
         }
     }
     AccountController.ClearQuestionAnswer();
     AccountController.ClearQuestion();
     return(Json(true, JsonRequestBehavior.AllowGet));
 }