ChristopherusHaus/CustomReportCreator - Digitale Prüfliste LWL - ZAD nach Team
This commit is contained in:
@@ -45,6 +45,7 @@ namespace ChristopherusHaus
|
||||
DateTime.TryParse(queryRo.Rows[0].Field2.ToString(), out end);
|
||||
}
|
||||
long? customerOid = null;
|
||||
string zad = "";
|
||||
if (queryRo.Rows[0].Field3.ToString() == "0")
|
||||
{
|
||||
var masterReport = new LwlPruefliste();
|
||||
@@ -52,7 +53,8 @@ namespace ChristopherusHaus
|
||||
var customerListOrd = customerList.OrderBy(c => c.Person.LastNameFirstName).ToList();
|
||||
foreach (var c in customerListOrd)
|
||||
{
|
||||
var ro = LwlPrueflisteRO.Create(start, end, "9011053", c.Oid);
|
||||
zad = GetCustomerTeam(c);
|
||||
var ro = LwlPrueflisteRO.Create(start, end, zad, c.Oid, "LWL (alt)");
|
||||
if (ro.ServiceRecords != null && ro.ServiceRecords.Count > 0)
|
||||
{
|
||||
try
|
||||
@@ -77,7 +79,9 @@ namespace ChristopherusHaus
|
||||
{
|
||||
customerOid = oidOut;
|
||||
}
|
||||
var ro = LwlPrueflisteRO.Create(start, end, "9011053", customerOid);
|
||||
var c = DAOFactory.GenericDAO.LoadByID<Customer>(customerOid.Value);
|
||||
zad = GetCustomerTeam(c);
|
||||
var ro = LwlPrueflisteRO.Create(start, end, zad, c.Oid, "LWL (alt)");
|
||||
liste.SetReportDataSource(ro);
|
||||
return liste;
|
||||
}
|
||||
@@ -85,6 +89,25 @@ namespace ChristopherusHaus
|
||||
return liste;
|
||||
}
|
||||
|
||||
private string GetCustomerTeam(Customer c)
|
||||
{
|
||||
string zad = "";
|
||||
var team = c.Team2CustomerList.FirstOrDefault();
|
||||
if (team.Team.Name.ToLower().Contains("bochum"))
|
||||
{
|
||||
zad = "60-9011096.1";
|
||||
}
|
||||
else if (team.Team.Name.ToLower().Contains("dortmund") || team.Team.Name.ToLower().Contains("königsmühle"))
|
||||
{
|
||||
zad = "60-9011063.1";
|
||||
}
|
||||
else if (team.Team.Name.ToLower().Contains("witten"))
|
||||
{
|
||||
zad = "60-9011071.1";
|
||||
}
|
||||
return zad;
|
||||
}
|
||||
|
||||
public override XtraReport CreateSettlementReport(string dcId, long? invoiceBaseOid)
|
||||
{
|
||||
long result;
|
||||
|
||||
Reference in New Issue
Block a user