CB
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
</property>-->
|
||||
|
||||
<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root;Initial Catalog=vkmaachensbd
|
||||
Server=localhost;Password=root;User ID=root;Initial Catalog=lori
|
||||
</property>
|
||||
|
||||
<property name="dialect">
|
||||
@@ -40,5 +40,4 @@
|
||||
<mapping assembly="BeWo.Data" />
|
||||
</session-factory>
|
||||
</hibernate-configuration>
|
||||
|
||||
</configuration>
|
||||
@@ -16,7 +16,6 @@ using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
using DevExpress.XtraScheduler;
|
||||
using Resource = BeWo.Data.Entities.Resource;
|
||||
using Utils = BeWo.Service.Core.Utils;
|
||||
@@ -872,23 +871,34 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
// Geänderte Serientermine werden anhand der RecurrenceId aus der Datenbank geladen und der Typ auf "gelöscht" gesetzt
|
||||
var recurrenceIds = Utils.ExtractRecurrenceIdFromRecurrenceString(lOriginals);
|
||||
|
||||
if(recurrenceIds.Count > 0)
|
||||
// Geänderte Serientermine werden anhand der RecurrenceId aus der Datenbank geladen und der Typ auf "gelöscht" gesetzt
|
||||
//CB: Nur von Type = 1 also Root prüfen
|
||||
foreach (var org in lOriginals)
|
||||
{
|
||||
var exceptionsToDelete = DAOFactory.SearchDAO.FindAppointmentsByRecurrenceId(recurrenceIds);
|
||||
|
||||
exceptionsToDelete.DoForEach(exception =>
|
||||
if (org.Type == 1)
|
||||
{
|
||||
if(exception.Oid != null && exception.Version != null)
|
||||
List<SchedulerAppointment> appointments = new List<SchedulerAppointment>();
|
||||
appointments.Add(org);
|
||||
var recurrenceIds = Utils.ExtractRecurrenceIdFromRecurrenceString(appointments);
|
||||
|
||||
if (recurrenceIds.Count > 0)
|
||||
{
|
||||
pOid2Version.AddIfNotIn(new KeyValuePair<long, long>(exception.Oid.Value, exception.Version.Value));
|
||||
var exceptionsToDelete = DAOFactory.SearchDAO.FindAppointmentsByRecurrenceId(recurrenceIds);
|
||||
|
||||
exceptionsToDelete.DoForEach(exception =>
|
||||
{
|
||||
if (exception.Oid != null && exception.Version != null)
|
||||
{
|
||||
pOid2Version.AddIfNotIn(new KeyValuePair<long, long>(exception.Oid.Value,
|
||||
exception.Version.Value));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
foreach(var kvp in pOid2Version)
|
||||
|
||||
|
||||
foreach (var kvp in pOid2Version)
|
||||
{
|
||||
ServiceLogic.SetActivationType<SchedulerAppointment>(new Dictionary<long, long> { { kvp.Key, kvp.Value } }, ActivationTypeId.Deleted);
|
||||
}
|
||||
@@ -1041,8 +1051,15 @@ namespace BeWo.Service.ServiceImplementations
|
||||
try
|
||||
{
|
||||
var absenceTimes = DAOFactory.SearchDAO.GetAllAbsenceTimesInIntervalByEmployee(pStart, pEnd, pEmployeeOid, pHasRightToSeeAllEmployeeAppointments);
|
||||
|
||||
return MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(absenceTimes).OrderBy(a => a.Start).ToList();
|
||||
var dcList = MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(absenceTimes);
|
||||
foreach (var at in dcList)
|
||||
{
|
||||
if (at.End.HasValue)
|
||||
{
|
||||
at.End = at.End.Value.Date.AddDays(1).AddTicks(-1);
|
||||
}
|
||||
}
|
||||
return dcList.OrderBy(a => a.Start).ToList();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user