Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo into master

This commit is contained in:
Marcel Hirschle
2022-01-19 09:41:31 +01:00
2 changed files with 34 additions and 38 deletions

View File

@@ -107,7 +107,7 @@ namespace SBBMainzReports
{
foreach (var c2sc in ro.CostBearer2SupportConceptList)
{
if (c2sc.CostBearer.Organisation.Name.ToLower().Contains("jugendamt der landeshauptstadt mainz") && c2sc.ApprovedStartDate <= ro.StartDate && c2sc.ApprovedEndDate >= ro.EndDate)
if (c2sc.CostBearer.Organisation.Name.ToLower().Contains("jugendamt der landeshauptstadt mainz") && c2sc.StartDate <= ro.StartDate && c2sc.EndDate >= ro.StartDate)
return c2sc;
}
}
@@ -123,26 +123,32 @@ namespace SBBMainzReports
long betreuer2EOid = 0;
int i = 0;
if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
{
var c2s = GetCurrentC2S(pRO);
var c2s = GetCurrentC2S(pRO);
if (c2s != null)
{
SupportConceptApprovalPeriod2Employee p2e;
foreach (var rating in c2s.SupportConcept.Ratings)
{
if (rating.StartDate >= pRO.StartDate && rating.StartDate <= pRO.EndDate)
if (rating.StartDate >= pRO.StartDate && rating.StartDate < pRO.EndDate.AddDays(1))
{
foreach (var item in rating.GoalRatingList)
{
var entry = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(item.ValueListEntryOid.Value);
var ratingName = entry.Value;
var ratingErgebnis = item.RatingType.DisplayName;
ValueListEntry entry = null;
string ratingName = null;
string ratingErgebnis = null;
if (item.ValueListEntryOid != null)
entry = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(item.ValueListEntryOid.Value);
if (entry != null)
ratingName = entry.Value;
if (item.RatingType != null)
ratingErgebnis = item.RatingType.DisplayName;
switch (i)
{
case 0:
lblZiel1.Text = ratingName;
if (ratingErgebnis.ToLower() == "erledigt")
if (ratingErgebnis != null && ratingErgebnis.ToLower() == "erledigt")
{
xrCheckBox1.Checked = true;
xrCheckBox1.Visible = true;
@@ -151,7 +157,7 @@ namespace SBBMainzReports
lblBewertung1.Text = ratingErgebnis; break;
case 1:
lblZiel2.Text = ratingName;
if (ratingErgebnis.ToLower() == "erledigt")
if (ratingErgebnis != null && ratingErgebnis.ToLower() == "erledigt")
{
xrCheckBox2.Checked = true;
xrCheckBox2.Visible = true;
@@ -160,7 +166,7 @@ namespace SBBMainzReports
lblBewertung2.Text = ratingErgebnis; break;
case 2:
lblZiel3.Text = ratingName;
if (ratingErgebnis.ToLower() == "erledigt")
if (ratingErgebnis != null && ratingErgebnis.ToLower() == "erledigt")
{
xrCheckBox3.Checked = true;
xrCheckBox3.Visible = true;
@@ -169,7 +175,7 @@ namespace SBBMainzReports
lblBewertung3.Text = ratingErgebnis; break;
case 3:
lblZiel4.Text = ratingName;
if (ratingErgebnis.ToLower() == "erledigt")
if (ratingErgebnis != null && ratingErgebnis.ToLower() == "erledigt")
{
xrCheckBox4.Checked = true;
xrCheckBox4.Visible = true;
@@ -234,22 +240,17 @@ namespace SBBMainzReports
}
lblQualifikation1.Text = qualifikation1;
lblQualifikation2.Text = qualifikation2;
}
if (pRO.CostBearer2SupportConceptList != null)
{
var cb2sc = GetCurrentC2S(pRO);
if (cb2sc.CostBearerContactPerson != null)
if (c2s.CostBearerContactPerson != null)
{
if (cb2sc.CostBearerContactPerson.Sex.HasValue &&
cb2sc.CostBearerContactPerson.Sex.Value == Sex.Female)
if (c2s.CostBearerContactPerson.Sex.HasValue &&
c2s.CostBearerContactPerson.Sex.Value == Sex.Female)
lblAnsprechpartner.Text = "Frau ";
else if (cb2sc.CostBearerContactPerson.Sex.HasValue &&
cb2sc.CostBearerContactPerson.Sex.Value == Sex.Male)
else if (c2s.CostBearerContactPerson.Sex.HasValue &&
c2s.CostBearerContactPerson.Sex.Value == Sex.Male)
lblAnsprechpartner.Text = "Herr ";
lblAnsprechpartner.Text += cb2sc.CostBearerContactPerson.LastName;
lblAnsprechpartner.Text += c2s.CostBearerContactPerson.LastName;
}
}
}

View File

@@ -103,7 +103,7 @@ namespace SBBMainzReports
{
foreach (var c2sc in ro.CostBearer2SupportConceptList)
{
if (c2sc.CostBearer.Organisation.Name.ToLower().Contains("jugendamt der landeshauptstadt mainz") && c2sc.ApprovedStartDate <= ro.StartDate && c2sc.ApprovedEndDate >= ro.EndDate)
if (c2sc.CostBearer.Organisation.Name.ToLower().Contains("jugendamt der landeshauptstadt mainz") && c2sc.StartDate <= ro.StartDate && c2sc.EndDate >= ro.StartDate)
return c2sc;
}
}
@@ -118,9 +118,9 @@ namespace SBBMainzReports
String betreuer2 = "";
long betreuer2EOid = 0;
if (pRO.CostBearer2SupportConceptList != null && pRO.CostBearer2SupportConceptList.Count > 0)
{
var c2s = GetCurrentC2S(pRO);
if (c2s != null)
{
SupportConceptApprovalPeriod2Employee p2e;
foreach (var scap in c2s.ApprovalPeriodList)
@@ -175,22 +175,17 @@ namespace SBBMainzReports
}
lblQualifikation1.Text = qualifikation1;
lblQualifikation2.Text = qualifikation2;
}
if (pRO.CostBearer2SupportConceptList != null)
{
var cb2sc = GetCurrentC2S(pRO);
if (cb2sc.CostBearerContactPerson != null)
if (c2s.CostBearerContactPerson != null)
{
if (cb2sc.CostBearerContactPerson.Sex.HasValue &&
cb2sc.CostBearerContactPerson.Sex.Value == Sex.Female)
if (c2s.CostBearerContactPerson.Sex.HasValue &&
c2s.CostBearerContactPerson.Sex.Value == Sex.Female)
lblAnsprechpartner.Text = "Frau ";
else if (cb2sc.CostBearerContactPerson.Sex.HasValue &&
cb2sc.CostBearerContactPerson.Sex.Value == Sex.Male)
else if (c2s.CostBearerContactPerson.Sex.HasValue &&
c2s.CostBearerContactPerson.Sex.Value == Sex.Male)
lblAnsprechpartner.Text = "Herr ";
lblAnsprechpartner.Text += cb2sc.CostBearerContactPerson.LastName;
lblAnsprechpartner.Text += c2s.CostBearerContactPerson.LastName;
}
}
}