Files
BeWoPlaner/Service/ServiceContracts/IResourceService.cs
Lyndon Jetten 23b8757ff5 FaC: Neues Scheduling-Modul hinzugefügt, aber noch lange nicht fertig.
ownChat: Neues TimeStamp-Objekt wird unterstützt und der Chat funktioniert wieder.
2024-06-05 14:45:33 +02:00

272 lines
12 KiB
C#

using System;
using System.Collections.Generic;
using System.ServiceModel;
using BS.Shared.Core;
using BS.Shared.DataContracts;
namespace BeWo.Service.ServiceContracts
{
[ServiceContract]
public interface IResourceService
{
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeactivateResource(long pOid, long pVersion);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeactivateResources(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteBooking(long pOid, long pVersion);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteBookings(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteResource(long pOid, long pVersion);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteResources(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<BookingSequenceDC> GetAllBookings(DateTime pStartSpan, DateTime pEndSpan);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<BookingSequenceDC> GetAllBookingsByResource(long pResourceOid, DateTime pStartSpan, DateTime pEndSpan);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceDC> GetAllResources();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<long> InsertNewBookings(List<BookingSequenceDC> pBookings);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<long> InsertNewResources(List<ResourceDC> pResource);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<long> UpdateBookings(List<BookingSequenceDC> pBookings);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<long> UpdateResources(List<ResourceDC> pResource);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<BookingSequenceDC> UpdateBookingSequenceDCs(List<BookingSequenceDC> pBookings);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceDC> UpdateResourceDCs(List<ResourceDC> pResource);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<BookingSequenceDC> InsertNewBookingSequenceDCs(IEnumerable<BookingSequenceDC> pBookings);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceAppointmentDC> UpdateResourceAppointments(List<ResourceAppointmentDC> pResourceAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceAppointmentDC> InsertNewResourceAppointments(IEnumerable<ResourceAppointmentDC> pResourceAppointments);
[FaultContract(typeof (BeWoFault))]
[OperationContract]
void DeleteResourceAppointments(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceAppointmentDC> GetAllResourceAppointments();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceAppointmentDC> GetResourceAppointmentsById(IEnumerable<long> pOids);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceAppointmentDC> LoadPossibleDuplicates(string pRecurrenceInfo);
[FaultContract(typeof (BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetAllSchedulerAppointments();
[FaultContract(typeof (BeWoFault))]
[OperationContract]
SchedulerAppointmentDC GetSchedulerAppointmentByid(long oid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteSchedulerAppointments(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> InsertSchedulerAppointments(IList<SchedulerAppointmentDC> pNewSchedulerAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> UpdateSchedulerAppointments(List<SchedulerAppointmentDC> pNewSchedulerAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetSchedulerAppointmentsById(IEnumerable<long> pOids);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeactivateSchedulerAppointments(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
Dictionary<ValueListEntryDC, List<ResourceDC>> GetAllCategories2ResourcesInDictionary();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetAllActiveSchedulerAppointments();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetAllOpenAppointmentsForEmployee(long pEmployeeOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<Employee2SchedulerAppointmentDC> InsertEmployee2SchedulerAppointments(IEnumerable<Employee2SchedulerAppointmentDC> pEmployee2SchedulerAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<Employee2SchedulerAppointmentDC> UpdateEmployee2SchedulerAppointments(List<Employee2SchedulerAppointmentDC> pEmployee2SchedulerAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteEmployee2SchedulerAppointments(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetAllActiveAndNotDeclinedForEmployeeAppointments(long pEmployeeOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
bool OverlappingAppointmentsExist(DateTime start, DateTime end, List<long> employees, List<long> customers, List<long> resources, long originator, long? appointmentOid, string recurrenceId = "", int ocurrenceIndex = 0);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> DeactivateSchedulerAppointmentsForSync(Dictionary<long, long> pOid2Version);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetAllActiveAppointmentsForEmployeeInInterval(DateTime start, DateTime end, long pEmployeeOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetAllActiveAppointmentsForEmployeeInInterval2(DateTime start, DateTime end, long pEmployeeOid, bool pHasRightToSeeAllEmployeeAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<AbsenceTimeDC> GetAllActiveAbsenceTimesInInterval(DateTime pStart, DateTime pEnd, long pEmployeeOid, bool pHasRightToSeeAllEmployeeAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> LoadFilteredAppointments(bool pHasRightToSeeAllEmployeeAppointments, long pEmployeeOid, DateTime pIntervalStart, DateTime pIntervalEnd, List<long> pSelectedEmployees, List<long> pSelectedCustomer, List<long> pSelectedResources, bool pEmployeesOnly, bool pCustomersOnly, bool pResourcesOnly, bool pPrivateAppointmentsOnly, bool pOnlyMyAppointments);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> LoadFilteredAppointmentsMitAufgaben(bool pHasRightToSeeAllEmployeeAppointments, long pEmployeeOid, DateTime pIntervalStart, DateTime pIntervalEnd, List<long> pSelectedEmployees, List<long> pSelectedCustomer, List<long> pSelectedResources, bool pEmployeesOnly, bool pCustomersOnly, bool pResourcesOnly, bool pPrivateAppointmentsOnly, bool pOnlyMyAppointments, bool pShowTasks);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetAllTasksForEmployee(long pEmployeeOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> GetSchedulerAppointmentTasksForEmployeeBySupportConecpt(long pEmployeeOid, long pSupportConceptOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> LoadTasksAndAppointmentsForEmployee(long pEmployeeOid, DateTime pInvertalStart, int pBufferSize, long? pEmployeeAppointmentsOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void InsertTestAppointments(long pEmployeeOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteTestAppointments();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ResourceDC> CheckResourceAvailability(DateTime start, DateTime end, List<long> resourceOids, long? selectedAppointmentOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
SchedulerAppointmentDC FindRootAppointmentByRecurrenceId(string recurrenceId);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
string ValidateSchedulerAppointment(DateTime start, DateTime end, IEnumerable<long> employees, IEnumerable<long> customers, List<long> resources, long originator, long? appointmentOid, Guid? recurrenceId, int occurrenceIndex = 0, bool shouldSkipResourceAvailability = false);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteMobileTestAppointments();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> LoadFilteredAllActiveAppointments(long employeeOid, DateTime start, DateTime end, List<long> customerOids);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> LoadOccurrencesByRecurrenceId(string recurrenceId);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
Dictionary<DateTime, List<DateTimeSpan>> FindAppointmentsInRange(int duration, DateTime startDate, DateTime endDate, List<long> resourceOids, List<long> customerOids, List<long> employeeOids, long loggedInEmployeeOid, int intervalBuffer = 30, bool skipWeekends = true);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void ConvertResourceBookingsToResourceAppointments();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<AbsenceTimeDC> GetAllActiveCustomersAbsenceTimesInInterval(DateTime start, DateTime end, long employeeOid, List<long> selectedCustomerOids);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<AbsenceTimeDC> GetAllActiveEmployeeAbsenceTimesInInterval(DateTime start, DateTime end, long employeeOid, List<long> selectedEmployeeOids);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
Dictionary<string, List<string>> CheckResourceAvailabilityWithEmployeeInformation(DateTime start, DateTime end, List<long> resourceOids, long? selectedAppointmentOid, Guid? recurrenceId, int occurrenceIndex = 0, bool shouldSkipResourceAvailability = false);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
bool CheckSchedulerRightsForAppointmentEditing(long appointmentOid, long loggedOnUserOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
SchedulerAppointmentDC InsertSchedulerAppointment(SchedulerAppointmentDC appointment);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> CheckSchedulerRightsForAppointmentsToEdit(List<SchedulerAppointmentDC> appointments2Check, UserDC user);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SchedulerAppointmentDC> InsertOrUpdateSchedulerAppointments(List<SchedulerAppointmentDC> appointments2InsertOrUpdate);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteOrUpdateSchedulerAppointments(List<SchedulerAppointmentDC> appointments2DeleteOrUpdate);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
Dictionary<SchedulerAppointmentDC, bool> OverlappingAppointmentsExistForMultiple(List<SchedulerAppointmentDC> appointments);
}
}