Bugfix Cannot access the 'CustomFields' property of a disposed object, wenn Termin im Kalender aus dem Startbildschirm geöffnet werden SupportOID=165420

This commit is contained in:
2026-06-18 14:55:38 +02:00
parent 86ed73dcc1
commit 0a468bb78d
8 changed files with 92 additions and 20 deletions

View File

@@ -221,6 +221,7 @@
</Compile> </Compile>
<Compile Include="View\Developer\DeveloperView.xaml.cs"> <Compile Include="View\Developer\DeveloperView.xaml.cs">
<DependentUpon>DeveloperView.xaml</DependentUpon> <DependentUpon>DeveloperView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\CustomerWohneinheitenView.xaml.cs"> <Compile Include="View\Detail\Wohneinheit\CustomerWohneinheitenView.xaml.cs">
<DependentUpon>CustomerWohneinheitenView.xaml</DependentUpon> <DependentUpon>CustomerWohneinheitenView.xaml</DependentUpon>
</Compile> </Compile>
@@ -378,6 +379,7 @@
<Page Include="View\Developer\DeveloperView.xaml"> <Page Include="View\Developer\DeveloperView.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\CustomerWohneinheitenView.xaml"> <Page Include="View\Detail\Wohneinheit\CustomerWohneinheitenView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>

View File

@@ -17,7 +17,15 @@ namespace BeWo.Scheduler.Utils
public static CustomFieldStorage GetCustomFieldStorage(this Appointment appointment) public static CustomFieldStorage GetCustomFieldStorage(this Appointment appointment)
{ {
return appointment.CustomFields[nameof(CustomFieldStorage)] as CustomFieldStorage; try
{
return appointment.CustomFields[nameof(CustomFieldStorage)] as CustomFieldStorage;
}
catch (Exception)
{
}
return new CustomFieldStorage();
} }
public static bool CF_IsTask(this Appointment appointment) public static bool CF_IsTask(this Appointment appointment)

View File

@@ -7,6 +7,7 @@ using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
@@ -55,6 +56,8 @@ namespace BeWo.Scheduler.View
private bool _IsEmployeeBrushVisible; private bool _IsEmployeeBrushVisible;
Appointment appointmentToOpenFormHomePanel = null;
public bool IsEmployeeBrushVisible public bool IsEmployeeBrushVisible
{ {
get => _IsEmployeeBrushVisible; get => _IsEmployeeBrushVisible;
@@ -2255,11 +2258,11 @@ namespace BeWo.Scheduler.View
var apps = Scheduler.ActiveView.GetAppointments().ToList(); var apps = Scheduler.ActiveView.GetAppointments().ToList();
var oid = _SelectedAppointmentFromHomePanelView.SchedulerAppointmentOid; var oid = _SelectedAppointmentFromHomePanelView.SchedulerAppointmentOid;
Appointment appointmentToOpen; //Appointment appointmentToOpen;
if(oid != null) if(oid != null)
{ {
appointmentToOpen = apps.FirstOrDefault(app => appointmentToOpenFormHomePanel = apps.FirstOrDefault(app =>
{ {
var oidValue = app.CF_SchedulerAppointmentOid(); var oidValue = app.CF_SchedulerAppointmentOid();
@@ -2267,19 +2270,19 @@ namespace BeWo.Scheduler.View
}); });
if(appointmentToOpen != null) //if(appointmentToOpenFormHomePanel != null)
{ //{
Scheduler.ShowEditAppointmentForm(appointmentToOpen); // Scheduler.ShowEditAppointmentForm(appointmentToOpenFormHomePanel);
} //}
} }
else if(_SelectedAppointmentFromHomePanelView.RecurrenceId != null && _SelectedAppointmentFromHomePanelView.RecurrenceIndex > 0) else if(_SelectedAppointmentFromHomePanelView.RecurrenceId != null && _SelectedAppointmentFromHomePanelView.RecurrenceIndex > 0)
{ {
appointmentToOpen = apps.FirstOrDefault(appointment => appointment.RecurrenceInfo.Id.ToString().Equals(_SelectedAppointmentFromHomePanelView.RecurrenceId)); appointmentToOpenFormHomePanel = apps.FirstOrDefault(appointment => appointment.RecurrenceInfo.Id.ToString().Equals(_SelectedAppointmentFromHomePanelView.RecurrenceId));
if(appointmentToOpen != null) //if(appointmentToOpenFormHomePanel != null)
{ //{
Scheduler.ShowEditAppointmentForm(appointmentToOpen); // Scheduler.ShowEditAppointmentForm(appointmentToOpenFormHomePanel);
} //}
} }
_IsComingFromHomeDragPanel = false; _IsComingFromHomeDragPanel = false;
@@ -2298,6 +2301,19 @@ namespace BeWo.Scheduler.View
} }
}); });
} }
public void OpenAppointmentFromHomePanel()
{
while (_IsComingFromHomeDragPanel)
{
Thread.Sleep(100);
}
if (appointmentToOpenFormHomePanel != null)
{
Scheduler.ShowEditAppointmentForm(appointmentToOpenFormHomePanel);
appointmentToOpenFormHomePanel = null;
}
}
private void ExportButton_OnClick(object sender, RoutedEventArgs e) private void ExportButton_OnClick(object sender, RoutedEventArgs e)
{ {

View File

@@ -308,7 +308,8 @@ namespace BeWo.View
BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll)) && sc2.StartDate.HasValue) BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll)) && sc2.StartDate.HasValue)
{ {
#if DEBUG #if DEBUG
MainControl.NavigateTo(new SchedulingMasterView(sc2.StartDate.Value, sc2) { ParentView = this }); //MainControl.NavigateTo(new SchedulingMasterView(sc2.StartDate.Value, sc2) { ParentView = this });
MainControl.NavigateTo(new SchedulerMasterView(sc2.StartDate.Value, sc2) { ParentView = this });
#else #else
MainControl.NavigateTo(new SchedulerMasterView(sc2.StartDate.Value, sc2) { ParentView = this }); MainControl.NavigateTo(new SchedulerMasterView(sc2.StartDate.Value, sc2) { ParentView = this });
#endif #endif

View File

@@ -20,6 +20,8 @@ namespace BeWo.View.Master
var scheduler = new NewSchedulerView(pIntervalStartDate, pAppointment); var scheduler = new NewSchedulerView(pIntervalStartDate, pAppointment);
grid_root.Children.Add(scheduler); grid_root.Children.Add(scheduler);
scheduler.OpenAppointmentFromHomePanel();
} }
} }
} }

View File

@@ -13,17 +13,17 @@
<basicHttpBinding> <basicHttpBinding>
<binding name="BeWoBasicEndpoint" closeTimeout="00:05:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text"> <binding name="BeWoBasicEndpoint" closeTimeout="00:05:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
<readerQuotas maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport" /> <security mode="None" />
<!-- mode="Transport" für https und "None" sonst--> <!-- mode="Transport" für https und "None" sonst-->
</binding> </binding>
<binding name="BeWoStreamingEndpoint" receiveTimeout="10:10:00" sendTimeout="10:01:00" maxBufferSize="65536" maxReceivedMessageSize="67108864" transferMode="StreamedRequest" useDefaultWebProxy="true" messageEncoding="Text"> <binding name="BeWoStreamingEndpoint" receiveTimeout="10:10:00" sendTimeout="10:01:00" maxBufferSize="65536" maxReceivedMessageSize="67108864" transferMode="StreamedRequest" useDefaultWebProxy="true" messageEncoding="Text">
<readerQuotas maxDepth="128" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="128" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport" /> <security mode="None" />
<!-- mode="Transport" für https und "None" sonst--> <!-- mode="Transport" für https und "None" sonst-->
</binding> </binding>
<binding name="QueryServiceEndpoint" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text"> <binding name="QueryServiceEndpoint" closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true" messageEncoding="Text">
<readerQuotas maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <readerQuotas maxDepth="128" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport"> <security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/> <transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="UserName" algorithmSuite="Default"/> <message clientCredentialType="UserName" algorithmSuite="Default"/>
</security> </security>

View File

@@ -2088,6 +2088,10 @@ PRIMARY KEY (`Oid`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1; ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;
#------------------------------------------------------------------------------------------------------------------------------------------------------------
ALTER TABLE `aiconversationmessage` ALTER TABLE `aiconversationmessage`
CHANGE COLUMN `Message` `Message` LONGTEXT NULL DEFAULT NULL ; CHANGE COLUMN `Message` `Message` LONGTEXT NULL DEFAULT NULL ;
@@ -2103,4 +2107,42 @@ DROP FOREIGN KEY `FK_CUSTOMERVERMITTLUNGARBEIT_VERMITTLUNGSGRUNDLAGE`,
DROP FOREIGN KEY `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT`; DROP FOREIGN KEY `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT`;
ALTER TABLE `customervermittlungarbeit` ALTER TABLE `customervermittlungarbeit`
DROP INDEX `FK_CUSTOMERVERMITTLUNGARBEIT_VERMITTLUNGSGRUNDLAGE` , DROP INDEX `FK_CUSTOMERVERMITTLUNGARBEIT_VERMITTLUNGSGRUNDLAGE` ,
DROP INDEX `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT` ; DROP INDEX `FK_CUSTOMERVERMITTLUNGARBEIT_AUFTRAGSHERKUNFT` ;
ALTER TABLE `aipromptbausteinroutine`
ADD COLUMN `RoutineType` INT NULL DEFAULT NULL AFTER `ActionType`;
UPDATE `aipromptbausteinprompt` SET `IsOwnsoftPrompt` = '0' WHERE (`PromptId` IS NULL) AND OID > 0;
UPDATE `aipromptbausteinprompt` SET `IsOwnsoftPrompt` = '1' WHERE (`PromptId` IS NOT NULL) AND OID > 0;
ALTER TABLE `aiconversation`
CHANGE COLUMN `UIContext` `ActionType` INT NULL DEFAULT NULL ;
UPDATE `aiconversation`
SET ActionType = 1;
CREATE TABLE `aipromptbausteinroutine2empfavorite` (
`AiPromptbausteinRoutineOid` bigint NOT NULL,
`EmployeeOid` bigint NOT NULL,
PRIMARY KEY (`AiPromptbausteinRoutineOid`,`EmployeeOid`),
CONSTRAINT `FK_AIPROMPTBAUSTEINROUTINE2EMPFAV_AIPROMPT` FOREIGN KEY (`AiPromptbausteinRoutineOid`) REFERENCES `aipromptbausteinroutine` (`Oid`),
CONSTRAINT `FK_AIPROMPTBAUSTEINROUTINE2EMPFAV_APPUSER` FOREIGN KEY (`EmployeeOid`) REFERENCES `employee` (`Oid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
ALTER TABLE `aipromptbausteinroutinestep`
ADD COLUMN `RoutineOid` BIGINT NULL AFTER `PromptReferenceVersion`,
ADD INDEX `FK_AIPROMPTROUTINESTEP_ROUTINE_idx` (`RoutineOid` ASC) VISIBLE;
;
ALTER TABLE `aipromptbausteinroutinestep`
ADD CONSTRAINT `FK_AIPROMPTROUTINESTEP_ROUTINE`
FOREIGN KEY (`RoutineOid`)
REFERENCES `aipromptbausteinroutine` (`Oid`)
ON DELETE CASCADE
ON UPDATE CASCADE;
ALTER TABLE `aipromptbausteinroutine`
DROP COLUMN `IsFavorite`;

View File

@@ -38,7 +38,7 @@ namespace BeWo.Service.Plugins
//t = "1352143437"; // Sewo //t = "1352143437"; // Sewo
//t = "7107514623"; // BeWo Neuss //t = "7107514623"; // BeWo Neuss
//t = "9098141768"; // Fib e.V. Marburg //t = "9098141768"; // Fib e.V. Marburg
t = "1505148718"; // VSD Hamm //t = "1505148718"; // VSD Hamm
//t = "5926081834"; // Spektrum //t = "5926081834"; // Spektrum
//t = "1378137009"; // BeWo Direkt //t = "1378137009"; // BeWo Direkt
//t = "3010479871"; // Aachener Verein //t = "3010479871"; // Aachener Verein
@@ -70,7 +70,7 @@ namespace BeWo.Service.Plugins
//t = "5351926758"; // Viva a Vida //t = "5351926758"; // Viva a Vida
//t = "2215396183"; // Diakonie Remscheid Lennep //t = "2215396183"; // Diakonie Remscheid Lennep
//t = "5157599087"; // SHG Schwerte //t = "5157599087"; // SHG Schwerte
t = "4526293996"; // Fortis //t = "4526293996"; // Fortis
//t = "3647969417"; // Caritas Bottrop //t = "3647969417"; // Caritas Bottrop
//t = "3057313346"; // SSB Mainz //t = "3057313346"; // SSB Mainz
//t = "6246287823"; // BeWo Alsdorf //t = "6246287823"; // BeWo Alsdorf
@@ -330,7 +330,7 @@ namespace BeWo.Service.Plugins
//t = "5065709552"; // Biotop e.V. //t = "5065709552"; // Biotop e.V.
//t = "9094672461"; // Transkulturelles Betreuungsbüro (Toprak GmbH) //t = "9094672461"; // Transkulturelles Betreuungsbüro (Toprak GmbH)
//t = "9008813932"; // Aids Hilfe Giessen //t = "9008813932"; // Aids Hilfe Giessen
t = "4052216789"; // Perspektiven e.V. //t = "4052216789"; // Perspektiven e.V.
//t = "7663765314"; // Christina Frommen (Frommen BeWo) //t = "7663765314"; // Christina Frommen (Frommen BeWo)
//t = "5462295916"; // BeWo Dellbrueck //t = "5462295916"; // BeWo Dellbrueck
//t = "2120989920"; // Sozialbüro Schüßler und Wilckens GbR //t = "2120989920"; // Sozialbüro Schüßler und Wilckens GbR
@@ -442,6 +442,7 @@ namespace BeWo.Service.Plugins
//t = "9999999999"; // Claude Stundenkontotest //t = "9999999999"; // Claude Stundenkontotest
//t = "4341679073"; // Caritasverband für den Landkreis Aichach-Friedberg e.V. //t = "4341679073"; // Caritasverband für den Landkreis Aichach-Friedberg e.V.
//t = "1996525562"; // HW Hilfswerk Inklusion und Teilhabe //t = "1996525562"; // HW Hilfswerk Inklusion und Teilhabe
t = "2348634192"; // Ravensburger Jugendhilfeverein e.V.
return t; return t;
#else #else