예제 #1
0
        public GetBuildingUsesOutput getBuildingUsesById(GetBuildingUsesInput input)
        {
            var getBuildingUsesById = _buildingUsesManager.GetBuildingUsesById(input.id);
            var output = Mapper.Map <Models.BuildingUses, GetBuildingUsesOutput>(getBuildingUsesById);

            return(output);
        }
예제 #2
0
        public ActionResult EditBuildingUsesModal(int BuildingUsesId)
        {
            var getBuildingUses = new GetBuildingUsesInput()
            {
                id = BuildingUsesId
            };

            var buildingUse = _buildingUsesAppService.getBuildingUsesById(getBuildingUses);

            var BuildingUsesViewModel = new BuildingUsesViewModel()
            {
                BuildingUsesOutput = buildingUse
            };

            return(View("_EditUserModal", BuildingUsesViewModel));
        }
예제 #3
0
        public ActionResult ProjectCertificateRpt()
        {
            var reportViewer = new ReportViewer()
            {
                ProcessingMode      = ProcessingMode.Local,
                SizeToReportContent = true,
                Width  = Unit.Percentage(100),
                Height = Unit.Percentage(100),
            };
            var projectId = Convert.ToInt32(Request["Id"]);
            ProjectsApplicationViewDataTable    PD = new ProjectsApplicationViewDataTable();
            ProjectsApplicationViewTableAdapter PA = new ProjectsApplicationViewTableAdapter();

            PA.ProjectApplicationFillByProjectId(PD, projectId);

            foreach (DataRow row in PD.Rows)
            {
                GetInterventionTypeInput input = new GetInterventionTypeInput();
                input.Id = int.Parse(row["interventionTypeId"].ToString());
                GetInterventionTypeOutput output = _InterventionTypeAppService.GetInterventionTypeById(input);
                row["InterVType"] = output.InterventionName;

                getNeighborhoodIntput NInput = new getNeighborhoodIntput();
                NInput.Id = Convert.ToInt32(row["neighborhoodID"].ToString());
                getNeighborhoodOutput NOutput = _neighborhoodAppService.getNeighborhoodById(NInput);
                row["Neighborhood"] = NOutput.EName;


                var DonorId = row["donorId"].ToString();
                if (!string.IsNullOrWhiteSpace(DonorId))
                {
                    GetDonorsInput DInput = new GetDonorsInput();
                    DInput.Id = Convert.ToInt32(row["donorId"].ToString());
                    var DOutput = _donorsAppService.GetDonorById(DInput);
                    row["Donor"] = DOutput.DonorName;
                }
                else
                {
                    row["Donor"] = "no Donor";
                }

                var isBuildingHasRoof = Convert.ToByte(row["isBuildingHasRoof"].ToString());
                if (isBuildingHasRoof == 1)
                {
                    row["BuildingRoof"] = "Yes";
                }
                else
                {
                    row["BuildingRoof"] = "No";
                }

                GetBuildingUsesInput UInput = new GetBuildingUsesInput();
                UInput.id = Convert.ToInt32(row["buildingUsesID"].ToString());
                var UOutput = _buildingUsesAppService.getBuildingUsesById(UInput);
                row["BuildingUses"] = UOutput.UsedFor;
            }

            var rows      = PD.Rows;
            var ProjectID = Convert.ToInt32(rows[0]["Id"]);
            // var AllUploadedProjectFiles = _uploadProjectFilesAppService.GetAllUploadedProjectFiles();
            // var ProjectUploadedFiles = from UF in AllUploadedProjectFiles where UF.ProjectId == ProjectID orderby UF.Id descending select UF;
            UploadProjectFilesViewDataTable    UPD = new UploadProjectFilesViewDataTable();
            UploadProjectFilesViewTableAdapter UPA = new UploadProjectFilesViewTableAdapter();

            UPA.FillByProjectUploadFilesProjectId(UPD, ProjectID);



            reportViewer.LocalReport.ReportPath = @"Reporting\ProjectCertificate.rdlc";

            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("ProjectApplicationDataSet", (object)PD));
            reportViewer.LocalReport.DataSources.Add(new ReportDataSource("ProjectFilesDataSet", (object)UPD));
            reportViewer.LocalReport.Refresh();
            ViewBag.ReportViewer = reportViewer;

            return(View("ProjectCertificateView"));
        }