diff --git a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml
index 46582714f..8748bb13b 100644
--- a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml
+++ b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml
@@ -26,8 +26,8 @@
-
-
+
+
@@ -35,11 +35,11 @@
-
-
+
+
-
+
@@ -56,54 +56,33 @@
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
-
+ Margin="3,22,3,3" CellValueChanged="gridView_CellValueChanged_1" RowMinHeight="24"
+ />
diff --git a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
index 54c14534f..9c8d5cf02 100644
--- a/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
+++ b/BeWo/View/Detail/Accounting/GkvAbrechnungOverview.xaml.cs
@@ -119,6 +119,9 @@ namespace BeWo.View.Detail.Accounting
{
_Viewmodel.UpdateList(dcList);
UpdateDataGridFilter();
+
+ if (datagrid_gkvAbrechnungen.Visibility != Visibility.Visible)
+ datagrid_gkvAbrechnungen.Visibility = Visibility.Visible;
});
}
@@ -200,31 +203,40 @@ namespace BeWo.View.Detail.Accounting
{
var vm = datagrid_gkvAbrechnungen.GetCurrentValue();
- string text = "Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung senden möchten?";
+ var dc = vm.CommitToDataContract();
+ var state = dc.GetState();
+ var can_send = state == GkvState.NoSend || state == GkvState.Error;
- if (vm.TransferProtokolle != null && vm.TransferProtokolle.Any())
+ if (!can_send)
{
- var last = vm.TransferProtokolle.Last();
-
- var state = last.GetState();
-
- if(state == 6)
- {
- text = "Die gewählte GKV-Abrechnung wurde bereits erfolgreich gesendet. Möchten Sie sie erneut senden?";
- }
+ string error;
+ if (state == GkvState.Waiting)
+ error = "Es wurde bereits übertragen ohne direkte Fehler.";
+ else if (state == GkvState.ErrorFatal)
+ error = "GKV-Abrechnung enthält schwere Fehler. Erstellen Sie die Rechnung erneut.";
+ else if (state == GkvState.Paid)
+ error = "GKV-Abrechnung ist bereits als bezahlt markiert.";
+ else if (state == GkvState.OldAndNoFeedback)
+ error = "GKV-Abrechnung ist älter als 28 Tage und als nicht bezahlt markiert. Wenden Sie sich bitte an Ihre Krankenkasse";
else
- {
- text = "Die gewählte GKV-Abrechnung wurde nicht erfolgreich gesendet. Möchten Sie sie erneut senden?";
- }
+ error = "def";
+
+ MessageBox.Show(error, "Übertragung nicht möglich");
+ return;
}
+ string text = "Sind Sie sicher, dass Sie die gewählte GKV-Abrechnung senden möchten?";
+
+ if (state == GkvState.Error)
+ text = "Die gewählte GKV-Abrechnung wurde nicht erfolgreich an die Krankenkasse übertragen. Möchten Sie sie erneut senden?";
+
if (MessageBox.Show(text, "GKV-Abrechnung senden", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
{
var req = new GkvAbrechnungSendRequestDC();
- req.GkvAbrechnungDC = vm.CommitToDataContract();
+ req.GkvAbrechnungOid = vm.GkvAbrechnungOid.Value;
ServiceFacade.DoAccountingServiceAsync(s => s.SendNewGkvAbrechnung(req),
cb =>
@@ -233,10 +245,11 @@ namespace BeWo.View.Detail.Accounting
{
if (cb.Successful)
{
- var dc = cb.GkvAbrechnungDC;
+ var dc2 = cb.GkvAbrechnungDC;
- vm.GkvAbrechnungVersion = dc.GkvAbrechnungVersion;
- vm.UpdateGkvTransferProtokoll(dc.TransferProtokolle.ToList());
+ vm.GkvAbrechnungVersion = dc2.GkvAbrechnungVersion;
+ vm.TransferProtokolle = dc2.TransferProtokolle.ToList();
+ vm.GkvState = dc2.GetState();
}
else
{
@@ -285,6 +298,10 @@ namespace BeWo.View.Detail.Accounting
var ed = (CheckEdit)e.Editor;
ed.Tag = e.Row;
}
+ else if (int.TryParse(datagrid_gkvAbrechnungen.CurrentColumn.Tag.ToString(), out int tag) && gridView.ActiveEditor is TextEdit)
+ {
+ ((TextEdit)gridView.ActiveEditor).SetPropertyValue("MaxLength", tag);
+ }
}
private void gridView_CellValueChanged(object sender, CellValueChangedEventArgs e)
{
@@ -301,13 +318,15 @@ namespace BeWo.View.Detail.Accounting
if (e.Property != null && e.Property.Name == "Background")
{
var gkvAbrechnungVM = datagrid_gkvAbrechnungen.GetRow(e.RowHandle) as GkvAbrechnungVM;
- /*
- if (gkvAbrechnungVM != null && !String.IsNullOrEmpty(gkvAbrechnungVM.BackgroundColor))
+
+ if (gkvAbrechnungVM is null)
+ return;
+
+ if (!gkvAbrechnungVM.Bezahlt && DateTime.Now - gkvAbrechnungVM.ErstelltAm > TimeSpan.FromDays(28))
{
- e.Result = new SolidColorBrush((Color)ColorConverter.ConvertFromString(gkvAbrechnungVM.BackgroundColor));
+ e.Result = Brushes.Orange;
e.Handled = true;
}
- */
}
}
@@ -326,6 +345,7 @@ namespace BeWo.View.Detail.Accounting
vm.GkvAbrechnungVersion = dc.GkvAbrechnungVersion;
vm.Bezahlt = dc.Bezahlt;
+ vm.GkvState = dc.GetState();
}
private void SaveNoticeChange(GkvAbrechnungVM vm, string notice)
diff --git a/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs b/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs
index fc342fd1d..b058d74d6 100644
--- a/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs
+++ b/BeWo/View/Detail/Accounting/NewGkvAbrechnungPopUpView.xaml.cs
@@ -136,10 +136,6 @@ namespace BeWo.View.Detail.Accounting
popup_organisation.IsOpen = false;
gkvsearchview.ItemSelected -= gkvsearchview_OrganisationSelected;
- ViewModel.IKKostenträger = e.Data.IKKostentrager;
- ViewModel.IKVersichertenKarte = e.Data.IKKrankenkasse;
- ViewModel.IKDatenannahmestelle = e.Data.IKDatenannahmestelle;
-
popupedit_GkvSearch.Text = e.Data.ToString();
popupedit_GkvSearch.Focus();
diff --git a/BeWo/ViewModel/GkvAbrechnungVM.cs b/BeWo/ViewModel/GkvAbrechnungVM.cs
index f383485ac..2bf0e7ad0 100644
--- a/BeWo/ViewModel/GkvAbrechnungVM.cs
+++ b/BeWo/ViewModel/GkvAbrechnungVM.cs
@@ -3,10 +3,12 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using BeWo.Validation;
+using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.GkvAbrechnung;
+using BS.Shared.Extensions;
using DevExpress.Xpf.Core;
namespace BeWo.ViewModel
@@ -32,10 +34,6 @@ AntwortEntschluesseltAm
public static string PropertyName_AbrechnungsZeitraumStart = "AbrechnungsZeitraumStart";
public static string PropertyName_AbrechnungsZeitraumEnde = "AbrechnungsZeitraumEnde";
- public static string PropertyName_Nutzdatendatei = "Nutzdatendatei";
- public static string PropertyName_Auftragsdatei = "Auftragsdatei";
- public static string PropertyName_Transfername = "Transfername";
-
public static string PropertyName_ErstelltAm = "ErstelltAm";
private long? _GkvAbrechnungOid;
@@ -50,20 +48,14 @@ AntwortEntschluesseltAm
private DateTime? _AbrechnungsZeitraumStart;
private DateTime? _AbrechnungsZeitraumEnde;
- private string _Nutzdatendatei;
- private string _Auftragsdatei;
- private string _Transfername;
- private int _Dateigröße;
- private int _Datenaustauschreferenz;
-
- private DateTime? _ErstelltAm;
+ private DateTime _ErstelltAm;
private decimal _Betrag;
private bool _Bezahlt;
+ private GkvState _GkvState;
+
internal bool _IsChecked;
- internal bool _IsSendingRequestCurrently;
- internal bool _SendAndFailed;
private List _InvoiceBases2;
private BindingList _InvoiceBases;
@@ -77,69 +69,7 @@ AntwortEntschluesseltAm
}
#region
- [Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public string IKVersichertenKarte
- {
- get { return this._IKVersichertenKarte; }
-
- set
- {
- if (this.AreDifferent(this._IKVersichertenKarte, value))
- {
- this._IKVersichertenKarte = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKVersichertenKarte, value), nameof(IKVersichertenKarte));
- this.FirePropertyChanged(nameof(IKVersichertenKarte));
- }
- }
- }
-
- [Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public string IKKostenträger
- {
- get { return this._IKKostenträger; }
-
- set
- {
- if (this.AreDifferent(this._IKKostenträger, value))
- {
- this._IKKostenträger = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKKostenträger, value), nameof(IKKostenträger));
- this.FirePropertyChanged(nameof(IKKostenträger));
- }
- }
- }
-
- [ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public string IKDatenannahmestelle
- {
- get { return this._IKDatenannahmestelle; }
-
- set
- {
- if (this.AreDifferent(this._IKDatenannahmestelle, value))
- {
- this._IKDatenannahmestelle = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKDatenannahmestelle, value), nameof(IKDatenannahmestelle));
- this.FirePropertyChanged(nameof(IKDatenannahmestelle));
- }
- }
- }
- [ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public string IKLeistungserbringer
- {
- get { return this._IKLeistungserbringer; }
-
- set
- {
- if (this.AreDifferent(this._IKLeistungserbringer, value))
- {
- this._IKLeistungserbringer = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.IKLeistungserbringer, value), nameof(IKLeistungserbringer));
- this.FirePropertyChanged(nameof(IKLeistungserbringer));
- }
- }
- }
-
+
public string AbrechnungsZeitraum => $"{AbrechnungsZeitraumStart.Value.ToShortDateString()} - {AbrechnungsZeitraumEnde.Value.ToShortDateString()}";
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
@@ -178,99 +108,8 @@ AntwortEntschluesseltAm
}
}
- [ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public string Nutzdatendatei
- {
- get { return this._Nutzdatendatei; }
-
- set
- {
- if (this.AreDifferent(this._Nutzdatendatei, value))
- {
- this._Nutzdatendatei = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Nutzdatendatei, value), PropertyName_Nutzdatendatei);
- this.FirePropertyChanged(PropertyName_Nutzdatendatei);
- }
- }
- }
-
- [ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public string Auftragsdatei
- {
- get { return this._Auftragsdatei; }
-
- set
- {
- if (this.AreDifferent(this._Auftragsdatei, value))
- {
- this._Auftragsdatei = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Auftragsdatei, value), PropertyName_Auftragsdatei);
- this.FirePropertyChanged(PropertyName_Auftragsdatei);
- }
- }
- }
-
- [ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public string Transfername
- {
- get { return this._Transfername; }
-
- set
- {
- if (this.AreDifferent(this._Transfername, value))
- {
- this._Transfername = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Transfername, value), PropertyName_Transfername);
- this.FirePropertyChanged(PropertyName_Transfername);
- }
- }
- }
-
- [ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public int Datenaustauschreferenz
- {
- get { return this._Datenaustauschreferenz; }
-
- set
- {
- if (this.AreDifferent(this._Datenaustauschreferenz, value))
- {
- this._Datenaustauschreferenz = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Datenaustauschreferenz, value), nameof(Datenaustauschreferenz));
- this.FirePropertyChanged(nameof(Datenaustauschreferenz));
- }
- }
- }
- [ValidationAttribute(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public int Dateigröße
- {
- get { return this._Dateigröße; }
-
- set
- {
- if (this.AreDifferent(this._Dateigröße, value))
- {
- this._Dateigröße = value;
- this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Dateigröße, value), nameof(Dateigröße));
- this.FirePropertyChanged(nameof(Dateigröße));
- FirePropertyChanged(nameof(DateigrößeDisplayname));
- }
- }
- }
-
- public string DateigrößeDisplayname {
- get
- {
- return Utils.SizeSuffix(Dateigröße, 0);
- }
- set
- {
-
- }
- }
-
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
- public DateTime? ErstelltAm
+ public DateTime ErstelltAm
{
get { return this._ErstelltAm; }
@@ -285,24 +124,6 @@ AntwortEntschluesseltAm
}
}
-
- //public string GesendetDisplay
- //{
- // get
- // {
- // if (IsSendingRequestCurrently)
- // return "Sendet";
-
- // if (SendAndFailed)
- // return "Fehlgeschlagen";
-
- // if (GesendetAm.HasValue)
- // return GesendetAm.Value.ToString();
- // else
- // return "-";
- // }
- //}
-
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public long? GkvAbrechnungOid
{
@@ -382,6 +203,21 @@ AntwortEntschluesseltAm
}
}
+ [Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
+ public GkvState GkvState
+ {
+ get { return this._GkvState; }
+
+ set
+ {
+ if (this.AreDifferent(this._GkvState, value))
+ {
+ this._GkvState = value;
+ this.FirePropertyChanged(nameof(GkvState));
+ }
+ }
+ }
+
public bool IsChecked
{
get { return _IsChecked; }
@@ -411,13 +247,10 @@ AntwortEntschluesseltAm
public List TransferProtokolle
{
get { return _TransferProtokolle; }
- set { _TransferProtokolle = value; }
- }
-
- public void UpdateGkvTransferProtokoll(List list)
- {
- _TransferProtokolle = list;
- FirePropertyChanged(nameof(TransferProtokolle));
+ set {
+ _TransferProtokolle = value;
+ FirePropertyChanged(nameof(TransferProtokolle));
+ }
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
@@ -452,21 +285,14 @@ AntwortEntschluesseltAm
protected override void InitByDataContract(GkvAbrechnungDC pDataContract)
{
- _IKDatenannahmestelle = pDataContract.IKDatenannahmestelle;
- _IKKostenträger = pDataContract.IKKostenträger;
- _IKLeistungserbringer = pDataContract.IKLeistungserbringer;
- _IKVersichertenKarte = pDataContract.IKVersichertenKarte;
_AbrechnungsZeitraumStart = pDataContract.AbrechnungsZeitraumStart;
_AbrechnungsZeitraumEnde = pDataContract.AbrechnungsZeitraumEnde;
- _Nutzdatendatei = pDataContract.Nutzdatendatei;
- _Auftragsdatei = pDataContract.Auftragsdatei;
- _Transfername = pDataContract.Transfername;
+
_ErstelltAm = pDataContract.ErstelltAm;
- _Datenaustauschreferenz = pDataContract.Datenaustauschreferenz;
- _Dateigröße = pDataContract.Dateigröße;
_GkvAbrechnungOid = pDataContract.GkvAbrechnungOid;
_GkvAbrechnungVersion = pDataContract.GkvAbrechnungVersion;
+
_Notice = pDataContract.Notice;
_Betrag = pDataContract.Betrag;
@@ -484,29 +310,22 @@ AntwortEntschluesseltAm
}
_Organisation = pDataContract.Organisation;
+
+ _GkvState = pDataContract.GetState();
}
protected override GkvAbrechnungDC MapToDataContract(GkvAbrechnungDC pDataContract, bool doCommit)
{
- pDataContract.IKDatenannahmestelle = _IKDatenannahmestelle;
- pDataContract.IKVersichertenKarte = _IKVersichertenKarte;
- pDataContract.IKKostenträger = _IKKostenträger;
- pDataContract.IKLeistungserbringer = _IKLeistungserbringer;
pDataContract.AbrechnungsZeitraumStart = _AbrechnungsZeitraumStart;
pDataContract.AbrechnungsZeitraumEnde = _AbrechnungsZeitraumEnde;
- pDataContract.Nutzdatendatei = _Nutzdatendatei;
- pDataContract.Auftragsdatei = _Auftragsdatei;
- pDataContract.Transfername = _Transfername;
pDataContract.ErstelltAm = _ErstelltAm;
pDataContract.GkvAbrechnungOid = _GkvAbrechnungOid;
pDataContract.GkvAbrechnungVersion = _GkvAbrechnungVersion;
- pDataContract.Dateigröße = _Dateigröße;
pDataContract.Notice = _Notice;
pDataContract.Betrag = _Betrag;
pDataContract.Bezahlt = _Bezahlt;
- pDataContract.Datenaustauschreferenz = _Datenaustauschreferenz;
if (_InvoiceBases != null && _InvoiceBases.Any())
pDataContract.InvoiceBases = _InvoiceBases.Where(x => x.IsChecked).Select(vm => vm.CommitToDataContract()).ToList();
diff --git a/Dakota/DakotaValidator.cs b/Dakota/DakotaValidator.cs
index d28f5671b..5c5c4348a 100644
--- a/Dakota/DakotaValidator.cs
+++ b/Dakota/DakotaValidator.cs
@@ -22,7 +22,7 @@ namespace Dakota
///
/// Validiert in erster Phase die Daten. Bei Fehler wird eine DakotaException geworfen.
///
- public static void ValidateFirstStep(MandatorDC mandatordc, GkvAbrechnungRequestDC request)
+ public static void ValidateFirstStep(MandatorDC mandatordc)
{
if (mandatordc == null)
throw new DakotaException("Mandator ist null");
diff --git a/Dakota/Logic/DakotaInfoCreator.cs b/Dakota/Logic/DakotaInfoCreator.cs
index a77115ced..f9ebb9469 100644
--- a/Dakota/Logic/DakotaInfoCreator.cs
+++ b/Dakota/Logic/DakotaInfoCreator.cs
@@ -61,10 +61,8 @@ namespace Dakota.Logic
return info;
}
- internal InfoDateiAuftrags GetEmptyInfoAuftragsdatei(string empfang, string logischerDateiname, string verfahrenkennung, int datenaustauschreferenz)
+ internal InfoDateiAuftrags GetEmptyInfoAuftragsdatei(string empfang, string logischerDateiname, string verfahrenkennung, int transfernummer)
{
- var transfernummer = datenaustauschreferenz % 1000;
-
var info = new InfoDateiAuftrags();
info.Identifikator = 500000;
diff --git a/Dakota/Logic/DakotaManager.cs b/Dakota/Logic/DakotaManager.cs
index 0e5fc8f05..439494fd2 100644
--- a/Dakota/Logic/DakotaManager.cs
+++ b/Dakota/Logic/DakotaManager.cs
@@ -40,7 +40,7 @@ namespace Dakota.Logic
IsSammelrechnung = isSammelrechnung;
}
- public void Add(ServiceInvoiceDC serviceInvoice, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator, int datenaustauschreferenz)
+ public void Add(ServiceInvoiceDC serviceInvoice, OrganisationDC organisation, CustomerDC customer, MandatorDC mandator, int datenaustauschreferenz, int transfernummer)
{
try
{
@@ -58,7 +58,7 @@ namespace Dakota.Logic
var logischer_dateiname = DakotaConfig.GetLogischerDateiname(Month).Trim();
var info_nutz_add = DakotaInfoCreator.GetEmptyInfoNutzdatendatei(DakotaConfig.IKAbsender, organisation.IKDatenannahmestelle, logischer_dateiname, datenaustauschreferenz);
- var info_auf_add = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(organisation.IKDatenannahmestelle, logischer_dateiname, verfahrenkennung, datenaustauschreferenz);
+ var info_auf_add = DakotaInfoCreator.GetEmptyInfoAuftragsdatei(organisation.IKDatenannahmestelle, logischer_dateiname, verfahrenkennung, transfernummer);
DakotaInfoNutzDict.Add(ik_datenannahmestelle, info_nutz_add);
DakotaInfoAufDict.Add(ik_datenannahmestelle, info_auf_add);
diff --git a/Dakota/Models/DakotaException.cs b/Dakota/Models/DakotaException.cs
index e335fbbee..6203fa942 100644
--- a/Dakota/Models/DakotaException.cs
+++ b/Dakota/Models/DakotaException.cs
@@ -9,8 +9,14 @@ namespace Dakota.Models
{
public class DakotaException : ArgumentException
{
+ public string Title { get; set; }
public string Message { get; set; }
+ public DakotaException(string message, string title) : this(message)
+ {
+ Title = title;
+ }
+
public DakotaException(string message) : this()
{
Message = message;
diff --git a/Data/Access/SearchDAO.cs b/Data/Access/SearchDAO.cs
index 04dee7656..b1d0c688b 100644
--- a/Data/Access/SearchDAO.cs
+++ b/Data/Access/SearchDAO.cs
@@ -108,7 +108,7 @@ namespace BeWo.Data.Access
.Add(Restrictions.Eq("IsActive", ActivationTypeId.Active));
return c.List();
- }
+ }
public virtual IList GetEmployeeForWohnheim(long wOid)
{
var c = CreateCriteria()
@@ -122,9 +122,9 @@ namespace BeWo.Data.Access
var lCriteria = CreateCriteria()
.Add(Restrictions.Like(Person.PropertyName_FirstName, pFirstName, MatchMode.Anywhere))
.Add(Restrictions.Like(Person.PropertyName_LastName, pLastName, MatchMode.Anywhere));
- if(pDateOfBirth != null)
+ if (pDateOfBirth != null)
lCriteria.Add(Restrictions.Eq(Person.PropertyName_DateOfBirth, pDateOfBirth));
- if(pPersonType != null)
+ if (pPersonType != null)
lCriteria.Add(Restrictions.Eq(Person.PropertyName_Type, pPersonType));
return lCriteria.List();
@@ -135,7 +135,7 @@ namespace BeWo.Data.Access
var lCriteria = CreateCriteria()
.Add(Restrictions.Like(Organisation.PropertyName_Name, pName, MatchMode.Anywhere));
- if(pOnlyCostBearer)
+ if (pOnlyCostBearer)
lCriteria.Add(Restrictions.IsNotNull(Organisation.PropertyName_CostBearer));
return lCriteria.List();
@@ -236,15 +236,15 @@ namespace BeWo.Data.Access
var c = CreateCriteria()
.CreateAlias(ServiceRecord.PropertyName_Employee, "e", JoinType.InnerJoin);
- if(pCostBearer2SupportConceptOid.HasValue)
+ if (pCostBearer2SupportConceptOid.HasValue)
{
c = c.CreateAlias(ServiceRecord.PropertyName_SupportConcept, "sc", JoinType.InnerJoin)
.CreateAlias("sc." + SupportConcept.PropertyName_CostBearer2SupportConceptList, "c2s", JoinType.InnerJoin);
}
- if(pEmployeeOid.HasValue)
+ if (pEmployeeOid.HasValue)
c = c.Add(Restrictions.Eq("e." + BeWoEntityBase.PropertyName_Oid, pEmployeeOid));
- if(pCostBearer2SupportConceptOid.HasValue)
+ if (pCostBearer2SupportConceptOid.HasValue)
c = c.Add(Restrictions.Eq("c2s." + BeWoEntityBase.PropertyName_Oid, pCostBearer2SupportConceptOid));
return c.List().ToList();
@@ -264,33 +264,33 @@ namespace BeWo.Data.Access
var c = CreateCriteria()
.CreateAlias(ServiceRecord.PropertyName_Employee, "e", JoinType.InnerJoin);
- if(supportConceptOid.HasValue)
+ if (supportConceptOid.HasValue)
{
c = c.CreateAlias(ServiceRecord.PropertyName_SupportConcept, "sc", JoinType.InnerJoin);
}
- if(serviceCategoryOid.HasValue)
+ if (serviceCategoryOid.HasValue)
{
c = c.CreateAlias(ServiceRecord.PropertyName_ServiceDescription, "sd", JoinType.InnerJoin)
.CreateAlias("sd." + ServiceDescription.PropertyName_ServiceCategory, "cat", JoinType.InnerJoin);
}
- if(supportConceptOid.HasValue)
+ if (supportConceptOid.HasValue)
{
c = c.Add(Restrictions.Eq("sc." + BeWoEntityBase.PropertyName_Oid, supportConceptOid));
}
- if(costBearer2SupportConceptOid.HasValue)
+ if (costBearer2SupportConceptOid.HasValue)
{
c = c.Add(Restrictions.Eq(ServiceRecord.PropertyName_CostBearer2SupportConceptOid, costBearer2SupportConceptOid));
}
- if(serviceCategoryOid.HasValue)
+ if (serviceCategoryOid.HasValue)
{
c = c.Add(Restrictions.Eq("cat." + BeWoEntityBase.PropertyName_Oid, serviceCategoryOid));
}
- if(start.HasValue && end.HasValue)
+ if (start.HasValue && end.HasValue)
{
c.Add(Restrictions.Between(ServiceRecord.PropertyName_Start, start, end));
}
@@ -325,7 +325,7 @@ namespace BeWo.Data.Access
var criteria = CreateCriteria()
.Add(Restrictions.Eq(ServiceRecord.PropertyName_CostBearer2SupportConceptOid, pCostBearer2SupportConceptOid));
- if(period != null)
+ if (period != null)
criteria =
criteria.Add(
Restrictions.Or(
@@ -351,7 +351,7 @@ namespace BeWo.Data.Access
.Add(Restrictions.Eq(ServiceRecord.PropertyName_EmployeeOid, pEmployeeOid))
.Add(Restrictions.IsNull(ServiceRecord.PropertyName_CostBearer2SupportConceptOid));
- if(days.HasValue)
+ if (days.HasValue)
{
var minDate = DateTime.Now.Date.AddDays(-1 * days.Value);
c.Add(Restrictions.Ge(ServiceRecord.PropertyName_Start, minDate));
@@ -366,7 +366,7 @@ namespace BeWo.Data.Access
.Add(Restrictions.Eq(ServiceRecord.PropertyName_EmployeeOid, pEmployeeOid))
.Add(Restrictions.IsNull(ServiceRecord.PropertyName_CostBearer2SupportConceptOid));
- if(period != null)
+ if (period != null)
{
criteria =
criteria.Add(
@@ -399,11 +399,11 @@ namespace BeWo.Data.Access
var lCriteria = CreateCriteria()
.Add(Restrictions.Eq(ServiceRecord.PropertyName_EmployeeOid, pEmployeeOid));
- if(pSpan != null)
+ if (pSpan != null)
lCriteria.Add(Restrictions.Between(ServiceRecord.PropertyName_Start, pSpan.StartDateTime, pSpan.EndDateTime));
- if(customerOid != null)
+ if (customerOid != null)
lCriteria.Add(Restrictions.Eq(ServiceRecord.PropertyName_CustomerOid, customerOid.Value));
- if(srTypeFilter.HasValue)
+ if (srTypeFilter.HasValue)
{
lCriteria.Add(Restrictions.Eq(ServiceRecord.PropertyName_ServiceRecordType, srTypeFilter.Value));
}
@@ -427,7 +427,7 @@ namespace BeWo.Data.Access
.Add(Restrictions.Eq(ServiceRecord.PropertyName_CustomerOid, customerOid));
- if(includeEndDateInSearch)
+ if (includeEndDateInSearch)
{
var orCriteria = Restrictions.Or(
Restrictions.Between(ServiceRecord.PropertyName_Start, pSpan.StartDateTime, pSpan.EndDateTime),
@@ -448,9 +448,9 @@ namespace BeWo.Data.Access
- if(employeeOid != null)
+ if (employeeOid != null)
lCriteria.Add(Restrictions.Eq(ServiceRecord.PropertyName_EmployeeOid, employeeOid.Value));
- if(srTypeFilter.HasValue)
+ if (srTypeFilter.HasValue)
{
lCriteria.Add(Restrictions.Eq(ServiceRecord.PropertyName_ServiceRecordType, srTypeFilter.Value));
}
@@ -462,7 +462,7 @@ namespace BeWo.Data.Access
{
var lCriteria = CreateCriteria()
.Add(Restrictions.Between(ServiceRecord.PropertyName_Start, pSpan.StartDateTime, pSpan.EndDateTime));
- if(srTypeFilter.HasValue)
+ if (srTypeFilter.HasValue)
{
lCriteria.Add(Restrictions.Eq(ServiceRecord.PropertyName_ServiceRecordType, srTypeFilter.Value));
}
@@ -493,10 +493,10 @@ namespace BeWo.Data.Access
lCriteria = lCriteria.CreateCriteria(SupportConcept.PropertyName_Customer, JoinType.InnerJoin);
- if(!IsNullOrEmpty(pCustomerReferenceNumber))
+ if (!IsNullOrEmpty(pCustomerReferenceNumber))
lCriteria.Add(Restrictions.Eq(Customer.PropertyName_ReferenceNumber, pCustomerReferenceNumber));
- if(!BS.Shared.Core.Utils.AreAllNullOrEmpty(pCustomerFirstName, pCustomerLastName))
+ if (!BS.Shared.Core.Utils.AreAllNullOrEmpty(pCustomerFirstName, pCustomerLastName))
lCriteria.CreateCriteria(Customer.PropertyName_Person)
.Add(Restrictions.Like(Person.PropertyName_FirstName, pCustomerFirstName, MatchMode.Anywhere))
.Add(Restrictions.Like(Person.PropertyName_LastName, pCustomerLastName, MatchMode.Anywhere));
@@ -528,7 +528,7 @@ namespace BeWo.Data.Access
public IEnumerable FindExpiringSupportConcepts(long? employeeOid, DateTime minDate, DateTime expiredUntil)
{
var c = CreateCriteriaIsActive();
- if(employeeOid == null)
+ if (employeeOid == null)
{
return c
.CreateCriteria(SupportConcept.PropertyName_CostBearer2SupportConceptList, JoinType.InnerJoin)
@@ -551,7 +551,7 @@ namespace BeWo.Data.Access
public IEnumerable FindSupportConceptsWithConferenceDate(long? employeeOid, DateTime conferenceDateUntil)
{
var c = CreateCriteriaIsActive();
- if(employeeOid == null)
+ if (employeeOid == null)
{
return c
.Add(Restrictions.Between(SupportConcept.PropertyName_ConferenceDate, DateTime.Now, conferenceDateUntil))
@@ -602,7 +602,7 @@ namespace BeWo.Data.Access
{
var lCriteria = CreateCriteriaIsActive();
- if(pSpan != null)
+ if (pSpan != null)
lCriteria.Add(Restrictions.Between(AccountingTransaction.PropertyName_BookingDate, pSpan.StartDateTime, pSpan.EndDateTime));
var test = lCriteria.List();
@@ -615,13 +615,13 @@ namespace BeWo.Data.Access
var lCriteria = CreateCriteriaIsActive()
.CreateAlias(AccountingTransaction.PropertyName_CostBearer2SupportConcept, "cb2sc", JoinType.LeftOuterJoin);
- if(pSpan != null)
+ if (pSpan != null)
lCriteria.Add(Restrictions.Between(AccountingTransaction.PropertyName_BookingDate, pSpan.StartDateTime, pSpan.EndDateTime));
- if(pSupportConceptCostBearerRelOid != null)
+ if (pSupportConceptCostBearerRelOid != null)
lCriteria.Add(Restrictions.Eq("cb2sc." + BeWoEntityBase.PropertyName_Oid, pSupportConceptCostBearerRelOid));
- if(pSupportConceptOid != null)
+ if (pSupportConceptOid != null)
{
lCriteria.CreateCriteria("cb2sc." + CostBearer2SupportConcept.PropertyName_SupportConcept)
.Add(Restrictions.Eq(BeWoEntityBase.PropertyName_Oid, pSupportConceptOid));
@@ -661,7 +661,7 @@ namespace BeWo.Data.Access
var c = CreateCriteriaIsActive()
.Add(Restrictions.Eq(BeWoFolder.PropertyName_ObjectTid, pObjTid));
- if(pObjOid > 0)
+ if (pObjOid > 0)
{
c.Add(Restrictions.Eq(BeWoFolder.PropertyName_ObjectOid, pObjOid));
}
@@ -691,7 +691,7 @@ namespace BeWo.Data.Access
public Employee FindEmployeeWithPersonOid(long pPersonOid)
{
var person = DAOFactory.GenericDAO.LoadByID(pPersonOid);
- if(person != null)
+ if (person != null)
{
return CreateCriteria()
.Add(Restrictions.Eq(Employee.PropertyName_Person, person)).UniqueResult();
@@ -703,7 +703,7 @@ namespace BeWo.Data.Access
public Customer FindCustomerWithPersonOid(long pPersonOid)
{
var person = DAOFactory.GenericDAO.LoadByID(pPersonOid);
- if(person != null)
+ if (person != null)
{
return CreateCriteria()
.Add(Restrictions.Eq(Customer.PropertyName_Person, person)).UniqueResult();
@@ -762,7 +762,7 @@ namespace BeWo.Data.Access
var c = CreateCriteria()
.Add(Restrictions.Eq(ServiceRecord.PropertyName_CostBearer2SupportConceptOid, costbearer2SupportConcept));
- if(days.HasValue)
+ if (days.HasValue)
{
var minDate = DateTime.Now.Date.AddDays(-1 * days.Value);
@@ -1033,11 +1033,11 @@ namespace BeWo.Data.Access
.Add(Restrictions.Eq("ib." + InvoiceBase.PropertyName_RecipientCostBearerOid, costBearerOid))
.Add(Restrictions.Eq("ib." + BeWoEntityBase.PropertyName_IsActive, ActivationTypeId.Active));
- if(supportConceptOid.HasValue)
+ if (supportConceptOid.HasValue)
criteria = criteria
.Add(Restrictions.Eq("ib." + InvoiceBase.PropertyName_SupportConceptOid, supportConceptOid.Value));
- if(period != null)
+ if (period != null)
criteria = criteria
.Add(Restrictions.Or(
Restrictions.Or(
@@ -1056,13 +1056,13 @@ namespace BeWo.Data.Access
.CreateAlias(ServiceInvoice.PropertyName_InvoiceBase, "ib", JoinType.InnerJoin)
.Add(Restrictions.Eq("ib." + BeWoEntityBase.PropertyName_IsActive, ActivationTypeId.Active));
- if(costbearer2SupportConceptOid.HasValue)
+ if (costbearer2SupportConceptOid.HasValue)
criteria = criteria
.Add(Restrictions.Eq("ib." + InvoiceBase.PropertyName_CostBearer2SupportConceptOid, costbearer2SupportConceptOid.Value));
- if(period != null)
+ if (period != null)
criteria = criteria
.Add(Restrictions.Or(
Restrictions.Or(
@@ -1089,10 +1089,10 @@ namespace BeWo.Data.Access
{
var criteria = CreateCriteriaIsActive();
- if(!fetchEmployees)
+ if (!fetchEmployees)
criteria = criteria
.Add(Restrictions.IsNull(AbsenceTime.PropertyName_EmployeeOid));
- else if(!fetchCustomers)
+ else if (!fetchCustomers)
criteria = criteria
.Add(Restrictions.IsNull(AbsenceTime.PropertyName_CustomerOid));
@@ -1175,12 +1175,12 @@ namespace BeWo.Data.Access
{
var criteria = CreateCriteriaIsActive();
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
criteria = criteria.Add(Restrictions.Eq(AbsenceTime.PropertyName_EmployeeOid, employeeOid));
}
- if(customerOid.HasValue)
+ if (customerOid.HasValue)
{
criteria = criteria.Add(Restrictions.Eq(AbsenceTime.PropertyName_CustomerOid, customerOid));
}
@@ -1231,7 +1231,7 @@ namespace BeWo.Data.Access
var criteria = CreateCriteriaIsActive()
.Add(Restrictions.Between("Datum", start, end));
- if(regionOid.HasValue)
+ if (regionOid.HasValue)
criteria = criteria.CreateAlias(AdditionalServiceBooking.PropertyName_AdditionalServiceRegion, "asr", JoinType.InnerJoin)
.Add(Restrictions.Eq("asr." + BeWoEntityBase.PropertyName_Oid, regionOid));
@@ -1382,17 +1382,17 @@ namespace BeWo.Data.Access
public bool OverlappingAppointmentsExist(DateTime start, DateTime end, IEnumerable employees, IEnumerable customers, IEnumerable resources, long originator, long? appointmentOid, string recurrenceId = "", int occurrenceIndex = 0)
{
- if(employees is null)
+ if (employees is null)
{
employees = new List();
}
- if(customers is null)
+ if (customers is null)
{
customers = new List();
}
- if(resources is null)
+ if (resources is null)
{
resources = new List();
}
@@ -1401,13 +1401,13 @@ namespace BeWo.Data.Access
var isBeingUpdatedToNormalAppointment = false;
Guid? recurrenceIdToIgnore = null;
- if(appointmentOid != null)
+ if (appointmentOid != null)
{
// Das Pattern wird geladen, bzw. mit der Ausnahme mit Index 0 verglichen
// Wird die Serie in einen Einzeltermin geändert und es existiert eine Ausnahme mit Index 0, sollte die Ausnahme behalten werden und nicht der Root-Termin
var original = DAOFactory.GenericDAO.LoadByID(appointmentOid.Value);
var ri = original?.GetRecurrenceId();
- if(ri != null && IsNullOrWhiteSpace(recurrenceId))
+ if (ri != null && IsNullOrWhiteSpace(recurrenceId))
{
isBeingUpdatedToNormalAppointment = true;
recurrenceIdToIgnore = ri;
@@ -1416,7 +1416,7 @@ namespace BeWo.Data.Access
Guid? recurrenceGuid = null;
- if(Guid.TryParse(recurrenceId, out var parsedGuid))
+ if (Guid.TryParse(recurrenceId, out var parsedGuid))
{
recurrenceGuid = parsedGuid;
}
@@ -1428,7 +1428,7 @@ namespace BeWo.Data.Access
.Add(Restrictions.Eq(nameof(SchedulerAppointment.IsTask), false))
.Add(betweenDateTimesCriterion);
- if(isRecurrenceException == false)
+ if (isRecurrenceException == false)
{
criteria.Add(Restrictions.Not(Restrictions.Eq(BeWoEntityBase.PropertyName_Oid, appointmentOid)));
}
@@ -1437,7 +1437,7 @@ namespace BeWo.Data.Access
var appointments = appTmp.Where(a =>
{
- if(a.RecurrenceInfo is null)
+ if (a.RecurrenceInfo is null)
{
return true;
}
@@ -1457,13 +1457,13 @@ namespace BeWo.Data.Access
var recurringAppointments = recurringAppointmentsCriteria.List().ToList();
- if(isBeingUpdatedToNormalAppointment)
+ if (isBeingUpdatedToNormalAppointment)
{
recurringAppointments = recurringAppointments.Where(root =>
{
var recId = root.GetRecurrenceId();
- if(recId is null || recurrenceIdToIgnore is null)
+ if (recId is null || recurrenceIdToIgnore is null)
{
return true;
}
@@ -1475,7 +1475,7 @@ namespace BeWo.Data.Access
{
var recId = root.GetRecurrenceId();
- if(recId is null || recurrenceIdToIgnore is null)
+ if (recId is null || recurrenceIdToIgnore is null)
{
return true;
}
@@ -1484,7 +1484,7 @@ namespace BeWo.Data.Access
}).ToList();
}
- foreach(var appointment in recurringAppointments)
+ foreach (var appointment in recurringAppointments)
{
var recurrenceInfo = new RecurrenceInfo();
recurrenceInfo.FromXml(appointment.RecurrenceInfo);
@@ -1494,7 +1494,7 @@ namespace BeWo.Data.Access
// Das Muster für die Terminserie wird berechnet
var pattern = StaticAppointmentFactory.CreateAppointment(AppointmentType.Pattern);
- if(pattern is null)
+ if (pattern is null)
{
continue;
}
@@ -1511,9 +1511,9 @@ namespace BeWo.Data.Access
// Die Serientermine werden berechnet (ausnahmslos, d.h. es werden auch bearbeitete und gelöschte Termine erstellt, die herausgefiltert werden müssen).
var occurrences = occurenceCalculator.CalcOccurrences(interval, pattern);
- foreach(var occurrence in occurrences.GetAppointments(interval))
+ foreach (var occurrence in occurrences.GetAppointments(interval))
{
- if(appointment.EndDate is null || appointment.StartDate is null)
+ if (appointment.EndDate is null || appointment.StartDate is null)
{
continue;
}
@@ -1531,7 +1531,7 @@ namespace BeWo.Data.Access
var isInIntervalTest = start.IsInInterval(end, occurrence.Start, occurrence.Start.AddMinutes(duration));
- if(!isInIntervalTest ||
+ if (!isInIntervalTest ||
changedOccurences != null && changedOccurences.Any(changedOccurence => changedOccurence.PatternId.Equals(patternId) && changedOccurence.Index == index) ||
deletedOccurences != null && deletedOccurences.Any(deletedOccurence => deletedOccurence.PatternId.Equals(patternId) && deletedOccurence.Index == index) ||
index == occurrenceIndex && guidParsingSuccessful && recurrenceGuid != null && recurrenceGuid.Equals(occurrenceGuid))
@@ -1540,10 +1540,10 @@ namespace BeWo.Data.Access
}
// Prüfen, ob es eine Ausnahme an dem Tag gibt, die zu dem Pattern gehört, um das Pattern auszuschließen
- var relatedAppointments = FindAppointmentsByRecurrenceId(new List {recurrenceInfo.Id.ToString()}, true);
+ var relatedAppointments = FindAppointmentsByRecurrenceId(new List { recurrenceInfo.Id.ToString() }, true);
var relatedAppointmentsInInterval = relatedAppointments.Where(a =>
{
- if(a.StartDate == null || a.EndDate == null)
+ if (a.StartDate == null || a.EndDate == null)
{
return false;
}
@@ -1560,23 +1560,23 @@ namespace BeWo.Data.Access
// Prüfen, ob es sich bei dem Termin für den Überschneidungen gesucht werden, um zu unterscheiden, ob ein Serientermin in einen normalen geändert wird.
var root = FindRootAppointmentByRecurrenceId(recurrenceInfo.Id.ToString());
- if(root.Oid != null && appointmentOid != null && root.Oid == appointmentOid && root.RecurrenceInfo != null && IsNullOrWhiteSpace(recurrenceId))
+ if (root.Oid != null && appointmentOid != null && root.Oid == appointmentOid && root.RecurrenceInfo != null && IsNullOrWhiteSpace(recurrenceId))
{
hasToStop = true;
}
// Indices und Ids der RecurrenceInfo vergleichen. Stimmen sie überein, dann wird das generiert Serienelement ignoriert.
- if(occurrence.RecurrenceInfo?.Id != null && !hasToStop)
+ if (occurrence.RecurrenceInfo?.Id != null && !hasToStop)
{
- if(Guid.TryParse(occurrence.RecurrenceInfo.Id.ToString(), out var guid))
+ if (Guid.TryParse(occurrence.RecurrenceInfo.Id.ToString(), out var guid))
{
- foreach(var relatedAppointment in relatedAppointmentsInInterval)
+ foreach (var relatedAppointment in relatedAppointmentsInInterval)
{
var relatedAppointmentRecurrenceId = relatedAppointment.GetRecurrenceIdAndIndex(out var relatedAppointmentRecurrenceIndex);
- if(relatedAppointmentRecurrenceId != null)
+ if (relatedAppointmentRecurrenceId != null)
{
- if(guid.Equals(relatedAppointmentRecurrenceId) && relatedAppointmentRecurrenceIndex.Equals(occurrence.RecurrenceIndex))
+ if (guid.Equals(relatedAppointmentRecurrenceId) && relatedAppointmentRecurrenceIndex.Equals(occurrence.RecurrenceIndex))
{
hasToStop = true;
break;
@@ -1586,28 +1586,28 @@ namespace BeWo.Data.Access
}
}
- if(hasToStop)
+ if (hasToStop)
{
continue;
}
var recurringAppointment = new SchedulerAppointment
{
- AllDay = occurrence.AllDay,
- CustomerList = appointment.CustomerList,
- Notice = appointment.Notice,
- EmployeeList = appointment.EmployeeList,
- EndDate = occurrence.Start.AddMinutes(duration),
+ AllDay = occurrence.AllDay,
+ CustomerList = appointment.CustomerList,
+ Notice = appointment.Notice,
+ EmployeeList = appointment.EmployeeList,
+ EndDate = occurrence.Start.AddMinutes(duration),
FormerBookingSequenceOid = appointment.FormerBookingSequenceOid,
- IsPrivate = appointment.IsPrivate,
- Location = appointment.Location,
- Originator = appointment.Originator,
- RecurrenceInfo = occurrence.RecurrenceInfo.ToXml(),
- ReminderInfo = appointment.ReminderInfo,
- ResourceList = appointment.ResourceList,
- StartDate = occurrence.Start,
- Subject = appointment.Subject ?? "",
- Type = appointment.Type
+ IsPrivate = appointment.IsPrivate,
+ Location = appointment.Location,
+ Originator = appointment.Originator,
+ RecurrenceInfo = occurrence.RecurrenceInfo.ToXml(),
+ ReminderInfo = appointment.ReminderInfo,
+ ResourceList = appointment.ResourceList,
+ StartDate = occurrence.Start,
+ Subject = appointment.Subject ?? "",
+ Type = appointment.Type
};
schedulerAppointments.AddIfNotIn(recurringAppointment);
@@ -1617,9 +1617,9 @@ namespace BeWo.Data.Access
// Falls es sich um eine Ausnahme einer Serie handelt, muss die Serie ignoriert werden
var shouldIgnoreAppointment = false;
- if(isRecurrenceException && recurrenceId != null)
+ if (isRecurrenceException && recurrenceId != null)
{
- if(recurrenceGuid.HasValue)
+ if (recurrenceGuid.HasValue)
{
shouldIgnoreAppointment = true;
}
@@ -1629,11 +1629,11 @@ namespace BeWo.Data.Access
schedulerAppointments = schedulerAppointments.Where(appointment => appointment.Type != 4).ToList();
- foreach(var appointment in schedulerAppointments)
+ foreach (var appointment in schedulerAppointments)
{
- if(shouldIgnoreAppointment)
+ if (shouldIgnoreAppointment)
{
- if(!ShouldDoAppointmentOverlappingCheck(appointment, recurrenceGuid.Value))
+ if (!ShouldDoAppointmentOverlappingCheck(appointment, recurrenceGuid.Value))
{
continue;
}
@@ -1649,7 +1649,7 @@ namespace BeWo.Data.Access
var hasOverlappingOriginatorAppointments = schedulerAppointments.Any(appointment =>
{
- if(!ShouldDoAppointmentOverlappingCheck(appointment, recurrenceGuid))
+ if (!ShouldDoAppointmentOverlappingCheck(appointment, recurrenceGuid))
{
return false;
}
@@ -1661,17 +1661,17 @@ namespace BeWo.Data.Access
return hasOverlappingEmployeeAppointments || hasOverlappingCustomerAppointments || hasOverlappingResourceAppointments || hasOverlappingOriginatorAppointments;
}
-
+
private static bool ShouldDoAppointmentOverlappingCheck(SchedulerAppointment appointment, Guid? recurrenceId)
{
- if(!appointment.Oid.HasValue || !recurrenceId.HasValue)
+ if (!appointment.Oid.HasValue || !recurrenceId.HasValue)
{
return true;
}
var recId = appointment.GetRecurrenceIdAndIndex(out var recIndex);
- if(appointment.RecurrenceInfo is null || recId is null)
+ if (appointment.RecurrenceInfo is null || recId is null)
{
return true;
}
@@ -1717,18 +1717,18 @@ namespace BeWo.Data.Access
public IEnumerable GetInvoiceBases(DateTime? startDate, DateTime? endDate, bool useInvoiceDate = true)
{
var lCriteria = CreateCriteriaIsActive();
- if(useInvoiceDate)
+ if (useInvoiceDate)
{
- if(startDate.HasValue)
+ if (startDate.HasValue)
lCriteria.Add(Restrictions.Ge(InvoiceBase.PropertyName_InvoiceDate, startDate));
- if(endDate.HasValue)
+ if (endDate.HasValue)
lCriteria.Add(Restrictions.Le(InvoiceBase.PropertyName_InvoiceDate, endDate));
}
else
{
- if(startDate.HasValue)
+ if (startDate.HasValue)
lCriteria.Add(Restrictions.Ge(InvoiceBase.PropertyName_AccountingPeriodEnd, startDate));
- if(endDate.HasValue)
+ if (endDate.HasValue)
lCriteria.Add(Restrictions.Le(InvoiceBase.PropertyName_AccountingPeriodStart, endDate));
}
@@ -1786,7 +1786,7 @@ namespace BeWo.Data.Access
.CreateAlias(SupportConcept.PropertyName_Customer, "c")
.Add(Restrictions.In("c." + BeWoEntityBase.PropertyName_Oid, customerOids));
- if(expiredOnesToo)
+ if (expiredOnesToo)
{
}
@@ -1799,7 +1799,7 @@ namespace BeWo.Data.Access
var minStart = DateTime.Now.GetShortDateTime().AddDays(-dayCount);
var c = CreateCriteriaIsActive();
- if(costBearer2SupportConceptOid.HasValue)
+ if (costBearer2SupportConceptOid.HasValue)
{
c.Add(Restrictions.Eq(ServiceRecord.PropertyName_CostBearer2SupportConceptOid, costBearer2SupportConceptOid));
}
@@ -1809,7 +1809,7 @@ namespace BeWo.Data.Access
.Add(Restrictions.IsNull(ServiceRecord.PropertyName_CostBearer2SupportConceptOid));
}
- if(dayCount > 0)
+ if (dayCount > 0)
{
c.Add(Restrictions.Ge(ServiceRecord.PropertyName_Start, minStart));
}
@@ -1856,18 +1856,18 @@ namespace BeWo.Data.Access
var exceptionIds = new List();
var regex = new Regex("(Id=\\\"[a-z0-9-]+\\\")");
- foreach(var appointment in exceptionalRecurrenceInfos)
+ foreach (var appointment in exceptionalRecurrenceInfos)
{
var match = regex.Match(appointment.RecurrenceInfo);
- if(match.Success)
+ if (match.Success)
{
var value = match.Value;
var actualId = value.Split("\"");
- if(actualId.Count > 1)
+ if (actualId.Count > 1)
{
var id = actualId[1];
- if(!appointments.Any(w => w.RecurrenceInfo != null && w.RecurrenceInfo.Contains(id) && w.Type == 1))
+ if (!appointments.Any(w => w.RecurrenceInfo != null && w.RecurrenceInfo.Contains(id) && w.Type == 1))
{
exceptionIds.Add(appointment.Oid.Value);
}
@@ -1877,7 +1877,7 @@ namespace BeWo.Data.Access
var exceptionsToModify = appointments.Where(w => w.Oid.HasValue && exceptionIds.Contains(w.Oid.Value)).ToList();
- foreach(var exception in exceptionsToModify)
+ foreach (var exception in exceptionsToModify)
{
var replacingAppointment = new SchedulerAppointment
{
@@ -1900,14 +1900,14 @@ namespace BeWo.Data.Access
var recurrenceIds = new List();
var allExceptionalRecurrenceInfos = appointments.Where(w => w.RecurrenceInfo != null);
- foreach(var appointment in allExceptionalRecurrenceInfos)
+ foreach (var appointment in allExceptionalRecurrenceInfos)
{
var match = regex.Match(appointment.RecurrenceInfo);
- if(match.Success)
+ if (match.Success)
{
var value = match.Value;
var actualId = value.Split("\"");
- if(actualId.Count > 1)
+ if (actualId.Count > 1)
{
recurrenceIds.AddIfNotIn(actualId[1]);
}
@@ -1923,34 +1923,34 @@ namespace BeWo.Data.Access
public IEnumerable FilterEmployeesWithAppointments(List pEmployeeOids, DateTime pStartTime, DateTime pEndTime)
{
- if(pEmployeeOids == null)
+ if (pEmployeeOids == null)
{
pEmployeeOids = new List();
}
var result = new List();
var appointments = GetAllActiveAppointmentsForEmployeeInInterval2(pStartTime, pEndTime, pEmployeeOids) ?? new List();
- var gefilterteTermine =
+ var gefilterteTermine =
appointments.Where(w => w.EmployeeList != null && w.EmployeeList
.Select(s => s.Employee.Oid.Value)
.Intersect(pEmployeeOids).Any() || !w.EmployeeList.Select(s => s.Employee.Oid.Value)
.Intersect(pEmployeeOids).Any() && pEmployeeOids.Contains(w.Originator.Oid.Value)).ToList();
var employee2SchedulerAppointmentsList = gefilterteTermine.Select(s => s.EmployeeList).ToList();
- foreach(var employee2SchedulerAppointments in employee2SchedulerAppointmentsList)
+ foreach (var employee2SchedulerAppointments in employee2SchedulerAppointmentsList)
{
- foreach(var employee2SchedulerAppointment in employee2SchedulerAppointments)
+ foreach (var employee2SchedulerAppointment in employee2SchedulerAppointments)
{
- if(employee2SchedulerAppointment.Employee.Oid.HasValue && !result.Contains(employee2SchedulerAppointment.Employee.Oid.Value))
+ if (employee2SchedulerAppointment.Employee.Oid.HasValue && !result.Contains(employee2SchedulerAppointment.Employee.Oid.Value))
{
result.Add(employee2SchedulerAppointment.Employee.Oid.Value);
}
}
}
- foreach(var originator in gefilterteTermine.Select(s => s.Originator))
+ foreach (var originator in gefilterteTermine.Select(s => s.Originator))
{
- if(originator.Oid.HasValue && !result.Contains(originator.Oid.Value))
+ if (originator.Oid.HasValue && !result.Contains(originator.Oid.Value))
{
result.Add(originator.Oid.Value);
}
@@ -1978,7 +1978,7 @@ namespace BeWo.Data.Access
var abwesenheiten = c.List();
- foreach(var abwesenheit in abwesenheiten)
+ foreach (var abwesenheit in abwesenheiten)
{
result.AddIfNotIn(abwesenheit.EmployeeOid.Value);
}
@@ -2020,13 +2020,13 @@ namespace BeWo.Data.Access
var c = CreateCriteriaIsActive()
.Add(Restrictions.Not(Restrictions.In(RightRelation.PropertyName_UserGroupOid, pUserGroupOids)))
- .Add(Restrictions.In(RightRelation.PropertyName_RightType, new[] {UserRightType.UserGroupView_View, UserRightType.UserGroupView_Edit, UserRightType.ViewAll, UserRightType.EditAll}))
+ .Add(Restrictions.In(RightRelation.PropertyName_RightType, new[] { UserRightType.UserGroupView_View, UserRightType.UserGroupView_Edit, UserRightType.ViewAll, UserRightType.EditAll }))
.Add(Subqueries.PropertyIn(RightRelation.PropertyName_UserGroupOid, dc));
var result = c.List();
var nachUserGroupOidSortiert = new Dictionary>();
- foreach(var relation in result)
+ foreach (var relation in result)
{
nachUserGroupOidSortiert.AddOrUpdateValueInDictionary(relation.UserGroupOid.Value, relation.RightType);
}
@@ -2066,14 +2066,14 @@ namespace BeWo.Data.Access
var c = CreateCriteriaIsActive();
if (objectTid == TableID.Employee)
- {
+ {
c.Add(Restrictions.Eq(Arbeitszeit.PropertyName_EmployeeOid, objectOid));
}
else
{
c.Add(Restrictions.Eq("Customer", DAOFactory.GenericDAO.GetByID(objectOid)));
}
-
+
return c.List().ToList();
}
@@ -2138,7 +2138,7 @@ namespace BeWo.Data.Access
public IEnumerable FindNextChatMessages(long senderOid, long empfaengerOid, int messlateZahl, List list, bool isteam)
{
var c = CreateCriteriaIsActive();
- if(!isteam)
+ if (!isteam)
{
c.Add(
Restrictions.Or(
@@ -2167,7 +2167,7 @@ namespace BeWo.Data.Access
{
//Zähle hier alle ChatMessages
int xc;
- if(!isTeam)
+ if (!isTeam)
{
xc =
Session.QueryOver()
@@ -2190,7 +2190,7 @@ namespace BeWo.Data.Access
int ergebnis = xc - aktuelleZahl;
- if(ergebnis < 0)
+ if (ergebnis < 0)
ergebnis = 0;
return ergebnis;
@@ -2295,7 +2295,7 @@ namespace BeWo.Data.Access
.Add(Restrictions.Not(Restrictions.In(ChatMessage.PropertyName_MessageId, pExceptions)))
.Add(Restrictions.IsNull(ChatMessage.PropertyName_TeamOid));
- if(pForTeam)
+ if (pForTeam)
{
c = CreateCriteriaIsActive()
.Add(Restrictions.Eq(ChatMessage.PropertyName_TeamOid, pRecipientOid))
@@ -2404,17 +2404,17 @@ namespace BeWo.Data.Access
public static string ToSql(ICriteria criteria)
{
- var criteriaImpl = (CriteriaImpl) criteria;
- var sessionImpl = (SessionImpl) criteriaImpl.Session;
- var factory = (ISessionFactoryImplementor) sessionImpl.SessionFactory;
+ var criteriaImpl = (CriteriaImpl)criteria;
+ var sessionImpl = (SessionImpl)criteriaImpl.Session;
+ var factory = (ISessionFactoryImplementor)sessionImpl.SessionFactory;
var implementors = factory.GetImplementors(criteriaImpl.EntityOrClassName);
- if(implementors.Length == 0)
+ if (implementors.Length == 0)
{
return "No entity or class name found!";
}
- var loader = new CriteriaLoader((IOuterJoinLoadable) factory.GetEntityPersister(implementors[0]), factory, criteriaImpl, implementors[0], sessionImpl.EnabledFilters);
+ var loader = new CriteriaLoader((IOuterJoinLoadable)factory.GetEntityPersister(implementors[0]), factory, criteriaImpl, implementors[0], sessionImpl.EnabledFilters);
return loader.SqlString.ToString();
}
@@ -2442,26 +2442,26 @@ namespace BeWo.Data.Access
c.Add(Restrictions.IsNull(ChatMessage.PropertyName_TeamOid));
- if(pForTeam)
+ if (pForTeam)
{
c = CreateCriteriaIsActive()
.Add(Restrictions.Eq(ChatMessage.PropertyName_TeamOid, pRecipientOid));
}
- if(!IsNullOrEmpty(pMessageId))
+ if (!IsNullOrEmpty(pMessageId))
{
var c1 = CreateCriteriaIsActive()
.Add(Restrictions.Eq(ChatMessage.PropertyName_MessageId, pMessageId))
.AddOrder(Order.Desc(BeWoEntityBase.PropertyName_InsTs));
var list = c1.List();
- if(list.Count > 0)
+ if (list.Count > 0)
{
var lastLoadedChatMessage = c1.List().First();
c.Add(Restrictions.Not(Restrictions.In(ChatMessage.PropertyName_MessageId, pExceptions)));
- if(pIsInitialCall)
+ if (pIsInitialCall)
{
c.Add(Restrictions.Gt(BeWoEntityBase.PropertyName_InsTs, lastLoadedChatMessage.InsTs));
}
@@ -2490,10 +2490,10 @@ namespace BeWo.Data.Access
{
var teams = new List();
- if(pIsTeam)
+ if (pIsTeam)
{
var employee = FindEmployeeWithPersonOid(pSenderPersonOid);
- if(employee != null)
+ if (employee != null)
{
teams.AddRange(FindTeamsOfEmployee(employee.Oid.Value).Select(s => s.Oid.Value));
}
@@ -2501,7 +2501,7 @@ namespace BeWo.Data.Access
var c = CreateCriteria();
- if(pIsTeam)
+ if (pIsTeam)
{
c.Add(Restrictions.And(Restrictions.Eq(NewestChatMessage.PropertyName_IsTeam, true),
Restrictions.Eq(NewestChatMessage.PropertyName_RecipientPersonOid, pRecipientPersonOid)));
@@ -2555,7 +2555,7 @@ namespace BeWo.Data.Access
List nAr = new List();
- foreach(var item in c.List())
+ foreach (var item in c.List())
{
nAr.Add(item.Oid.Value);
}
@@ -2563,7 +2563,7 @@ namespace BeWo.Data.Access
ArbeitszeitListe a = new ArbeitszeitListe();
a.Arbeitszeit = c.List().ToList();
- if(nAr.Count != 0)
+ if (nAr.Count != 0)
{
var cEintrag =
CreateCriteria()
@@ -2602,7 +2602,7 @@ namespace BeWo.Data.Access
{
c = CreateCriteriaIsActive();
}
-
+
return c
.CreateAlias(SupportConcept.PropertyName_CostBearer2SupportConceptList, "cb2sc", JoinType.InnerJoin)
@@ -2682,7 +2682,7 @@ namespace BeWo.Data.Access
), Restrictions.And(Restrictions.Lt(AbsenceTime.PropertyName_Start, start), Restrictions.Gt(AbsenceTime.PropertyName_End, start)))
);
- if(!pHasRightToSeeAllEmployeeAppointments)
+ if (!pHasRightToSeeAllEmployeeAppointments)
{
criteria.Add(Restrictions.Eq(AbsenceTime.PropertyName_EmployeeOid, pEmployeeOid));
}
@@ -2694,11 +2694,11 @@ namespace BeWo.Data.Access
{
var criteria = CreateCriteriaIsActive();
- if(pIsInAdministrationView)
+ if (pIsInAdministrationView)
{
criteria.Add(Restrictions.Eq(nameof(TextModule.IsOnlyForEmployee), false));
}
- else if(!pHasRightToSeeAll)
+ else if (!pHasRightToSeeAll)
{
criteria.Add(Restrictions.Eq(nameof(TextModule.IsOnlyForEmployee), true))
.Add(Restrictions.Eq(nameof(TextModule.Employee) + "." + nameof(BeWoEntityBase.Oid), pEmployeeOid));
@@ -2749,7 +2749,7 @@ namespace BeWo.Data.Access
var criteria = CreateCriteria();
- if(!pIncludeInactiveOnes)
+ if (!pIncludeInactiveOnes)
{
criteria.Add(Restrictions.Eq(BeWoEntityBase.PropertyName_IsActive, ActivationTypeId.Active));
}
@@ -2763,31 +2763,31 @@ namespace BeWo.Data.Access
Restrictions.And(Restrictions.IsNotNull(SchedulerAppointment.PropertyName_RecurrenceInfo), Expression.Sql(new SqlString(recurrenceBetween)))),
Restrictions.And(Restrictions.Eq(SchedulerAppointment.PropertyName_Type, 3), Expression.Sql(new SqlString(recurrenceBetween))))));
- if(pPrivateAppointmentsOnly)
+ if (pPrivateAppointmentsOnly)
{
criteria.Add(Restrictions.Eq(SchedulerAppointment.PropertyName_IsPrivate, true));
}
else
{
- if(pEmployeesOnly)
+ if (pEmployeesOnly)
{
var hasEmployees = $"{BeWoEntityBase.PropertyName_Oid} IN (SELECT newschappoid FROM employee2newschapp)";
criteria.Add(Expression.Sql(hasEmployees));
}
- if(pCustomersOnly)
+ if (pCustomersOnly)
{
var hasCustomers = $"{BeWoEntityBase.PropertyName_Oid} IN (SELECT newschappoid FROM customer2newschapp)";
criteria.Add(Expression.Sql(hasCustomers));
}
- if(pResourcesOnly)
+ if (pResourcesOnly)
{
var hasResources = $"{BeWoEntityBase.PropertyName_Oid} IN (SELECT newschappoid FROM resource2newschapp)";
criteria.Add(Expression.Sql(hasResources));
}
- if(pSelectedEmployees.Any())
+ if (pSelectedEmployees.Any())
{
var detachedCriteria1 = DetachedCriteria.For()
.Add(Restrictions.In(Employee2SchedulerAppointment.PropertyName_Employee + ".Oid", pSelectedEmployees))
@@ -2795,12 +2795,12 @@ namespace BeWo.Data.Access
criteria.Add(Subqueries.PropertyIn(BeWoEntityBase.PropertyName_Oid, detachedCriteria1));
}
- if(pSelectedCustomers.Any())
+ if (pSelectedCustomers.Any())
{
var list = "";
- for(var i = 0; i < pSelectedCustomers.Count; i++)
+ for (var i = 0; i < pSelectedCustomers.Count; i++)
{
- if(i != pSelectedCustomers.Count - 1)
+ if (i != pSelectedCustomers.Count - 1)
{
list += "" + pSelectedCustomers[i] + ",";
}
@@ -2815,12 +2815,12 @@ namespace BeWo.Data.Access
criteria.Add(Expression.Sql(blah));
}
- if(pSelectedResources.Any())
+ if (pSelectedResources.Any())
{
var list = "";
- for(var i = 0; i < pSelectedResources.Count; i++)
+ for (var i = 0; i < pSelectedResources.Count; i++)
{
- if(i != pSelectedResources.Count - 1)
+ if (i != pSelectedResources.Count - 1)
{
list += "" + pSelectedResources[i] + ",";
}
@@ -2852,35 +2852,35 @@ namespace BeWo.Data.Access
ICriterion customerCriterion = null;
ICriterion resourceCriterion = null;
- if(pEmployeeOid.HasValue)
+ if (pEmployeeOid.HasValue)
{
ownAppointmentCriterion = CreateOwnAppointmentsCriteria(pEmployeeOid.Value);
}
- if(pPrivateAppointmentsOnly)
+ if (pPrivateAppointmentsOnly)
{
mainCriteria.Add(Restrictions.Eq(SchedulerAppointment.PropertyName_IsPrivate, true));
}
- if(pEmployeesOnly)
+ if (pEmployeesOnly)
{
var hasEmployees = $"{BeWoEntityBase.PropertyName_Oid} IN (SELECT newschappoid FROM employee2newschapp)";
mainCriteria.Add(Expression.Sql(hasEmployees));
}
- if(pCustomersOnly)
+ if (pCustomersOnly)
{
var hasCustomers = $"{BeWoEntityBase.PropertyName_Oid} IN (SELECT newschappoid FROM customer2newschapp)";
mainCriteria.Add(Expression.Sql(hasCustomers));
}
- if(pResourcesOnly)
+ if (pResourcesOnly)
{
var hasResources = $"{BeWoEntityBase.PropertyName_Oid} IN (SELECT newschappoid FROM resource2newschapp)";
mainCriteria.Add(Expression.Sql(hasResources));
}
- if(pSelectedEmployees.Any())
+ if (pSelectedEmployees.Any())
{
var detachedCriteria1 = DetachedCriteria.For()
.Add(Restrictions.In(Employee2SchedulerAppointment.PropertyName_Employee + ".Oid", pSelectedEmployees))
@@ -2888,7 +2888,7 @@ namespace BeWo.Data.Access
var employee2SchedCrit = Subqueries.PropertyIn(BeWoEntityBase.PropertyName_Oid, detachedCriteria1);
var originatorCrit = Restrictions.In(SchedulerAppointment.PropertyName_Originator, pSelectedEmployees);
-
+
var detachedCriteria2 = DetachedCriteria.For("e2s2")
.SetProjection(Projections.Property(BeWoEntityBase.PropertyName_Oid))
.Add(Restrictions.EqProperty("e2s2." + Employee2SchedulerAppointment.PropertyName_SchedulerAppointment, "sa.Oid"));
@@ -2900,12 +2900,12 @@ namespace BeWo.Data.Access
employeeCriterion = Restrictions.Or(employee2SchedCrit, and);
}
- if(pSelectedCustomers.Any())
+ if (pSelectedCustomers.Any())
{
var list = "";
- for(var i = 0; i < pSelectedCustomers.Count; i++)
+ for (var i = 0; i < pSelectedCustomers.Count; i++)
{
- if(i != pSelectedCustomers.Count - 1)
+ if (i != pSelectedCustomers.Count - 1)
{
list += "" + pSelectedCustomers[i] + ",";
}
@@ -2919,12 +2919,12 @@ namespace BeWo.Data.Access
customerCriterion = Expression.Sql(blah);
}
- if(pSelectedResources.Any())
+ if (pSelectedResources.Any())
{
var list = "";
- for(var i = 0; i < pSelectedResources.Count; i++)
+ for (var i = 0; i < pSelectedResources.Count; i++)
{
- if(i != pSelectedResources.Count - 1)
+ if (i != pSelectedResources.Count - 1)
{
list += "" + pSelectedResources[i] + ",";
}
@@ -2945,9 +2945,9 @@ namespace BeWo.Data.Access
resourceCriterion
};
- if(pSelectedResources.Count == 0)
+ if (pSelectedResources.Count == 0)
{
- if(!pHasRightToSeeAllEmployeeAppointments && pSelectedEmployees.Count == 0)
+ if (!pHasRightToSeeAllEmployeeAppointments && pSelectedEmployees.Count == 0)
{
mainCriteria.Add(ownAppointmentCriterion);
}
@@ -2959,7 +2959,7 @@ namespace BeWo.Data.Access
var orCriteria = CreateOrCriteria(listOfCriterias);
- if(orCriteria != null)
+ if (orCriteria != null)
{
mainCriteria.Add(orCriteria);
}
@@ -2972,18 +2972,18 @@ namespace BeWo.Data.Access
var exceptionIds = new List();
- foreach(var appointment in exceptionalRecurrenceInfos)
+ foreach (var appointment in exceptionalRecurrenceInfos)
{
var match = RecurrenceIdRegex.Match(appointment.RecurrenceInfo);
- if(match.Success)
+ if (match.Success)
{
var value = match.Value;
var actualId = value.Split("\"");
- if(actualId.Count > 1)
+ if (actualId.Count > 1)
{
var id = actualId[1];
- if(!appointments.Any(w => w.RecurrenceInfo != null && w.RecurrenceInfo.Contains(id) && w.Type == 1))
+ if (!appointments.Any(w => w.RecurrenceInfo != null && w.RecurrenceInfo.Contains(id) && w.Type == 1))
{
exceptionIds.Add(appointment.Oid.Value);
}
@@ -2995,7 +2995,7 @@ namespace BeWo.Data.Access
// Der Type wird auf "normal" gesetzt, damit nicht die ganze Serie angezeigt werden muss, die unter Umständen nichts mit den Filterkriterien zu tun hat.
var exceptionsToModify = appointments.Where(w => w.Oid.HasValue && exceptionIds.Contains(w.Oid.Value)).ToList();
- foreach(var exception in exceptionsToModify)
+ foreach (var exception in exceptionsToModify)
{
var replacingAppointment = new SchedulerAppointment
{
@@ -3034,11 +3034,11 @@ namespace BeWo.Data.Access
{
ICriterion orCriterion = null;
- if(criterionList != null && criterionList.Count > 0)
+ if (criterionList != null && criterionList.Count > 0)
{
- foreach(var c in criterionList)
+ foreach (var c in criterionList)
{
- if(c != null)
+ if (c != null)
{
orCriterion = orCriterion == null ? c : Restrictions.Or(orCriterion, c);
}
@@ -3076,12 +3076,12 @@ namespace BeWo.Data.Access
var criteria = CreateCriteria("sa");
- if(!excludeTasks)
+ if (!excludeTasks)
{
criteria.Add(Restrictions.Not(Restrictions.Eq(nameof(SchedulerAppointment.IsTask), true)));
}
- if(!pIncludeInactiveOnes)
+ if (!pIncludeInactiveOnes)
{
criteria.Add(Restrictions.Eq(BeWoEntityBase.PropertyName_IsActive, ActivationTypeId.Active));
}
@@ -3118,7 +3118,7 @@ namespace BeWo.Data.Access
public IList FindAppointmentsByRecurrenecInfo(List pRecurrenceInfos, bool pExcludeRootAppointments = false)
{
- if(pRecurrenceInfos == null || pRecurrenceInfos.Count == 0)
+ if (pRecurrenceInfos == null || pRecurrenceInfos.Count == 0)
{
return new List();
}
@@ -3128,7 +3128,7 @@ namespace BeWo.Data.Access
public IList FindAppointmentsByRecurrenceId(List pRecurrenceIds, bool pExcludeRootAppointments = false)
{
- if(pRecurrenceIds == null || pRecurrenceIds.Count == 0)
+ if (pRecurrenceIds == null || pRecurrenceIds.Count == 0)
{
return new List();
}
@@ -3138,7 +3138,7 @@ namespace BeWo.Data.Access
pRecurrenceIds.DoForEach(id => { criterionList.AddIfNotIn(Restrictions.Like(SchedulerAppointment.PropertyName_RecurrenceInfo, id, MatchMode.Anywhere)); });
var recurrenceIdOr = CreateOrCriteria(criterionList);
- if(recurrenceIdOr == null)
+ if (recurrenceIdOr == null)
{
return new List();
;
@@ -3149,9 +3149,9 @@ namespace BeWo.Data.Access
.Add(Restrictions.IsNotNull(SchedulerAppointment.PropertyName_RecurrenceInfo))
.Add(recurrenceIdOr);
- if(pExcludeRootAppointments)
+ if (pExcludeRootAppointments)
{
- c.Add(Restrictions.In(nameof(Appointment.Type), new[] {2, 3, 4}));
+ c.Add(Restrictions.In(nameof(Appointment.Type), new[] { 2, 3, 4 }));
}
return c.List();
@@ -3159,7 +3159,7 @@ namespace BeWo.Data.Access
public SchedulerAppointment FindRootAppointmentByRecurrenceId(string recurrenceId)
{
- if(Guid.TryParse(recurrenceId, out var guid))
+ if (Guid.TryParse(recurrenceId, out var guid))
{
var criteria = CreateCriteria()
.Add(Restrictions.Like(nameof(SchedulerAppointment.RecurrenceInfo), recurrenceId, MatchMode.Anywhere))
@@ -3220,17 +3220,17 @@ namespace BeWo.Data.Access
public SchedulerAppointment FindRootAppointmentForException(SchedulerAppointmentDC pAppointment)
{
- if(pAppointment?.RecurrenceInfo == null)
+ if (pAppointment?.RecurrenceInfo == null)
{
return null;
}
var match = RecurrenceIdRegex.Match(pAppointment.RecurrenceInfo);
- if(match.Success)
+ if (match.Success)
{
var value = match.Value;
var actualId = value.Split("\"");
- if(actualId.Count > 1)
+ if (actualId.Count > 1)
{
var id = actualId[1];
@@ -3241,7 +3241,7 @@ namespace BeWo.Data.Access
var resultList = criteria.List();
- if(resultList == null || resultList.Count == 0)
+ if (resultList == null || resultList.Count == 0)
{
return null;
}
@@ -3255,17 +3255,17 @@ namespace BeWo.Data.Access
public SchedulerAppointment FindRootAppointmentForException(SchedulerAppointment pAppointment)
{
- if(pAppointment?.RecurrenceInfo == null)
+ if (pAppointment?.RecurrenceInfo == null)
{
return null;
}
var match = RecurrenceIdRegex.Match(pAppointment.RecurrenceInfo);
- if(match.Success)
+ if (match.Success)
{
var value = match.Value;
var actualId = value.Split("\"");
- if(actualId.Count > 1)
+ if (actualId.Count > 1)
{
var id = actualId[1];
@@ -3276,7 +3276,7 @@ namespace BeWo.Data.Access
var resultList = criteria.List();
- if(resultList == null || resultList.Count == 0)
+ if (resultList == null || resultList.Count == 0)
{
return null;
}
@@ -3292,14 +3292,14 @@ namespace BeWo.Data.Access
{
var recurrenceIds = new List();
- foreach(var info in pRecurrenceInfos)
+ foreach (var info in pRecurrenceInfos)
{
var match = RecurrenceIdRegex.Match(info);
- if(match.Success)
+ if (match.Success)
{
var value = match.Value;
var actualId = value.Split("\"");
- if(actualId.Count > 1)
+ if (actualId.Count > 1)
{
recurrenceIds.AddIfNotIn(actualId[1]);
}
@@ -3331,13 +3331,13 @@ namespace BeWo.Data.Access
var c = CreateCriteriaIsActive()
.Add(Restrictions.Eq(nameof(SchedulerAppointment.IsTask), true));
- if(hideCompletedTasks)
+ if (hideCompletedTasks)
{
c.Add(Restrictions.IsNull(nameof(SchedulerAppointment.CompletedDate)));
}
var employeeListRelationCriteria = DetachedCriteria.For()
- .Add(Restrictions.In(Employee2SchedulerAppointment.PropertyName_Employee + ".Oid", new List {pEmployee}))
+ .Add(Restrictions.In(Employee2SchedulerAppointment.PropertyName_Employee + ".Oid", new List { pEmployee }))
.SetProjection(Projections.Property(Employee2SchedulerAppointment.PropertyName_SchedulerAppointment));
var employee2SchedCrit = Subqueries.PropertyIn(BeWoEntityBase.PropertyName_Oid, employeeListRelationCriteria);
@@ -3354,7 +3354,7 @@ namespace BeWo.Data.Access
var c = CreateCriteriaIsActive();
var employeeListRelationCriteria = DetachedCriteria.For()
- .Add(Restrictions.In(nameof(Employee2SchedulerAppointment.Employee) + ".Oid", new List {pEmployeeOid}))
+ .Add(Restrictions.In(nameof(Employee2SchedulerAppointment.Employee) + ".Oid", new List { pEmployeeOid }))
.SetProjection(Projections.Property(nameof(Employee2SchedulerAppointment.SchedulerAppointmentOid)));
var employee2SchedCrit = Subqueries.PropertyIn(nameof(BeWoEntityBase.Oid), employeeListRelationCriteria);
@@ -3418,9 +3418,9 @@ namespace BeWo.Data.Access
var c = CreateCriteria();
var list = "";
- for(var i = 0; i < pSupportConceptOids.Count; i++)
+ for (var i = 0; i < pSupportConceptOids.Count; i++)
{
- if(i != pSupportConceptOids.Count - 1)
+ if (i != pSupportConceptOids.Count - 1)
{
list += "" + pSupportConceptOids[i] + ",";
}
@@ -3567,9 +3567,9 @@ namespace BeWo.Data.Access
var result = new Dictionary>();
- foreach(var assistanceTimeEntry in assistanceTimes)
+ foreach (var assistanceTimeEntry in assistanceTimes)
{
- if(assistanceTimeEntry.Customer != null)
+ if (assistanceTimeEntry.Customer != null)
{
result.AddOrUpdateValueInDictionary(assistanceTimeEntry.Customer, assistanceTimeEntry.ArbeitszeitEintraege.ToList());
}
@@ -3624,16 +3624,16 @@ namespace BeWo.Data.Access
var members = new List();
- foreach(var team in teams)
+ foreach (var team in teams)
{
members.AddRangeIfElementsNotIn(team.MemberList);
}
- foreach(var member in members)
+ foreach (var member in members)
{
- foreach(var employee2customer in member.Employee2CustomerList)
+ foreach (var employee2customer in member.Employee2CustomerList)
{
- if(employee2customer.CustomerOid.HasValue)
+ if (employee2customer.CustomerOid.HasValue)
{
result.AddIfNotIn(employee2customer.CustomerOid.Value);
}
@@ -3735,7 +3735,7 @@ namespace BeWo.Data.Access
var appointments = new List();
- if(selectedAppointmentOid.HasValue)
+ if (selectedAppointmentOid.HasValue)
{
changedOccurrencesCriteria.Add(Restrictions.Not(Restrictions.Eq(nameof(BeWoEntityBase.Oid), selectedAppointmentOid.Value)));
deletedOccurrencesCriteria.Add(Restrictions.Not(Restrictions.Eq(nameof(BeWoEntityBase.Oid), selectedAppointmentOid.Value)));
@@ -3747,7 +3747,7 @@ namespace BeWo.Data.Access
recurringAppointments.DoForEach(appointment => recurrenceIds += $"'{appointment.GetRecurrenceId()}',");
recurrenceIds = recurrenceIds.Trim(',');
- if(recurrenceIds.Any())
+ if (recurrenceIds.Any())
{
var changedCriteria = CreateCriteriaIsActive()
.Add(Restrictions.Eq(nameof(SchedulerAppointment.Type), 3))
@@ -3761,7 +3761,7 @@ namespace BeWo.Data.Access
// Sich wiederholende Termine erzeugen und dabei die Ausnahmen und gelöschten Ausnahmen ignorieren
var interval = new TimeInterval(start, end);
- foreach(var recurringAppointment in recurringAppointments)
+ foreach (var recurringAppointment in recurringAppointments)
{
var recurrenceInfo = new RecurrenceInfo();
recurrenceInfo.FromXml(recurringAppointment.RecurrenceInfo);
@@ -3774,7 +3774,7 @@ namespace BeWo.Data.Access
pattern.Start = pattern.RecurrenceInfo.Start;
pattern.End = pattern.RecurrenceInfo.End;
- if(!Guid.TryParse(pattern.RecurrenceInfo.Id.ToString(), out var patternId))
+ if (!Guid.TryParse(pattern.RecurrenceInfo.Id.ToString(), out var patternId))
{
continue;
}
@@ -3784,9 +3784,9 @@ namespace BeWo.Data.Access
var occurrenceAppointments = occurrences.GetAppointments(interval);
- foreach(var occurrence in occurrenceAppointments)
+ foreach (var occurrence in occurrenceAppointments)
{
- if(recurringAppointment.EndDate is null || recurringAppointment.StartDate is null)
+ if (recurringAppointment.EndDate is null || recurringAppointment.StartDate is null)
{
continue;
}
@@ -3798,12 +3798,12 @@ namespace BeWo.Data.Access
{
var guid = a.GetRecurrenceIdAndIndex(out var i);
- if(guid is null)
+ if (guid is null)
{
return false;
}
- if(guid.Value.Equals(patternId) && index == i)
+ if (guid.Value.Equals(patternId) && index == i)
{
return true;
}
@@ -3813,12 +3813,12 @@ namespace BeWo.Data.Access
{
var guid = a.GetRecurrenceIdAndIndex(out var i);
- if(guid is null)
+ if (guid is null)
{
return false;
}
- if(guid.Value.Equals(patternId) && index == i)
+ if (guid.Value.Equals(patternId) && index == i)
{
return true;
}
@@ -3826,7 +3826,7 @@ namespace BeWo.Data.Access
return false;
});
- if(isDeletedOrChanged)
+ if (isDeletedOrChanged)
{
continue;
}
@@ -3834,35 +3834,35 @@ namespace BeWo.Data.Access
var duration = (recurringAppointment.EndDate.Value - recurringAppointment.StartDate.Value).TotalMinutes;
var isInIntervalTest = start.IsInInterval(end, occurrence.Start, occurrence.Start.AddMinutes(duration));
- if(!isInIntervalTest)
+ if (!isInIntervalTest)
{
continue;
}
var occurrenceAppointment = new SchedulerAppointment
{
- AllDay = occurrence.AllDay,
- CustomerList = recurringAppointment.CustomerList,
- Notice = recurringAppointment.Notice,
- EmployeeList = recurringAppointment.EmployeeList,
- EndDate = occurrence.Start.AddMinutes(duration),
+ AllDay = occurrence.AllDay,
+ CustomerList = recurringAppointment.CustomerList,
+ Notice = recurringAppointment.Notice,
+ EmployeeList = recurringAppointment.EmployeeList,
+ EndDate = occurrence.Start.AddMinutes(duration),
FormerBookingSequenceOid = recurringAppointment.FormerBookingSequenceOid,
- IsPrivate = recurringAppointment.IsPrivate,
- Location = recurringAppointment.Location,
- Originator = recurringAppointment.Originator,
- RecurrenceInfo = occurrence.RecurrenceInfo.ToXml(),
- ReminderInfo = recurringAppointment.ReminderInfo,
- ResourceList = recurringAppointment.ResourceList,
- StartDate = occurrence.Start,
- Subject = recurringAppointment.Subject ?? Empty,
- Type = recurringAppointment.Type
+ IsPrivate = recurringAppointment.IsPrivate,
+ Location = recurringAppointment.Location,
+ Originator = recurringAppointment.Originator,
+ RecurrenceInfo = occurrence.RecurrenceInfo.ToXml(),
+ ReminderInfo = recurringAppointment.ReminderInfo,
+ ResourceList = recurringAppointment.ResourceList,
+ StartDate = occurrence.Start,
+ Subject = recurringAppointment.Subject ?? Empty,
+ Type = recurringAppointment.Type
};
- if(!(recurrenceId is null) && occurrenceIndex.HasValue)
+ if (!(recurrenceId is null) && occurrenceIndex.HasValue)
{
var recId = occurrenceAppointment.GetRecurrenceId();
- if((recId?.Equals(recurrenceId.Value) ?? false) && index.Equals(occurrenceIndex.Value))
+ if ((recId?.Equals(recurrenceId.Value) ?? false) && index.Equals(occurrenceIndex.Value))
{
continue;
}
@@ -3940,14 +3940,14 @@ namespace BeWo.Data.Access
{
ApplicationUser user;
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
var employee = CreateCriteria().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult();
user = FindUserForEmployee(employee);
}
else
{
- if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
+ if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
{
user = LoggedInUserOperationContextExt.Current.User;
}
@@ -3963,19 +3963,19 @@ namespace BeWo.Data.Access
var lCriteria = CreateCriteriaIsActive();
- if(rights.Contains(UserRightType.ViewAll) || rights.Contains(UserRightType.CustomerView_View))
+ if (rights.Contains(UserRightType.ViewAll) || rights.Contains(UserRightType.CustomerView_View))
{
return lCriteria.List().ToList();
}
var result = new List();
- if(rights.Contains(UserRightType.Customer_ViewMyCustomers))
+ if (rights.Contains(UserRightType.Customer_ViewMyCustomers))
{
result = user.Employee.Employee2CustomerList.Select(employee2Customer => employee2Customer.Customer).Distinct().ToList();
}
- if(rights.Contains(UserRightType.Customer_ViewMyTeams))
+ if (rights.Contains(UserRightType.Customer_ViewMyTeams))
{
var teams = FindAllActiveTeamsOfEmployee(user.Employee.Oid.Value);
@@ -4047,12 +4047,12 @@ namespace BeWo.Data.Access
Restrictions.Ge(nameof(ServiceRecord.End), span.StartDateTime)));
lCriteria.Add(orCriteria);
-
+
var allServiceRecords = lCriteria.List().ToList();
var result = new Dictionary>();
- foreach(var serviceRecord in allServiceRecords)
+ foreach (var serviceRecord in allServiceRecords)
{
if (serviceDescriptionOids == null || serviceDescriptionOids.Count == 0 || serviceDescriptionOids.Contains(serviceRecord.ServiceDescription.Oid.Value))
{
@@ -4067,14 +4067,14 @@ namespace BeWo.Data.Access
{
ApplicationUser user;
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
var employee = CreateCriteria().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult();
user = FindUserForEmployee(employee);
}
else
{
- if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
+ if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
{
user = LoggedInUserOperationContextExt.Current.User;
}
@@ -4084,7 +4084,7 @@ namespace BeWo.Data.Access
}
}
- if(user.Employee.Oid == null)
+ if (user.Employee.Oid == null)
{
return new List();
}
@@ -4095,19 +4095,19 @@ namespace BeWo.Data.Access
var lCriteria = CreateCriteriaIsActive();
- if(rights.Contains(UserRightType.ViewAll) || rights.Contains(UserRightType.EmployeeView_View))
+ if (rights.Contains(UserRightType.ViewAll) || rights.Contains(UserRightType.EmployeeView_View))
{
return lCriteria.List().ToList();
}
var result = new List();
- if(rights.Contains(UserRightType.Employee_AllowViewOwnEmployees))
+ if (rights.Contains(UserRightType.Employee_AllowViewOwnEmployees))
{
result.AddIfNotIn(user.Employee);
}
- if(rights.Contains(UserRightType.Employee_AllowViewOwnTeam))
+ if (rights.Contains(UserRightType.Employee_AllowViewOwnTeam))
{
var leadingTeams = user.Employee.LeadingTeams;
leadingTeams.DoForEach(team =>
@@ -4192,14 +4192,14 @@ namespace BeWo.Data.Access
ApplicationUser user;
var result = new List();
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
var employee = CreateCriteria().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult();
user = FindUserForEmployee(employee);
}
else
{
- if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
+ if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
{
user = LoggedInUserOperationContextExt.Current.User;
}
@@ -4209,7 +4209,7 @@ namespace BeWo.Data.Access
}
}
- if(user.Employee.Oid == null)
+ if (user.Employee.Oid == null)
{
return result;
}
@@ -4218,12 +4218,12 @@ namespace BeWo.Data.Access
user.UserGroups.DoForEach(s => s.Rights.DoForEach(right => rights.AddIfNotIn(right.RightType)));
- if(rights.Contains(UserRightType.ViewAll) || rights.Contains(UserRightType.TeamView_ViewAll))
+ if (rights.Contains(UserRightType.ViewAll) || rights.Contains(UserRightType.TeamView_ViewAll))
{
return CreateCriteriaIsActive().List();
}
- if(rights.Contains(UserRightType.TeamView_ViewMyTeams))
+ if (rights.Contains(UserRightType.TeamView_ViewMyTeams))
{
result.AddRangeIfElementsNotIn(FindLeadingTeams(user.Employee.Oid.Value));
result.AddRangeIfElementsNotIn(FindTeamsOfEmployee(user.Employee.Oid.Value));
@@ -4264,7 +4264,7 @@ namespace BeWo.Data.Access
public SchedulerAppointment FindIndexZeroChangedOccurrence(Guid? recurrenceId)
{
- if(recurrenceId == null)
+ if (recurrenceId == null)
{
return null;
}
@@ -4295,23 +4295,23 @@ namespace BeWo.Data.Access
var stringBuilder = new StringBuilder();
- foreach(var resourceName2Intervals in info)
+ foreach (var resourceName2Intervals in info)
{
stringBuilder.AppendLine($"Die Ressource \"{resourceName2Intervals.Key}\" ist im ausgewählten Zeitraum {start:dd.MM.yyyy HH:mm} bis {end:dd.MM.yyyy HH:mm} bereits gebucht:");
- if(!resourceName2Intervals.Value.All(IsNullOrWhiteSpace))
+ if (!resourceName2Intervals.Value.All(IsNullOrWhiteSpace))
{
stringBuilder.Append("\r\n\r\n");
}
- foreach(var interval in resourceName2Intervals.Value)
+ foreach (var interval in resourceName2Intervals.Value)
{
stringBuilder.AppendLine($"{interval}");
}
}
- if(isOverlapping)
+ if (isOverlapping)
{
- if(info.Any())
+ if (info.Any())
{
stringBuilder.Append("\n\n");
}
@@ -4319,7 +4319,7 @@ namespace BeWo.Data.Access
stringBuilder.Append("Dieser Termin überschneidet sich mit einem anderen bereits existierenden Termin.");
}
- if(info.Any() || isOverlapping)
+ if (info.Any() || isOverlapping)
{
stringBuilder.Append("\n\nMöchten Sie trotzdem speichern?");
}
@@ -4338,14 +4338,14 @@ namespace BeWo.Data.Access
{
ApplicationUser user;
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
var employee = CreateCriteria().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult();
user = FindUserForEmployee(employee);
}
else
{
- if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
+ if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
{
user = LoggedInUserOperationContextExt.Current.User;
}
@@ -4369,7 +4369,7 @@ namespace BeWo.Data.Access
});
// Der ApplicationUser darf alles Sehen oder alle Hilfepläne
- if(user.CheckForAtLeastOneRight(new List {UserRightType.ViewAll, UserRightType.SupportConcept_ViewAllSupportConcepts}) && supportConceptFilter == CustomerFilterEnum.All)
+ if (user.CheckForAtLeastOneRight(new List { UserRightType.ViewAll, UserRightType.SupportConcept_ViewAllSupportConcepts }) && supportConceptFilter == CustomerFilterEnum.All)
{
return lCriteria.List().ToList();
}
@@ -4377,17 +4377,17 @@ namespace BeWo.Data.Access
var customerOids = user.Employee.Employee2CustomerList.Where(employee2Customer => employee2Customer.Customer.Oid.HasValue).Select(employee2Customer => employee2Customer.Customer.Oid.Value).Distinct().ToList();
// Wählt man "Nur Klienten meiner Teams anzeigen", sollen nicht die Hilfepläne der eigenen Klienten angezeigt werden.
- if(supportConceptFilter == CustomerFilterEnum.TeamCustomer)
+ if (supportConceptFilter == CustomerFilterEnum.TeamCustomer)
{
customerOids.Clear();
}
// Der ApplicationUser darf die Hilfepläne seiner Teams sehen
- if(user.CheckForRight(UserRightType.SupportConcept_ViewMyTeams) && (supportConceptFilter == CustomerFilterEnum.TeamCustomer || supportConceptFilter == CustomerFilterEnum.All))
+ if (user.CheckForRight(UserRightType.SupportConcept_ViewMyTeams) && (supportConceptFilter == CustomerFilterEnum.TeamCustomer || supportConceptFilter == CustomerFilterEnum.All))
{
- foreach(var coid in customerOids)
+ foreach (var coid in customerOids)
{
- if(!teamCustomerOids.Contains(coid))
+ if (!teamCustomerOids.Contains(coid))
{
teamCustomerOids.Add(coid);
}
@@ -4420,14 +4420,14 @@ namespace BeWo.Data.Access
var result = false;
- if(serviceRecordOids.Any() && signatures.Any())
+ if (serviceRecordOids.Any() && signatures.Any())
{
var blubb = new List();
signatures.DoForEach(s =>
{
s.ServiceRecords.DoForEach(sr =>
{
- if(sr.Oid.HasValue)
+ if (sr.Oid.HasValue)
{
blubb.AddIfNotIn(sr.Oid.Value);
}
@@ -4517,7 +4517,7 @@ namespace BeWo.Data.Access
confirmationReceiptSignatures.DoForEach(crs => crs.ServiceRecords.DoForEach(sr =>
{
- if(sr.Oid.HasValue)
+ if (sr.Oid.HasValue)
{
result.AddIfNotIn(sr.Oid.Value);
}
@@ -4542,7 +4542,7 @@ namespace BeWo.Data.Access
confirmationReceiptSignatures.DoForEach(crs => crs.ServiceRecords.DoForEach(sr =>
{
- if(sr.Oid.HasValue)
+ if (sr.Oid.HasValue)
{
result.AddIfNotIn(sr.Oid.Value);
}
@@ -4580,7 +4580,7 @@ namespace BeWo.Data.Access
{
ApplicationUser user;
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
var employee = CreateCriteria().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult();
user = FindUserForEmployee(employee);
@@ -4591,15 +4591,15 @@ namespace BeWo.Data.Access
}
var lCriteria = CreateCriteriaIsActive();
-
+
// Der ApplicationUser darf alles sehen
var viewAllRights = new List { UserRightType.CustomerView_View };
- if(!ignoreViewAllRight)
+ if (!ignoreViewAllRight)
{
viewAllRights.Add(UserRightType.ViewAll);
}
- if(user.CheckForAtLeastOneRight(viewAllRights) && customerFilter == CustomerFilterEnum.All)
+ if (user.CheckForAtLeastOneRight(viewAllRights) && customerFilter == CustomerFilterEnum.All)
{
return lCriteria.List().ToList();
}
@@ -4607,7 +4607,7 @@ 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 die Klienten seiner Teams sehen
- if(user.CheckForRight(UserRightType.Customer_ViewMyTeams) && (customerFilter == CustomerFilterEnum.TeamCustomer || customerFilter == CustomerFilterEnum.All) && (user.Employee?.Oid.HasValue ?? false))
+ if (user.CheckForRight(UserRightType.Customer_ViewMyTeams) && (customerFilter == CustomerFilterEnum.TeamCustomer || customerFilter == CustomerFilterEnum.All) && (user.Employee?.Oid.HasValue ?? false))
{
var teamCustomerOids = new List();
@@ -4615,7 +4615,7 @@ namespace BeWo.Data.Access
teams.DoForEach(team =>
{
- if(team.Oid is null)
+ if (team.Oid is null)
{
return;
}
@@ -4654,9 +4654,9 @@ namespace BeWo.Data.Access
}
oidList += String.Format("{0}", oid);
}
-
+
return GetSqlResult("SELECT oid,personoid,customeroid,istfamilie FROM customer2person where personoid in (" + oidList + ")");
-
+
}
public List FindActiveAppointmentsForCustomers(List customerOids, DateTime startDate, DateTime endDate)
@@ -4685,13 +4685,13 @@ namespace BeWo.Data.Access
employeeOid,
start, end,
new List(),
- customerOids,
- new List(),
- false,
- true,
- false,
- false,
- false,
+ customerOids,
+ new List(),
+ false,
+ true,
+ false,
+ false,
+ false,
false);
return appointments.ToList();
@@ -4702,12 +4702,12 @@ namespace BeWo.Data.Access
var c = CreateCriteriaIsActive().Add(Restrictions.Eq(nameof(ServiceRecord.CustomerOid), customerOid));
c.Add(Restrictions.In(nameof(ServiceRecord.EmployeeOid), employeeOids));
-
+
var betweenCriterion = CreateBetweenDateTimesCriterion(start, end, nameof(ServiceRecord.Start), nameof(ServiceRecord.End));
c.Add(betweenCriterion);
- if(onlyBillableCategories)
+ if (onlyBillableCategories)
{
c.CreateAlias(ServiceRecord.PropertyName_ServiceDescription, "sd", JoinType.InnerJoin)
.CreateAlias("sd." + ServiceDescription.PropertyName_ServiceCategory, "sc", JoinType.InnerJoin)
@@ -4771,7 +4771,7 @@ namespace BeWo.Data.Access
serviceRecords.DoForEach(sr =>
{
- if(sr?.Customer != null)
+ if (sr?.Customer != null)
{
result.AddIfNotIn(sr.Customer);
}
@@ -4788,7 +4788,7 @@ namespace BeWo.Data.Access
serviceRecords.DoForEach(sr =>
{
- if(sr?.Customer != null)
+ if (sr?.Customer != null)
{
result.AddIfNotIn(sr.Customer);
}
@@ -4802,11 +4802,11 @@ namespace BeWo.Data.Access
var lCriteria = CreateCriteria()
.Add(Restrictions.In(nameof(ServiceRecord.EmployeeOid), employeeOids));
- if(span != null)
+ if (span != null)
{
lCriteria.Add(Restrictions.Between(ServiceRecord.PropertyName_Start, span.StartDateTime, span.EndDateTime));
}
-
+
var result = lCriteria.List().ToList();
return result;
@@ -4869,7 +4869,7 @@ namespace BeWo.Data.Access
result.AddRangeIfElementsNotIn(apptmts);
}
-
+
/*
Normal = 0,
Pattern = 1,
@@ -4880,7 +4880,7 @@ namespace BeWo.Data.Access
var changedOccurrences = result.Where(a => a.Type == 3).Select(s => BS.Shared.Core.Utils.GetOccurrenceId(s.RecurrenceInfo)).ToList();
var deletedOccurrences = result.Where(a => a.Type == 4).Select(s => BS.Shared.Core.Utils.GetOccurrenceId(s.RecurrenceInfo)).ToList();
-
+
var kek = IntervalFinderHelper.GetRecurrencesForIntervalFinder(result, intervalStart, intervalEnd, changedOccurrences, deletedOccurrences, skipWeekends);
result.AddRange(kek);
@@ -4889,7 +4889,7 @@ namespace BeWo.Data.Access
if (intervals.Count > 0)
{
- if(result.Count > 0)
+ if (result.Count > 0)
{
foreach (var interval in intervals)
{
@@ -4923,9 +4923,9 @@ namespace BeWo.Data.Access
var criteria = CreateCriteriaIsActiveWithAlias("sa")
.Add(Restrictions.Not(Restrictions.Eq(nameof(SchedulerAppointment.IsTask), true)));
- if(intervals.Count > 0)
+ if (intervals.Count > 0)
{
- if(intervals.Count > 1)
+ if (intervals.Count > 1)
{
var criterionList = new List();
@@ -5030,12 +5030,12 @@ namespace BeWo.Data.Access
private static string GetGeneratedSql(ICriteria criteria)
{
- var criteriaImpl = (CriteriaImpl) criteria;
- var sessionImpl = (SessionImpl) criteriaImpl.Session;
- var factory = (SessionFactoryImpl) sessionImpl.SessionFactory;
+ var criteriaImpl = (CriteriaImpl)criteria;
+ var sessionImpl = (SessionImpl)criteriaImpl.Session;
+ var factory = (SessionFactoryImpl)sessionImpl.SessionFactory;
var implementors = factory.GetImplementors(criteriaImpl.EntityOrClassName);
- var loader = new CriteriaLoader((IOuterJoinLoadable) factory.GetEntityPersister(implementors[0]), factory, criteriaImpl, implementors[0], sessionImpl.EnabledFilters);
-
+ var loader = new CriteriaLoader((IOuterJoinLoadable)factory.GetEntityPersister(implementors[0]), factory, criteriaImpl, implementors[0], sessionImpl.EnabledFilters);
+
return loader.SqlString.ToString();
}
@@ -5085,7 +5085,7 @@ namespace BeWo.Data.Access
{
ApplicationUser user;
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
var employee = CreateCriteria().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult();
user = FindUserForEmployee(employee);
@@ -5094,13 +5094,13 @@ namespace BeWo.Data.Access
{
user = LoggedInUserOperationContextExt.Current?.User != null ? LoggedInUserOperationContextExt.Current.User : SessionFacade.LoggedInUser;
}
-
+
var criteria = CreateCriteria();
// Der ApplicationUser darf alles sehen
var viewAllRights = new List { UserRightType.CustomerView_View };
- if(user.CheckForAtLeastOneRight(viewAllRights) && customerFilter == CustomerFilterEnum.All)
+ if (user.CheckForAtLeastOneRight(viewAllRights) && customerFilter == CustomerFilterEnum.All)
{
return criteria.List().ToList();
}
@@ -5110,13 +5110,13 @@ namespace BeWo.Data.Access
var customerOids = new List();
// Der ApplicationUser darf die Klienten seiner Teams sehen
- if(user.CheckForRight(UserRightType.Customer_ViewMyTeams) && (customerFilter == CustomerFilterEnum.TeamCustomer || customerFilter == CustomerFilterEnum.All) && (user.Employee?.Oid.HasValue ?? false))
+ if (user.CheckForRight(UserRightType.Customer_ViewMyTeams) && (customerFilter == CustomerFilterEnum.TeamCustomer || customerFilter == CustomerFilterEnum.All) && (user.Employee?.Oid.HasValue ?? false))
{
var teams = FindAllActiveTeamsOfEmployee(user.Employee.Oid.Value);
teams.DoForEach(team =>
{
- if(team.Oid is null)
+ if (team.Oid is null)
{
return;
}
@@ -5128,7 +5128,7 @@ namespace BeWo.Data.Access
}
// Der ApplicationUser darf seine eigenen Klienten sehen.
- if(user.CheckForRight(UserRightType.Customer_ViewMyCustomers) && (customerFilter == CustomerFilterEnum.All || customerFilter == CustomerFilterEnum.MyCustomer))
+ if (user.CheckForRight(UserRightType.Customer_ViewMyCustomers) && (customerFilter == CustomerFilterEnum.All || customerFilter == CustomerFilterEnum.MyCustomer))
{
customerOids.AddRangeIfElementsNotIn(ownCustomerOids);
}
@@ -5142,14 +5142,14 @@ namespace BeWo.Data.Access
{
ApplicationUser user;
- if(employeeOid.HasValue)
+ if (employeeOid.HasValue)
{
var employee = CreateCriteria().Add(Restrictions.Eq(nameof(Employee.Oid), employeeOid)).UniqueResult();
user = FindUserForEmployee(employee);
}
else
{
- if(LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
+ if (LoggedInUserOperationContextExt.Current != null && LoggedInUserOperationContextExt.Current.User != null)
{
user = LoggedInUserOperationContextExt.Current.User;
}
@@ -5159,7 +5159,7 @@ namespace BeWo.Data.Access
}
}
- if(user.Employee.Oid == null)
+ if (user.Employee.Oid == null)
{
return new List();
}
@@ -5170,19 +5170,19 @@ namespace BeWo.Data.Access
var criteria = CreateCriteria();
- if(rights.Contains(UserRightType.EmployeeView_View))
+ if (rights.Contains(UserRightType.EmployeeView_View))
{
return criteria.List().ToList();
}
var result = new List();
- if(rights.Contains(UserRightType.Employee_AllowViewOwnEmployees))
+ if (rights.Contains(UserRightType.Employee_AllowViewOwnEmployees))
{
result.AddIfNotIn(user.Employee);
}
- if(rights.Contains(UserRightType.Employee_AllowViewOwnTeam))
+ if (rights.Contains(UserRightType.Employee_AllowViewOwnTeam))
{
var leadingTeams = user.Employee.LeadingTeams;
@@ -5281,9 +5281,9 @@ namespace BeWo.Data.Access
var c2 = CreateCriteriaIsActive()
//.Add(Restrictions.Not(Restrictions.Eq(nameof(SchedulerAppointment.Type), 4)))
.Add(betweenCriterion);
-
- if(!(selectedAppointmentOid is null))
+
+ if (!(selectedAppointmentOid is null))
{
c2.Add(Restrictions.Not(Restrictions.Eq(nameof(BeWoEntityBase.Oid), selectedAppointmentOid)));
}
@@ -5295,14 +5295,14 @@ namespace BeWo.Data.Access
var isBeingUpdatedToNormalAppointment = false;
Guid? recurrenceIdToIgnore = null;
- if(selectedAppointmentOid.HasValue)
+ if (selectedAppointmentOid.HasValue)
{
// Das Pattern wird geladen, bzw. mit der Ausnahme mit Index 0 verglichen
// Wird die Serie in einen Einzeltermin geändert und es existiert eine Ausnahme mit Index 0, sollte die Ausnahme behalten werden und nicht der Root-Termin
var original = DAOFactory.GenericDAO.LoadByID(selectedAppointmentOid.Value);
var originalRecurrenceId = original?.GetRecurrenceId();
- if(!(originalRecurrenceId is null) && IsNullOrWhiteSpace(recurrenceId?.ToString()))
+ if (!(originalRecurrenceId is null) && IsNullOrWhiteSpace(recurrenceId?.ToString()))
{
isBeingUpdatedToNormalAppointment = true;
recurrenceIdToIgnore = originalRecurrenceId;
@@ -5311,7 +5311,7 @@ namespace BeWo.Data.Access
var appointments = tempAppointments.Where(appointment =>
{
- if(appointment.RecurrenceInfo is null)
+ if (appointment.RecurrenceInfo is null)
{
return true;
}
@@ -5328,7 +5328,7 @@ namespace BeWo.Data.Access
var recurringAppointments = recurringAppointmentsCriteria.List().ToList();
- if(isBeingUpdatedToNormalAppointment)
+ if (isBeingUpdatedToNormalAppointment)
{
recurringAppointments = recurringAppointments.Where(root => FilterRootAppointment(root, recurrenceIdToIgnore)).ToList();
@@ -5337,7 +5337,7 @@ namespace BeWo.Data.Access
recurringAppointments = recurringAppointments.Where(s => s.ResourceList.Any(r => r.Oid.HasValue && resourceOids.Contains(r.Oid.Value))).ToList();
- foreach(var appointment in recurringAppointments)
+ foreach (var appointment in recurringAppointments)
{
var recurrenceInfo = new RecurrenceInfo();
recurrenceInfo.FromXml(appointment.RecurrenceInfo);
@@ -5346,7 +5346,7 @@ namespace BeWo.Data.Access
var pattern = StaticAppointmentFactory.CreateAppointment(AppointmentType.Pattern);
- if(pattern is null)
+ if (pattern is null)
{
continue;
}
@@ -5361,9 +5361,9 @@ namespace BeWo.Data.Access
var occurrences = occurrenceCalculator.CalcOccurrences(interval, pattern);
- foreach(var occurrence in occurrences.GetAppointments(interval))
+ foreach (var occurrence in occurrences.GetAppointments(interval))
{
- if(appointment.EndDate is null || appointment.StartDate is null)
+ if (appointment.EndDate is null || appointment.StartDate is null)
{
continue;
}
@@ -5380,7 +5380,7 @@ namespace BeWo.Data.Access
// und darf nicht in der Liste der geänderten Serientermine oder der Liste der gelöschten Serientermine sein.
var isInIntervalTest = start.IsInInterval(end, occurrence.Start, occurrence.Start.AddMinutes(duration));
- if(!isInIntervalTest ||
+ if (!isInIntervalTest ||
changedOccurrences.Any(changedOccurence => changedOccurence.PatternId.Equals(patternId) && changedOccurence.Index == index) ||
deletedOccurrences.Any(deletedOccurence => deletedOccurence.PatternId.Equals(patternId) && deletedOccurence.Index == index) ||
index == occurrenceIndex && guidParsingSuccessful && recurrenceId != null && recurrenceId.Equals(occurrenceGuid))
@@ -5392,7 +5392,7 @@ namespace BeWo.Data.Access
var relatedAppointments = FindAppointmentsByRecurrenceId(new List { recurrenceInfo.Id.ToString() }, true);
var relatedAppointmentsInInterval = relatedAppointments.Where(a =>
{
- if(a.StartDate == null || a.EndDate == null)
+ if (a.StartDate == null || a.EndDate == null)
{
return false;
}
@@ -5409,23 +5409,23 @@ namespace BeWo.Data.Access
// Prüfen, ob es sich bei dem Termin für den Überschneidungen gesucht werden, um zu unterscheiden, ob ein Serientermin in einen normalen geändert wird.
var root = FindRootAppointmentByRecurrenceId(recurrenceInfo.Id.ToString());
- if(root.Oid != null && selectedAppointmentOid != null && root.Oid == selectedAppointmentOid && root.RecurrenceInfo != null && IsNullOrWhiteSpace(recurrenceId?.ToString()))
+ if (root.Oid != null && selectedAppointmentOid != null && root.Oid == selectedAppointmentOid && root.RecurrenceInfo != null && IsNullOrWhiteSpace(recurrenceId?.ToString()))
{
hasToStop = true;
}
// Indices und Ids der RecurrenceInfo vergleichen. Stimmen sie überein, dann wird das generiert Serienelement ignoriert.
- if(occurrence.RecurrenceInfo?.Id != null && !hasToStop)
+ if (occurrence.RecurrenceInfo?.Id != null && !hasToStop)
{
- if(Guid.TryParse(occurrence.RecurrenceInfo.Id.ToString(), out var guid))
+ if (Guid.TryParse(occurrence.RecurrenceInfo.Id.ToString(), out var guid))
{
- foreach(var relatedAppointment in relatedAppointmentsInInterval)
+ foreach (var relatedAppointment in relatedAppointmentsInInterval)
{
var relatedAppointmentRecurrenceId = relatedAppointment.GetRecurrenceIdAndIndex(out var relatedAppointmentRecurrenceIndex);
- if(relatedAppointmentRecurrenceId != null)
+ if (relatedAppointmentRecurrenceId != null)
{
- if(guid.Equals(relatedAppointmentRecurrenceId) && relatedAppointmentRecurrenceIndex.Equals(occurrence.RecurrenceIndex))
+ if (guid.Equals(relatedAppointmentRecurrenceId) && relatedAppointmentRecurrenceIndex.Equals(occurrence.RecurrenceIndex))
{
hasToStop = true;
break;
@@ -5435,28 +5435,28 @@ namespace BeWo.Data.Access
}
}
- if(hasToStop)
+ if (hasToStop)
{
continue;
}
var recurringAppointment = new SchedulerAppointment
{
- AllDay = occurrence.AllDay,
- CustomerList = appointment.CustomerList,
- Notice = appointment.Notice,
- EmployeeList = appointment.EmployeeList,
- EndDate = occurrence.Start.AddMinutes(duration),
+ AllDay = occurrence.AllDay,
+ CustomerList = appointment.CustomerList,
+ Notice = appointment.Notice,
+ EmployeeList = appointment.EmployeeList,
+ EndDate = occurrence.Start.AddMinutes(duration),
FormerBookingSequenceOid = appointment.FormerBookingSequenceOid,
- IsPrivate = appointment.IsPrivate,
- Location = appointment.Location,
- Originator = appointment.Originator,
- RecurrenceInfo = occurrence.RecurrenceInfo.ToXml(),
- ReminderInfo = appointment.ReminderInfo,
- ResourceList = appointment.ResourceList,
- StartDate = occurrence.Start,
- Subject = appointment.Subject ?? "",
- Type = appointment.Type
+ IsPrivate = appointment.IsPrivate,
+ Location = appointment.Location,
+ Originator = appointment.Originator,
+ RecurrenceInfo = occurrence.RecurrenceInfo.ToXml(),
+ ReminderInfo = appointment.ReminderInfo,
+ ResourceList = appointment.ResourceList,
+ StartDate = occurrence.Start,
+ Subject = appointment.Subject ?? "",
+ Type = appointment.Type
};
appointments.AddIfNotIn(recurringAppointment);
@@ -5470,7 +5470,7 @@ namespace BeWo.Data.Access
{
var recId = root.GetRecurrenceId();
- if(recId is null || recurrenceIdToIgnore is null)
+ if (recId is null || recurrenceIdToIgnore is null)
{
return true;
}
@@ -5500,7 +5500,7 @@ namespace BeWo.Data.Access
var result = new Dictionary>();
- if(user is null)
+ if (user is null)
{
return result;
}
@@ -5512,17 +5512,17 @@ namespace BeWo.Data.Access
var dictionary = new Dictionary>();
- foreach(var appointment in appointments)
+ foreach (var appointment in appointments)
{
- foreach(var resource in appointment.ResourceList)
+ foreach (var resource in appointment.ResourceList)
{
dictionary.AddOrUpdateValueInDictionary(resource, appointment);
}
}
- foreach(var resource2Appointments in dictionary)
+ foreach (var resource2Appointments in dictionary)
{
- foreach(var appointment in resource2Appointments.Value)
+ foreach (var appointment in resource2Appointments.Value)
{
var originator = appointment.Originator;
var employee2Appointments = appointment.EmployeeList;
@@ -5530,15 +5530,15 @@ namespace BeWo.Data.Access
var isOwnAppointment = (originator?.Equals(loggedInEmployee) ?? false) || employee2Appointments.ToList().Any(e2a => e2a.Employee.Equals(loggedInEmployee));
// Wenn isOwnAppointment true ist, darf der Benutzer die Uhrzeiten und die Mitarbeiter sehen. Ansonsten müssen die Rechte geprüft werden.
- if(isOwnAppointment || hasRightToViewEmployeeAppointments) // Es werden Zeit und Mitarbeiter angezeigt
+ if (isOwnAppointment || hasRightToViewEmployeeAppointments) // Es werden Zeit und Mitarbeiter angezeigt
{
result.AddOrUpdateValueInDictionary(resource2Appointments.Key.Name, $"{CreateDateTimeInfoFromAppointment(appointment.StartDate, appointment.EndDate, appointment.AllDay)} von {originator}");
}
- else if(hasRightToViewResourceAppointments && !hasRightToViewEmployeeAppointments) // Nur die Uhrzeit anzeigen
+ else if (hasRightToViewResourceAppointments && !hasRightToViewEmployeeAppointments) // Nur die Uhrzeit anzeigen
{
result.AddOrUpdateValueInDictionary(resource2Appointments.Key.Name, $"{CreateDateTimeInfoFromAppointment(appointment.StartDate, appointment.EndDate, appointment.AllDay)}");
}
- else if(!hasRightToViewEmployeeAppointments) // Es werden weder Zeit noch Mitarbeiter angezeigt
+ else if (!hasRightToViewEmployeeAppointments) // Es werden weder Zeit noch Mitarbeiter angezeigt
{
result.AddOrUpdateValueInDictionary(resource2Appointments.Key.Name, string.Empty);
}
@@ -5550,14 +5550,14 @@ namespace BeWo.Data.Access
private static string CreateDateTimeInfoFromAppointment(DateTime? start, DateTime? end, bool allDay)
{
- if(start.HasValue && end.HasValue && allDay == false)
+ if (start.HasValue && end.HasValue && allDay == false)
{
return start.Value.Date == end.Value.Date ?
$"{start.Value.ToShortTimeString()} - {end.Value.ToShortTimeString()} " :
$"{start.Value:dd.MM.yyyy HH:mm} - {end.Value:dd.MM.yyyy HH:mm} ";
}
- if(allDay && start.HasValue && end.HasValue)
+ if (allDay && start.HasValue && end.HasValue)
{
return start.Value.Date == end.Value.Date ? " " : $"{start.Value.ToShortDateString()} - {end.Value.ToShortDateString()} ";
}
@@ -5601,7 +5601,7 @@ namespace BeWo.Data.Access
return criteira.List().FirstOrDefault();
}
- catch(Exception e)
+ catch (Exception e)
{
return null;
}
@@ -5618,9 +5618,9 @@ namespace BeWo.Data.Access
var result = new Dictionary();
- foreach(var entry in historyEntries)
+ foreach (var entry in historyEntries)
{
- if(entry.ServiceRecordOid.HasValue && result.ContainsKey(entry.ServiceRecordOid.Value) || entry.ServiceRecordOid is null)
+ if (entry.ServiceRecordOid.HasValue && result.ContainsKey(entry.ServiceRecordOid.Value) || entry.ServiceRecordOid is null)
{
continue;
}
@@ -5634,11 +5634,11 @@ namespace BeWo.Data.Access
// ToDo: Veraltet und wird nicht mehr benutzt!
public List FindFormerlyLinkedServiceRecords(long confirmationReceiptSignatureOid, long customerOid, long supportConceptOid, long costBearer2SupportConceptOid, string timeSpanString)
{
- if(timeSpanString?.Length != 21)
+ if (timeSpanString?.Length != 21)
{
return new List();
}
-
+
var d1 = timeSpanString.Substring(0, 2);
var m1 = timeSpanString.Substring(3, 2);
var d2 = timeSpanString.Substring(11, 2);
@@ -5701,16 +5701,16 @@ namespace BeWo.Data.Access
var row = objectsList.FirstOrDefault();
- if(row is null || row.Length != 5)
+ if (row is null || row.Length != 5)
{
return null;
}
var customerConfirmationReceiptSignatureState = (SignatureStateType)row[0];
var employeeConfirmationReceiptSignatureState = (SignatureStateType)row[1];
- var serviceRecordSignatureStateType = (SignatureStateType)row[2];
- var customerConfirmationReceiptSignatureOid = (long?)row[3];
- var employeeConfirmationReceiptSignatureOid = (long?)row[4];
+ var serviceRecordSignatureStateType = (SignatureStateType)row[2];
+ var customerConfirmationReceiptSignatureOid = (long?)row[3];
+ var employeeConfirmationReceiptSignatureOid = (long?)row[4];
return new SignatureStateInfoFromServiceRecordHistoryEntry(customerConfirmationReceiptSignatureState, employeeConfirmationReceiptSignatureState, serviceRecordSignatureStateType, customerConfirmationReceiptSignatureOid, employeeConfirmationReceiptSignatureOid);
}
@@ -5719,7 +5719,7 @@ namespace BeWo.Data.Access
{
var result = new Dictionary();
- if(serviceRecordOids is null || serviceRecordOids.Count == 0)
+ if (serviceRecordOids is null || serviceRecordOids.Count == 0)
{
return result;
}
@@ -5734,16 +5734,16 @@ namespace BeWo.Data.Access
var objectsList = sqlQuery.List