Beispiel #1
0
        // GET: Report

        #region Certifications

        public ActionResult PrintCertificate(ParamerterViewModels item)
        {
            var        model      = unitOfWork.CertificationsRepo.Get(m => m.Id == item.Id);
            XtraReport xtraReport = new XtraReport();

            if (model.Any())
            {
                if (model.FirstOrDefault().CertificationTypes.CertificationType == "Barangay Clearance")
                {
                    xtraReport = new rptBarangayClearance()
                    {
                        DataSource = model
                    };
                }
                else if (model.FirstOrDefault().CertificationTypes.CertificationType == "Resident Certification")
                {
                    xtraReport = new rptResidents()
                    {
                        DataSource = model
                    };
                }
                else if (model.FirstOrDefault().CertificationTypes.CertificationType == "Business Permit")
                {
                    xtraReport = new rptBusinessCertificate()
                    {
                        DataSource = model
                    };
                }
            }
            return(PartialView(xtraReport));
        }
Beispiel #2
0
        public ActionResult TemplateReport()
        {
            var template = unitOfWork.TemplatesRepo.Find();
            //if (template != null)
            //    template.Template = template?.Template?.Replace("[FullName]", "mark Christopher");
            List <Templates> model = new List <Templates>()
            {
                template
            };
            rptResidents rptResidents = new rptResidents()
            {
                DataSource = model
            };

            return(PartialView(rptResidents));
        }