public ActionResult EmployeeWise()
        {
            var viewModel = new HRDStaffContractDetails()
            {
                EmployeeList = empDb.getEmployeedetails(),
            };

            return(View(viewModel));
        }
        public ActionResult StaffContractDetailsReport()
        {
            var viewModel = new HRDStaffContractDetails()
            {
                DepartmentList = departmentDb.getAllDepartment(),
                PositionList   = empDb.getDesignation()
            };

            return(View(viewModel));
        }
        public ActionResult StaffContractDetailsReport(HRDStaffContractDetails param)
        {
            //SP_GET_EMPCONTRACT_INFO  " & xDept & "," & xPos & "")
            var vm = param;

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

                reportData    = humanresourcesdb.getStaffContractDetails(vm.DepartmentId, vm.PositionId);
                reportDocPath = @"\Areas\ManagementReports\Reports\HumanResourcesReports\HRD_GetStaffContractDetails.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());
        }
        public ActionResult EmployeeWise(HRDStaffContractDetails param)
        {
            var vm = param;

            if (Request.IsAjaxRequest())
            {
                string         fromtext      = Request.Form["SelectedCategoryText"];
                ReportViewerVm reportVM      = new ReportViewerVm();
                ReportViewer   reportViewer  = new ReportViewer();
                string         reportDocPath = "";
                DataTable      reportData    = new DataTable();

                reportData    = humanresourcesdb.getIndividualEmplEval(vm.EvaluationDate);
                reportDocPath = @"\Areas\ManagementReports\Reports\HumanResourcesReports\HRD_GetIndivEmpEval.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("fromtext", fromtext.ToString()));
                //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());
        }