コード例 #1
0
 public ActionResult Index()
 {
     CertificateListModel model = new CertificateListModel();
     //Get the entry points to be loaded in the screen
     IList<EntryPoint> query = (from entryPoints in db.EntryPoints where entryPoints.IsDeleted == false select entryPoints).ToList();
     model.EntryPoints = new SelectList(query, "EntryPointId", "Name");
     //Search the certificates in the page 1
     model.SearchCertificateList(1);
     return View(model);
 }
コード例 #2
0
 public PartialViewResult SearchCertificateGrid(CertificateListModel model, int? selectedPage)
 {
     model.SearchCertificateList(selectedPage.HasValue?selectedPage.Value:1);
     return PartialView("_CertificateGrid", model);
 }
コード例 #3
0
 public void SearchCertificateExport(CertificateListModel model, int? selectedPage)
 {
     model.SearchCertificateList(1, true);
     MemoryStream report = ExcelManagement.GenerateCertificateReport(model, Server.MapPath("~/Images/Logo-Voc-Iraq.png"));
     report.Position = 0;
     string currentDateTime = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss");
     MicrosoftExcelStreamResult result = new MicrosoftExcelStreamResult(report, "CertificateReport" + currentDateTime + ".xlsx");
     Session.Add("CertificateReport", result);
 }