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); }
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); }