public ActionResult HRPayrollEmployee()
        {
            var viewModel = new OtherReportsDateTimeOnly()
            {
                StartDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),
                EndDate   = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),
            };

            return(View(viewModel));
        }
        public ActionResult EvaluationMonitor()
        {
            var viewModel = new OtherReportsDateTimeOnly()
            {
                StartDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),
                EndDate   = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),
            };

            return(View(viewModel));
        }
        public ActionResult MagcardEmployee()
        {
            var viewModel = new OtherReportsDateTimeOnly()
            {
                StartDate      = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),
                EndDate        = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),
                DepartmentList = departmentDb.getAllHRCategory()
            };

            return(View(viewModel));
        }
        public ActionResult MagcardEmployee(OtherReportsDateTimeOnly param)
        {
            var    vm                    = param;
            string deptidArray           = Request.Form["DepartmentIdArray"];
            string DepartmentIdArraytext = Request.Form["DepartmentIdArraytext"];

            DepartmentIdArraytext = DepartmentIdArraytext.Substring(1);

            var DeptId = "0";

            if (deptidArray.Contains("0") || deptidArray == null || deptidArray == "")
            {
                DeptId = "0";
            }
            else
            {
                DeptId = deptidArray;
            }
            if (Request.IsAjaxRequest())
            {
                ReportViewerVm reportVM      = new ReportViewerVm();
                ReportViewer   reportViewer  = new ReportViewer();
                string         reportDocPath = "";
                DataTable      reportData    = new DataTable();

                reportData    = helpdeskDB.getMagcard(vm.StartDate, vm.EndDate.AddDays(1), DeptId, "[MCRS].[Helpdesk_DutyRosterMissingWithHRCategory]");
                reportDocPath = @"\Areas\ManagementReports\Reports\HelpDeskReports\HelpDeskMissingDutyRosterReport.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.LocalReport.SetParameters(new ReportParameter("sdate", vm.StartDate.ToString("MMMM-yyyy")));
                reportViewer.LocalReport.SetParameters(new ReportParameter("endate", vm.EndDate.ToString("MMMM-yyyy")));
                reportViewer.LocalReport.SetParameters(new ReportParameter("catname", DepartmentIdArraytext));
                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());
        }
Ejemplo n.º 5
0
        public ActionResult ExpireIqama()
        {

            var viewModel = new OtherReportsDateTimeOnly()
            {
                StartDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),
                EndDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day),

            };

            return View(viewModel);
        }
Ejemplo n.º 6
0
        public ActionResult ExpireIqama(OtherReportsDateTimeOnly param)
        {
            //SP_Get_Iquama_Epiry   Report_EmployeebyExpiringIquama.rpt
            var vm = param;
            if (Request.IsAjaxRequest())
            {

                ReportViewerVm reportVM = new ReportViewerVm();
                ReportViewer reportViewer = new ReportViewer();
                string reportDocPath = "";
                DataTable reportData = new DataTable();

                reportData = OtherReportDB.getStartEndDateandSP(vm.StartDate, vm.EndDate.AddDays(1), "[MCRS].[PersonnelReports_GetIqamaExpiry]");
                reportDocPath = @"\Areas\ManagementReports\Reports\PersonnelReports\PersonnelReports_GetIqamaExpiry.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();

        }
        public ActionResult EvaluationMonitor(OtherReportsDateTimeOnly param)
        {
            //SP_OP_GeneralExpensesReport Report_EmployeeIndividualEvaluation
            var vm = param;

            if (Request.IsAjaxRequest())
            {
                var clickEmpId = Request.Form["ClickEmployeeId"];

                ReportViewerVm reportVM      = new ReportViewerVm();
                ReportViewer   reportViewer  = new ReportViewer();
                string         reportDocPath = "";
                DataTable      reportData    = new DataTable();

                if (clickEmpId == "0")
                {
                    reportData    = OtherReportDB.getEvalMonitr(vm.StartDate, vm.EndDate.AddDays(1));
                    reportDocPath = @"\Areas\ManagementReports\Reports\HumanResourcesReports\HRD_GetEvaluationMonitor.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.LocalReport.SetParameters(new ReportParameter("stDate", param.StartDate.ToShortDateString()));
                    reportViewer.LocalReport.SetParameters(new ReportParameter("enDate", param.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));
                }
                else
                {
                    reportData    = OtherReportDB.getIndividualEmplEvaluation(clickEmpId);
                    reportDocPath = @"\Areas\ManagementReports\Reports\HumanResourcesReports\HRD_GetEvaluationMonitorIndividual.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.LocalReport.SetParameters(new ReportParameter("stDate", param.StartDate.ToShortDateString()));
                    reportViewer.LocalReport.SetParameters(new ReportParameter("enDate", param.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());
        }