Exemple #1
0
        public WorksOrderPrint CreateWorksOrderPrint(int id = 0)
        {
            var          report = new WorksOrderPrint();
            TenantConfig config = _tenantServices.GetTenantConfigById(CurrentTenantId);

            if (!config.ShowDecimalPoint)
            {
                report.lblQuantity.TextFormatString = "{0:0.##}";
            }
            report.paramOrderId.Value = id;
            report.RequestParameters  = false;
            return(report);
        }
Exemple #2
0
        public WorksOrderPrint CreateWorksOrderDayPrint()
        {
            var resources      = _appointmentsService.GetAllResources(CurrentTenantId).ToList();
            var combinedReport = new WorksOrderPrint {
                FilterString = "[WorksAppointmentResourcesId] In (?paramResourceIds)"
            };

            combinedReport.paramScheduleDate.Value = DateTime.Today;

            StaticListLookUpSettings paramResourceIdsSettings = (StaticListLookUpSettings)combinedReport.paramResourceIds.LookUpSettings;

            paramResourceIdsSettings.LookUpValues.AddRange(resources.Select(m => new LookUpValue(m.ResourceId, m.Name)));
            combinedReport.ParametersRequestBeforeShow += CombinedReport_ParametersRequestBeforeShow;

            return(combinedReport);
        }