TeamPfeil/QuittierungsbelegQualifikation.cs - Start und Enddatum beim Hauptbetreuuer
This commit is contained in:
@@ -141,26 +141,30 @@ namespace TeamPfeil
|
||||
lblWeeklyFLS3.Text = string.Format("{0:0.00}", std.Q3);
|
||||
lblWeeklyFLS4.Text = string.Format("{0:0.00}", std.Q4);
|
||||
|
||||
pRO.MainAttendant = SetMainAttendantsQuali(pRO.CustomerOid);
|
||||
pRO.MainAttendant = SetMainAttendantsQuali(pRO.CustomerOid, pRO);
|
||||
|
||||
bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private string SetMainAttendantsQuali(long customerOid)
|
||||
private string SetMainAttendantsQuali(long customerOid, ServicesOverviewRO pRO)
|
||||
{
|
||||
var c = DAOFactory.GenericDAO.GetByID<Customer>(customerOid);
|
||||
string MainAttendant = "";
|
||||
foreach (var item in c.Employee2CustomerList)
|
||||
{
|
||||
foreach (var valueEntry in item.ValueList)
|
||||
if (!item.StartDate.HasValue && !item.EndDate.HasValue
|
||||
|| item.StartDate.HasValue && item.StartDate.Value < pRO.EndDate && (!item.EndDate.HasValue || item.EndDate.Value > pRO.StartDate)
|
||||
|| !item.StartDate.HasValue && item.EndDate.HasValue && item.EndDate > pRO.EndDate)
|
||||
{
|
||||
// Änderung von Zuständiger Fachkraft auf alle verantwortlichen MA
|
||||
//if (valueEntry.Entry.SystemEntryID != null && valueEntry.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant)
|
||||
//{
|
||||
if (MainAttendant.Length > 0)
|
||||
foreach (var valueEntry in item.ValueList)
|
||||
{
|
||||
MainAttendant += ", ";
|
||||
}
|
||||
// Änderung von Zuständiger Fachkraft auf alle verantwortlichen MA
|
||||
//if (valueEntry.Entry.SystemEntryID != null && valueEntry.Entry.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant)
|
||||
//{
|
||||
if (MainAttendant.Length > 0)
|
||||
{
|
||||
MainAttendant += ", ";
|
||||
}
|
||||
MainAttendant += item.Employee.Person.FirstName + " " + item.Employee.Person.LastName;
|
||||
var e = DAOFactory.GenericDAO.LoadByID<Employee>(item.EmployeeOid ?? 0);
|
||||
foreach (var ve in e.ValueList)
|
||||
@@ -185,7 +189,8 @@ namespace TeamPfeil
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
return MainAttendant;
|
||||
|
||||
Reference in New Issue
Block a user