MH: LWL Bericht Schmitzi DB
This commit is contained in:
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
using BeWo.Data.Access;
|
||||||
using System.Collections.Generic;
|
|
||||||
using BeWo.Data.Access;
|
|
||||||
using BeWo.Data.Entities;
|
using BeWo.Data.Entities;
|
||||||
using BeWo.Report;
|
using BeWo.Report;
|
||||||
using BeWo.Report.DefaultReports;
|
using BeWo.Report.DefaultReports;
|
||||||
@@ -8,6 +6,9 @@ using BeWo.Report.ReportObjects;
|
|||||||
using BeWo.Service.DCEntityMapper;
|
using BeWo.Service.DCEntityMapper;
|
||||||
using BS.Shared.DataContracts;
|
using BS.Shared.DataContracts;
|
||||||
using DevExpress.XtraReports.UI;
|
using DevExpress.XtraReports.UI;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace OwnSoftTestSchmitzi
|
namespace OwnSoftTestSchmitzi
|
||||||
{
|
{
|
||||||
@@ -37,8 +38,77 @@ namespace OwnSoftTestSchmitzi
|
|||||||
return base.CreateSettlementReport(dcId, invoiceBaseOid, false);
|
return base.CreateSettlementReport(dcId, invoiceBaseOid, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override XtraReport CreateQueryReport(long queryOid, string queryReportId)
|
||||||
|
{
|
||||||
|
if (queryOid == 500)
|
||||||
|
{
|
||||||
|
return CreateLwlPruefliste(CreateQueryRO(queryOid, queryReportId));
|
||||||
|
|
||||||
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
}
|
||||||
|
return base.CreateQueryReport(queryOid, queryReportId);
|
||||||
|
}
|
||||||
|
private LwlPruefliste CreateLwlPruefliste(QueryRO queryRo)
|
||||||
|
{
|
||||||
|
var liste = new LwlPruefliste();
|
||||||
|
|
||||||
|
if (queryRo.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DateTime start = DateTime.MaxValue;
|
||||||
|
DateTime end = DateTime.MinValue;
|
||||||
|
|
||||||
|
if (queryRo.Rows[0].Field1 != null)
|
||||||
|
{
|
||||||
|
DateTime.TryParse(queryRo.Rows[0].Field1.ToString(), out start);
|
||||||
|
}
|
||||||
|
if (queryRo.Rows[0].Field2 != null)
|
||||||
|
{
|
||||||
|
DateTime.TryParse(queryRo.Rows[0].Field2.ToString(), out end);
|
||||||
|
}
|
||||||
|
long? customerOid = null;
|
||||||
|
if (queryRo.Rows[0].Field3.ToString() == "0")
|
||||||
|
{
|
||||||
|
var masterReport = new LwlPruefliste();
|
||||||
|
//masterReport.CreateDocument();
|
||||||
|
|
||||||
|
var customerList = DAOFactory.GenericDAO.GetAllActive<Customer>();
|
||||||
|
var customerListOrd = customerList.OrderBy(c => c.Person.LastNameFirstName).ToList();
|
||||||
|
foreach (var c in customerListOrd)
|
||||||
|
{
|
||||||
|
var ro = LwlPrueflisteRO.Create(start, end, "9009847", c.Oid);
|
||||||
|
if (ro.ServiceRecords != null && ro.ServiceRecords.Count > 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
liste = new LwlPruefliste();
|
||||||
|
liste.SetReportDataSource(ro);
|
||||||
|
liste.CreateDocument();
|
||||||
|
masterReport.Pages.AddRange(liste.Pages);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// ignore - z.B. kein Hilfeplan
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return (LwlPruefliste)masterReport;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (queryRo.Rows[0].Field3 != null)
|
||||||
|
{
|
||||||
|
if (Int64.TryParse(queryRo.Rows[0].Field3.ToString(), out var oidOut))
|
||||||
|
{
|
||||||
|
customerOid = oidOut;
|
||||||
|
}
|
||||||
|
var ro = LwlPrueflisteRO.Create(start, end, "9009847", customerOid);
|
||||||
|
liste.SetReportDataSource(ro);
|
||||||
|
return liste;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return liste;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override XtraReport CreateServiceOverviewAllCustomersReport(int month, int year, long orgaOid, long empOid, long? serviceCategoryOid, int startDay, int endDay)
|
||||||
{
|
{
|
||||||
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
|
List<ServicesOverviewRO> lROs = ServicesOverviewRO.Create(month, year, orgaOid, empOid, startDay, endDay, serviceCategoryOid);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user