Esempio n. 1
0
        public JsonResult DisplayJobInvoiceSummaryFill(Display_JobInvoiceSummaryViewModel vm)
        {
            DisplayFilterJobInvoiceSummarySettings    SettingParameter  = SetCurrentParameterSettings(vm);
            IEnumerable <JobInvoiceSummaryViewModels> JobInvoiceSummary = _JobInvoiceSummaryService.JobInvoiceSummary(SettingParameter);

            if (JobInvoiceSummary != null)
            {
                JsonResult json = Json(new { Success = true, Data = JobInvoiceSummary.ToList() }, JsonRequestBehavior.AllowGet);
                json.MaxJsonLength = int.MaxValue;
                return(json);
            }
            return(Json(new { Success = true }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public DisplayFilterJobInvoiceSummarySettings SetCurrentParameterSettings(Display_JobInvoiceSummaryViewModel vm)
        {
            DisplayFilterJobInvoiceSummarySettings DisplayFilterJobInvoiceSummarySettings = new DisplayFilterJobInvoiceSummarySettings();

            DisplayFilterJobInvoiceSummaryParameters FromDateParameter = new DisplayFilterJobInvoiceSummaryParameters();

            FromDateParameter.ParameterName = "FromDate";
            FromDateParameter.Value         = vm.FromDate;
            FromDateParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters ToDateParameter = new DisplayFilterJobInvoiceSummaryParameters();

            ToDateParameter.ParameterName = "ToDate";
            ToDateParameter.Value         = vm.ToDate;
            ToDateParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters JobWorkerParameter = new DisplayFilterJobInvoiceSummaryParameters();

            JobWorkerParameter.ParameterName = "JobWorker";
            JobWorkerParameter.Value         = vm.JobWorker;
            JobWorkerParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters FormatParameter = new DisplayFilterJobInvoiceSummaryParameters();

            FormatParameter.ParameterName = "Format";
            FormatParameter.Value         = vm.Format;
            FormatParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters ReportTypeParameter = new DisplayFilterJobInvoiceSummaryParameters();

            ReportTypeParameter.ParameterName = "ReportType";
            ReportTypeParameter.Value         = vm.ReportType;
            ReportTypeParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters SiteParameter = new DisplayFilterJobInvoiceSummaryParameters();

            SiteParameter.ParameterName = "Site";
            SiteParameter.Value         = vm.SiteIds;
            SiteParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters DivisionParameter = new DisplayFilterJobInvoiceSummaryParameters();

            DivisionParameter.ParameterName = "Division";
            DivisionParameter.Value         = vm.DivisionIds;
            DivisionParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters ProcessParameter = new DisplayFilterJobInvoiceSummaryParameters();

            ProcessParameter.ParameterName = "Process";
            ProcessParameter.Value         = vm.Process;
            ProcessParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummaryParameters TextHiddenParameter = new DisplayFilterJobInvoiceSummaryParameters();

            TextHiddenParameter.ParameterName = "TextHidden";
            TextHiddenParameter.Value         = vm.TextHidden;
            TextHiddenParameter.IsApplicable  = true;

            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters = new List <DisplayFilterJobInvoiceSummaryParameters>();
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(FromDateParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(ToDateParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(JobWorkerParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(FormatParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(ReportTypeParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(SiteParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(DivisionParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(ProcessParameter);
            DisplayFilterJobInvoiceSummarySettings.DisplayFilterJobInvoiceSummaryParameters.Add(TextHiddenParameter);
            System.Web.HttpContext.Current.Session["CurrentSetting"] = DisplayFilterJobInvoiceSummarySettings;
            return(DisplayFilterJobInvoiceSummarySettings);
        }