diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 1d4d74ff2..6274c334d 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -16,7 +16,7 @@
true
Internet
true
- true
+ false
8CA4066C36C87B745E4016FDA715A6DB16FCFFA9
@@ -39,16 +39,16 @@
false
true
false
- https://app.ownsoft.de/test/
+ https://app.ownsoft.de/
de-DE
BeWoPlaner
ownSoft GmbH
- 2.0.1.259
+ 2.0.1.260
true
publish.htm
false
true
- 260
+ 261
2.0.1.%2a
false
true
diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user
index c3f5d6713..060d57d23 100644
--- a/BeWo/BeWo.csproj.user
+++ b/BeWo/BeWo.csproj.user
@@ -2,7 +2,7 @@
D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\
- https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/
+ https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/
https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 4b8ccf552..2b85a65a3 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -1081,6 +1081,12 @@ namespace BeWo
showStackTrace = false;
showSupportForm = false;
}
+ else if (!String.IsNullOrEmpty(e.Message) && e.Message.IndexOf("Row was updated or deleted by another transaction") >= 0)
+ {
+ displayMessage = "Der Datensatz wurde in der Zwischenzeit von " + BS.Shared.Translation.Translator.Translate("einem anderen Benutzer") + " geändert. Ihre Änderungen konnten leider NICHT gespeichert werden. Das Problem tritt auf, wenn mehrere " + BS.Shared.Translation.Translator.Translate("BenutzerPlural") + " gleichzeitig den gleichen Datensatz bearbeiten.\n\nSie müssen den Datensatz schließen und erneut öffnen, um die Änderungen vornehmen zu können.";
+ showStackTrace = false;
+ showSupportForm = false;
+ }
//else if (stacktrace.IndexOf("GenericADOException") >= 0 && stacktrace.IndexOf("could not insert") >= 0 && stacktrace.IndexOf("Data too long for column") >= 0)
//{
// displayMessage = "Eine Eingabe enthält zu viele Zeichen.";
diff --git a/BeWo/View/Detail/Report/QueryView.xaml.cs b/BeWo/View/Detail/Report/QueryView.xaml.cs
index d749dbdde..7ab606612 100644
--- a/BeWo/View/Detail/Report/QueryView.xaml.cs
+++ b/BeWo/View/Detail/Report/QueryView.xaml.cs
@@ -545,6 +545,7 @@ namespace BeWo.View.Detail.Report
param.Name = item.Name;
param.ParamType = item.ParamType;
+ param.DefaultValue = item.DefaultValue;
switch (item.ParamType)
{
diff --git a/Data/Entities/Parameter.cs b/Data/Entities/Parameter.cs
index 7e40e7c26..451508dd0 100644
--- a/Data/Entities/Parameter.cs
+++ b/Data/Entities/Parameter.cs
@@ -70,5 +70,7 @@ namespace BeWo.Data.Entities
}
}
}
+
+ public virtual string DefaultValue { get; set; }
}
}
\ No newline at end of file
diff --git a/Data/Mappings/Parameter.hbm.xml b/Data/Mappings/Parameter.hbm.xml
index de6659b39..dc15649ab 100644
--- a/Data/Mappings/Parameter.hbm.xml
+++ b/Data/Mappings/Parameter.hbm.xml
@@ -15,5 +15,6 @@
+
\ No newline at end of file
diff --git a/Model/Changes_2025_02_25 Parameter Defaultvalue.txt b/Model/Changes_2025_02_25 Parameter Defaultvalue.txt
new file mode 100644
index 000000000..34ffd1ce9
--- /dev/null
+++ b/Model/Changes_2025_02_25 Parameter Defaultvalue.txt
@@ -0,0 +1,3 @@
+ALTER TABLE `Parameter`
+ADD COLUMN `DefaultValue` VARCHAR(256) NULL DEFAULT NULL;
+
diff --git a/Queries/Einträge ohne Monatsunterschrift der Hauptbetreuung.txt b/Queries/Einträge ohne Monatsunterschrift der Hauptbetreuung.txt
new file mode 100644
index 000000000..8c373e71a
--- /dev/null
+++ b/Queries/Einträge ohne Monatsunterschrift der Hauptbetreuung.txt
@@ -0,0 +1,34 @@
+SELECT
+p.LastName as 'Nachname',
+p.Firstname as 'Vorname',
+c2s.ApprovedStartDate as 'Bewilligt von',
+c2s.ApprovedEndDate as 'Bewilligt bis',
+scat.Name as 'Kategorie',
+Date_Format(sr.StartDate, '%d.%m.%Y') as 'Datum',
+IF (Date_Format(sr.StartDate, '%s') <> '00', '', Date_Format(sr.StartDate, '%H:%i')) as 'von',
+IF (Date_Format(sr.StartDate, '%s') <> '00', '', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), '%H:%i')) as 'bis',
+Round(sr.Roundedduration, 0) as 'Minuten',
+(select CONCAT(emp1p.`FirstName`, ' ', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as 'Hauptbetreuung',
+(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as 'Team'
+FROM servicerecord sr
+join costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid
+join supportconcept sc on c2s.supportconceptoid = sc.oid
+join customer c on sc.customeroid = c.oid
+join person p on c.personoid = p.oid
+join servicedescription sd on sd.oid = sr.servicedescriptionoid
+join servicecategory scat on scat.oid = sd.servicecategoryoid
+where sr.oid
+not in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s
+join confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is not null and crs.customeroid is null) and
+scat.billable = true and
+sr.startdate >= ':Von' and sr.startdate < ':bis'
+order by p.Lastname, sr.startdate
+
+
+
+INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4713,24,0,'Einträge ohne Monatsunterschrift der Hauptbetreuung','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.oid \nnot in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s\njoin confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is not null and crs.customeroid is null) and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `parameter` (`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`DefaultValue`) VALUES (4713,25,'Von_bis',5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'aktueller Monat');
+
+
+
+
diff --git a/Queries/Einträge ohne Monatsunterschrift des Klienten.txt b/Queries/Einträge ohne Monatsunterschrift des Klienten.txt
new file mode 100644
index 000000000..e6602ff6c
--- /dev/null
+++ b/Queries/Einträge ohne Monatsunterschrift des Klienten.txt
@@ -0,0 +1,35 @@
+SELECT
+p.LastName as 'Nachname',
+p.Firstname as 'Vorname',
+c2s.ApprovedStartDate as 'Bewilligt von',
+c2s.ApprovedEndDate as 'Bewilligt bis',
+scat.Name as 'Kategorie',
+Date_Format(sr.StartDate, '%d.%m.%Y') as 'Datum',
+IF (Date_Format(sr.StartDate, '%s') <> '00', '', Date_Format(sr.StartDate, '%H:%i')) as 'von',
+IF (Date_Format(sr.StartDate, '%s') <> '00', '', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), '%H:%i')) as 'bis',
+Round(sr.Roundedduration, 0) as 'Minuten',
+(select CONCAT(emp1p.`FirstName`, ' ', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as 'Hauptbetreuung',
+(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as 'Team'
+FROM servicerecord sr
+join costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid
+join supportconcept sc on c2s.supportconceptoid = sc.oid
+join customer c on sc.customeroid = c.oid
+join person p on c.personoid = p.oid
+join servicedescription sd on sd.oid = sr.servicedescriptionoid
+join servicecategory scat on scat.oid = sd.servicecategoryoid
+where sr.oid
+not in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s
+join confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is null and crs.customeroid is not null) and
+scat.billable = true and
+sr.startdate >= ':Von' and sr.startdate < ':bis'
+order by p.Lastname, sr.startdate
+
+
+
+
+INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4712,24,0,'Einträge ohne Monatsunterschrift des Klienten','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.oid \nnot in (select servicerecordoid from confirmationreceiptsignature2servicerecord crs2s\njoin confirmationreceiptsignature crs on crs2s.confirmationreceiptsignatureoid = crs.oid where crs.employeeoid is null and crs.customeroid is not null) and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `parameter` (`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`DefaultValue`) VALUES (4712,25,'Von_bis',5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'aktueller Monat');
+
+
+
+
diff --git a/Queries/Fehlende Einzelunterschriften im ausgewählten Zeitaum.txt b/Queries/Fehlende Einzelunterschriften im ausgewählten Zeitaum.txt
new file mode 100644
index 000000000..d6be73f6f
--- /dev/null
+++ b/Queries/Fehlende Einzelunterschriften im ausgewählten Zeitaum.txt
@@ -0,0 +1,34 @@
+
+SELECT
+p.LastName as 'Nachname',
+p.Firstname as 'Vorname',
+c2s.ApprovedStartDate as 'Bewilligt von',
+c2s.ApprovedEndDate as 'Bewilligt bis',
+scat.Name as 'Kategorie',
+Date_Format(sr.StartDate, '%d.%m.%Y') as 'Datum',
+IF (Date_Format(sr.StartDate, '%s') <> '00', '', Date_Format(sr.StartDate, '%H:%i')) as 'von',
+IF (Date_Format(sr.StartDate, '%s') <> '00', '', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), '%H:%i')) as 'bis',
+Round(sr.Roundedduration, 0) as 'Minuten',
+(select CONCAT(emp1p.`FirstName`, ' ', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as 'Hauptbetreuung',
+(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as 'Team'
+FROM servicerecord sr
+join costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid
+join supportconcept sc on c2s.supportconceptoid = sc.oid
+join customer c on sc.customeroid = c.oid
+join person p on c.personoid = p.oid
+join servicedescription sd on sd.oid = sr.servicedescriptionoid
+join servicecategory scat on scat.oid = sd.servicecategoryoid
+where sr.SignatureOID is null and
+scat.billable = true and
+sr.startdate >= ':Von' and sr.startdate < ':bis'
+order by p.Lastname, sr.startdate
+
+
+
+
+INSERT INTO `query` (`Oid`,`Tid`,`Type`,`Title`,`SQL`,`Notice`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`,`UserGroupOids`,`ReportTypeName`,`FileName`,`ExportTitle`) VALUES (4711,24,0,'Einträge ohne Unterschrift','SELECT \np.LastName as \'Nachname\',\np.Firstname as \'Vorname\',\nc2s.ApprovedStartDate as \'Bewilligt von\',\nc2s.ApprovedEndDate as \'Bewilligt bis\',\nscat.Name as \'Kategorie\',\nDate_Format(sr.StartDate, \'%d.%m.%Y\') as \'Datum\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(sr.StartDate, \'%H:%i\')) as \'von\',\nIF (Date_Format(sr.StartDate, \'%s\') <> \'00\', \'\', Date_Format(Date_Add(sr.StartDate, INTERVAL sr.Roundedduration MINUTE), \'%H:%i\')) as \'bis\',\nRound(sr.Roundedduration, 0) as \'Minuten\',\n(select CONCAT(emp1p.`FirstName`, \' \', emp1p.`LastName`) from employee emp1 join `person` emp1p on emp1p.`Oid` = emp1.`PersonOid` where emp1.`Oid` in (select employeeoid from `employee2customer` e2c1 join `valuelistentry2object` vl2o on e2c1.`Oid` = vl2o.`ObjectOid` join `valuelistentry` vle on vl2o.`ValueListEntryOid` = vle.`Oid` where e2c1.`CustomerOid` = c.`Oid` and vle.`SystemEntryID` = 3) LIMIT 1) as \'Hauptbetreuung\',\n(select t.`Name` from team t where t.`Oid` in (select teamoid from `team2customer` t2c where t2c.`CustomerOid` = c.`Oid`) LIMIT 1) as \'Team\' \nFROM servicerecord sr\njoin costbearer2supportconcept c2s on sr.costbearer2supportconceptoid = c2s.oid\njoin supportconcept sc on c2s.supportconceptoid = sc.oid\njoin customer c on sc.customeroid = c.oid\njoin person p on c.personoid = p.oid\njoin servicedescription sd on sd.oid = sr.servicedescriptionoid\njoin servicecategory scat on scat.oid = sd.servicecategoryoid\nwhere sr.SignatureOID is null and\nscat.billable = true and\nsr.startdate >= \':Von\' and sr.startdate < \':bis\'\norder by p.Lastname, sr.startdate',NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL);
+INSERT INTO `parameter` (`QueryOid`,`Tid`,`Name`,`Type`,`DbType`,`InsTs`,`InsUser`,`UdpUser`,`Version`,`IsActive`,`SystemEntryID`) VALUES (4711,25,'Von_bis',5,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+
+
+
+
diff --git a/Service/Plugins/OperationService.cs b/Service/Plugins/OperationService.cs
index f36126f86..360fa2770 100644
--- a/Service/Plugins/OperationService.cs
+++ b/Service/Plugins/OperationService.cs
@@ -334,9 +334,16 @@ namespace BeWo.Service.Plugins
// ValueListEntryType.SupportConceptIndividualGoalCategoryType
// };
- // var goals = cb2Sc.SupportConcept.ValueList.Where(v => vlist.Contains(v.Entry.Type)).ToList();
+ // var goals = cb2Sc.SupportConcept.ValueList.Where(v => vlist.Contains(v.Entry.Type)).Select(v => v.Entry).ToList();
// if (goals.Count > 0)
// {
+ // foreach (var tb in list)
+ // {
+ // if (tb.Parent != null)
+ // {
+ // tb.Parent.Name = String.Format(" {0}", tb.Parent.Name);
+ // }
+ // }
// var allMainGoals = DAOFactory.SearchDAO.FindValueListEntries(new List() { ValueListEntryType.SupportConceptGoalCategoryType, ValueListEntryType.SupportConceptGoalType });
// Dictionary dict = new Dictionary();
@@ -344,16 +351,55 @@ namespace BeWo.Service.Plugins
// {
// dict.Add(item.Oid.Value, item);
// }
-
- // long oid = 1000000;
// foreach (var item in goals)
// {
- // var ziel = item.Entry;
- // TextModuleDC tm = new TextModuleDC();
- // tm.Text = ziel.Value;
- // tm.Name = ziel.Value;
- // tm.TextModuleOid = oid++;
- // list.Add(tm);
+ // if (!dict.ContainsKey(item.Oid.Value))
+ // {
+ // dict.Add(item.Oid.Value, item);
+ // }
+ // }
+
+ // var zielKategorie = new TextModuleDC();
+ // zielKategorie.Name = "Ziele";
+ // zielKategorie.TextModuleOid = 1000000;
+ // zielKategorie.IsParent = true;
+ // list.Add(zielKategorie);
+
+ // var entryOid2TextbausteinDict = new Dictionary();
+
+ // long oid = 1000001;
+ // foreach (var item in goals)
+ // {
+ // var path = new List();
+ // path.Add(item);
+ // var parentpath = GetAllParentGoalCategoies(dict, item);
+ // path.AddRange(parentpath);
+ // //Der Pfad enthält den Gesamten Pfad vom Kind zum Obersten Vater Knoten und muss rückwärts durchlaufen werden
+ // for (int i = path.Count - 1; i >= 0; i--)
+ // {
+ // var ziel = path[i];
+ // if (!entryOid2TextbausteinDict.ContainsKey(ziel.Oid.Value))
+ // {
+ // TextModuleDC tm = new TextModuleDC();
+ // tm.Text = ziel.Value;
+ // tm.Name = ziel.Value;
+ // tm.TextModuleOid = oid++;
+ // if (ziel.ParentOid.HasValue && entryOid2TextbausteinDict.ContainsKey(ziel.ParentOid.Value))
+ // {
+ // var parent = entryOid2TextbausteinDict[ziel.ParentOid.Value];
+ // parent.IsParent = true;
+ // tm.Parent = parent;
+ // }
+ // else
+ // {
+ // //an die oberste Kategorie hängen
+ // tm.Parent = zielKategorie;
+ // }
+ // entryOid2TextbausteinDict.Add(ziel.Oid.Value, tm);
+ // list.Add(tm);
+ // }
+ // }
+
// }
// }
//}
@@ -361,14 +407,14 @@ namespace BeWo.Service.Plugins
return list;
}
- public static IEnumerable GetAllParentGoalCategoies(Dictionary goalCategoryDict, ValueListEntryDC goal)
+ private static List GetAllParentGoalCategoies(Dictionary goalCategoryDict, ValueListEntry goal)
{
- IList path = new List();
+ var path = new List();
if (goal.ParentOid.HasValue && goalCategoryDict.ContainsKey(goal.ParentOid.Value))
{
- ValueListEntryDC parentCat = goalCategoryDict[goal.ParentOid.Value];
+ var parentCat = goalCategoryDict[goal.ParentOid.Value];
while (parentCat != null)
{
diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs
index becda8d3a..8724eeecb 100644
--- a/Service/Plugins/PluginLoader.cs
+++ b/Service/Plugins/PluginLoader.cs
@@ -350,7 +350,7 @@ namespace BeWo.Service.Plugins
//t = "3226307161"; // Roman Roger Puth
//t = "3522103738"; // AWO Münsterland-Recklinghausen
//t = "5592509446"; // Kontakt Verein für psychosoziale Hilfen e.V
- //t = "5344902949"; // SHK Service GmbH SBD
+ t = "5344902949"; // SHK Service GmbH SBD
//t = "1422963536"; // Malteser-Johanniter-Johanneshaus gGmbH
//t = "5433105975"; // aha e.V.
//t = "1701920223"; // SKFM Monheim
@@ -370,7 +370,7 @@ namespace BeWo.Service.Plugins
//t = "1062385308"; // Aidshilfe Fulda
//t = "3208082132"; // Klinikum Werra-Meißner GmbH
//t = "7164646882"; // Diakonisches Werk im Ev. Kirchenkreis Dinslaken - Ambulant Begleitetes Wohnen
- t = "1143768898"; // Diakonisches Werk im Ev. Kirchenkreis Dinslaken - Soziotherapie
+ //t = "1143768898"; // Diakonisches Werk im Ev. Kirchenkreis Dinslaken - Soziotherapie
//t = "8164797250"; // Diakonisches Werk im Ev. Kirchenkreis Dinslaken - Ambulante Jugendhilfe JUDI
//t = "4431610343"; // B-B-C-Terwort GmbH
//t = "2235342307"; // Suchtkrankenhilfe Ostfriesland
@@ -405,7 +405,7 @@ namespace BeWo.Service.Plugins
//t = "6203102637"; // BeWo Neuss-Lauth u. Lauth GbR
//t = "7060431533"; // Arche Tecklenburg e.V.
//t = "1159580198"; // Wendepunkt Velbert gGmbH
- t = "5094575560"; // Christopherus Haus MID
+ //t = "5094575560"; // Christopherus Haus MID
//t = "5261046426"; // SelbstWerk EN / Bettina Heckrodt
return t;
diff --git a/Service/Plugins/QueryService.cs b/Service/Plugins/QueryService.cs
index 3fe85325c..5c06c7dbd 100644
--- a/Service/Plugins/QueryService.cs
+++ b/Service/Plugins/QueryService.cs
@@ -1,7 +1,9 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
using System.Linq;
using BeWo.Data.Access;
+using BeWo.Service.Configuration;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
@@ -10,9 +12,24 @@ namespace BeWo.Service.Plugins
{
public class QueryService : AbstractIDSpecificDefaultClass
{
- public virtual List GetAllQueriesOfType(QueryType pType)
+ private AppSettings appSettings = null;
+
+ public AppSettings AppSettings
+ {
+ get
+ {
+ if (appSettings == null)
+ {
+ appSettings = AppSettings.CreateSettings();
+ }
+ return appSettings;
+ }
+ }
+
+
+ public virtual List GetAllQueriesOfType(QueryType pType)
{
- return DAOFactory.SearchDAO.FindQuery(pType).Select(
+ var list = DAOFactory.SearchDAO.FindQuery(pType).Select(
q =>
{
QueryDC queryDC = new QueryDC
@@ -32,11 +49,12 @@ namespace BeWo.Service.Plugins
List parameter = new List();
foreach (var item in q.Parameter)
{
- var param = new QueryParamDC
- {
- QueryParameterOid = item.Oid,
- ParamType = item.Type,
- Name = item.Name
+ var param = new QueryParamDC
+ {
+ QueryParameterOid = item.Oid,
+ ParamType = item.Type,
+ Name = item.Name,
+ DefaultValue = item.DefaultValue
};
if (item.Type == QueryParameterType.Custom)
@@ -50,7 +68,21 @@ namespace BeWo.Service.Plugins
queryDC.Parameter = parameter;
return queryDC;
}).ToList();
+
+ return list.Where(q => CheckQueryRights(q)).ToList();
}
+ private bool CheckQueryRights(QueryDC query)
+ {
+ if (query.Oid > 1000)
+ {
+ if (query.Title.Contains("Unterschrift") || query.Title.Contains("Monatsunterschrift"))
+ {
+ return AppSettings.ShowSignatures;
+ }
+ }
+
+ return true;
+ }
}
}
\ No newline at end of file
diff --git a/Service/ServiceImplementations/QueryServiceImp.cs b/Service/ServiceImplementations/QueryServiceImp.cs
index cf24a3ab6..123de077e 100644
--- a/Service/ServiceImplementations/QueryServiceImp.cs
+++ b/Service/ServiceImplementations/QueryServiceImp.cs
@@ -176,7 +176,19 @@ namespace BeWo.Service.ServiceImplementations
if (item.Value is DateTimeSpan)
{
DateTimeSpan dts = (DateTimeSpan)item.Value;
+ if (!String.IsNullOrEmpty(item.DefaultValue) && item.DefaultValue.ToLower().Contains("aktueller monat"))
+ {
+ DateTime aktuellerMonat = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
+ if (dts.StartDate == DateTime.MinValue)
+ {
+ dts.StartDate = aktuellerMonat;
+ }
+ if (dts.EndDate.Date == DateTime.MaxValue.Date)
+ {
+ dts.EndDate = aktuellerMonat.AddMonths(1).AddDays(-1);
+ }
+ }
string[] itemNames = item.Name.Split(new[] { '_' });
newsql = newsql.Replace(":" + GetParamterKeyName(itemNames[0]), String.Format("{0:yyyy-MM-dd}", dts.StartDate));
diff --git a/Shared/DataContracts/QueryParamDC.cs b/Shared/DataContracts/QueryParamDC.cs
index 0f04520eb..4ae1ba696 100644
--- a/Shared/DataContracts/QueryParamDC.cs
+++ b/Shared/DataContracts/QueryParamDC.cs
@@ -24,5 +24,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public long? QueryParameterOid { get; set; }
+
+ [DataMember]
+ public string DefaultValue { get; set; }
+
}
}
\ No newline at end of file