- Prüfung der Rechte für Queries für fehlende Unterschriften eingebaut.

- DefaultValue in Paramter Klasse eingefügt
- Queries für fehlende Unterschriften hinzugefügt
This commit is contained in:
Christian
2025-02-26 00:24:17 +01:00
parent 118efef267
commit 831c8b83aa
15 changed files with 238 additions and 28 deletions

View File

@@ -16,7 +16,7 @@
<EnableSecurityDebugging>true</EnableSecurityDebugging>
<TargetZone>Internet</TargetZone>
<GenerateManifests>true</GenerateManifests>
<SignManifests>true</SignManifests>
<SignManifests>false</SignManifests>
<ManifestKeyFile>
</ManifestKeyFile>
<ManifestCertificateThumbprint>8CA4066C36C87B745E4016FDA715A6DB16FCFFA9</ManifestCertificateThumbprint>
@@ -39,16 +39,16 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>true</UpdateRequired>
<MapFileExtensions>false</MapFileExtensions>
<InstallUrl>https://app.ownsoft.de/test/</InstallUrl>
<InstallUrl>https://app.ownsoft.de/</InstallUrl>
<TargetCulture>de-DE</TargetCulture>
<ProductName>BeWoPlaner</ProductName>
<PublisherName>ownSoft GmbH</PublisherName>
<MinimumRequiredVersion>2.0.1.259</MinimumRequiredVersion>
<MinimumRequiredVersion>2.0.1.260</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>260</ApplicationRevision>
<ApplicationRevision>261</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>

View File

@@ -2,7 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>D:\Projects\beyondsoft\BeWoPlaner\Publish\|publish\|D:\Projects\beyondsoft\BeWoPlaner\PublishTest\|D:\Projects\beyondsoft\BeWoPlaner\PublishDev\|D:\Projects\beyondsoft\BeWoPlaner\Publish45\</PublishUrlHistory>
<InstallUrlHistory>https://app.ownsoft.de/test/|https://app.ownsoft.de/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory>
<InstallUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/test/|https://app.ownsoft.de/dev/|http://app.ownsoft.de/dev/|http://app.beyondsoft.de/dev/</InstallUrlHistory>
<SupportUrlHistory />
<UpdateUrlHistory>https://app.ownsoft.de/|https://app.ownsoft.de/bewoplaner.application/</UpdateUrlHistory>
<BootstrapperUrlHistory />

View File

@@ -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.";

View File

@@ -545,6 +545,7 @@ namespace BeWo.View.Detail.Report
param.Name = item.Name;
param.ParamType = item.ParamType;
param.DefaultValue = item.DefaultValue;
switch (item.ParamType)
{

View File

@@ -70,5 +70,7 @@ namespace BeWo.Data.Entities
}
}
}
public virtual string DefaultValue { get; set; }
}
}

View File

@@ -15,5 +15,6 @@
<property column="UdpUser" type="String" name="UdpUser" length="256" />
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
<property type="String" name="DefaultValue" />
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,3 @@
ALTER TABLE `Parameter`
ADD COLUMN `DefaultValue` VARCHAR(256) NULL DEFAULT NULL;

View File

@@ -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');

View File

@@ -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');

View File

@@ -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);

View File

@@ -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>() { ValueListEntryType.SupportConceptGoalCategoryType, ValueListEntryType.SupportConceptGoalType });
// Dictionary<long, ValueListEntry> dict = new Dictionary<long, ValueListEntry>();
@@ -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, TextModuleDC>();
// long oid = 1000001;
// foreach (var item in goals)
// {
// var path = new List<ValueListEntry>();
// 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<ValueListEntryDC> GetAllParentGoalCategoies(Dictionary<long, ValueListEntryDC> goalCategoryDict, ValueListEntryDC goal)
private static List<ValueListEntry> GetAllParentGoalCategoies(Dictionary<long, ValueListEntry> goalCategoryDict, ValueListEntry goal)
{
IList<ValueListEntryDC> path = new List<ValueListEntryDC>();
var path = new List<ValueListEntry>();
if (goal.ParentOid.HasValue && goalCategoryDict.ContainsKey(goal.ParentOid.Value))
{
ValueListEntryDC parentCat = goalCategoryDict[goal.ParentOid.Value];
var parentCat = goalCategoryDict[goal.ParentOid.Value];
while (parentCat != null)
{

View File

@@ -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;

View File

@@ -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<QueryService>
{
public virtual List<QueryDC> GetAllQueriesOfType(QueryType pType)
private AppSettings appSettings = null;
public AppSettings AppSettings
{
get
{
if (appSettings == null)
{
appSettings = AppSettings.CreateSettings();
}
return appSettings;
}
}
public virtual List<QueryDC> 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<QueryParamDC> parameter = new List<QueryParamDC>();
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;
}
}
}

View File

@@ -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));

View File

@@ -24,5 +24,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public long? QueryParameterOid { get; set; }
[DataMember]
public string DefaultValue { get; set; }
}
}