Exemple #1
0
         public ActionResult EmployeeExclusionMaster()
        {

            var viewModel = new PRProfLicenseReport()
            {
             HrCategoryList = departmentDb.getAllHRCategory(),

            };

            return View(viewModel);
        }
Exemple #2
0
        public ActionResult ProfLicenseReport()
        {

            var viewModel = new PRProfLicenseReport()
            {
        

            };

            return View(viewModel);
        }
Exemple #3
0
        public ActionResult DependentSummaryList(PRProfLicenseReport param)
        {

            var vm = param;
            if (Request.IsAjaxRequest())
            {
  
                  ReportViewerVm reportVM = new ReportViewerVm();
                ReportViewer reportViewer = new ReportViewer();
                string reportDocPath = "";
                DataTable reportData = new DataTable();

                reportData = personneldb.getDependentSummaryList();
                //Report_DependentList
                reportDocPath = @"\Areas\ManagementReports\Reports\PersonnelReports\PR_GetDependentSummaryList.rdl";
                if (reportData.Rows.Count == 0)
                    return Content(Errors.ReportContent("NO RECORDS FOUND"));

                reportViewer.ProcessingMode = ProcessingMode.Local;
                reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + reportDocPath;
                ReportDataSource datasourceItem = new ReportDataSource("DataSet1", reportData);
                reportViewer.LocalReport.DataSources.Add(datasourceItem);
                reportViewer = this.DynamicReportHeader(reportViewer, "DataSet2");
               reportViewer.LocalReport.SetParameters(new ReportParameter("branch", Global.OrganizationDetails.Name + " - " + Global.OrganizationDetails.City.ToUpper()));
                reportViewer.SizeToReportContent = true;
                reportViewer.Height = Unit.Percentage(100);
                reportViewer.Width = Unit.Percentage(100);
                reportViewer.ShowPrintButton = true;
                reportVM.ReportViewer = reportViewer;
                System.Web.HttpContext.Current.Session[Global.ReportViewerSessionName] = reportViewer;
                System.Web.HttpContext.Current.Session[Global.PdfUriSessionName] = Common.Helper.getApplicationUri("Preview", "Print", null);
                return PartialView("~/Views/Shared/_reportViewer.cshtml", reportVM);


            }
            return View();

        }
Exemple #4
0
        public ActionResult ProfLicenseReport(PRProfLicenseReport param)
        {

            var vm = param;
            if (Request.IsAjaxRequest())
            {
  
                  ReportViewerVm reportVM = new ReportViewerVm();
                ReportViewer reportViewer = new ReportViewer();
                string reportDocPath = "";
                DataTable reportData = new DataTable();

                reportData = personneldb.getProfessionalLicense(vm.LicenseId, vm.GroupById);

             

                //If CType(cboDepartment.SelectedItem, ValueDescriptionPair).Value() = 1 Then
                //    ReportDoc.Load(Configuration.ConfigurationSettings.AppSettings("ReportMapString") & "\Report_ProfessionalLicenseReport(MOH).rpt")
                //ElseIf CType(cboDepartment.SelectedItem, ValueDescriptionPair).Value() = 2 Then
                //    ReportDoc.Load(Configuration.ConfigurationSettings.AppSettings("ReportMapString") & "\Report_ProfessionalLicenseReport(SaudiCouncil).rpt")
                //Else
                //    If opt1.Checked = True Then
                //        ReportDoc.Load(Configuration.ConfigurationSettings.AppSettings("ReportMapString") & "\Report_ProfessionalLicenseReport(ALL)1.rpt")
                //    Else
                //        ReportDoc.Load(Configuration.ConfigurationSettings.AppSettings("ReportMapString") & "\Report_ProfessionalLicenseReport(ALL)2.rpt")
                //    End If
                //End If


                if (vm.LicenseId == 1)
                {

                    reportDocPath = @"\Areas\ManagementReports\Reports\PersonnelReports\PersonnelReports_PRLicenseMOH.rdl";

                }
                else if (vm.LicenseId == 2)
                {

                    reportDocPath = @"\Areas\ManagementReports\Reports\PersonnelReports\PersonnelReports_ProfessionalLicense_SaudiCouncil.rdl";

                }
                else {

                    //if (vm.GroupById == 0)
                    //{
                        reportDocPath = @"\Areas\ManagementReports\Reports\PersonnelReports\PersonnelReport_ProfessionalLicenseALLByCat.rdl";
                    //}
                    //else {
                    //    reportDocPath = @"\Areas\ManagementReports\Reports\PersonnelReports\PersonnelReport_ProfessionalLicenseALLByDept.rdl";
                    //}
                }


                if (reportData.Rows.Count == 0)
                    return Content(Errors.ReportContent("NO RECORDS FOUND"));

                reportViewer.ProcessingMode = ProcessingMode.Local;
                reportViewer.LocalReport.ReportPath = Request.MapPath(Request.ApplicationPath) + reportDocPath;
                ReportDataSource datasourceItem = new ReportDataSource("DataSet1", reportData);
                reportViewer.LocalReport.DataSources.Add(datasourceItem);
                reportViewer = this.DynamicReportHeader(reportViewer, "DataSet2");
                //reportViewer.LocalReport.SetParameters(new ReportParameter("stDate", vm.StartDate.ToShortDateString()));
                //reportViewer.LocalReport.SetParameters(new ReportParameter("enDate", vm.EndDate.ToShortDateString()));
                reportViewer.LocalReport.SetParameters(new ReportParameter("branch", Global.OrganizationDetails.Name + " - " + Global.OrganizationDetails.City.ToUpper()));
                reportViewer.SizeToReportContent = true;
                reportViewer.Height = Unit.Percentage(100);
                reportViewer.Width = Unit.Percentage(100);
                reportViewer.ShowPrintButton = true;
                reportVM.ReportViewer = reportViewer;
                System.Web.HttpContext.Current.Session[Global.ReportViewerSessionName] = reportViewer;
                System.Web.HttpContext.Current.Session[Global.PdfUriSessionName] = Common.Helper.getApplicationUri("Preview", "Print", null);
                return PartialView("~/Views/Shared/_reportViewer.cshtml", reportVM);


            }
            return View();

        }