예제 #1
0
 public ActionResult DemographicReportTextual()
 {
     PollReportViewModel model = DemographicViewModel();
     CodeFile1 tryomg = new CodeFile1();
     PdfPTable table = tryomg.QuestionReport(Server.MapPath("/Resources"), model, null);
     IList<IElement> stuff = new List<IElement>();
     stuff.Add(table);
     tryomg.CreatePDF(stuff, Server.MapPath("/Resources"),"Results by Question with Demographic Comparison Report",model.name);
     return View(model);
 }
예제 #2
0
 public ActionResult QuestionReportTextual(int pollID)
 {
     var poll = pollRepository.GetPollByID(pollID);
     PollReportViewModel model = QuestionViewModel(pollID);
     CodeFile1 tryomg = new CodeFile1();
     PdfPTable table = tryomg.QuestionReport(Server.MapPath("/Resources"), model, null);
     IList<IElement> tab = new List<IElement>();
     tab.Add(table);
     tryomg.CreatePDF(tab, Server.MapPath("/Resources"), "Results by Question Report",poll.name);
     Entity root = null;
     foreach (Entity e in poll.entities)
     {
         if (e.parent == null)
         {
             root = e;
             break;
         }
     }
     model.root = root;
     return View(model);
 }
예제 #3
0
 public ViewResult ApplyQuestionReportTextualFilters(int pollID, int[] entityIDs)
 {
     var poll = pollRepository.GetPollByID(pollID);
     PollReportViewModel model = QuestionViewModel(pollID);
     Entity root = null;
     foreach (Entity e in poll.entities)
     {
         if (e.parent == null)
         {
             root = e;
             break;
         }
     }
     model.root = root;
     if (entityIDs == null)
     {
         model.selectedEntities = new List<Entity>();
     }
     else
     {
         model.selectedEntities = entityRepository.GetEntityByEntityIDs(entityIDs);
         model.filteredResponses = FilteredResponses(pollID, model.selectedEntities);
     }
     CodeFile1 tryomg = new CodeFile1();
     PdfPTable table = tryomg.QuestionReport(Server.MapPath("/Resources"), model, null);
     IList<IElement> tab = new List<IElement>();
     tab.Add(table);
     tryomg.CreatePDF(tab, Server.MapPath("/Resources"), "Results by Question Report", poll.name);
     return View("ReportTextual", model);
 }