Weiterentwicklung am Quittierungsbelegfeature im Mobilklienten
Mehrtägige Buchungen werden im Mobilklienten korrekt gespeichert
This commit is contained in:
@@ -314,6 +314,10 @@ namespace BeWo.ServiceProxy
|
||||
"ault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.SupportConceptDC> GetActiveSupportConceptsForEmployee(System.Nullable<long> employeeOid, BeWo.View.Navigation.Filter.CustomerFilterEnum supportConceptFilter);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/FindTeamCustomers", ReplyAction="http://tempuri.org/IEmployeeService/FindTeamCustomersResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/FindTeamCustomersBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<long> FindTeamCustomers(System.Nullable<long> teamOid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/ArchiveEmployee", ReplyAction="http://tempuri.org/IEmployeeService/ArchiveEmployeeResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/ArchiveEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void ArchiveEmployee(long pOid, long pVersion);
|
||||
@@ -790,6 +794,11 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetActiveSupportConceptsForEmployee(employeeOid, supportConceptFilter);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<long> FindTeamCustomers(System.Nullable<long> teamOid)
|
||||
{
|
||||
return base.Channel.FindTeamCustomers(teamOid);
|
||||
}
|
||||
|
||||
public void ArchiveEmployee(long pOid, long pVersion)
|
||||
{
|
||||
base.Channel.ArchiveEmployee(pOid, pVersion);
|
||||
@@ -1571,7 +1580,28 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Employee2SchedulerAppointmentDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Employee2SchedulerAppointmentDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ValueListEntryDC, System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTokenDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.Collections.Generic.Dictionary<int, long>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<int, long>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.SignatureType, System.Collections.Generic.List<long>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<System.DateTime, BS.Shared.DataContracts.Compact.CompactCustomerDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, System.Collections.Generic.List<BS.Shared.DataContracts.AccountingTransactionDC>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<string, BS.Shared.DataContracts.Compact.CompactTokenDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<string, string>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.UserRightType, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SignatureType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.HomeViewPanelType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Auszahlungsintervall))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Zahlungstyp))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VertretungsStatus))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SchulbegleitenderZugehoerigkeitsTyp))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.MessageType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.StatementType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportFilterDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceDescriptionDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportResultDC))]
|
||||
@@ -1676,26 +1706,7 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FLSAnalysisDataDetailDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordFLSOverviewDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordFLSOverviewDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.HomeViewPanelType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Auszahlungsintervall))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.Zahlungstyp))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.VertretungsStatus))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SchulbegleitenderZugehoerigkeitsTyp))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.MessageType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.StatementType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.Collections.Generic.Dictionary<int, long>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<int, long>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<System.DateTime, BS.Shared.DataContracts.Compact.CompactCustomerDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, System.Collections.Generic.List<BS.Shared.DataContracts.AccountingTransactionDC>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<string, BS.Shared.DataContracts.Compact.CompactTokenDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<string, string>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.UserRightType, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTokenDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
|
||||
@@ -4809,6 +4820,20 @@ namespace BeWo.ServiceProxy
|
||||
public interface IOperationsService
|
||||
{
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/LoadServiceRecordOidsWithCustomerConfirmati" +
|
||||
"onReceiptSignatures", ReplyAction="http://tempuri.org/IOperationsService/LoadServiceRecordOidsWithCustomerConfirmati" +
|
||||
"onReceiptSignaturesResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/LoadServiceRecordOidsWithCustomerConfirmati" +
|
||||
"onReceiptSignaturesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<long> LoadServiceRecordOidsWithCustomerConfirmationReceiptSignatures(System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetServiceRecordsWithoutConfirmationReceipt" +
|
||||
"Signature", ReplyAction="http://tempuri.org/IOperationsService/GetServiceRecordsWithoutConfirmationReceipt" +
|
||||
"SignatureResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetServiceRecordsWithoutConfirmationReceipt" +
|
||||
"SignatureBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC> GetServiceRecordsWithoutConfirmationReceiptSignature(System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetFlexibleReportResult", ReplyAction="http://tempuri.org/IOperationsService/GetFlexibleReportResultResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetFlexibleReportResultBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.FlexibleReportResultDC GetFlexibleReportResult(BS.Shared.DataContracts.FlexibleReportFilterDC filter);
|
||||
@@ -4996,7 +5021,7 @@ namespace BeWo.ServiceProxy
|
||||
"tomerResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignatureByDateAndCus" +
|
||||
"tomerBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, BS.Shared.Core.DateTimeSpan timeSpan);
|
||||
bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, BS.Shared.Core.DateTimeSpan timeSpan, BS.Shared.SignatureType signatureType);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/LoadServiceCategory", ReplyAction="http://tempuri.org/IOperationsService/LoadServiceCategoryResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/LoadServiceCategoryBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
@@ -5053,7 +5078,7 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignature", ReplyAction="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignatureResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignatureBeWoFaultFau" +
|
||||
"lt", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
bool HasConfirmationReceiptSignature(System.Collections.Generic.List<long> customerOids, System.Nullable<long> employeeOid, System.Nullable<long> costbearerOid, System.Nullable<long> serviceCategoryOid, BS.Shared.Core.DateTimeSpan timeSpan);
|
||||
bool HasConfirmationReceiptSignature(System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/ReplacePlaceholdersInTemplate", ReplyAction="http://tempuri.org/IOperationsService/ReplacePlaceholdersInTemplateResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/ReplacePlaceholdersInTemplateBeWoFaultFault" +
|
||||
@@ -5072,6 +5097,46 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetObjectForFilePathBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
string GetObjectForFilePath(BS.Shared.TableID table, System.Nullable<long> oid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/LoadConfirmationReceiptSignaturesByServiceR" +
|
||||
"ecordOids", ReplyAction="http://tempuri.org/IOperationsService/LoadConfirmationReceiptSignaturesByServiceR" +
|
||||
"ecordOidsResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/LoadConfirmationReceiptSignaturesByServiceR" +
|
||||
"ecordOidsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> LoadConfirmationReceiptSignaturesByServiceRecordOids(out System.Collections.Generic.List<long> serviceRecordOidsWithSignatures, System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateConfirmationReceiptSignatures", ReplyAction="http://tempuri.org/IOperationsService/UpdateConfirmationReceiptSignaturesResponse" +
|
||||
"")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateConfirmationReceiptSignaturesBeWoFaul" +
|
||||
"tFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> UpdateConfirmationReceiptSignatures(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> confirmationReceiptSignatures2Update);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteConfirmationReceiptSignatures", ReplyAction="http://tempuri.org/IOperationsService/DeleteConfirmationReceiptSignaturesResponse" +
|
||||
"")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteConfirmationReceiptSignaturesBeWoFaul" +
|
||||
"tFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void DeleteConfirmationReceiptSignatures(System.Collections.Generic.Dictionary<long, long> oid2Version);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignaturesByCustomerA" +
|
||||
"ndServiceRecords", ReplyAction="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignaturesByCustomerA" +
|
||||
"ndServiceRecordsResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/HasConfirmationReceiptSignaturesByCustomerA" +
|
||||
"ndServiceRecordsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
bool HasConfirmationReceiptSignaturesByCustomerAndServiceRecords(long customerOid, System.Collections.Generic.List<long> serviceRecordOids);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/LoadAllConfirmationReceiptSignaturesByServi" +
|
||||
"ceRecordOids", ReplyAction="http://tempuri.org/IOperationsService/LoadAllConfirmationReceiptSignaturesByServi" +
|
||||
"ceRecordOidsResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/LoadAllConfirmationReceiptSignaturesByServi" +
|
||||
"ceRecordOidsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> LoadAllConfirmationReceiptSignaturesByServiceRecordOids(out System.Collections.Generic.Dictionary<BS.Shared.SignatureType, System.Collections.Generic.List<long>> serviceRecordOidsWithSignature, System.Collections.Generic.List<long> serviceRecordOids);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/LoadServiceRecordOidsWithConfirmationReceip" +
|
||||
"tSignatures", ReplyAction="http://tempuri.org/IOperationsService/LoadServiceRecordOidsWithConfirmationReceip" +
|
||||
"tSignaturesResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/LoadServiceRecordOidsWithConfirmationReceip" +
|
||||
"tSignaturesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<long> LoadServiceRecordOidsWithConfirmationReceiptSignatures(System.Collections.Generic.List<long> serviceRecordOids);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
|
||||
"")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCBeWoFaul" +
|
||||
@@ -5972,6 +6037,16 @@ namespace BeWo.ServiceProxy
|
||||
{
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<long> LoadServiceRecordOidsWithCustomerConfirmationReceiptSignatures(System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType)
|
||||
{
|
||||
return base.Channel.LoadServiceRecordOidsWithCustomerConfirmationReceiptSignatures(serviceRecordOids, signatureType);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC> GetServiceRecordsWithoutConfirmationReceiptSignature(System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType)
|
||||
{
|
||||
return base.Channel.GetServiceRecordsWithoutConfirmationReceiptSignature(serviceRecordOids, signatureType);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.FlexibleReportResultDC GetFlexibleReportResult(BS.Shared.DataContracts.FlexibleReportFilterDC filter)
|
||||
{
|
||||
return base.Channel.GetFlexibleReportResult(filter);
|
||||
@@ -6172,9 +6247,9 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.HasConfirmationReceiptSignaturesByEmployeeAndServiceRecords(employeeOid, serviceRecordOids);
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, BS.Shared.Core.DateTimeSpan timeSpan)
|
||||
public bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, BS.Shared.Core.DateTimeSpan timeSpan, BS.Shared.SignatureType signatureType)
|
||||
{
|
||||
return base.Channel.HasConfirmationReceiptSignatureByDateAndCustomer(customerOid, timeSpan);
|
||||
return base.Channel.HasConfirmationReceiptSignatureByDateAndCustomer(customerOid, timeSpan, signatureType);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.ServiceCategoryDC LoadServiceCategory(long serviceCategoryOid)
|
||||
@@ -6237,9 +6312,9 @@ namespace BeWo.ServiceProxy
|
||||
base.Channel.DeleteTemplates(vorlagen);
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignature(System.Collections.Generic.List<long> customerOids, System.Nullable<long> employeeOid, System.Nullable<long> costbearerOid, System.Nullable<long> serviceCategoryOid, BS.Shared.Core.DateTimeSpan timeSpan)
|
||||
public bool HasConfirmationReceiptSignature(System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType)
|
||||
{
|
||||
return base.Channel.HasConfirmationReceiptSignature(customerOids, employeeOid, costbearerOid, serviceCategoryOid, timeSpan);
|
||||
return base.Channel.HasConfirmationReceiptSignature(serviceRecordOids, signatureType);
|
||||
}
|
||||
|
||||
public string ReplacePlaceholdersInTemplate(BS.Shared.DataContracts.DokumentvorlageDC template, System.Nullable<long> objectOid, System.Nullable<long> tableOid)
|
||||
@@ -6262,6 +6337,36 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetObjectForFilePath(table, oid);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> LoadConfirmationReceiptSignaturesByServiceRecordOids(out System.Collections.Generic.List<long> serviceRecordOidsWithSignatures, System.Collections.Generic.List<long> serviceRecordOids, BS.Shared.SignatureType signatureType)
|
||||
{
|
||||
return base.Channel.LoadConfirmationReceiptSignaturesByServiceRecordOids(out serviceRecordOidsWithSignatures, serviceRecordOids, signatureType);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> UpdateConfirmationReceiptSignatures(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> confirmationReceiptSignatures2Update)
|
||||
{
|
||||
return base.Channel.UpdateConfirmationReceiptSignatures(confirmationReceiptSignatures2Update);
|
||||
}
|
||||
|
||||
public void DeleteConfirmationReceiptSignatures(System.Collections.Generic.Dictionary<long, long> oid2Version)
|
||||
{
|
||||
base.Channel.DeleteConfirmationReceiptSignatures(oid2Version);
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignaturesByCustomerAndServiceRecords(long customerOid, System.Collections.Generic.List<long> serviceRecordOids)
|
||||
{
|
||||
return base.Channel.HasConfirmationReceiptSignaturesByCustomerAndServiceRecords(customerOid, serviceRecordOids);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> LoadAllConfirmationReceiptSignaturesByServiceRecordOids(out System.Collections.Generic.Dictionary<BS.Shared.SignatureType, System.Collections.Generic.List<long>> serviceRecordOidsWithSignature, System.Collections.Generic.List<long> serviceRecordOids)
|
||||
{
|
||||
return base.Channel.LoadAllConfirmationReceiptSignaturesByServiceRecordOids(out serviceRecordOidsWithSignature, serviceRecordOids);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<long> LoadServiceRecordOidsWithConfirmationReceiptSignatures(System.Collections.Generic.List<long> serviceRecordOids)
|
||||
{
|
||||
return base.Channel.LoadServiceRecordOidsWithConfirmationReceiptSignatures(serviceRecordOids);
|
||||
}
|
||||
|
||||
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
|
||||
{
|
||||
base.Channel.UpdateIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Web;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Optimization;
|
||||
|
||||
namespace BeWoPlanerMobil
|
||||
{
|
||||
@@ -18,11 +17,6 @@ namespace BeWoPlanerMobil
|
||||
// "~/Scripts/jquery.unobtrusive*",
|
||||
// "~/Scripts/jquery.validate*"));
|
||||
|
||||
// Use the development version of Modernizr to develop with and learn from. Then, when you're
|
||||
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
|
||||
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
|
||||
"~/Scripts/modernizr-*"));
|
||||
|
||||
//bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
|
||||
|
||||
//bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
|
||||
|
||||
@@ -89,6 +89,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\Lib\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="RestSharp, Version=106.0.0.0, Culture=neutral, PublicKeyToken=598062e77f915f75, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.106.10.1\lib\net452\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -312,7 +314,6 @@
|
||||
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
|
||||
<Content Include="Scripts\locale\de.js" />
|
||||
<Content Include="Scripts\mobileUtils.js" />
|
||||
<Content Include="Scripts\modernizr-2.8.3.js" />
|
||||
<Content Include="Scripts\moment-with-locales.js" />
|
||||
<Content Include="Scripts\moment-with-locales.min.js" />
|
||||
<Content Include="Scripts\moment.js" />
|
||||
|
||||
@@ -504,21 +504,20 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
private void ApplyWatermark()
|
||||
public static string ApplyWatermark(string blob, string watermarkImagePath)
|
||||
{
|
||||
if (Model == null || string.IsNullOrWhiteSpace(Model.SignatureImage))
|
||||
if(string.IsNullOrWhiteSpace(blob))
|
||||
{
|
||||
Logout();
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
var watermarkImage = Image.FromFile(Server.MapPath("../Content/images/bewoplaner_logo_big.png"));
|
||||
var watermarkImage = Image.FromFile(watermarkImagePath);
|
||||
|
||||
var signatureImage = SignatureUtils.Base64StringToBitmap(Model.SignatureImage);
|
||||
var signatureImage = SignatureUtils.Base64StringToBitmap(blob);
|
||||
|
||||
var hasTransparentBackground = SignatureUtils.HasTransparentBackground(Model.SignatureImage);
|
||||
var hasTransparentBackground = SignatureUtils.HasTransparentBackground(blob);
|
||||
|
||||
if (hasTransparentBackground)
|
||||
if(hasTransparentBackground)
|
||||
{
|
||||
signatureImage = SignatureUtils.AddBackgroundToBitmap(signatureImage, Color.White);
|
||||
}
|
||||
@@ -527,7 +526,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
for(var y = 0; y < signatureImage.Height; y++)
|
||||
{
|
||||
for (var x = 0; x < signatureImage.Width; x++)
|
||||
for(var x = 0; x < signatureImage.Width; x++)
|
||||
{
|
||||
watermarker.Position = WatermarkPosition.Absolute;
|
||||
watermarker.PositionX = x;
|
||||
@@ -543,7 +542,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
y += watermarkImage.Height;
|
||||
}
|
||||
|
||||
Model.SignatureImage = "data:image/png;base64," + SignatureUtils.ConvertImageToBase64String(watermarker.Image);
|
||||
return "data:image/png;base64," + SignatureUtils.ConvertImageToBase64String(watermarker.Image);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
@@ -728,6 +727,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var enddatum = datum;
|
||||
|
||||
var endDateString = collection[FormCollectionConstants.EndDateKey];
|
||||
if(endDateString != null)
|
||||
{
|
||||
enddatum = Convert.ToDateTime(endDateString);
|
||||
}
|
||||
|
||||
var start = collection[FormCollectionConstants.StartKey];
|
||||
var ende = collection[FormCollectionConstants.EndKey];
|
||||
var dauer = 0;
|
||||
@@ -1614,13 +1619,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var startHoursDt = ConvertTimeStringToDateTime(startString);
|
||||
var endHoursDt = ConvertTimeStringToDateTime(endString);
|
||||
|
||||
if (!DateTime.TryParse(dateString, out var date))
|
||||
if(!DateTime.TryParse(von, out var startDate))
|
||||
{
|
||||
date = DateTime.Now.Date;
|
||||
startDate = DateTime.Now.Date;
|
||||
}
|
||||
|
||||
var startDt = date.AddHours(startHoursDt.Hour).AddMinutes(startHoursDt.Minute);
|
||||
var endDt = date.AddHours(endHoursDt.Hour).AddMinutes(endHoursDt.Minute);
|
||||
if(!DateTime.TryParse(bis, out var endDate))
|
||||
{
|
||||
endDate = DateTime.Now.Date;
|
||||
}
|
||||
|
||||
var startDt = startDate.AddHours(startHoursDt.Hour).AddMinutes(startHoursDt.Minute);
|
||||
var endDt = endDate.AddHours(endHoursDt.Hour).AddMinutes(endHoursDt.Minute);
|
||||
|
||||
if (startDt > endDt)
|
||||
{
|
||||
@@ -2351,6 +2361,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var isParsingSuccessful2 = long.TryParse(pFormCollection[FormCollectionConstants.ServiceRecordOidHolder2Key], out var serviceRecordOid);
|
||||
var isParsingSuccessful = long.TryParse(pFormCollection[FormCollectionConstants.SignatureOidHolderKey], out var signatureOid);
|
||||
|
||||
if(isParsingSuccessful && isParsingSuccessful2)
|
||||
{
|
||||
var signatureServiceRecord = Model.ServiceRecords.FirstOrDefault(serviceRecord => serviceRecord.ServiceRecordOid.Equals(serviceRecordOid));
|
||||
@@ -2359,7 +2370,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
Model.SignatureImage = OperationsService.GetSignature(signatureOid).DataBild;
|
||||
|
||||
ApplyWatermark();
|
||||
Model.SignatureImage = ApplyWatermark(Model.SignatureImage, Server.MapPath("../Content/images/bewoplaner_logo_big.png"));
|
||||
}
|
||||
|
||||
return RedirectToActionPermanent("Main");
|
||||
@@ -2585,8 +2596,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(Model.IsInGroupBookingMode && Model.SelectedSupportConcepts.Count > 1)
|
||||
{
|
||||
// ResetGroupBookingMode(true);
|
||||
|
||||
return SaveGroupBooking();
|
||||
}
|
||||
|
||||
@@ -2604,6 +2613,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return ResetEditingMode();
|
||||
}
|
||||
|
||||
// Wird zum Bearbeiten von Gruppenbuchungen benutzt
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
public ActionResult EditServiceRecord(FormCollection formCollection)
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
@@ -13,29 +8,14 @@ using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
/*
|
||||
* Quittierungsbeleg wie im Fat-Client implementieren ✓
|
||||
* Mit Unterschriftenfunktion für den Mitarbeiter ✓
|
||||
* Liste mit allen ServiceRecords des Mitarbeiters für einen Klienten ✓
|
||||
*
|
||||
* TODO: Beim Speichern von ServiceRecords prüfen, ob es schon eine Mitarbeiterunterschrift für Quittierungsbelege gibt ✓
|
||||
* TODO: Unterschrift in Quittierungsbeleg einbauen
|
||||
* TODO: Bei neuer Unterschrift für einen Zeitraum die alte löschen
|
||||
|
||||
* TODO:
|
||||
* TODO: Flag wie ShowSignature, genannt ShowEmployeeSignature
|
||||
* TODO: ServiceRecords eines Quittierungsbelegs müssen mit einer Mitarbeiterunterschrift verknüpft sein, damit die Unterschrift angezeigt wird.
|
||||
* TODO:
|
||||
* TODO: Rechte:
|
||||
* TODO:
|
||||
* TODO: Für das Standartdatum den ersten des letzten Monats nehmen ✓
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
public class ReportController : AbstractBaseController
|
||||
{
|
||||
private ReportModel _Model;
|
||||
@@ -77,7 +57,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Main", "Main");
|
||||
}
|
||||
|
||||
// Damit das Standartdatum beim allerersten Aufruf gesetzt werden kann, gibt es die InitReports-Methode
|
||||
CreateServiceOverview(null);
|
||||
|
||||
return View(Model);
|
||||
}
|
||||
@@ -101,10 +81,10 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var first = new DateTime(year, month, 1).AddMonths(-1);
|
||||
var last = first.AddMonths(1).AddDays(-1);
|
||||
|
||||
Model.SelectedYear = first.Year;
|
||||
Model.SelectedMonth = first.Month;
|
||||
Model.SelectedYear = first.Year;
|
||||
Model.SelectedMonth = first.Month;
|
||||
Model.SelectedStartDay = first.Day;
|
||||
Model.SelectedEndDay = last.Day;
|
||||
Model.SelectedEndDay = last.Day;
|
||||
|
||||
var filterEnums = Enum.GetValues(typeof(QBFilterEnum)).Cast<QBFilterEnum>();
|
||||
|
||||
@@ -137,9 +117,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return Logout();
|
||||
}
|
||||
|
||||
if(Model.SelectedFilterItem == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Report");
|
||||
}
|
||||
|
||||
if(Model.SelectedFilterItem.FilterEnum == QBFilterEnum.KlientenAuswahl)
|
||||
{
|
||||
var customerOidString = formCollection[FormCollectionConstants.SelectedCustomerOidKey];
|
||||
var customerOidString = formCollection == null ? Model.SelectedCustomerOid.ToString() : formCollection[FormCollectionConstants.SelectedCustomerOidKey];
|
||||
|
||||
var isCustomerOidSuccessful = long.TryParse(customerOidString, out var selectedCustomerOid);
|
||||
|
||||
@@ -157,7 +142,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(Model.SelectedFilterItem.FilterEnum == QBFilterEnum.TeamAuswahl)
|
||||
{
|
||||
var teamOidString = formCollection[FormCollectionConstants.SelectedTeamOidKey];
|
||||
var teamOidString = formCollection == null ? Model.SelectedTeamOid.ToString() : formCollection[FormCollectionConstants.SelectedTeamOidKey];
|
||||
|
||||
var isTeamOidSuccessful = long.TryParse(teamOidString, out var selectedTeamOid);
|
||||
|
||||
@@ -179,13 +164,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
var reportObjects = new List<ServicesOverviewRO>();
|
||||
|
||||
var month = Model.SelectedMonth;
|
||||
var year = Model.SelectedYear;
|
||||
var year = Model.SelectedYear;
|
||||
|
||||
var organisationOid = Model.SelectedOrganisationOid ?? 0;
|
||||
var employeeOid = Model.SelectedEmployeeOid ?? 0;
|
||||
var organisationOid = Model.SelectedOrganisationOid ?? 0;
|
||||
var employeeOid = Model.SelectedEmployeeOid ?? 0;
|
||||
var serviceCategoryOid = Model.SelectedServiceCategoryOid;
|
||||
var teamOid = Model.SelectedTeamOid;
|
||||
var customerOid = Model.SelectedCustomerOid ?? 0;
|
||||
var teamOid = Model.SelectedTeamOid;
|
||||
var customerOid = Model.SelectedCustomerOid ?? 0;
|
||||
|
||||
switch(Model.SelectedFilterItem.FilterEnum)
|
||||
{
|
||||
@@ -212,19 +197,62 @@ namespace BeWoPlanerMobil.Controllers
|
||||
break;
|
||||
}
|
||||
|
||||
Model.ConfirmationReceiptObject = null;
|
||||
Model.ConfirmationReceiptObject = new ConfirmationReceiptObject(BuildInformationString(), new List<QuittierungsbelegResult>());
|
||||
reportObjects = reportObjects.Where(x => x != null).ToList();
|
||||
|
||||
reportObjects.DoForEach(ro =>
|
||||
var srOids = new List<long>();
|
||||
|
||||
reportObjects.DoForEach(x => x.Services.DoForEach(s => srOids.AddIfNotIn(s.ServiceRecordOid)));
|
||||
|
||||
Model.ConfirmationReceiptSignatures = OperationsService.LoadAllConfirmationReceiptSignaturesByServiceRecordOids(srOids, out var serviceRecordOidsWithSignature);
|
||||
|
||||
var customerSignatures = Model.ConfirmationReceiptSignatures.Where(crs => crs.SignatureType == SignatureType.Customer);
|
||||
var employeeSignatures = Model.ConfirmationReceiptSignatures.Where(crs => crs.SignatureType == SignatureType.Employee);
|
||||
|
||||
Model.ReportServiceRecordOids = new List<long>();
|
||||
reportObjects.DoForEach(ro => ro.Services.DoForEach(s =>
|
||||
{
|
||||
Model.ReportServiceRecordOids.AddIfNotIn(s.ServiceRecordOid);
|
||||
}));
|
||||
|
||||
var hasEmployeeSignature = srOids.All(a => serviceRecordOidsWithSignature.ContainsKey(SignatureType.Employee) && serviceRecordOidsWithSignature[SignatureType.Employee].Contains(a));
|
||||
|
||||
Model.ConfirmationReceiptObject = null;
|
||||
Model.ConfirmationReceiptObject = new ConfirmationReceiptObject(BuildInformationString(), new List<QuittierungsbelegResult>(), BuildInformationString(true), GetTimeSpanString(), hasEmployeeSignature, employeeSignatures.ToList());
|
||||
|
||||
reportObjects.DoForEach(reportObject =>
|
||||
{
|
||||
var quittierungsbelegItems = new List<QuittierungsbelegItem>();
|
||||
|
||||
ro.Services.DoForEach(serviceDetail => { quittierungsbelegItems.Add(new QuittierungsbelegItem(serviceDetail)); });
|
||||
reportObject.Services.DoForEach(serviceDetail =>
|
||||
{
|
||||
quittierungsbelegItems.Add(new QuittierungsbelegItem(serviceDetail));
|
||||
});
|
||||
|
||||
Model.ConfirmationReceiptObject.ConfirmationReceiptResultList.Add(new QuittierungsbelegResult(ro.CustomerName, quittierungsbelegItems));
|
||||
if(quittierungsbelegItems.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var oids = quittierungsbelegItems.Select(s => s.ServiceRecordOid);
|
||||
|
||||
var hasCustomerSignature = oids.All(a => serviceRecordOidsWithSignature.ContainsKey(SignatureType.Customer) && serviceRecordOidsWithSignature[SignatureType.Customer].Contains(a));
|
||||
|
||||
var customerSignatureOid = hasCustomerSignature ? customerSignatures.FirstOrDefault(cs => cs.ServiceRecords.All(a => a.Customer.CustomerOid.Equals(reportObject.CustomerOid) && a.ServiceRecordOid.HasValue && serviceRecordOidsWithSignature[SignatureType.Customer].Contains(a.ServiceRecordOid.Value)))?.ConfirmationReceiptSignatureOid : null;
|
||||
|
||||
Model.ConfirmationReceiptObject.ConfirmationReceiptResultList.Add(
|
||||
new QuittierungsbelegResult
|
||||
(
|
||||
$"{reportObject.CustomerLastName}, " +
|
||||
$"{reportObject.CustomerFirstName}",
|
||||
quittierungsbelegItems,
|
||||
reportObject.CustomerOid,
|
||||
hasCustomerSignature,
|
||||
customerSignatureOid
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
if(Model.ConfirmationReceiptObject.ConfirmationReceiptResultList.Count == 0)
|
||||
if(Model.ConfirmationReceiptObject.ConfirmationReceiptResultList.All(qbItem => qbItem.Items.Count == 0))
|
||||
{
|
||||
TempData["HasWarningMessage"] = true;
|
||||
}
|
||||
@@ -232,28 +260,33 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Report");
|
||||
}
|
||||
|
||||
private string BuildInformationString()
|
||||
private string BuildInformationString(bool isDativ = false)
|
||||
{
|
||||
var stringBuilder = new StringBuilder("Einträge für ");
|
||||
var stringBuilder = new StringBuilder(isDativ ? string.Empty : "Einträge für ");
|
||||
|
||||
//Einträge für [alle Klienten/die Klienten meines Teams/meine Klienten/[CustomerName]/[TeamName]] [von [Mitarbeiter] [bei [Kostenträger]] und [Leistungskategorie]] vom 01.10. bis 31.10.2020
|
||||
// Einträge für [alle Klienten/die Klienten meines Teams/meine Klienten/[CustomerName]/[TeamName]] [von [Mitarbeiter] [bei [Kostenträger]] und [Leistungskategorie]] vom 01.10. bis 31.10.2020
|
||||
// Einträge für Grube, Clair von Fisher, George bei LWL und face-to-face vom 01.10. bis 31.10.2020
|
||||
// Unterschrift für x erbrachte Leistungen von
|
||||
|
||||
switch(Model.SelectedFilterItem.FilterEnum)
|
||||
{
|
||||
case QBFilterEnum.KlientenAuswahl:
|
||||
stringBuilder.Append(Model.SelectedCustomer);
|
||||
break;
|
||||
case QBFilterEnum.MeineKlienten:
|
||||
stringBuilder.Append("meine Klienten");
|
||||
stringBuilder.Append(isDativ ? "meinen" : "meine");
|
||||
stringBuilder.Append(" Klienten");
|
||||
break;
|
||||
case QBFilterEnum.NurKlientenMeinesTeams:
|
||||
stringBuilder.Append("die Klienten meines Teams");
|
||||
stringBuilder.Append(isDativ ? "den" : "die");
|
||||
stringBuilder.Append(" Klienten meines Teams");
|
||||
break;
|
||||
case QBFilterEnum.TeamAuswahl:
|
||||
stringBuilder.Append(Model.SelectedTeam);
|
||||
break;
|
||||
default:
|
||||
stringBuilder.Append("alle Klienten");
|
||||
stringBuilder.Append(isDativ ? "allen" : "alle");
|
||||
stringBuilder.Append(" Klienten");
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -279,16 +312,21 @@ namespace BeWoPlanerMobil.Controllers
|
||||
stringBuilder.Append(Model.SelectedServiceCategory.Name);
|
||||
}
|
||||
|
||||
var month = Model.SelectedMonth < 10 ? $"0{Model.SelectedMonth}" : Model.SelectedMonth.ToString();
|
||||
var year = Model.SelectedYear;
|
||||
var vom = Model.SelectedStartDay < 10 ? $"0{Model.SelectedStartDay}" : Model.SelectedStartDay.ToString();
|
||||
var bis = Model.SelectedEndDay < 10 ? $"0{Model.SelectedEndDay}" : Model.SelectedEndDay.ToString();
|
||||
|
||||
stringBuilder.Append($"vom {vom}.{month}. bis {bis}.{month}.{year}");
|
||||
stringBuilder.Append(GetTimeSpanString());
|
||||
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
private string GetTimeSpanString()
|
||||
{
|
||||
var month = Model.SelectedMonth < 10 ? $"0{Model.SelectedMonth}" : Model.SelectedMonth.ToString();
|
||||
var year = Model.SelectedYear;
|
||||
var vom = Model.SelectedStartDay < 10 ? $"0{Model.SelectedStartDay}" : Model.SelectedStartDay.ToString();
|
||||
var bis = Model.SelectedEndDay < 10 ? $"0{Model.SelectedEndDay}" : Model.SelectedEndDay.ToString();
|
||||
|
||||
return $"vom {vom}.{month}. bis {bis}.{month}.{year}";
|
||||
}
|
||||
|
||||
private IEnumerable<long> GetTeamCustomerOids(long? teamOid = null)
|
||||
{
|
||||
var customerOids = new List<long>();
|
||||
@@ -314,139 +352,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpPost]
|
||||
public string CreateEmployeeSignatureForServiceOverview(string base64SignatureString)
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
Logout();
|
||||
}
|
||||
|
||||
var confirmationReceiptSignature = new ConfirmationReceiptSignatureDC();
|
||||
|
||||
var serviceRecordOids = new List<long>();
|
||||
|
||||
Model.ConfirmationReceiptObject.ConfirmationReceiptResultList.DoForEach(result => result.Items.DoForEach(item => serviceRecordOids.AddIfNotIn(item.ServiceRecordOid)));
|
||||
|
||||
var serviceRecords = OperationsService.GetServiceRecordsByIds(serviceRecordOids);
|
||||
|
||||
confirmationReceiptSignature.ServiceRecords = serviceRecords;
|
||||
confirmationReceiptSignature.EmployeeOid = Model.Employee.EmployeeOid;
|
||||
|
||||
// TODO: Prüfen, ob es bereits eine oder mehrere Mitarbeiterunterschriften gibt und die gegebenenfalls löschen
|
||||
var signatureToDelete = OperationsService.FindConfirmationReceiptSignaturesByEmployeeAndServiceRecords(Model.Employee.EmployeeOid.Value, serviceRecordOids);
|
||||
|
||||
using(var signatureBitmap = SignatureUtils.Base64StringToBitmap(base64SignatureString.Split(',')[1]))
|
||||
{
|
||||
var isValid = SignatureUtils.ValidateSignature(signatureBitmap);
|
||||
|
||||
if(!isValid)
|
||||
{
|
||||
return MobileUtils.SerializeObject("Das Unterschriftenfeld darf nicht leer sein.");
|
||||
}
|
||||
|
||||
confirmationReceiptSignature.SignatureImage = base64SignatureString;
|
||||
|
||||
OperationsService.InsertConfirmationReceiptSignature(confirmationReceiptSignature);
|
||||
}
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string ValidateEmployeeSignature()
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid == null)
|
||||
{
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var serviceRecordOids = new List<long>();
|
||||
|
||||
Model.ConfirmationReceiptObject.ConfirmationReceiptResultList.DoForEach(result =>
|
||||
{
|
||||
result.Items.DoForEach(item =>
|
||||
{
|
||||
serviceRecordOids.AddIfNotIn(item.ServiceRecordOid);
|
||||
});
|
||||
});
|
||||
|
||||
var hasSignature = OperationsService.HasConfirmationReceiptSignaturesByEmployeeAndServiceRecords(Model.Employee.EmployeeOid.Value, serviceRecordOids);
|
||||
|
||||
return hasSignature.ToString();
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string CheckForEmployeeSignature(string customerOidString, string monthString, string yearString, string startDayString, string endDayString, string costbearerOidString, string employeeOidString, string serviceCategoryOidString)
|
||||
{
|
||||
if(Model?.Employee?.EmployeeOid == null)
|
||||
{
|
||||
Logout();
|
||||
}
|
||||
|
||||
// TODO: Auswahl beachten
|
||||
/*
|
||||
* Methode im SearchDAO anpassen an Kostenträger, Leistungskategorie, Mitarbeiter, Team
|
||||
*/
|
||||
|
||||
var isParsingSuccessful1 = long.TryParse(customerOidString, out var customerOid);
|
||||
var isParsingSuccessful2 = int.TryParse(monthString, out var month);
|
||||
var isParsingSuccessful3 = int.TryParse(yearString, out var year);
|
||||
var isParsingSuccessful4 = int.TryParse(startDayString, out var startDay);
|
||||
var isParsingSuccessful5 = int.TryParse(endDayString, out var endDay);
|
||||
|
||||
long.TryParse(costbearerOidString, out var organisationOid);
|
||||
long.TryParse(employeeOidString, out var employeeOid);
|
||||
long.TryParse(serviceCategoryOidString, out var serviceCategoryOid);
|
||||
|
||||
var customerOids = new List<long>();
|
||||
|
||||
if(Model.SelectedFilterItem != null)
|
||||
{
|
||||
switch(Model.SelectedFilterItem.FilterEnum)
|
||||
{
|
||||
case QBFilterEnum.AlleKlienten:
|
||||
customerOids = EmployeeService.GetActiveCompactCustomersForEmployee(Model.Employee.EmployeeOid).Select(s => s.CustomerOid).ToList();
|
||||
break;
|
||||
case QBFilterEnum.NurKlientenMeinesTeams:
|
||||
customerOids = GetTeamCustomerOids().ToList();
|
||||
break;
|
||||
case QBFilterEnum.MeineKlienten:
|
||||
customerOids = DefaultReportCreator.GetMeineKlientenOids().ToList();
|
||||
break;
|
||||
case QBFilterEnum.KlientenAuswahl:
|
||||
customerOids = new List<long> {customerOid};
|
||||
break;
|
||||
case QBFilterEnum.TeamAuswahl:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
long? costbearerOid = null;
|
||||
if(organisationOid > 0)
|
||||
{
|
||||
var organisation = Model.Organisations.FirstOrDefault(o => o.OrganisationOid.Equals(organisationOid));
|
||||
costbearerOid = organisation?.CostBearerOid;
|
||||
}
|
||||
|
||||
//if(isParsingSuccessful1 && isParsingSuccessful2 && isParsingSuccessful3 && isParsingSuccessful4 && isParsingSuccessful5 && year > 0)
|
||||
if(isParsingSuccessful2 && isParsingSuccessful3 && isParsingSuccessful4 && isParsingSuccessful5 && year > 0)
|
||||
{
|
||||
var theTimeSpan = new DateTimeSpan(new DateTime(year, month, startDay), new DateTime(year, month, endDay));
|
||||
|
||||
//var hasSignature = OperationsService.HasConfirmationReceiptSignatureByDateAndCustomer(customerOid, theTimeSpan);
|
||||
|
||||
var test = OperationsService.HasConfirmationReceiptSignature(customerOids, employeeOid == 0 ? null : (long?) employeeOid, costbearerOid, serviceCategoryOid == 0 ? null : (long?) serviceCategoryOid, theTimeSpan);
|
||||
|
||||
//return MobileUtils.SerializeObject(hasSignature);
|
||||
return MobileUtils.SerializeObject(false);
|
||||
}
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string ChangeDateSelection(string startDayString, string endDayString, string monthString, string yearString)
|
||||
{
|
||||
@@ -469,8 +374,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.SelectedStartDay = start.Day;
|
||||
Model.SelectedMonth = month;
|
||||
Model.SelectedYear = year;
|
||||
|
||||
return MobileUtils.SerializeObject(true);
|
||||
}
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
@@ -517,5 +420,133 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpPost]
|
||||
public string CreateSignatureForServiceOverview(string base64SignatureString, string customerOidString, bool? isCustomerSignature, bool? overwrite)
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var shouldOverwrite = overwrite.HasValue && overwrite.Value;
|
||||
|
||||
var customerOid = 0L;
|
||||
|
||||
var isCustomerSig = isCustomerSignature.HasValue && isCustomerSignature.Value;
|
||||
|
||||
if(isCustomerSig)
|
||||
{
|
||||
var isSuccessful = long.TryParse(customerOidString, out customerOid);
|
||||
|
||||
if(!isSuccessful || customerOid == 0)
|
||||
{
|
||||
return MobileUtils.SerializeObject("Es ist ein unbekannter Fehler aufgetreten. Bitte wenden Sie sich an den Administrator.");
|
||||
}
|
||||
}
|
||||
|
||||
var signatureType = isCustomerSig ? SignatureType.Customer : SignatureType.Employee;
|
||||
|
||||
var serviceRecordOids = new List<long>();
|
||||
|
||||
var resultList = Model.ConfirmationReceiptObject.ConfirmationReceiptResultList;
|
||||
|
||||
if(isCustomerSig)
|
||||
{
|
||||
resultList = resultList.Where(item => item.CustomerOid == customerOid).ToList();
|
||||
}
|
||||
|
||||
resultList.DoForEach(result => result.Items.DoForEach(item => serviceRecordOids.AddIfNotIn(item.ServiceRecordOid)));
|
||||
|
||||
var existingServiceRecordSignatures = OperationsService.LoadConfirmationReceiptSignaturesByServiceRecordOids(serviceRecordOids, signatureType, out var serviceRecordOidsWithSignature);
|
||||
|
||||
var serviceRecords = OperationsService.GetServiceRecordsByIds(serviceRecordOids);
|
||||
|
||||
using(var signatureBitmap = SignatureUtils.Base64StringToBitmap(base64SignatureString.Split(',')[1]))
|
||||
{
|
||||
// TODO: TimeSpanString hinzufügen
|
||||
/*
|
||||
* 01.01. - 17.01.2021 -> werden wegen überschreiben ein paar Einträge entfernt, muss auch der String angepasst werden
|
||||
* Das erste StartDate und das letzte EndDate können nicht im gewählten Monat liegen: 31.12.2020 22:00 bis 01.01.2021 03:00.
|
||||
*/
|
||||
var isValid = SignatureUtils.ValidateSignature(signatureBitmap);
|
||||
|
||||
if(!isValid)
|
||||
{
|
||||
return MobileUtils.SerializeObject("Das Unterschriftenfeld darf nicht leer sein.");
|
||||
}
|
||||
|
||||
if(shouldOverwrite)
|
||||
{
|
||||
foreach(var csr in existingServiceRecordSignatures)
|
||||
{
|
||||
var temp = csr.ServiceRecords.Where(sr => sr.ServiceRecordOid.HasValue && !serviceRecordOidsWithSignature.Contains(sr.ServiceRecordOid.Value));
|
||||
csr.ServiceRecords.Clear();
|
||||
csr.ServiceRecords.AddRangeIfElementsNotIn(temp);
|
||||
|
||||
if(csr.ServiceRecords.Count == 0 && csr.ConfirmationReceiptSignatureOid.HasValue)
|
||||
{
|
||||
OperationsService.DeleteConfirmationReceiptSignature(csr.ConfirmationReceiptSignatureOid.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
OperationsService.UpdateConfirmationReceiptSignature(csr);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
serviceRecords = serviceRecords.Where(sr => sr.ServiceRecordOid.HasValue && !serviceRecordOidsWithSignature.Contains(sr.ServiceRecordOid.Value)).ToList();
|
||||
}
|
||||
|
||||
var timeSpanString = GetTimeSpanString();
|
||||
if(timeSpanString.Contains("vom"))
|
||||
{
|
||||
timeSpanString = timeSpanString.Substring(4);
|
||||
}
|
||||
|
||||
var confirmationReceiptSignature = new ConfirmationReceiptSignatureDC
|
||||
{
|
||||
ServiceRecords = serviceRecords,
|
||||
CustomerOid = isCustomerSig ? (long?) customerOid : null,
|
||||
Employee = isCustomerSig ? null : MobileSessionFacade.LoggedInCompactEmployee,
|
||||
SignatureImage = base64SignatureString,
|
||||
SignatureType = signatureType,
|
||||
TimeSpanString = timeSpanString
|
||||
};
|
||||
|
||||
OperationsService.InsertConfirmationReceiptSignature(confirmationReceiptSignature);
|
||||
}
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
public string LoadConfirmationReceiptSignature(string signatureOidString)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
Logout();
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
if(long.TryParse(signatureOidString, out var signatureOid))
|
||||
{
|
||||
var signature = Model.GetConfirmationReceiptSignatureByOid(signatureOid);
|
||||
|
||||
return signature?.SignatureImage != null ? MainController.ApplyWatermark(signature.SignatureImage, Server.MapPath("../Content/images/bewoplaner_logo_big.png")) : null;
|
||||
}
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
return MobileUtils.SerializeObject("Ein Fehler ist aufgetreten. Bitte wenden Sie sich an Ihren Administrator.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,5 +238,14 @@ namespace BeWoPlanerMobil.Models
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public List<long> ReportServiceRecordOids { get; set; }
|
||||
|
||||
public List<ConfirmationReceiptSignatureDC> ConfirmationReceiptSignatures { get; set; } = new List<ConfirmationReceiptSignatureDC>();
|
||||
|
||||
public ConfirmationReceiptSignatureDC GetConfirmationReceiptSignatureByOid(long confirmationReceiptSignatureOid)
|
||||
{
|
||||
return ConfirmationReceiptSignatures.FirstOrDefault(crs => crs.ConfirmationReceiptSignatureOid == confirmationReceiptSignatureOid);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,8 @@ function showMessagePopupWithCallback(title, message, callback, executeCallbackB
|
||||
callback();
|
||||
});
|
||||
|
||||
if (executeCallbackByBothButtons === true) {
|
||||
if(executeCallbackByBothButtons === true) {
|
||||
$("#message-popup-close-btn, #message-popup-esc-btn").off("click");
|
||||
$("#message-popup-close-btn, #message-popup-esc-btn").on("click",
|
||||
function() {
|
||||
callback();
|
||||
@@ -168,11 +169,13 @@ function showAlertMessageBox(title, message, callback, executeCallbackByBothButt
|
||||
|
||||
$("#popupMessage").text(message);
|
||||
|
||||
$("#message-popup-ok-btn").off("click");
|
||||
$("#message-popup-ok-btn").on("click", function() {
|
||||
callback();
|
||||
});
|
||||
|
||||
if(executeCallbackByBothButtons === true) {
|
||||
$("#message-popup-close-btn").off("click");
|
||||
$("#message-popup-close-btn").on("click", function() {
|
||||
callback();
|
||||
});
|
||||
@@ -193,14 +196,12 @@ function showWarningMessageBox(title, message, callback, executeCallbackByBothBu
|
||||
|
||||
$("#popupMessage").text(message);
|
||||
|
||||
$("#message-popup-ok-btn").on("click", function() {
|
||||
callback();
|
||||
});
|
||||
$("#message-popup-ok-btn").off("click");
|
||||
$("#message-popup-ok-btn").on("click", callback);
|
||||
|
||||
if(executeCallbackByBothButtons === true) {
|
||||
$("#message-popup-close-btn").on("click", function() {
|
||||
callback();
|
||||
});
|
||||
$("#message-popup-close-btn").off("click");
|
||||
$("#message-popup-close-btn").on("click", callback);
|
||||
}
|
||||
|
||||
$("#messagePopup").modal(
|
||||
|
||||
1406
BeWoPlanerMobil/Scripts/modernizr-2.8.3.js
vendored
1406
BeWoPlanerMobil/Scripts/modernizr-2.8.3.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -566,7 +566,13 @@ function getStartAndEndDate() {
|
||||
// Bei leeren Start- und Endfeldern. Muss ein Dummydate zurückgeben,
|
||||
// damit das Speichern ohne Angabe der Start- und Endzeit möglich ist.
|
||||
if($("#start-time").val().length === 0 || $("#end-time").val().length === 0) {
|
||||
var dummyDate = moment(new Date());
|
||||
var bareDate = new Date();
|
||||
|
||||
bareDate.setHours(0);
|
||||
bareDate.setMinutes(0);
|
||||
bareDate.setSeconds(1);
|
||||
|
||||
var dummyDate = moment(bareDate);
|
||||
|
||||
return [dummyDate, dummyDate];
|
||||
}
|
||||
|
||||
@@ -45,15 +45,19 @@ function calculateDays() {
|
||||
$.get(changeDateSelectionUrl, { startDayString: startDay, endDayString: endDay, monthString: month, yearString: year});
|
||||
}
|
||||
|
||||
function initializeReportSignature() {
|
||||
function initializeReportSignature(overwrite) {
|
||||
$("#report-form-container").hide();
|
||||
$("#report-signature-container").addClass("d-block");
|
||||
|
||||
var customer = $("#customers-drop-down option:selected").text();
|
||||
var month = $("#month-select option:selected").text();
|
||||
var year = $("#year-select option:selected").text();
|
||||
if(overwrite) {
|
||||
$("#overwriting-employee-signature-alert").addClass("d-block");
|
||||
}
|
||||
|
||||
$("#report-info-column").html("Unterschrift für erbrachte Leistungen von " + customer + " im " + month + " " + year);
|
||||
var text = $("#signature-canvas-information").val();
|
||||
|
||||
var serviceRecordCount = $("#service-record-count").val();
|
||||
|
||||
$("#report-info-column").html("Unterschrift für " + serviceRecordCount + " erbrachte Leistungen von " + text);
|
||||
|
||||
resizeCanvas("#report-sketch-pad", "#report-canvas-row");
|
||||
|
||||
@@ -65,7 +69,7 @@ function initializeReportSignature() {
|
||||
var clearButton = document.getElementById("clear-report-canvas-btn");
|
||||
var cancelButton = document.getElementById("cancel-report-signature-btn");
|
||||
|
||||
saveButton.addEventListener("click", function(event) {
|
||||
saveButton.addEventListener("click", function() {
|
||||
var clonedCanvas = trimCanvas(cloneCanvas(document.getElementById("report-sketch-pad")));
|
||||
|
||||
var context = clonedCanvas.getContext("2d");
|
||||
@@ -78,79 +82,40 @@ function initializeReportSignature() {
|
||||
showMessagePopupWithCallback("Unterschrift speichern", "Mit dem Speichern der Unterschrift ist es nicht mehr möglich, die betroffenen Einträge der Zeiterfassung zu ändern.", function() {
|
||||
showSpinner();
|
||||
|
||||
var test = getValidateEmployeeSignatureUrl();
|
||||
var signatureCreationUrl = getCreateSignatureForServiceOverviewUrl();
|
||||
|
||||
$.get(test).done(function(result) {
|
||||
// Falls true bisherige Unterschrift ersetzen
|
||||
if(result === undefined || result === null) {
|
||||
logError("employee signature validation result is undefined");
|
||||
return;
|
||||
}
|
||||
showSpinner();
|
||||
|
||||
if(result === "True") {
|
||||
showWarningMessageBox("Speichern",
|
||||
"Für " + month + " " + year + " existiert bereits eine oder mehrere Mitarbeiterunterschriften. Möchten Sie sie ersetzen?",
|
||||
function() {
|
||||
var url = getCreateEmployeeSignatureForServiceOverviewUrl();
|
||||
$.post(signatureCreationUrl, { base64SignatureString: dataUrl, customerOidString: null, isCustomerSignature: false, overwrite: overwrite }).done(function(json) {
|
||||
hideSpinner();
|
||||
|
||||
$.post(url, { base64SignatureString: dataUrl }).done(function(json) {
|
||||
hideSpinner();
|
||||
|
||||
if (isEmptyOrSpaces(json)) {
|
||||
$("#signature-container").removeClass("d-block");
|
||||
$("#main-container, #checkbox-container").show();
|
||||
showMessagePopupWithCallback("Unterschrift",
|
||||
"Die Unterschrift wurde erfolgreich gespeichert.",
|
||||
function() {
|
||||
showSpinner();
|
||||
location.reload();
|
||||
},
|
||||
true);
|
||||
} else {
|
||||
showMessagePopup("Fehler", json);
|
||||
signaturePad.clear();
|
||||
}
|
||||
});
|
||||
},
|
||||
false);
|
||||
if(isEmptyOrSpaces(json)) {
|
||||
// Ist umbenannt in report-signature-container
|
||||
$("#signature-container").removeClass("d-block");
|
||||
$("#main-container, #checkbox-container").show();
|
||||
showMessagePopupWithCallback("Unterschrift", "Die Unterschrift wurde erfolgreich gespeichert.", function() {
|
||||
showSpinner();
|
||||
location.reload();
|
||||
}, true);
|
||||
} else {
|
||||
var url = getCreateEmployeeSignatureForServiceOverviewUrl();
|
||||
|
||||
$.post(url, { base64SignatureString: dataUrl }).done(function(json) {
|
||||
hideSpinner();
|
||||
|
||||
if(isEmptyOrSpaces(json)) {
|
||||
$("#signature-container").removeClass("d-block");
|
||||
$("#main-container, #checkbox-container").show();
|
||||
showMessagePopupWithCallback("Unterschrift", "Die Unterschrift wurde erfolgreich gespeichert.", function() {
|
||||
showSpinner();
|
||||
location.reload();
|
||||
}, true);
|
||||
} else {
|
||||
showMessagePopup("Fehler", json);
|
||||
signaturePad.clear();
|
||||
}
|
||||
});
|
||||
showMessagePopup("Fehler", json);
|
||||
signaturePad.clear();
|
||||
}
|
||||
});
|
||||
|
||||
}, false);
|
||||
});
|
||||
|
||||
clearButton.addEventListener("click", function(event) {
|
||||
clearButton.addEventListener("click", function() {
|
||||
signaturePad.clear();
|
||||
});
|
||||
|
||||
cancelButton.addEventListener("click", function(event) {
|
||||
cancelButton.addEventListener("click", function() {
|
||||
showMessagePopupWithCallback("Unterschrift", "Sind Sie sicher, dass Sie die Unterschrift nicht speichern möchten?",
|
||||
function() {
|
||||
$("#report-signature-container").removeClass("d-block");
|
||||
$("#report-form-container").show();
|
||||
|
||||
signaturePad.clear();
|
||||
|
||||
//TODO: Notwendigkeit prüfen
|
||||
//$.get(getResetSignatureImageUrl());
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
@@ -192,53 +157,6 @@ function checkForExistingSignature() {
|
||||
endDayString: endDay,
|
||||
monthString: month,
|
||||
yearString: year
|
||||
},
|
||||
function(result1) {
|
||||
if (result1!=null && result1.length > 1) {
|
||||
var jason = $.parseJSON(result1);
|
||||
|
||||
if (jason === true) {
|
||||
var customerOid = $("#customers-drop-down option:selected").val();
|
||||
|
||||
var monthName = $("#month-select option:selected").text();
|
||||
|
||||
var isCostbearerChecked = $("#selected-organisation-cb").is(":checked");
|
||||
|
||||
var costbearerOid = isCostbearerChecked === true ? $("#organisation-select option:selected").val() : null;
|
||||
|
||||
logDebug($("#organisation-select option:selected").val());
|
||||
|
||||
var url = getCheckForEmployeeSignatureUrl();
|
||||
|
||||
$.get(url,
|
||||
{
|
||||
customerOidString: customerOid,
|
||||
monthString: month,
|
||||
yearString: year,
|
||||
startDayString: startDay,
|
||||
endDayString: endDay,
|
||||
costbearerOidString: costbearerOid
|
||||
},
|
||||
function(result) {
|
||||
if(result === null || result === undefined || result.length <= 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hasSignatures = $.parseJSON(result);
|
||||
|
||||
if(hasSignatures === true) {
|
||||
$("#warning-message-container").removeClass("d-none");
|
||||
$("#warning-message-container").addClass("d-block");
|
||||
$("#warning-message-container").html("Für " + monthName + " " + year + " existiert bereits eine Mitarbeiterunterschrift.");
|
||||
} else {
|
||||
$("#warning-message-container").empty();
|
||||
$("#warning-message-container").removeClass("d-block");
|
||||
$("#warning-message-container").addClass("d-none");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -298,6 +216,109 @@ function filterCheckBoxChange() {
|
||||
});
|
||||
}
|
||||
|
||||
function validateReportForm() {
|
||||
function onCustomerSelectionChange() {
|
||||
var url = getSetCustomerUrl();
|
||||
|
||||
var selectedCustomerOid = $("#customers-drop-down option:selected").val();
|
||||
|
||||
$.get(url, { customerOid: selectedCustomerOid}).done(function() {
|
||||
checkForExistingSignature();
|
||||
});
|
||||
}
|
||||
|
||||
function openCustomerSignaturePopup(numberOfEntries, customerName, timeSpan, customerOid, overwrite) {
|
||||
// Popup anzeigen
|
||||
$("#report-form-container").hide();
|
||||
|
||||
$("#report-customer-signature-container").addClass("d-block");
|
||||
|
||||
$("#report-customer-info-column").html("Unterschrift für " + numberOfEntries + " erbrachte Leistungen von " + customerName + " (" + timeSpan + ")");
|
||||
|
||||
if (overwrite) {
|
||||
$("#overwriting-customer-signature-alert").addClass("d-block");
|
||||
}
|
||||
|
||||
resizeCanvas("#report-customer-sketch-pad", "#report-customer-canvas-row");
|
||||
|
||||
var canvas = document.getElementById("report-customer-sketch-pad");
|
||||
|
||||
var signaturePad = new SignaturePad(canvas, { backgroundColor: "rgba(255, 255, 255, 0)" });
|
||||
|
||||
var saveButton = document.getElementById("save-report-customer-signature-btn");
|
||||
var clearButton = document.getElementById("clear-report-customer-canvas-btn");
|
||||
var cancelButton = document.getElementById("cancel-report-customer-signature-btn");
|
||||
|
||||
saveButton.addEventListener("click", function() {
|
||||
var clonedCanvas = trimCanvas(cloneCanvas(document.getElementById("report-customer-sketch-pad")));
|
||||
|
||||
var context = clonedCanvas.getContext("2d");
|
||||
context.globalCompositeOperation = "destination-over";
|
||||
context.fillStyle = "white";
|
||||
context.fillRect(0, 0, clonedCanvas.width, clonedCanvas.height);
|
||||
|
||||
var dataUrl = clonedCanvas.toDataURL("image/png");
|
||||
|
||||
showMessagePopupWithCallback("Unterschrift speichern", "Mit dem Speichern der Unterschrift ist es nicht mehr möglich, die betroffenen Einträge der Zeiterfassung zu ändern.",
|
||||
function() {
|
||||
var url = getCreateSignatureForServiceOverviewUrl();
|
||||
|
||||
$.post(url, { base64SignatureString: dataUrl, customerOidString: customerOid, isCustomerSignature: true, overwrite: overwrite }).done(function(json) {
|
||||
hideSpinner();
|
||||
|
||||
if(isEmptyOrSpaces(json)) {
|
||||
showMessagePopupWithCallback("Unterschrift",
|
||||
"Die Unterschrift wurde erfolgreich gespeichert.",
|
||||
function() {
|
||||
showSpinner();
|
||||
location.reload();
|
||||
},
|
||||
true);
|
||||
} else {
|
||||
showMessagePopup("Fehler", json);
|
||||
signaturePad.clear();
|
||||
}
|
||||
});
|
||||
},
|
||||
false);
|
||||
});
|
||||
|
||||
clearButton.addEventListener("click", function() {
|
||||
signaturePad.clear();
|
||||
});
|
||||
|
||||
cancelButton.addEventListener("click", function() {
|
||||
showMessagePopupWithCallback("Unterschrift", "Sind Sie sicher, dass Sie die Unterschrift nicht speichern möchten?",
|
||||
function() {
|
||||
$("#report-customer-signature-container").removeClass("d-block");
|
||||
$("#overwriting-customer-signature-alert").removeClass("d-block");
|
||||
$("#report-form-container").show();
|
||||
|
||||
signaturePad.clear();
|
||||
}, false);
|
||||
});
|
||||
}
|
||||
|
||||
function showCustomerSignature(signatureOid) {
|
||||
loadConfirmationReceiptSignature(signatureOid);
|
||||
}
|
||||
|
||||
function loadConfirmationReceiptSignature(signatureOid) {
|
||||
var url = getLoadConfirmationReceiptSignatureUrl();
|
||||
|
||||
$.get(url, { signatureOidString: signatureOid }).done(function(json) {
|
||||
$("#signature-img-popup").addClass("d-block");
|
||||
|
||||
$("#signature-holder-img").prop("src", json);
|
||||
});
|
||||
}
|
||||
|
||||
function hideConfirmationReceiptSignature() {
|
||||
$("#signature-img-popup").removeClass("d-block");
|
||||
$(".modal-backdrop").hide();
|
||||
}
|
||||
|
||||
function showEmployeeSignature(signatureOid) {
|
||||
$("#employee-signature-list").hide();
|
||||
|
||||
loadConfirmationReceiptSignature(signatureOid);
|
||||
}
|
||||
@@ -11,11 +11,20 @@ namespace BeWoPlanerMobil.Util
|
||||
|
||||
public List<QuittierungsbelegItem> Items { get; }
|
||||
|
||||
public QuittierungsbelegResult(string customerName, List<QuittierungsbelegItem> items)
|
||||
public long CustomerOid { get; }
|
||||
|
||||
public bool HasCustomerSignature { get; }
|
||||
|
||||
public long? CustomerSignatureOid { get; }
|
||||
|
||||
public QuittierungsbelegResult(string customerName, List<QuittierungsbelegItem> items, long customerOid, bool hasCustomerSignature, long? customerSignatureOid)
|
||||
{
|
||||
CustomerName = customerName;
|
||||
Items = items;
|
||||
Identifier = Guid.NewGuid();
|
||||
CustomerOid = customerOid;
|
||||
HasCustomerSignature = hasCustomerSignature;
|
||||
CustomerSignatureOid = customerSignatureOid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace BeWoPlanerMobil.Util.ReportUtils
|
||||
{
|
||||
@@ -8,10 +10,34 @@ namespace BeWoPlanerMobil.Util.ReportUtils
|
||||
|
||||
public List<QuittierungsbelegResult> ConfirmationReceiptResultList { get; }
|
||||
|
||||
public ConfirmationReceiptObject(string information, List<QuittierungsbelegResult> confirmationReceiptResultList)
|
||||
public int NumberOfServiceRecords
|
||||
{
|
||||
get
|
||||
{
|
||||
var count = 0;
|
||||
|
||||
ConfirmationReceiptResultList.DoForEach(crr => count += crr.Items.Count);
|
||||
|
||||
return count;
|
||||
}
|
||||
}
|
||||
|
||||
public string SignatureCanvasInformation { get; set; }
|
||||
|
||||
public string TimeSpanString { get; set; }
|
||||
|
||||
public bool HasEmployeeSignature { get; }
|
||||
|
||||
public List<ConfirmationReceiptSignatureDC> EmployeeSignatures { get; }
|
||||
|
||||
public ConfirmationReceiptObject(string information, List<QuittierungsbelegResult> confirmationReceiptResultList, string signatureCanvasInformation, string timeSpanString, bool hasEmployeeSignature, List<ConfirmationReceiptSignatureDC> employeeSignatures)
|
||||
{
|
||||
Information = information;
|
||||
ConfirmationReceiptResultList = confirmationReceiptResultList;
|
||||
SignatureCanvasInformation = signatureCanvasInformation;
|
||||
TimeSpanString = timeSpanString;
|
||||
HasEmployeeSignature = hasEmployeeSignature;
|
||||
EmployeeSignatures = employeeSignatures;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,18 +5,6 @@
|
||||
}
|
||||
|
||||
<script>
|
||||
function getCreateEmployeeSignatureForServiceOverviewUrl() {
|
||||
return "@Url.Action("CreateEmployeeSignatureForServiceOverview")";
|
||||
}
|
||||
|
||||
function getValidateEmployeeSignatureUrl() {
|
||||
return "@Url.Action("ValidateEmployeeSignature")";
|
||||
}
|
||||
|
||||
function getCheckForEmployeeSignatureUrl() {
|
||||
return "@Url.Action("CheckForEmployeeSignature")";
|
||||
}
|
||||
|
||||
function getChangeDateSelectionUrl() {
|
||||
return "@Url.Action("ChangeDateSelection")";
|
||||
}
|
||||
@@ -29,26 +17,32 @@
|
||||
return "@Url.Action("SetQbFilterEnum")";
|
||||
}
|
||||
|
||||
function getSetCustomerUrl() {
|
||||
return "@Url.Action("SetCustomer")";
|
||||
}
|
||||
|
||||
function getValidateCustomerSignatureUrl() {
|
||||
// TODO: implementieren? Ja!
|
||||
}
|
||||
|
||||
function getCreateSignatureForServiceOverviewUrl() {
|
||||
return "@Url.Action("CreateSignatureForServiceOverview")";
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
initializeReportView();
|
||||
});
|
||||
|
||||
function validateDates() {
|
||||
|
||||
function getLoadConfirmationReceiptSignatureUrl() {
|
||||
return "@Url.Action("LoadConfirmationReceiptSignature")";
|
||||
}
|
||||
</script>
|
||||
|
||||
@*
|
||||
TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten Tag des vorherigen Monats setzen
|
||||
*@
|
||||
|
||||
<div class="container-fluid my-3" id="report-form-container">
|
||||
<div class="row">
|
||||
<div class="col col-12 col-md-6 col-lg-5">
|
||||
@using(Html.BeginForm("CreateServiceOverview", "Report", FormMethod.Post))
|
||||
{
|
||||
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="form-row">
|
||||
<div class="col-md">
|
||||
@@ -64,7 +58,7 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1 d-none" id="customer-selection-container">
|
||||
@Html.LabelFor(m => m.SelectedCustomerOid)
|
||||
@Html.DropDownListFor(m => m.SelectedCustomerOid, Model.CustomerListItems, new { id = "customers-drop-down", @class = "form-control", onchange = "checkForExistingSignature()" })
|
||||
@Html.DropDownListFor(m => m.SelectedCustomerOid, Model.CustomerListItems, new { id = "customers-drop-down", @class = "form-control", onchange = "onCustomerSelectionChange()" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,7 +96,7 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mb-1 collapse" id="organisation-select-container">
|
||||
@Html.DropDownListFor(m => m.SelectedOrganisationOid, Model.OrganisationItems, new { id = "organisation-select", @class = "form-control", onchange="filterCheckBoxChange()" })
|
||||
@Html.DropDownListFor(m => m.SelectedOrganisationOid, Model.OrganisationItems, new { id = "organisation-select", @class = "form-control", onchange = "filterCheckBoxChange()" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
@@ -131,19 +125,19 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
@Html.LabelFor(m => m.SelectedStartDay)
|
||||
@Html.DropDownListFor(m => m.SelectedStartDay, Model.Days, new { id = "start-day-select", onchange = "checkForExistingSignature()", @class = "form-control"})
|
||||
@Html.DropDownListFor(m => m.SelectedStartDay, Model.Days, new { id = "start-day-select", onchange = "checkForExistingSignature()", @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
@Html.LabelFor(m => m.SelectedEndDay)
|
||||
@Html.DropDownListFor(m => m.SelectedEndDay, Model.Days, new { id = "end-day-select", onchange = "checkForExistingSignature()", @class = "form-control"})
|
||||
@Html.DropDownListFor(m => m.SelectedEndDay, Model.Days, new { id = "end-day-select", onchange = "checkForExistingSignature()", @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md">
|
||||
<div class="form-group mb-1">
|
||||
@Html.LabelFor(m => m.SelectedYear)
|
||||
@Html.DropDownListFor(m => m.SelectedYear, Model.Years, new { id = "year-select", onchange = "onMonthOrYearChange()", @class = "form-control"})
|
||||
@Html.DropDownListFor(m => m.SelectedYear, Model.Years, new { id = "year-select", onchange = "onMonthOrYearChange()", @class = "form-control" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -176,17 +170,46 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
@Model.ConfirmationReceiptObject.Information
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="service-record-count" value="@Model.ConfirmationReceiptObject.NumberOfServiceRecords" />
|
||||
<input type="hidden" id="signature-canvas-information" value="@Model.ConfirmationReceiptObject.SignatureCanvasInformation" />
|
||||
|
||||
foreach(var result in Model.ConfirmationReceiptObject.ConfirmationReceiptResultList)
|
||||
{
|
||||
<div class="card w-100 mb-3">
|
||||
<div class="card-header" data-toggle="collapse" data-target="#collapse-result-@result.Identifier">
|
||||
<h5 class="mb-0">
|
||||
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapse-result-@result.Identifier">
|
||||
<div class="text-left">
|
||||
<span>@result.CustomerName</span>
|
||||
</div>
|
||||
</button>
|
||||
</h5>
|
||||
<div class="card-header">
|
||||
<div class="row">
|
||||
<div class="col-7 col-xl-10 col-lg-8 col-md-7" data-toggle="collapse" data-target="#collapse-result-@result.Identifier">
|
||||
<h5 class="mb-0 d-inline h-100 w-auto">
|
||||
<button class="btn btn-link collapsed w-auto" type="button">
|
||||
<div class="text-left">
|
||||
<span>@result.CustomerName</span>
|
||||
</div>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-5 col-xl-2 col-lg-4 col-md-5">
|
||||
@{
|
||||
var methodName = "openCustomerSignaturePopup(" +
|
||||
$"'{result.Items.Count}', " +
|
||||
$"'{result.CustomerName}', " +
|
||||
$"'{Model.ConfirmationReceiptObject.TimeSpanString}', " +
|
||||
$"'{result.CustomerOid}', {result.HasCustomerSignature.ToString().ToLower()})";
|
||||
}
|
||||
|
||||
<button type="button" class="btn btn-bewo-customers float-right" onclick="@methodName">
|
||||
<span class="fas fa-signature d-inline"></span>
|
||||
</button>
|
||||
|
||||
@{
|
||||
if(result.HasCustomerSignature)
|
||||
{
|
||||
<button type="button" class="btn btn-bewo-customers mr-3 float-right" onclick="showCustomerSignature(@result.CustomerSignatureOid)">
|
||||
<span class="fas fa-file-contract"></span>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse" id="collapse-result-@result.Identifier">
|
||||
<div class="card-body mx-0 px-0">
|
||||
@@ -247,20 +270,75 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
if(Model?.ConfirmationReceiptObject?.ConfirmationReceiptResultList?.Count > 0)
|
||||
{
|
||||
if(Model?.ConfirmationReceiptObject?.EmployeeSignatures?.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<div class="container p-0">
|
||||
<div class="row">
|
||||
<div class="col mt-3">
|
||||
<div class="list-group">
|
||||
<a href="#" class="list-group-item flex-column align-items-start no-underline" data-toggle="modal" data-target="#employee-signature-list">
|
||||
<div class="d-flex">
|
||||
<h5 class="mb-1 text-dark text-left" id="employee-signature-name"></h5>
|
||||
</div>
|
||||
<p class="mb-1 text-left" id="employee-signature-time-span-string">
|
||||
<!-- TimeSpanString -->
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
if(Model?.ConfirmationReceiptObject?.ConfirmationReceiptResultList?.Count > 0)
|
||||
{
|
||||
<div class="d-flex bd-highlight mt-3">
|
||||
<div class="mr-auto bd-highlight">
|
||||
<!-- Abstandshalter -->
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-primary" id="signature-button" onclick="initializeReportSignature()">Unterschreiben</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- List mit den bereits geleisteten Mitarbeiterunterschriften -->
|
||||
<div class="modal" role="dialog" tabindex="-1" id="employee-signature-list">
|
||||
<div class="modal-dialog modal-dialog-centered text-center" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="list-group">
|
||||
@foreach(var employeeSignature in Model.ConfirmationReceiptObject.EmployeeSignatures)
|
||||
{
|
||||
<a href="#" class="list-group-item flex-column align-items-start no-underline" onclick="showEmployeeSignature(@employeeSignature.ConfirmationReceiptSignatureOid)">
|
||||
<div class="justify-content-between">
|
||||
<h5 class="mb-1 text-dark text-left">
|
||||
@employeeSignature.Employee
|
||||
</h5>
|
||||
</div>
|
||||
<p class="mb-1 text-left">
|
||||
@employeeSignature.TimeSpanString
|
||||
</p>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="d-flex bd-highlight mt-3">
|
||||
@if(Model?.ConfirmationReceiptObject?.HasEmployeeSignature ?? false)
|
||||
{
|
||||
<div class="bd-highlight">
|
||||
<button type="button" class="btn btn-bewo-employee" onclick="initializeReportSignature(true)">Neu unterschreiben</button>
|
||||
</div>
|
||||
}
|
||||
<div class="mr-auto bd-highlight">
|
||||
<!-- Abstandshalter -->
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-bewo-employee" id="signature-button" onclick="initializeReportSignature(false)">Unterschreiben</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@@ -268,6 +346,7 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Container für die Mitarbeiterunterschrift -->
|
||||
<div class="container-fluid d-none my-3" id="report-signature-container">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
@@ -278,6 +357,13 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col">
|
||||
<div class="alert alert-primary d-none" role="alert" id="overwriting-employee-signature-alert">
|
||||
Achtung, Sie sind dabei eine vorhandene Unterschrift zu ersetzen!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3" id="report-canvas-row">
|
||||
<div class="canvas-container" id="canvas-container">
|
||||
<canvas id="report-sketch-pad" width="500" heigh="200" style="border: 1px solid #343A40" class="bg-white rounded"></canvas>
|
||||
@@ -291,3 +377,61 @@ TODO: Datumsvalidierung, Standartdatum zu Beginn auf den ersten bis zum letzten
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Container für die Mitarbeiterunterschrift -->
|
||||
|
||||
|
||||
<!-- Container für die Klientenunterschrift -->
|
||||
<div class="container-fluid d-none my-3" id="report-customer-signature-container">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<input type="hidden" id="customer-oid-holder" />
|
||||
<h4 class="d-inline" id="report-customer-info-column">Unterschrift</h4>
|
||||
<button type="button" class="btn btn-primary float-right" id="cancel-report-customer-signature-btn">
|
||||
<span class="fas fa-times-circle"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3">
|
||||
<div class="col">
|
||||
<div class="alert alert-primary d-none" role="alert" id="overwriting-customer-signature-alert">
|
||||
Achtung, Sie sind dabei eine vorhandene Unterschrift zu ersetzen!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-3" id="report-customer-canvas-row">
|
||||
<div class="canvas-container" id="customer-canvas-container">
|
||||
<canvas id="report-customer-sketch-pad" width="500" heigh="200" style="border: 1px solid #343A40" class="bg-white rounded"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-primary float-right" id="save-report-customer-signature-btn">Speichern</button>
|
||||
<button type="button" class="btn btn-secondary float-right mr-3" id="clear-report-customer-canvas-btn">Neu</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Container für die Klientenunterschrift -->
|
||||
|
||||
|
||||
<!-- Container für die Unterschriftenanzeige -->
|
||||
<div id="signature-img-popup" class="modal d-none" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"><!-- TODO: Überschrift einfügen --></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" onclick="hideConfirmationReceiptSignature()">
|
||||
<span>×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<img id="signature-holder-img" alt="Unterschrift" class="img-fluid mx-auto d-block" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="hideConfirmationReceiptSignature()">Zurück</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Container für die Unterschriftenanzeige -->
|
||||
@@ -4,7 +4,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||||
<meta content="utf-8" http-equiv="encoding">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" id="viewport" />
|
||||
<title>@ViewBag.Title</title>
|
||||
|
||||
@@ -19,7 +21,6 @@
|
||||
<script src="~/Scripts/bootstrap-treeview.js"></script>
|
||||
<link rel="stylesheet" href="~/Content/style.css">
|
||||
|
||||
<script src="~/Scripts/modernizr-2.8.3.js"></script>
|
||||
<script src="~/Scripts/mobileUtils.js?v=1.5"></script>
|
||||
<script src="~/Scripts/moment.min.js"></script>
|
||||
<script src="~/Scripts/locale/de.js?v=1.5"></script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
|
||||
@@ -197,6 +197,10 @@
|
||||
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<system.codedom>
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.11" targetFramework="net472" />
|
||||
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net472" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
|
||||
<package id="Modernizr" version="2.8.3" targetFramework="net472" />
|
||||
<package id="Moment.js" version="2.24.0" targetFramework="net472" />
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net472" />
|
||||
<package id="RestSharp" version="106.10.1" targetFramework="net472" />
|
||||
|
||||
@@ -21,6 +21,7 @@ using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using DevExpress.XtraScheduler;
|
||||
using DevExpress.XtraScheduler.Compatibility;
|
||||
using NHibernate.Transform;
|
||||
using static System.String;
|
||||
using Appointment = BeWo.Data.Entities.Appointment;
|
||||
using Login = BeWo.Data.Entities.Login;
|
||||
@@ -3768,11 +3769,15 @@ namespace BeWo.Data.Access
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO 16.02.2021: Alias für EmployeeOid erstellen?
|
||||
public IList<ConfirmationReceiptSignature> GetConfirmationReceiptSignaturesByEmployee(long employeeOid, DateTimeSpan timeSpan)
|
||||
{
|
||||
var liste = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), SignatureType.Employee))
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.IsActive), ActivationTypeId.Active))
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
//.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.Employee), "e", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.Oid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "s", JoinType.InnerJoin)
|
||||
.Add(CreateBetweenDateTimesCriterion(timeSpan.StartDateTime, timeSpan.EndDateTime, "s.Start", "s.End")).List<ConfirmationReceiptSignature>();
|
||||
|
||||
@@ -3909,28 +3914,6 @@ namespace BeWo.Data.Access
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool HasEmployeeSignatureForCustomerInTimeSpan(long customerOid, DateTimeSpan timeSpan)
|
||||
{
|
||||
var start = timeSpan.StartDate.GetFirstOfMonth();
|
||||
var end = timeSpan.EndDate.GetLastOfMonth();
|
||||
|
||||
var timeSpanCriterion = CreateBetweenDateTimesCriterion(start, end, $"serviceRecord.{nameof(ServiceRecord.Start)}", $"serviceRecord.{nameof(ServiceRecord.End)}");
|
||||
|
||||
var criteria = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "serviceRecord")
|
||||
.Add(Restrictions.Eq($"serviceRecord.{nameof(ServiceRecord.CustomerOid)}", customerOid))
|
||||
.Add(timeSpanCriterion);
|
||||
|
||||
var hasAny = criteria.List<ConfirmationReceiptSignature>().Any();
|
||||
|
||||
return hasAny;
|
||||
}
|
||||
|
||||
public bool HasEmployeeSignaturesForServiceRecord(long serviceRecordOid)
|
||||
{
|
||||
return GetConfirmationReceiptSignaturesByServiceRecord(serviceRecordOid).Any();
|
||||
}
|
||||
|
||||
public IList<Quittierungsbelegsstatus> GetAllQuittierungsbelegStatusForMonth(DateTime start, DateTime ende)
|
||||
{
|
||||
DateTime begin = new DateTime(start.Year, start.Month, start.Day);
|
||||
@@ -3957,19 +3940,23 @@ namespace BeWo.Data.Access
|
||||
return crit.List<Dokumentvorlage>();
|
||||
}
|
||||
|
||||
// TODO 16.02.2021: Alias für EmployeeOid erstellen?
|
||||
public bool HasConfirmationReceiptSignaturesByEmployeeAndServiceRecords(long employeeOid, IEnumerable<long> serviceRecordOids)
|
||||
{
|
||||
var criteria = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), SignatureType.Employee))
|
||||
//.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.Employee), "e", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.Oid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "serviceRecord")
|
||||
.Add(Restrictions.In("serviceRecord.Oid", serviceRecordOids.ToList()));
|
||||
.Add(Restrictions.In("serviceRecord.Oid", serviceRecordOids.ToList()));
|
||||
|
||||
var hasSignatures = criteria.List<ConfirmationReceiptSignature>().Any();
|
||||
|
||||
return hasSignatures;
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, DateTimeSpan timeSpan)
|
||||
public bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, DateTimeSpan timeSpan, SignatureType signatureType)
|
||||
{
|
||||
var start = timeSpan.StartDate;
|
||||
var end = timeSpan.EndDate;
|
||||
@@ -3977,6 +3964,7 @@ namespace BeWo.Data.Access
|
||||
var timeSpanCriterion = CreateBetweenDateTimesCriterion(start, end, $"serviceRecord.{nameof(ServiceRecord.Start)}", $"serviceRecord.{nameof(ServiceRecord.End)}");
|
||||
|
||||
var criteria = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), signatureType))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "serviceRecord")
|
||||
.Add(Restrictions.Eq($"serviceRecord.{nameof(ServiceRecord.CustomerOid)}", customerOid))
|
||||
.Add(timeSpanCriterion);
|
||||
@@ -4031,12 +4019,16 @@ namespace BeWo.Data.Access
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO 16.02.2021: Alias für EmployeeOid erstellen?
|
||||
public IEnumerable<ConfirmationReceiptSignature> FindConfirmationReceiptSignaturesByEmployeeAndServiceRecords(long employeeOid, IEnumerable<long> serviceRecordOids)
|
||||
{
|
||||
var criteria = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), SignatureType.Employee))
|
||||
//.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.Employee), "e", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq(nameof(BeWoEntityBase.Oid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "serviceRecord")
|
||||
.Add(Restrictions.In("serviceRecord.Oid", serviceRecordOids.ToList()));
|
||||
.Add(Restrictions.In("serviceRecord.Oid", serviceRecordOids.ToList()));
|
||||
|
||||
return criteria.List<ConfirmationReceiptSignature>();
|
||||
}
|
||||
@@ -4171,8 +4163,6 @@ namespace BeWo.Data.Access
|
||||
});
|
||||
});
|
||||
|
||||
var customerOids = user.Employee.Employee2CustomerList.Where(employee2Customer => employee2Customer.Customer.Oid.HasValue).Select(employee2Customer => employee2Customer.Customer.Oid.Value).Distinct().ToList();
|
||||
|
||||
// Der ApplicationUser darf alles Sehen oder alle Hilfepläne
|
||||
if(user.CheckForAtLeastOneRight(new List<UserRightType> {UserRightType.ViewAll, UserRightType.SupportConcept_ViewAllSupportConcepts}) && supportConceptFilter == CustomerFilterEnum.All)
|
||||
{
|
||||
@@ -4185,6 +4175,8 @@ namespace BeWo.Data.Access
|
||||
return GetAllActiveSupportConceptsByCustomers(teamCustomerOids, true).ToList();
|
||||
}
|
||||
|
||||
var customerOids = user.Employee.Employee2CustomerList.Where(employee2Customer => employee2Customer.Customer.Oid.HasValue).Select(employee2Customer => employee2Customer.Customer.Oid.Value).Distinct().ToList();
|
||||
|
||||
return GetAllActiveSupportConceptsByCustomers(customerOids, true).ToList();
|
||||
}
|
||||
|
||||
@@ -4196,72 +4188,162 @@ namespace BeWo.Data.Access
|
||||
return c.List<SchedulerAppointment>();
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignature(IEnumerable<long> customerOids, long? employeeOid, long? costbearerOid, long? serviceCategoryOid, DateTimeSpan timeSpan)
|
||||
public bool HasConfirmationReceiptSignature(IList<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
var criteria = CreateCriteriaIsActive<ServiceRecord>();
|
||||
// Prüfen, ob alle ServiceRecords mit ein und derselben Mitarbeiterunterschrift verknüpft sind.
|
||||
// Eine Unterschrift kann mehrere ServiceRecords in der LinkListe haben, die nicht in der zu prüfenden Oid-Liste sind.
|
||||
var c = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), signatureType))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "sr", JoinType.InnerJoin)
|
||||
.Add(Restrictions.In($"sr.{nameof(BeWoEntityBase.Oid)}", serviceRecordOids.ToArray()));
|
||||
|
||||
var timeSpanCriterion = CreateBetweenDateTimesCriterion(timeSpan.StartDate, timeSpan.EndDate, nameof(ServiceRecord.Start), nameof(ServiceRecord.End));
|
||||
var signatures = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
|
||||
criteria.Add(timeSpanCriterion);
|
||||
var result = false;
|
||||
|
||||
if(costbearerOid.HasValue)
|
||||
if(serviceRecordOids.Any() && signatures.Any())
|
||||
{
|
||||
criteria = criteria.CreateAlias(nameof(ServiceRecord.CostBearer2SupportConcept), "c2sc", JoinType.InnerJoin)
|
||||
.CreateAlias($"c2sc.{nameof(CostBearer2SupportConcept.CostBearer)}", "c", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq($"c.{nameof(BeWoEntityBase.Oid)}", costbearerOid));
|
||||
var blubb = new List<long>();
|
||||
signatures.DoForEach(s => {
|
||||
s.ServiceRecords.DoForEach(sr =>
|
||||
{
|
||||
if(sr.Oid.HasValue)
|
||||
{
|
||||
blubb.AddIfNotIn(sr.Oid.Value);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
result = serviceRecordOids.ContainsSameItemsAs(blubb);
|
||||
}
|
||||
|
||||
if(employeeOid.HasValue)
|
||||
{
|
||||
criteria.Add(Restrictions.Eq(nameof(ServiceRecord.EmployeeOid), employeeOid));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
if(serviceCategoryOid.HasValue)
|
||||
{
|
||||
criteria = criteria.CreateAlias(nameof(ServiceRecord.ServiceDescription), "sd", JoinType.InnerJoin)
|
||||
.CreateAlias($"sd.{nameof(ServiceDescription.ServiceCategory)}", "category", JoinType.InnerJoin)
|
||||
.Add(Restrictions.Eq($"category.{nameof(BeWoEntityBase.Oid)}", serviceCategoryOid));
|
||||
}
|
||||
// Methode, die herausfindet, ob eine Liste mit ServiceRecordOids zu genau einer Mitarbeiterunterschrift gehört
|
||||
public ConfirmationReceiptSignature GetConfirmationReceiptSignatureForServiceRecords(List<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), signatureType))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "sr", JoinType.InnerJoin)
|
||||
.Add(Restrictions.In($"sr.{nameof(BeWoEntityBase.Oid)}", serviceRecordOids.ToArray()));
|
||||
|
||||
criteria.Add(Restrictions.In(nameof(ServiceRecord.CustomerOid), customerOids.ToArray()));
|
||||
var signatures = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
|
||||
var list = criteria.List<ServiceRecord>().Where(w => w.ServiceDescription.ServiceCategory.IsBillable).ToList();
|
||||
var relatedServiceRecordOids = new List<long>();
|
||||
signatures.DoForEach(s => relatedServiceRecordOids.AddRangeIfElementsNotIn(s.ServiceRecords.Select(x => x.Oid.Value)));
|
||||
|
||||
var debugText = Empty;
|
||||
list.DoForEach(s =>
|
||||
{
|
||||
var debugString = $"{s.Oid} {s.Start:dd.MM.yyyy HH:mm} - {s.End:dd.MM.yyyy HH:mm}; {s.CostBearer2SupportConcept.CostBearer.Organisation.Name}; {s.Customer.Person.LastNameFirstName}; {s.Employee.Person.LastNameFirstName}; {s.ServiceDescription.ServiceCategory.Name}";
|
||||
var containsItems = relatedServiceRecordOids.ContainsItems(serviceRecordOids);
|
||||
|
||||
if(s.GroupOid.HasValue)
|
||||
{
|
||||
debugString += $" Gruppenbuchung({s.GroupOid})";
|
||||
}
|
||||
return containsItems ? signatures.FirstOrDefault() : null;
|
||||
}
|
||||
|
||||
debugString += "\n";
|
||||
debugText += debugString;
|
||||
});
|
||||
public List<ConfirmationReceiptSignature> LoadConfirmationReceiptSignaturesByServiceRecordOids(IList<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), signatureType))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "sr", JoinType.InnerJoin)
|
||||
.Add(Restrictions.In($"sr.{nameof(BeWoEntityBase.Oid)}", serviceRecordOids.ToArray()));
|
||||
|
||||
var serviceRecordOids = list.Where(serviceRecord => serviceRecord.Oid.HasValue).Select(serviceRecord => serviceRecord.Oid.Value);
|
||||
// Der ResultTransformer erzeugt ein SELECT DISTINCT für den Roottypen (ConfirmationReceiptSignature)
|
||||
c.SetResultTransformer(new DistinctRootEntityResultTransformer());
|
||||
|
||||
/*
|
||||
* var liste = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "s", JoinType.InnerJoin)
|
||||
.Add(CreateBetweenDateTimesCriterion(timeSpan.StartDateTime, timeSpan.EndDateTime, "s.Start", "s.End"))
|
||||
*/
|
||||
var result = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignaturesByCustomerAndServiceRecords(long customerOid, IEnumerable<long> serviceRecordOids)
|
||||
{
|
||||
var criteria = CreateCriteria<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), SignatureType.Customer))
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.CustomerOid), customerOid))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "serviceRecord")
|
||||
.Add(Restrictions.In("serviceRecord.Oid", serviceRecordOids.ToList()));
|
||||
|
||||
var hasSignatures = criteria.List<ConfirmationReceiptSignature>().Any();
|
||||
|
||||
return hasSignatures;
|
||||
}
|
||||
|
||||
public List<ConfirmationReceiptSignature> LoadConfirmationReceiptSignaturesByServiceRecordOids(IList<long> serviceRecordOids)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "sr", JoinType.InnerJoin)
|
||||
.Add(Restrictions.In(nameof(BeWoEntityBase.Oid), serviceRecordOids.ToArray()));
|
||||
.Add(Restrictions.In($"sr.{nameof(BeWoEntityBase.Oid)}", serviceRecordOids.ToArray()));
|
||||
|
||||
var kek = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
// Der ResultTransformer erzeugt ein SELECT DISTINCT für den Roottypen (ConfirmationReceiptSignature)
|
||||
c.SetResultTransformer(new DistinctRootEntityResultTransformer());
|
||||
|
||||
if(serviceRecordOids.Any())
|
||||
var result = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<long> LoadServiceRecordOidsWithConfirmationReceiptSignatures(IList<long> serviceRecordOids)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "sr", JoinType.InnerJoin)
|
||||
.Add(Restrictions.In($"sr.{nameof(BeWoEntityBase.Oid)}", serviceRecordOids.ToArray()));
|
||||
|
||||
// Der ResultTransformer erzeugt ein SELECT DISTINCT für den Roottypen (ConfirmationReceiptSignature)
|
||||
c.SetResultTransformer(new DistinctRootEntityResultTransformer());
|
||||
|
||||
var confirmationReceiptSignatures = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
|
||||
var result = new List<long>();
|
||||
|
||||
confirmationReceiptSignatures.DoForEach(crs => crs.ServiceRecords.DoForEach(sr =>
|
||||
{
|
||||
if(sr.Oid.HasValue)
|
||||
{
|
||||
result.AddIfNotIn(sr.Oid.Value);
|
||||
}
|
||||
}));
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
return false;//criteria.List<ServiceRecord>().Any();
|
||||
public List<long> LoadServiceRecordOidsWithConfirmationReceiptSignatures(IList<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), signatureType))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "sr", JoinType.InnerJoin)
|
||||
.Add(Restrictions.In($"sr.{nameof(BeWoEntityBase.Oid)}", serviceRecordOids.ToArray()));
|
||||
|
||||
// Der ResultTransformer erzeugt ein SELECT DISTINCT für den Roottypen (ConfirmationReceiptSignature)
|
||||
c.SetResultTransformer(new DistinctRootEntityResultTransformer());
|
||||
|
||||
var confirmationReceiptSignatures = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
|
||||
var result = new List<long>();
|
||||
|
||||
confirmationReceiptSignatures.DoForEach(crs => crs.ServiceRecords.DoForEach(sr =>
|
||||
{
|
||||
if(sr.Oid.HasValue)
|
||||
{
|
||||
result.AddIfNotIn(sr.Oid.Value);
|
||||
}
|
||||
}));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public IEnumerable<ServiceRecord> GetServiceRecordsWithoutConfirmationReceiptSignature(IList<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
|
||||
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.SignatureType), signatureType))
|
||||
.CreateAlias(nameof(ConfirmationReceiptSignature.ServiceRecords), "sr", JoinType.InnerJoin)
|
||||
.Add(Restrictions.In($"sr.{nameof(BeWoEntityBase.Oid)}", serviceRecordOids.ToArray()))
|
||||
.SetResultTransformer(new DistinctRootEntityResultTransformer());
|
||||
|
||||
var confirmationReceiptSignatures = c.List<ConfirmationReceiptSignature>().ToList();
|
||||
|
||||
var serviceRecords = new List<ServiceRecord>();
|
||||
|
||||
confirmationReceiptSignatures.DoForEach(crs => serviceRecords.AddRangeIfElementsNotIn(crs.ServiceRecords));
|
||||
|
||||
return serviceRecords;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,21 +5,39 @@ namespace BeWo.Data.Entities
|
||||
{
|
||||
public class ConfirmationReceiptSignature : BeWoEntityBase
|
||||
{
|
||||
private long? _EmployeeOid;
|
||||
private long? _CustomerOid;
|
||||
|
||||
private Employee _Employee;
|
||||
|
||||
private IList<ServiceRecord> _ServiceRecords;
|
||||
|
||||
private string _SignatureImage;
|
||||
|
||||
public virtual long? EmployeeOid
|
||||
private string _TimeSpanString;
|
||||
|
||||
|
||||
public virtual Employee Employee
|
||||
{
|
||||
get => _EmployeeOid;
|
||||
get => _Employee;
|
||||
|
||||
set
|
||||
{
|
||||
if(AreDifferent(_EmployeeOid, value))
|
||||
if(AreDifferent(_Employee, value))
|
||||
{
|
||||
_EmployeeOid = value;
|
||||
_Employee = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual long? CustomerOid
|
||||
{
|
||||
get => _CustomerOid;
|
||||
|
||||
set
|
||||
{
|
||||
if(AreDifferent(_CustomerOid, value))
|
||||
{
|
||||
_CustomerOid = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -55,5 +73,32 @@ namespace BeWo.Data.Entities
|
||||
_Tid = TableID.ConfirmationReceiptSignature;
|
||||
}
|
||||
|
||||
private SignatureType _SignatureType;
|
||||
|
||||
public virtual SignatureType SignatureType
|
||||
{
|
||||
get => _SignatureType;
|
||||
|
||||
set
|
||||
{
|
||||
if(AreDifferent(_SignatureType, value))
|
||||
{
|
||||
_SignatureType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual string TimeSpanString
|
||||
{
|
||||
get => _TimeSpanString;
|
||||
|
||||
set
|
||||
{
|
||||
if(AreDifferent(_TimeSpanString, value))
|
||||
{
|
||||
_TimeSpanString = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,10 +13,14 @@
|
||||
<property name="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" />
|
||||
<property name="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" />
|
||||
<property name="Notice" />
|
||||
<property name="SignatureImage" column="SignatureImage" />
|
||||
<property name="EmployeeOid" />
|
||||
<property name="SignatureImage" />
|
||||
<property name="SignatureType" type="BS.Shared.SignatureType, BS.Shared" />
|
||||
<property name="CustomerOid" />
|
||||
<property name="TimeSpanString" />
|
||||
|
||||
<bag name="ServiceRecords" table="confirmationreceiptsignature2servicerecord" generic="true" cascade="all-delete-orphan" batch-size="250">
|
||||
<many-to-one name="Employee" column="EmployeeOid" class="BeWo.Data.Entities.Employee, BeWo.Data" cascade="none" />
|
||||
|
||||
<bag name="ServiceRecords" table="confirmationreceiptsignature2servicerecord" generic="true" cascade="none" batch-size="250">
|
||||
<key column="ConfirmationReceiptSignatureOid" />
|
||||
<many-to-many column="ServiceRecordOid" class="BeWo.Data.Entities.ServiceRecord, BeWo.Data" />
|
||||
</bag>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE confirmationreceiptsignature ADD COLUMN `SignatureType` tinyint(4);
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TABLE confirmationreceiptsignature ADD COLUMN CustomerOid BIGINT(19);
|
||||
ALTER TABLE confirmationreceiptsignature ADD KEY CONFIRMATIONRECEIPTSIGNATURE_CUSTOMER_FK (CustomerOid);
|
||||
ALTER TABLE confirmationreceiptsignature ADD CONSTRAINT FK_CONFIRMATIONRECEIPTSIGNATURE2CUSTOMER FOREIGN KEY (CustomerOid) REFERENCES Customer(Oid);
|
||||
61
Report/DefaultReports/Quittierungsbeleg.Designer.cs
generated
61
Report/DefaultReports/Quittierungsbeleg.Designer.cs
generated
@@ -113,8 +113,12 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrPictureBox2 = new DevExpress.XtraReports.UI.XRPictureBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit();
|
||||
@@ -292,7 +296,7 @@ namespace BeWo.Report.DefaultReports
|
||||
this.picSignature.Borders = DevExpress.XtraPrinting.BorderSide.None;
|
||||
this.picSignature.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Tag", null, "Services.Signature")});
|
||||
this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(1F, 1F);
|
||||
this.picSignature.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.picSignature.Name = "picSignature";
|
||||
this.picSignature.SizeF = new System.Drawing.SizeF(158F, 18F);
|
||||
this.picSignature.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
@@ -645,10 +649,10 @@ namespace BeWo.Report.DefaultReports
|
||||
//
|
||||
this.xrLabel5.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Top | DevExpress.XtraPrinting.BorderSide.Right)));
|
||||
this.xrLabel5.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(170F, 47.11109F);
|
||||
this.xrLabel5.LocationFloat = new DevExpress.Utils.PointFloat(170F, 47.1111F);
|
||||
this.xrLabel5.Name = "xrLabel5";
|
||||
this.xrLabel5.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
|
||||
this.xrLabel5.SizeF = new System.Drawing.SizeF(158.3612F, 30.50001F);
|
||||
this.xrLabel5.SizeF = new System.Drawing.SizeF(209.3611F, 30.50001F);
|
||||
this.xrLabel5.StylePriority.UseBackColor = false;
|
||||
this.xrLabel5.StylePriority.UseBorders = false;
|
||||
this.xrLabel5.StylePriority.UseFont = false;
|
||||
@@ -697,12 +701,14 @@ namespace BeWo.Report.DefaultReports
|
||||
// xrLabel2
|
||||
//
|
||||
this.xrLabel2.Font = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.xrLabel2.ForeColor = System.Drawing.Color.Black;
|
||||
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.xrLabel2.Multiline = true;
|
||||
this.xrLabel2.Name = "xrLabel2";
|
||||
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel2.SizeF = new System.Drawing.SizeF(674.9998F, 25F);
|
||||
this.xrLabel2.StylePriority.UseFont = false;
|
||||
this.xrLabel2.StylePriority.UseForeColor = false;
|
||||
this.xrLabel2.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel2.Text = "Quittierungsbeleg [Mandator.Name]";
|
||||
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
@@ -741,6 +747,8 @@ namespace BeWo.Report.DefaultReports
|
||||
// GroupFooter1
|
||||
//
|
||||
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrLabel18,
|
||||
this.xrPictureBox2,
|
||||
this.lblUnterschriftKlient,
|
||||
this.lblUnterschriftMitarbeiter,
|
||||
this.xrTableAbwesenheiten,
|
||||
@@ -754,7 +762,9 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrLabel11,
|
||||
this.xrLabel10,
|
||||
this.xrLabel9,
|
||||
this.xrLabel1});
|
||||
this.xrLabel1,
|
||||
this.xrPictureBox1,
|
||||
this.xrLabel17});
|
||||
this.GroupFooter1.HeightF = 270F;
|
||||
this.GroupFooter1.KeepTogether = true;
|
||||
this.GroupFooter1.Name = "GroupFooter1";
|
||||
@@ -1165,6 +1175,26 @@ namespace BeWo.Report.DefaultReports
|
||||
this.xrLabel1.StylePriority.UseTextAlignment = false;
|
||||
this.xrLabel1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
//
|
||||
// xrPictureBox1
|
||||
//
|
||||
this.xrPictureBox1.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Tag", null, "EmployeeSignature")});
|
||||
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(535.6389F, 227F);
|
||||
this.xrPictureBox1.Name = "xrPictureBox1";
|
||||
this.xrPictureBox1.Scripts.OnBeforePrint = "xrPictureBox1_BeforePrint";
|
||||
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(100F, 23F);
|
||||
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
this.xrPictureBox1.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.EmployeeSignature_BeforePrint);
|
||||
//
|
||||
// xrLabel17
|
||||
//
|
||||
this.xrLabel17.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "EmployeeSignatureDate", "{0:dd.MM.yyyy,}")});
|
||||
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(435.1388F, 227F);
|
||||
this.xrLabel17.Name = "xrLabel17";
|
||||
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel17.SizeF = new System.Drawing.SizeF(100F, 23F);
|
||||
//
|
||||
// fieldKontaktArt
|
||||
//
|
||||
this.fieldKontaktArt.DataMember = "Services";
|
||||
@@ -1176,6 +1206,25 @@ namespace BeWo.Report.DefaultReports
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
|
||||
//
|
||||
// xrLabel18
|
||||
//
|
||||
this.xrLabel18.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "CustomerSignatureDate", "{0:dd.MM.yyyy,}")});
|
||||
this.xrLabel18.LocationFloat = new DevExpress.Utils.PointFloat(129.4998F, 227F);
|
||||
this.xrLabel18.Name = "xrLabel18";
|
||||
this.xrLabel18.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
|
||||
this.xrLabel18.SizeF = new System.Drawing.SizeF(100F, 23F);
|
||||
//
|
||||
// xrPictureBox2
|
||||
//
|
||||
this.xrPictureBox2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Tag", null, "CustomerSignature")});
|
||||
this.xrPictureBox2.LocationFloat = new DevExpress.Utils.PointFloat(230F, 227F);
|
||||
this.xrPictureBox2.Name = "xrPictureBox2";
|
||||
this.xrPictureBox2.SizeF = new System.Drawing.SizeF(100F, 23F);
|
||||
this.xrPictureBox2.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
|
||||
this.xrPictureBox2.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.CustomerSignature_BeforePrint);
|
||||
//
|
||||
// Quittierungsbeleg
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
@@ -1295,5 +1344,9 @@ namespace BeWo.Report.DefaultReports
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel14;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel16;
|
||||
private DevExpress.XtraReports.UI.XRPictureBox picSignature;
|
||||
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel17;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel18;
|
||||
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox2;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
@@ -10,7 +9,7 @@ using DevExpress.XtraReports.UI;
|
||||
|
||||
namespace BeWo.Report.DefaultReports
|
||||
{
|
||||
public partial class Quittierungsbeleg : DevExpress.XtraReports.UI.XtraReport, IBeWoReport<ServicesOverviewRO>
|
||||
public partial class Quittierungsbeleg : XtraReport, IBeWoReport<ServicesOverviewRO>
|
||||
{
|
||||
public Quittierungsbeleg()
|
||||
{
|
||||
@@ -19,10 +18,6 @@ namespace BeWo.Report.DefaultReports
|
||||
|
||||
public void SetReportDataSource(ServicesOverviewRO pRO)
|
||||
{
|
||||
StackTrace stackTrace = new StackTrace();
|
||||
// Get calling method name
|
||||
Debug.WriteLine(stackTrace.GetFrame(1).GetMethod().Name);
|
||||
|
||||
bool hatGruppen = false;
|
||||
|
||||
//if (pRO == null)
|
||||
@@ -127,13 +122,54 @@ namespace BeWo.Report.DefaultReports
|
||||
}
|
||||
}
|
||||
|
||||
private void EmployeeSignature_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
if(sender is XRPictureBox pictureBox)
|
||||
{
|
||||
var base64String = pictureBox.Tag as string;
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(base64String))
|
||||
{
|
||||
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
|
||||
var binaryData = Convert.FromBase64String(base64Data);
|
||||
var image = ByteArrayToImage(binaryData);
|
||||
|
||||
pictureBox.Image = image;
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox.Image = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CustomerSignature_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
|
||||
{
|
||||
if(sender is XRPictureBox pictureBox)
|
||||
{
|
||||
var base64String = pictureBox.Tag as string;
|
||||
|
||||
if(!string.IsNullOrWhiteSpace(base64String))
|
||||
{
|
||||
var base64Data = Regex.Match(base64String, @"data:image/(?<type>.+?),(?<data>.+)").Groups["data"].Value;
|
||||
var binaryData = Convert.FromBase64String(base64Data);
|
||||
var image = ByteArrayToImage(binaryData);
|
||||
|
||||
pictureBox.Image = image;
|
||||
}
|
||||
else
|
||||
{
|
||||
pictureBox.Image = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Image ByteArrayToImage(byte[] byteArrayIn)
|
||||
{
|
||||
Image returnImage = null;
|
||||
MemoryStream ms = new System.IO.MemoryStream(byteArrayIn);
|
||||
returnImage = Image.FromStream(ms);
|
||||
|
||||
return returnImage;
|
||||
using(var memoryStream = new MemoryStream(byteArrayIn))
|
||||
{
|
||||
return Image.FromStream(memoryStream);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +171,12 @@ namespace BeWo.Report.ReportObjects
|
||||
|
||||
public string TotalGefahreneKilometerString { get; set; }
|
||||
|
||||
public string EmployeeSignature { get; set; }
|
||||
public DateTime? EmployeeSignatureDate { get; set; }
|
||||
|
||||
public string CustomerSignature { get; set; }
|
||||
public DateTime? CustomerSignatureDate { get; set; }
|
||||
|
||||
public int Year { get; set; }
|
||||
|
||||
public IList<CostBearer2SupportConcept> CostBearer2SupportConceptList { get; set; }
|
||||
@@ -1357,6 +1363,23 @@ namespace BeWo.Report.ReportObjects
|
||||
lResult.SupportConceptCostBearer = cb2scs.Values.First();
|
||||
}
|
||||
|
||||
var mandatorSettings = lResult.Mandator?.Settings;
|
||||
|
||||
if(mandatorSettings.Contains("ShowEmployeeSignature=1"))
|
||||
{
|
||||
var serviceRecordOids = lResult.Services.Select(service => service.ServiceRecordOid).ToList();
|
||||
|
||||
var employeeSignature = DAOFactory.SearchDAO.GetConfirmationReceiptSignatureForServiceRecords(serviceRecordOids, SignatureType.Employee);
|
||||
|
||||
lResult.EmployeeSignature = employeeSignature?.SignatureImage;
|
||||
lResult.EmployeeSignatureDate = employeeSignature?.InsTs;
|
||||
|
||||
var customerSignature = DAOFactory.SearchDAO.GetConfirmationReceiptSignatureForServiceRecords(serviceRecordOids, SignatureType.Customer);
|
||||
|
||||
lResult.CustomerSignature = customerSignature?.SignatureImage;
|
||||
lResult.CustomerSignatureDate = customerSignature?.InsTs;
|
||||
}
|
||||
|
||||
return lResult;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,20 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pDataContract.ConfirmationReceiptSignatureOid = pEntity.Oid;
|
||||
pDataContract.ConfirmationReceiptSignatureVersion = pEntity.Version;
|
||||
pDataContract.SignatureImage = pEntity.SignatureImage;
|
||||
pDataContract.EmployeeOid = pEntity.EmployeeOid;
|
||||
|
||||
pDataContract.CustomerOid = pEntity.CustomerOid;
|
||||
|
||||
pDataContract.SignatureType = pEntity.SignatureType;
|
||||
|
||||
pDataContract.TimeSpanString = pEntity.TimeSpanString;
|
||||
|
||||
pDataContract.ServiceRecords = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(pEntity.ServiceRecords);
|
||||
|
||||
if(pEntity.Employee != null)
|
||||
{
|
||||
pDataContract.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(pEntity.Employee);
|
||||
}
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
@@ -26,13 +36,23 @@ namespace BeWo.Service.DCEntityMapper
|
||||
pEntity.Oid = pDataContract.ConfirmationReceiptSignatureOid;
|
||||
pEntity.Version = pDataContract.ConfirmationReceiptSignatureVersion;
|
||||
pEntity.SignatureImage = pDataContract.SignatureImage;
|
||||
pEntity.EmployeeOid = pDataContract.EmployeeOid;
|
||||
|
||||
pEntity.CustomerOid = pDataContract.CustomerOid;
|
||||
|
||||
pEntity.SignatureType = pDataContract.SignatureType;
|
||||
|
||||
pEntity.TimeSpanString = pDataContract.TimeSpanString;
|
||||
|
||||
if(pDataContract.ServiceRecords != null)
|
||||
{
|
||||
pEntity.ServiceRecords = DAOFactory.GenericDAO.LoadByIDs<ServiceRecord>(pDataContract.ServiceRecords.Select(s => s.ServiceRecordOid.Value));
|
||||
}
|
||||
|
||||
if(pDataContract.Employee != null)
|
||||
{
|
||||
pEntity.Employee = DAOFactory.GenericDAO.LoadByID<Employee>(pDataContract.Employee.EmployeeOid);
|
||||
}
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BeWo.Service.Configuration;
|
||||
using BeWo.Service.Core;
|
||||
using BeWo.Service.Plugins;
|
||||
|
||||
@@ -403,5 +403,9 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<SupportConceptDC> GetActiveSupportConceptsForEmployee(long? employeeOid, CustomerFilterEnum supportConceptFilter);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<long> FindTeamCustomers(long? teamOid);
|
||||
}
|
||||
}
|
||||
@@ -974,7 +974,7 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, DateTimeSpan timeSpan);
|
||||
bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, DateTimeSpan timeSpan, SignatureType signatureType);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
@@ -1026,7 +1026,7 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
bool HasConfirmationReceiptSignature(IEnumerable<long> customerOids, long? employeeOid, long? costbearerOid, long? serviceCategoryOid, DateTimeSpan timeSpan);
|
||||
bool HasConfirmationReceiptSignature(IList<long> serviceRecordOids, SignatureType signatureType);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
@@ -1044,5 +1044,37 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
string GetObjectForFilePath(TableID table, long? oid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ConfirmationReceiptSignatureDC> LoadConfirmationReceiptSignaturesByServiceRecordOids(IList<long> serviceRecordOids, SignatureType signatureType, out List<long> serviceRecordOidsWithSignatures);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ConfirmationReceiptSignatureDC> UpdateConfirmationReceiptSignatures(IList<ConfirmationReceiptSignatureDC> confirmationReceiptSignatures2Update);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void DeleteConfirmationReceiptSignatures(Dictionary<long, long> oid2Version);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
bool HasConfirmationReceiptSignaturesByCustomerAndServiceRecords(long customerOid, IEnumerable<long> serviceRecordOids);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ConfirmationReceiptSignatureDC> LoadAllConfirmationReceiptSignaturesByServiceRecordOids(IList<long> serviceRecordOids, out Dictionary<SignatureType, List<long>> serviceRecordOidsWithSignature);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<long> LoadServiceRecordOidsWithConfirmationReceiptSignatures(IList<long> serviceRecordOids);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<long> LoadServiceRecordOidsWithCustomerConfirmationReceiptSignatures(IList<long> serviceRecordOids, SignatureType signatureType);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<ServiceRecordDC> GetServiceRecordsWithoutConfirmationReceiptSignature(IList<long> serviceRecordOids, SignatureType signatureType);
|
||||
}
|
||||
}
|
||||
@@ -1684,6 +1684,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
var teams = new List<Team>();
|
||||
|
||||
var teamOids = teams.Where(team => team.Oid.HasValue).Select(team => team.Oid.Value);
|
||||
|
||||
if(teamOid.HasValue)
|
||||
{
|
||||
teams.Add(DAOFactory.GenericDAO.LoadByID<Team>(teamOid.Value));
|
||||
@@ -1694,25 +1696,20 @@ namespace BeWo.Service.ServiceImplementations
|
||||
teams.AddRange(DAOFactory.SearchDAO.FindTeamsOfEmployee(employeeOid));
|
||||
}
|
||||
|
||||
foreach(var team in teams)
|
||||
teams.DoForEach(team =>
|
||||
{
|
||||
foreach(var employee in team.MemberList)
|
||||
team.MemberList.Where(member => member.Oid.HasValue && member.Oid != employeeOid).DoForEach(member =>
|
||||
{
|
||||
foreach(var employee2Customer in employee.Employee2CustomerList)
|
||||
{
|
||||
if(employee2Customer.Customer.IsActive == ActivationTypeId.Active)
|
||||
{
|
||||
foreach(var valueListEntry2Object in employee2Customer.ValueList)
|
||||
{
|
||||
if(valueListEntry2Object.Entry.Type == ValueListEntryType.StaffRoleType && valueListEntry2Object.SystemEntryID == SystemEntryID.EmployeeRoleMainAttendant && employee2Customer.Customer?.Oid != null)
|
||||
{
|
||||
result.AddIfNotIn(employee2Customer.Customer.Oid.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Nur, wo der Klient auch vom Team betreut wird
|
||||
result.AddRangeIfElementsNotIn(
|
||||
member.Employee2CustomerList.Where(
|
||||
employee2Customer => employee2Customer.CustomerOid.HasValue &&
|
||||
employee2Customer.Customer.Team2CustomerList.Any(team2Customer => team2Customer.TeamOid.HasValue &&
|
||||
teamOids.Contains(team2Customer.TeamOid.Value))
|
||||
).Select(employee2Customer => employee2Customer.CustomerOid.Value)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -1773,5 +1770,67 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public List<long> FindTeamCustomers(long? teamOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var customerOids = new List<long>();
|
||||
|
||||
ApplicationUser loggedInUser;
|
||||
|
||||
if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
|
||||
{
|
||||
loggedInUser = LoggedInUserOperationContextExt.Current.User;
|
||||
}
|
||||
else
|
||||
{
|
||||
loggedInUser = SessionFacade.LoggedInUser;
|
||||
}
|
||||
|
||||
if(loggedInUser?.Employee != null)
|
||||
{
|
||||
var teams = new List<Team>();
|
||||
|
||||
if(teamOid.HasValue)
|
||||
{
|
||||
teams.Add(DAOFactory.GenericDAO.LoadByID<Team>(teamOid.Value));
|
||||
}
|
||||
else if(loggedInUser.Employee.Oid.HasValue)
|
||||
{
|
||||
teams.AddRange(DAOFactory.SearchDAO.FindLeadingTeams(loggedInUser.Employee.Oid.Value));
|
||||
teams.AddRange(DAOFactory.SearchDAO.FindTeamsOfEmployee(loggedInUser.Employee.Oid.Value));
|
||||
}
|
||||
|
||||
foreach(var team in teams)
|
||||
{
|
||||
if(!team.Oid.HasValue)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var customers = DAOFactory.SearchDAO.FindCustomerOfTeam(team.Oid.Value);
|
||||
foreach(var c in customers)
|
||||
{
|
||||
if(c.IsActive == ActivationTypeId.Active)
|
||||
{
|
||||
if(c.Oid.HasValue && !customerOids.Contains(c.Oid.Value))
|
||||
{
|
||||
customerOids.Add(c.Oid.Value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return customerOids;
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6522,11 +6522,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, DateTimeSpan timeSpan)
|
||||
public bool HasConfirmationReceiptSignatureByDateAndCustomer(long customerOid, DateTimeSpan timeSpan, SignatureType signatureType)
|
||||
{
|
||||
try
|
||||
{
|
||||
return DAOFactory.SearchDAO.HasConfirmationReceiptSignatureByDateAndCustomer(customerOid, timeSpan);
|
||||
return DAOFactory.SearchDAO.HasConfirmationReceiptSignatureByDateAndCustomer(customerOid, timeSpan, signatureType);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -6910,11 +6910,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignature(IEnumerable<long> customerOids, long? employeeOid, long? costbearerOid, long? serviceCategoryOid, DateTimeSpan timeSpan)
|
||||
public bool HasConfirmationReceiptSignature(IList<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
try
|
||||
{
|
||||
return DAOFactory.SearchDAO.HasConfirmationReceiptSignature(customerOids, employeeOid, costbearerOid, serviceCategoryOid, timeSpan);
|
||||
return DAOFactory.SearchDAO.HasConfirmationReceiptSignature(serviceRecordOids, signatureType);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -7766,5 +7766,136 @@ namespace BeWo.Service.ServiceImplementations
|
||||
|
||||
return span;
|
||||
}
|
||||
|
||||
public List<ConfirmationReceiptSignatureDC> LoadConfirmationReceiptSignaturesByServiceRecordOids(IList<long> serviceRecordOids, SignatureType signatureType, out List<long> serviceRecordOidsWithSignatures)
|
||||
{
|
||||
try
|
||||
{
|
||||
var signatures = DAOFactory.SearchDAO.LoadConfirmationReceiptSignaturesByServiceRecordOids(serviceRecordOids, signatureType);
|
||||
|
||||
serviceRecordOidsWithSignatures = new List<long>();
|
||||
|
||||
foreach(var crs in signatures)
|
||||
{
|
||||
foreach(var sr in crs.ServiceRecords)
|
||||
{
|
||||
if(sr.Oid.HasValue && serviceRecordOids.Contains(sr.Oid.Value))
|
||||
{
|
||||
serviceRecordOidsWithSignatures.AddIfNotIn(sr.Oid.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewDCs(signatures);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ConfirmationReceiptSignatureDC> UpdateConfirmationReceiptSignatures(IList<ConfirmationReceiptSignatureDC> confirmationReceiptSignatures2Update)
|
||||
{
|
||||
try
|
||||
{
|
||||
var lOriginals = DAOFactory.GenericDAO.LoadByIDs<ConfirmationReceiptSignature>(confirmationReceiptSignatures2Update.Where(w => w.ConfirmationReceiptSignatureOid.HasValue).Select(confirmationReceiptSignatur => confirmationReceiptSignatur.ConfirmationReceiptSignatureOid.Value));
|
||||
|
||||
MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MergeWithEntitys(confirmationReceiptSignatures2Update, lOriginals);
|
||||
|
||||
DAOFactory.GenericDAO.Update(lOriginals);
|
||||
|
||||
lOriginals = DAOFactory.GenericDAO.LoadByIDs<ConfirmationReceiptSignature>(confirmationReceiptSignatures2Update.Where(w => w.ConfirmationReceiptSignatureOid.HasValue).Select(confirmationReceiptSignatur => confirmationReceiptSignatur.ConfirmationReceiptSignatureOid.Value));
|
||||
|
||||
return MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewDCs(lOriginals);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteConfirmationReceiptSignatures(Dictionary<long, long> oid2Version)
|
||||
{
|
||||
try
|
||||
{
|
||||
var originals = DAOFactory.GenericDAO.LoadByIDs<ConfirmationReceiptSignature>(oid2Version.Select(e => e.Key));
|
||||
originals.DoForEach(or => MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.ConcurrencyCheck(oid2Version[or.Oid.Value], or));
|
||||
|
||||
DAOFactory.GenericDAO.Delete(originals);
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasConfirmationReceiptSignaturesByCustomerAndServiceRecords(long customerOid, IEnumerable<long> serviceRecordOids)
|
||||
{
|
||||
try
|
||||
{
|
||||
return DAOFactory.SearchDAO.HasConfirmationReceiptSignaturesByCustomerAndServiceRecords(customerOid, serviceRecordOids);
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ConfirmationReceiptSignatureDC> LoadAllConfirmationReceiptSignaturesByServiceRecordOids(IList<long> serviceRecordOids, out Dictionary<SignatureType, List<long>> serviceRecordOidsWithSignature)
|
||||
{
|
||||
try
|
||||
{
|
||||
var confirmationReceiptSignatures = DAOFactory.SearchDAO.LoadConfirmationReceiptSignaturesByServiceRecordOids(serviceRecordOids);
|
||||
|
||||
serviceRecordOidsWithSignature = new Dictionary<SignatureType, List<long>>();
|
||||
|
||||
foreach(var csr in confirmationReceiptSignatures)
|
||||
{
|
||||
serviceRecordOidsWithSignature.AddOrUpdateValueInDictionary(csr.SignatureType, csr.ServiceRecords.Where(sr => sr.Oid.HasValue).Select(sr => sr.Oid.Value).ToList());
|
||||
}
|
||||
|
||||
return MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewDCs(confirmationReceiptSignatures);
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public List<long> LoadServiceRecordOidsWithConfirmationReceiptSignatures(IList<long> serviceRecordOids)
|
||||
{
|
||||
try
|
||||
{
|
||||
return DAOFactory.SearchDAO.LoadServiceRecordOidsWithConfirmationReceiptSignatures(serviceRecordOids);
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public List<long> LoadServiceRecordOidsWithCustomerConfirmationReceiptSignatures(IList<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
try
|
||||
{
|
||||
return DAOFactory.SearchDAO.LoadServiceRecordOidsWithConfirmationReceiptSignatures(serviceRecordOids, signatureType);
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ServiceRecordDC> GetServiceRecordsWithoutConfirmationReceiptSignature(IList<long> serviceRecordOids, SignatureType signatureType)
|
||||
{
|
||||
try
|
||||
{
|
||||
return MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(DAOFactory.SearchDAO.GetServiceRecordsWithoutConfirmationReceiptSignature(serviceRecordOids, signatureType));
|
||||
}
|
||||
catch(Exception exception)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1107,4 +1107,9 @@ namespace BS.Shared
|
||||
Ort
|
||||
}
|
||||
|
||||
public enum SignatureType
|
||||
{
|
||||
Employee,
|
||||
Customer
|
||||
}
|
||||
}
|
||||
@@ -4,17 +4,16 @@
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is CostRatePeriodDC)
|
||||
if (obj is CostRatePeriodDC costRatePeriod)
|
||||
{
|
||||
var y = (CostRatePeriodDC)obj;
|
||||
if (this.CostRatePeriodOid == null && y.CostRatePeriodOid == null)
|
||||
if (CostRatePeriodOid == null && costRatePeriod.CostRatePeriodOid == null)
|
||||
{
|
||||
return this.GetHashCode() == y.GetHashCode();
|
||||
return GetHashCode() == costRatePeriod.GetHashCode();
|
||||
}
|
||||
|
||||
if (this.CostRatePeriodOid != null && y.CostRatePeriodOid != null)
|
||||
if (CostRatePeriodOid != null && costRatePeriod.CostRatePeriodOid != null)
|
||||
{
|
||||
return this.CostRatePeriodOid == y.CostRatePeriodOid;
|
||||
return CostRatePeriodOid == costRatePeriod.CostRatePeriodOid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,8 +22,7 @@
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.CostRatePeriodOid.HasValue ? this.GetType().Name.GetHashCode() ^ this.CostRatePeriodOid.GetHashCode() : base.GetHashCode();
|
||||
return CostRatePeriodOid.HasValue ? GetType().Name.GetHashCode() ^ CostRatePeriodOid.GetHashCode() : base.GetHashCode();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -155,9 +155,9 @@ namespace BS.Shared.DataContracts.Compact
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is CompactOrganisationDC)
|
||||
if (obj is CompactOrganisationDC compactOrganisation)
|
||||
{
|
||||
return this.OrganisationOid == ((CompactOrganisationDC)obj).OrganisationOid;
|
||||
return OrganisationOid == compactOrganisation.OrganisationOid;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
@@ -16,9 +17,18 @@ namespace BS.Shared.DataContracts
|
||||
public string SignatureImage { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? EmployeeOid { get; set; }
|
||||
public CompactEmployeeDC Employee { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public List<ServiceRecordDC> ServiceRecords { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public SignatureType SignatureType { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? CustomerOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string TimeSpanString { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ContactDC : IDataContract
|
||||
public partial class ContactDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public long? ContactOID { get; set; }
|
||||
|
||||
@@ -7,7 +7,7 @@ using BS.Shared.DataContracts.Compact;
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ServiceRecordDC : IDataContract
|
||||
public partial class ServiceRecordDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public CompactOrganisationDC CostBearer { get; set; }
|
||||
|
||||
@@ -153,6 +153,7 @@
|
||||
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleDC.cs" />
|
||||
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleRelationDC.cs" />
|
||||
<Compile Include="DataContracts\AdditionalServiceRegionDC.cs" />
|
||||
<Compile Include="DataContracts\ClientPartials\ContactDC.cs" />
|
||||
<Compile Include="DataContracts\ConfirmationReceiptSignatureDC.cs" />
|
||||
<Compile Include="DataContracts\DienstBlockDC.cs" />
|
||||
<Compile Include="DataContracts\DienstEintragDC.cs" />
|
||||
|
||||
Reference in New Issue
Block a user