Merge branch 'master' of ssh://float.ownsoft.de/git/beyondSoft/BeWo into feature_rene_13_dakota

This commit is contained in:
2024-09-12 09:49:53 +02:00
932 changed files with 118123 additions and 95296 deletions

15
.gitignore vendored
View File

@@ -626,6 +626,21 @@ obj
/DakotaSender/obj
/DakotaUnitTest/bin
/DakotaUnitTest/obj
/WohneinheitUnitTest/bin
/WohneinheitUnitTest/obj
/BeWoDatabaseTerminator/BeWoDatabaseTerminator/bin/Debug
/BeWoDatabaseTerminator/BeWoDatabaseTerminator/bin/Release
/ReportImp/TestLWV
/TranslationUnitTest/bin
/ReportImp/demo_Sozio/Invoicing/CustomInvoiceFactory.cs
/ReportImp/demo_Sozio/Invoicing/SoziotherapieInvoiceCreation.cs
/ReportImp/demo_Sozio/LeistungsnachweisSoziotherapie.cs
/ReportImp/demo_Sozio/LeistungsnachweisSoziotherapie.designer.cs
/ReportImp/demo_Sozio/LeistungsnachweisSoziotherapie.resx
/ReportImp/demo_Sozio/Properties/AssemblyInfo.cs
/ReportImp/demo_Sozio/Properties/licenses.licx
/ReportImp/demo_Sozio/SoziotherapieRechnung.Designer.cs
/ReportImp/demo_Sozio/SoziotherapieRechnung.cs
/ReportImp/demo_Sozio/SoziotherapieRechnung.resx
/ReportImp/demo_Sozio/demo_Sozio.csproj

View File

@@ -16,7 +16,7 @@
<EnableSecurityDebugging>true</EnableSecurityDebugging>
<TargetZone>Internet</TargetZone>
<GenerateManifests>true</GenerateManifests>
<SignManifests>false</SignManifests>
<SignManifests>true</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.247</MinimumRequiredVersion>
<MinimumRequiredVersion>2.0.1.249</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>248</ApplicationRevision>
<ApplicationRevision>250</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
@@ -269,6 +269,10 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Styles\PrototypeStyles.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="UploadDialog.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -319,6 +323,62 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Controls\CustomerVermittlungArbeitControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Controls\Wohnhilfe\CustomerWohnhilfeControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\CustomerVermittlungArbeitView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\CustomerWohnhilfeView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitBelegungEditPopup.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitBelegungSchedulerView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitBelegungTableView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitEditPopup.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\CustomerFalldatenView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitBelegungEditControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitBelegungWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitGrundrissModalPopup.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitVerwaltungViewV1.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Wohneinheit\WohneinheitVerwaltungViewV2.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\HilfeplanImportView.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
@@ -836,12 +896,15 @@
<Compile Include="Converter\AnonymizationRight2VisibilityConverter.cs" />
<Compile Include="Converter\BoolNullCheckConverter.cs" />
<Compile Include="Converter\BoolReverseConverter.cs" />
<Compile Include="Converter\BoolEnabledToTabitemBackgroundConverter.cs" />
<Compile Include="Converter\BoolToParameterReturnConverter.cs" />
<Compile Include="Converter\CellColorConverter.cs" />
<Compile Include="Converter\CollectionContainsTag2BoolConverter.cs" />
<Compile Include="Converter\CollectionCountToBoolConverter.cs" />
<Compile Include="Converter\CollectionCountToVisibilityConverter.cs" />
<Compile Include="Converter\DeleteForGoodRight2VisibilityConverter.cs" />
<Compile Include="Converter\EnumToDescriptionConverter.cs" />
<Compile Include="Converter\EnumTranslationConverter.cs" />
<Compile Include="Converter\FileAttachmentTypeConverter.cs" />
<Compile Include="Converter\GkvState2StringConverter.cs" />
<Compile Include="Converter\IndividualGoalMassnahmeUncheckPreventConverter.cs" />
@@ -850,12 +913,16 @@
<Compile Include="Converter\ClientType2VisibilityConverter.cs" />
<Compile Include="Converter\BoolVisibilityMultiConverter.cs" />
<Compile Include="Converter\NullableBoolToBoolConverter.cs" />
<Compile Include="Converter\Object2ToStringConverter.cs" />
<Compile Include="Converter\TestDebugConverter.cs" />
<Compile Include="Converter\ParticipationBrushConverter.cs" />
<Compile Include="Converter\ArchiveRight2VisibilityConverter.cs" />
<Compile Include="Converter\ReactivationRight2VisibilityConverter.cs" />
<Compile Include="Converter\Rights2DefaultBooleanConverter.cs" />
<Compile Include="Converter\StringLengthVisibilityConverter.cs" />
<Compile Include="Converter\StringLengthVisibilityMultiConverter.cs" />
<Compile Include="Converter\UserRightType2BoolConverter.cs" />
<Compile Include="Converter\ValueConverterGroup.cs" />
<Compile Include="Core\AutoLockUI.cs" />
<Compile Include="Core\BeWoUtils.cs" />
<Compile Include="Core\BeWoWebClient.cs">
@@ -868,6 +935,7 @@
<Compile Include="Core\ReportPreviewModelLandscapeBugWorkaround.cs" />
<Compile Include="Core\SupportConceptGoalTreeItem.cs" />
<Compile Include="Core\TextModuleTreeItem.cs" />
<Compile Include="DebugConfig.cs" />
<Compile Include="EnterTenantDialog.xaml.cs">
<DependentUpon>EnterTenantDialog.xaml</DependentUpon>
</Compile>
@@ -1039,6 +1107,22 @@
<Compile Include="ViewModel\AdditionalServiceGroupOfPeopleVM.cs" />
<Compile Include="ViewModel\AdditionalServiceRegionVM.cs" />
<Compile Include="ViewModel\AdditionalServiceVM.cs" />
<Compile Include="ViewModel\CustomerFalldatenVM.cs" />
<Compile Include="ViewModel\CustomerGemeinnutzigeArbeitVM.cs" />
<Compile Include="ViewModel\ListViewModel\AbstractListVM.cs" />
<Compile Include="ViewModel\ListViewModel\CustomerGemeinnutzigeArbeitListVM.cs" />
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichBundVM.cs" />
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichEinkommenUndArbeitVM.cs" />
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichSozialeKontakteVM.cs" />
<Compile Include="ViewModel\Wohnhilfe\CustomerWohnhilfeBereichSozialstrukturVM.cs" />
<Compile Include="ViewModel\CustomerWohnhilfeVM.cs" />
<Compile Include="ViewModel\ImageVM.cs" />
<Compile Include="ViewModel\ListViewModel\CustomerWohnhilfeListVM.cs" />
<Compile Include="ViewModel\ListViewModel\ImageListVM.cs" />
<Compile Include="ViewModel\ListViewModel\WohneinheitBelegungListVM.cs" />
<Compile Include="ViewModel\ListViewModel\WohneinheitListVM.cs" />
<Compile Include="ViewModel\WohneinheitBelegungVM.cs" />
<Compile Include="ViewModel\WohneinheitVM.cs" />
<Compile Include="ViewModel\DienstInfoVM.cs" />
<Compile Include="ViewModel\BudgetVM.cs" />
<Compile Include="ViewModel\DocumentTreeItemVM.cs" />
@@ -1141,6 +1225,48 @@
<Compile Include="ViewModel\OrganisationPersonRelationVM.cs" />
<Compile Include="ViewModel\TextModuleVM.cs" />
<Compile Include="ViewModel\VerordnungslistenVM.cs" />
<Compile Include="View\Controls\CustomerVermittlungArbeitControl.xaml.cs">
<DependentUpon>CustomerVermittlungArbeitControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\Controls\Wohnhilfe\CustomerWohnhilfeControl.xaml.cs">
<DependentUpon>CustomerWohnhilfeControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\CustomerVermittlungArbeitView.xaml.cs">
<DependentUpon>CustomerVermittlungArbeitView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\CustomerWohnhilfeView.xaml.cs">
<DependentUpon>CustomerWohnhilfeView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitBelegungEditPopup.xaml.cs">
<DependentUpon>WohneinheitBelegungEditPopup.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitBelegungSchedulerView.xaml.cs">
<DependentUpon>WohneinheitBelegungSchedulerView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitBelegungTableView.xaml.cs">
<DependentUpon>WohneinheitBelegungTableView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitEditPopup.xaml.cs">
<DependentUpon>WohneinheitEditPopup.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\CustomerFalldatenView.xaml.cs">
<DependentUpon>CustomerFalldatenView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitBelegungEditControl.xaml.cs">
<DependentUpon>WohneinheitBelegungEditControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitBelegungWindow.xaml.cs">
<DependentUpon>WohneinheitBelegungWindow.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitGrundrissModalPopup.xaml.cs">
<DependentUpon>WohneinheitGrundrissModalPopup.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitVerwaltungViewV1.xaml.cs">
<DependentUpon>WohneinheitVerwaltungViewV1.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Wohneinheit\WohneinheitVerwaltungViewV2.xaml.cs">
<DependentUpon>WohneinheitVerwaltungViewV2.xaml</DependentUpon>
</Compile>
<Compile Include="View\HilfeplanImportView.xaml.cs">
<DependentUpon>HilfeplanImportView.xaml</DependentUpon>
</Compile>
@@ -3213,6 +3339,7 @@
<ItemGroup>
<Resource Include="Ressources\Icons\chatbot.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>

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

@@ -47,6 +47,7 @@
<conv:NodeType2IconPathConverter x:Key="NodeType2IconPathConverter" />
<conv:NumberSmaller0Converter x:Key="NumberSmaller0Converter" />
<conv:ObjectBoolConverter x:Key="ObjectBoolConverter" />
<conv:TestDebugConverter x:Key="TestDebugConverter" />
<conv:ObjectVisibilityConverter x:Key="ObjectVisibilityConverter" />
<conv:ObjectVisibilityMultiConverter x:Key="ObjectVisibilityMultiConverter" />
<conv:OneWayToSourceSwitch x:Key="OneWayToSourceSwitch" />
@@ -62,12 +63,28 @@
<conv:ReactivationRight2VisibilityConverter x:Key="ReactivationRight2VisibilityConverter" />
<conv:ArchiveRight2VisibilityConverter x:Key="ArchiveRight2VisibilityConverter" />
<conv:BoolReverseConverter x:Key="BoolReverseConverter" />
<conv:BoolEnabledToTabitemBackgroundConverter x:Key="BoolEnabledToTabitemBackgroundConverter" />
<conv:ValueConverterGroup x:Key="IsNewToTabitemBackground">
<conv:BoolReverseConverter/>
<conv:BoolEnabledToTabitemBackgroundConverter/>
</conv:ValueConverterGroup>
<conv:BoolToParameterReturnConverter x:Key="IsNewToTooltip"/>
<conv:UserRightType2BoolConverter x:Key="UserRightType2Enabled"/>
<conv:ValueConverterGroup x:Key="UserRightType2NotEnabled">
<conv:UserRightType2BoolConverter/>
<conv:BoolReverseConverter/>
</conv:ValueConverterGroup>
<conv:ValueConverterGroup x:Key="UserRightType2Visible">
<conv:UserRightType2BoolConverter/>
<conv:BoolVisibilityConverter/>
</conv:ValueConverterGroup>
<conv:IndividualGoalMassnahmeUncheckPreventConverter x:Key="IndividualGoalMassnahmeUncheckPreventConverter" />
<conv:Rights2DefaultBooleanConverter x:Key="Rights2DefaultBooleanConverter"/>
<conv:CollectionCountToVisibilityConverter x:Key="CollectionCountToVisibilityConverter" />
<conv:DeleteForGoodRight2VisibilityConverter x:Key="DeleteForGoodRight2VisibilityConverter" />
<conv:AnonymizationRight2VisibilityConverter x:Key="AnonymizationRight2VisibilityConverter" />
<conv:GkvState2StringConverter x:Key="GkvState2StringConverter" />
<conv:EnumTranslationConverter x:Key="EnumTranslationConverter" />
<Style x:Key="SupportConceptDetailStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />

View File

@@ -49,8 +49,8 @@ namespace BeWo
public static LoginControl LoginControl;
public static MainControl MainControl;
public static string ShortVersion = "3.21";
public static string Version = "Version 3.21.3 (GKV Test)";
public static string ShortVersion = "3.22";
public static string Version = "Version 3.22.4";
public static int RenderTier = 0;
@@ -531,7 +531,9 @@ namespace BeWo
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.ShowPersehImport);
AppSettings.ShowPersehImport = val != null && val.Equals("1");
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, SettingsKeys.DontUpdateApprovalPeriodDates);
AppSettings.DontUpdateApprovalPeriodDates = val != null && val.Equals("1");
switch (_Mandator.BeWoClientType)
@@ -647,7 +649,7 @@ namespace BeWo
String url = "";
#if DEBUG
url = String.Format("http://localhost:3777/Host");
//return new Uri("https://app4.bewoplaner.de/service");
//return new Uri("https://app5.bewoplaner.de/service");
//url = String.Format("app1.bewoplaner.de/service");
#endif
@@ -783,7 +785,15 @@ namespace BeWo
}
}
internal static bool HasLoggedOnUserRight(UserRightType[] pRight)
internal static bool HasLoggedOnUserRight(UserRightType right)
{
if (LoggedOnUser is null)
return false;
return LoggedOnUser.HasRight(right);
}
internal static bool HasLoggedOnUserRight(UserRightType[] pRight)
{
if (LoggedOnUser != null)
{

View File

@@ -0,0 +1,25 @@
using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
namespace BeWo.Converter
{
public class BoolEnabledToTabitemBackgroundConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
{
return Application.Current.Resources["TabItemTextBrush"];
}
return (bool)value ? Application.Current.Resources["TabItemTextBrush"] : Application.Current.Resources["TabItemTextBrushDisabled"];
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace BeWo.Converter
{
public class BoolToParameterReturnConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
{
return null;
}
return (bool)value ? parameter : null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -14,18 +14,24 @@ namespace BeWo.Converter
return Visibility.Visible;
}
var lMode = true;
if (parameter is string s)
{
bool.TryParse(s, out lMode);
}
if (lMode)
if(value is bool b)
{
return !(bool)value ? Visibility.Collapsed : Visibility.Visible;
var lMode = true;
if (parameter is string s)
{
bool.TryParse(s, out lMode);
}
if (lMode)
{
return !(bool)value ? Visibility.Collapsed : Visibility.Visible;
}
return (bool)value ? Visibility.Collapsed : Visibility.Visible;
}
return (bool)value ? Visibility.Collapsed : Visibility.Visible;
// Fange Fälle ab, wo noch nicht mit Command gearbeitet wird
return Visibility.Visible;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

View File

@@ -0,0 +1,35 @@
using BS.Shared.Core;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace BeWo.Converter
{
public class EnumTranslationConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if(value is Enum e)
{
if(EnumTranslations.Wohnhilfe2Translation.TryGetValue(e, out string v))
{
return v;
}
return e;
}
return null;
throw new NotImplementedException();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace BeWo.Converter
{
public class Object2ToStringConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is object)
return value.ToString();
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Globalization;
using System.Windows.Data;
namespace BeWo.Converter
{
public class TestDebugConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
}
}

View File

@@ -0,0 +1,34 @@
using BS.Shared;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace BeWo.Converter
{
public class UserRightType2BoolConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is UserRightType type)
{
return BeWoApp.HasLoggedOnUserRight(type);
}
if (parameter is UserRightType type2)
{
return BeWoApp.HasLoggedOnUserRight(type2);
}
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace BeWo.Converter
{
public class ValueConverterGroup : List<IValueConverter>, IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return this.Aggregate(value, (current, converter) => converter.Convert(current, targetType, parameter, culture));
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
}

View File

@@ -455,6 +455,7 @@ namespace BeWo.Core.Config
public bool ShowPersehImport { get; set; }
public bool DontUpdateApprovalPeriodDates { get; set; }
private SchedulerViewType _SchedulerViewType;
public SchedulerViewType SchedulerViewType

51
BeWo/DebugConfig.cs Normal file
View File

@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo
{
public enum DebugConfigMode
{
SimpleAutoLogin,
FeatureWohnhilfe
}
public class DebugConfig
{
private static DebugConfig _CurrentConfig;
public static DebugConfig CurrentConfig
{
get
{
#if DEBUG
return _CurrentConfig ?? (_CurrentConfig = SimpleAutoLogin);
#endif
return null;
}
}
public DebugConfigMode DebugConfigMode { get; set; }
public bool AutoLogin { get; set; }
public UIContext? SelectView { get; set; }
public static DebugConfig SimpleAutoLogin => new DebugConfig()
{
DebugConfigMode = DebugConfigMode.SimpleAutoLogin,
AutoLogin = true
};
public static DebugConfig FeatureWohnhilfe => new DebugConfig()
{
DebugConfigMode = DebugConfigMode.FeatureWohnhilfe,
AutoLogin = true,
SelectView = UIContext.Customer
};
}
}

View File

@@ -242,15 +242,21 @@ namespace BeWo
ServicePointManager.ServerCertificateValidationCallback = PinPublicKey;
}
private static String PUB_KEY_X3 = "3082010A02820101009CD30CF05AE52E47B7725D3783B3686330EAD735261925E1BDBE35F170922FB7B84B4105ABA99E350858ECB12AC468870BA3E375E4E6F3A76271BA7981601FD7919A9FF3D0786771C8690E9591CFFEE699E9603C48CC7ECA4D7712249D471B5AEBB9EC1E37001C9CAC7BA705EACE4AEBBD41E53698B9CBFD6D3C9668DF232A42900C867467C87FA59AB8526114133F65E98287CBDBFA0E56F68689F3853F9786AFB0DC1AEF6B0D95167DC42BA065B299043675806BAC4AF31B9049782FA2964F2A20252904C674C0D031CD8F31389516BAA833B843F1B11FC3307FA27931133D2D36F8E3FCF2336AB93931C5AFC48D0D1D641633AAFA8429B6D40BC0D87DC3930203010001";
//!!!!Wenn hier neue Keys hinzugefügt werden, muss das auch in der Klasse ChatController.HauptKlassen.Chat und im DatabaseTerminator gemacht werden!!
private static String PUB_KEY_R3 = "3082010A0282010100BB021528CCF6A094D30F12EC8D5592C3F882F199A67A4288A75D26AAB52BB9C54CB1AF8E6BF975C8A3D70F4794145535578C9EA8A23919F5823C42A94E6EF53BC32EDB8DC0B05CF35938E7EDCF69F05A0B1BBEC094242587FA3771B313E71CACE19BEFDBE43B45524596A9C153CE34C852EEB5AEED8FDE6070E2A554ABB66D0E97A540346B2BD3BC66EB66347CFA6B8B8F572999F830175DBA726FFB81C5ADD286583D17C7E709BBF12BF786DCC1DA715DD446E3CCAD25C188BC60677566B3F118F7A25CE653FF3A88B647A5FF1318EA9809773F9D53F9CF01E5F5A6701714AF63A4FF99B3939DDC53A706FE48851DA169AE2575BB13CC5203F5ED51A18BDB150203010001";
private static String PUB_KEY_X3 = "9CD30CF05AE52E47B7725D3783B3686330EAD735261925E1BDBE35F170922FB7B84B4105ABA99E350858ECB12AC468870BA3E375E4E6F3A76271BA7981601FD7919A9FF3D0786771C8690E9591CFFEE699E9603C48CC7ECA4D7712249D471B5AEBB9EC1E37001C9CAC7BA705EACE4AEBBD41E53698B9CBFD6D3C9668DF232A42900C867467C87FA59AB8526114133F65E98287CBDBFA0E56F68689F3853F9786AFB0DC1AEF6B0D95167DC42BA065B299043675806BAC4AF31B9049782FA2964F2A20252904C674C0D031CD8F31389516BAA833B843F1B11FC3307FA27931133D2D36F8E3FCF2336AB93931C5AFC48D0D1D641633AAFA8429B6D40BC0D87DC3930203010001";
private static String PUB_KEY_E1 = "04245C2DA22AFD1C4BA65D97732731ACB2A06962EF65E8A6B0F0AC4B9FFF1C0B700FD3982F4DFC0F009B37F074055732972E05EF2A4325A3FB6E342713F64F7E69D302995EEB244792C1249BE6B1218FC12481FC68CC1F69BA58F51922F774C616";
private static String PUB_KEY_R3 = "BB021528CCF6A094D30F12EC8D5592C3F882F199A67A4288A75D26AAB52BB9C54CB1AF8E6BF975C8A3D70F4794145535578C9EA8A23919F5823C42A94E6EF53BC32EDB8DC0B05CF35938E7EDCF69F05A0B1BBEC094242587FA3771B313E71CACE19BEFDBE43B45524596A9C153CE34C852EEB5AEED8FDE6070E2A554ABB66D0E97A540346B2BD3BC66EB66347CFA6B8B8F572999F830175DBA726FFB81C5ADD286583D17C7E709BBF12BF786DCC1DA715DD446E3CCAD25C188BC60677566B3F118F7A25CE653FF3A88B647A5FF1318EA9809773F9D53F9CF01E5F5A6701714AF63A4FF99B3939DDC53A706FE48851DA169AE2575BB13CC5203F5ED51A18BDB150203010001";
private static String PUB_KEY_R11 = "3082010A0282010100BA87BC5C1B0039CBCA0ACDD46710F9013CA54EA561CB26CA52FB1501B7B928F5281EED27B324183967090C08ECE03AB03B770EBDF3E53954410C4EAE41D69974DE51DBEF7BFF58BDA8B713F6DE31D5F272C9726A0B8374959C4600641499F3B1D922D9CDA892AA1C267A3FFEEF58057B089581DB710F8EFBE33109BB09BE504D5F8F91763D5A9D9E83F2E9C466B3E106664348188065A037189A9B843297B1B2BDC4F815009D2788FBE26317966C9B27674BC4DB285E69C279F0495CE02450E1C4BCA105AC7B406D00B4C2413FA758B82FC55C9BA5BB099EF1FEEBB08539FDA80AEF45C478EB652AC2CF5F3CDEE35C4D1BF70B272BAA0B4277534F796A1D87D90203010001";
private static String PUB_KEY_E1 = "245c2da22afd1c4ba65d97732731acb2a06962ef65e8a6b0f0ac4b9fff1c0b700fd3982f4dfc0f009b37f074055732972e05ef2a4325a3fb6e342713f64f7e69d302995eeb244792c1249be6b1218fc12481fc68cc1f69ba58f51922f774c616";
private static String PUB_KEY_R10 = "3082010A0282010100CF57E5E6C45412EDB447FEC92758764650288C1D3E88DF059DD5B51829BDDDB55ABFFAF6CEA3BEAF00214B625A5A3C012FC55803F689FF8E1143EBC1B5E01407968F6F1FD7E7BA8139097565B7C2AF185B372628E7A3F4072B6D1AFFAB58BC95AE40FFE9CB57C4B55B7F780D1861BC17E754C6BB4991CD6E18D18085EEA66536BC74EABC504CEAFC21F338169394BAB0D36B3806CD16127ACA5275C8AD76B2C29C5D98455C6F617BC62DEE3C13528601D957E6381CDF8DB51F92919AE74A1CCC45A87255F0B0E6A307ECFDA71B669E3F488B71847158C93AFAEF5EF25B442B3C74E78FB247C1076ACD9AB70D96F712812651540AEC61F6F7F5E2F28AC8950D8D0203010001";
private static String PUB_KEY_E5 = "0d0b3a8a6b618eb6efdc5f58e7c6424554ab63f66661480a2e5975b481023750b73f1679dc98eca1289772201c2ccfd57c52204e54785b84146bc090ae85ecc051413c5a877f064dd4fe60d1fa6c2de17d951088a208540f991a4ce6ea0aacd8";
private static String PUB_KEY_E6 = "d9f19e4687f8217160a826eba3fab9eada1db912a7d426d95114b1617c7596bf220b391fd5bed10a46aa2d3c4a09842ebe409555e91940376675ed324e770449f8707bc318e7cef77110feac74d800d4ed6d1c731633109c3ab2ea6c62f4bdb8";
private static String PUB_KEY_R10 = "CF57E5E6C45412EDB447FEC92758764650288C1D3E88DF059DD5B51829BDDDB55ABFFAF6CEA3BEAF00214B625A5A3C012FC55803F689FF8E1143EBC1B5E01407968F6F1FD7E7BA8139097565B7C2AF185B372628E7A3F4072B6D1AFFAB58BC95AE40FFE9CB57C4B55B7F780D1861BC17E754C6BB4991CD6E18D18085EEA66536BC74EABC504CEAFC21F338169394BAB0D36B3806CD16127ACA5275C8AD76B2C29C5D98455C6F617BC62DEE3C13528601D957E6381CDF8DB51F92919AE74A1CCC45A87255F0B0E6A307ECFDA71B669E3F488B71847158C93AFAEF5EF25B442B3C74E78FB247C1076ACD9AB70D96F712812651540AEC61F6F7F5E2F28AC8950D8D0203010001";
private static String PUB_KEY_R11 = "BA87BC5C1B0039CBCA0ACDD46710F9013CA54EA561CB26CA52FB1501B7B928F5281EED27B324183967090C08ECE03AB03B770EBDF3E53954410C4EAE41D69974DE51DBEF7BFF58BDA8B713F6DE31D5F272C9726A0B8374959C4600641499F3B1D922D9CDA892AA1C267A3FFEEF58057B089581DB710F8EFBE33109BB09BE504D5F8F91763D5A9D9E83F2E9C466B3E106664348188065A037189A9B843297B1B2BDC4F815009D2788FBE26317966C9B27674BC4DB285E69C279F0495CE02450E1C4BCA105AC7B406D00B4C2413FA758B82FC55C9BA5BB099EF1FEEBB08539FDA80AEF45C478EB652AC2CF5F3CDEE35C4D1BF70B272BAA0B4277534F796A1D87D90203010001";
private bool PinPublicKey(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors)
@@ -261,15 +267,18 @@ namespace BeWo
return false;
bool chainContainsPk = false;
foreach (var element in chain.ChainElements)
{
String pk = element.Certificate.GetPublicKeyString();
String testx3 = PUB_KEY_X3;
String testr3 = PUB_KEY_R3;
String teste1 = PUB_KEY_E1;
String r11 = PUB_KEY_R11;
if (pk == PUB_KEY_X3 || pk == PUB_KEY_R3 || pk == PUB_KEY_E1 || pk == PUB_KEY_R11 || pk == PUB_KEY_R10)
String pk = element.Certificate.GetPublicKeyString().ToLower();
if (pk.Contains(PUB_KEY_X3.ToLower()) ||
pk.Contains(PUB_KEY_R3.ToLower()) ||
pk.Contains(PUB_KEY_E1.ToLower()) ||
pk.Contains(PUB_KEY_E5.ToLower()) ||
pk.Contains(PUB_KEY_E6.ToLower()) ||
pk.Contains(PUB_KEY_R10.ToLower()) ||
pk.Contains(PUB_KEY_R11.ToLower()))
{
chainContainsPk = true;
}
@@ -701,6 +710,11 @@ namespace BeWo
{
TextBox_Username.Focus();
}
if(DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.AutoLogin)
{
button_login_Click(this, new RoutedEventArgs());
}
}
private void ShowModalBackground()
@@ -980,15 +994,23 @@ namespace BeWo
private void LoginResult( WaitLayer2 lWaitLayer, UserValidationResult result, String lUserName, String lPassword, String tenant, String lPIN)
{
if (result == UserValidationResult.UserValid || result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded)
if (result == UserValidationResult.UserValid || result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded || result == UserValidationResult.TwoFactorAuthenticationFailedNoChatCodeAllowLogin)
{
if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded)
if (result == UserValidationResult.UserValidTwoFactorAuthenticationNeeded || result == UserValidationResult.TwoFactorAuthenticationFailedNoChatCodeAllowLogin)
{
Translator t = new Translator(new MultiLanguage.ServiceTranslator());
grid_root.Children.Remove(lWaitLayer);
var dlg = new TwoFactorAuthMessageDialog(lUserName, lPassword);
var message = Translator.Translate("Zwei Faktor Authentifizierung erforderlich");
dlg.ShowCodeField = true;
if (result == UserValidationResult.TwoFactorAuthenticationFailedNoChatCodeAllowLogin)
{
message = Translator.Translate("Kein Chat Code für die Zwei Faktor Authentifizierung gefunden");
dlg.ShowCodeField = false;
}
if (message.Contains("<") && message.Contains(">"))
{
dlg.SetXaml(message);
@@ -997,7 +1019,7 @@ namespace BeWo
{
dlg.Message = message;
}
dlg.Owner = BeWoApp.Current.MainWindow;
var dr = dlg.ShowDialog();
@@ -1033,7 +1055,7 @@ namespace BeWo
});
}, true);
}
else if (result == UserValidationResult.PasswordExpired || result == UserValidationResult.BeWoPasswordNotAllowed)
else if (result == UserValidationResult.PasswordExpired || result == UserValidationResult.BeWoPasswordNotAllowed || result == UserValidationResult.TwoFactorAuthenticationFailedNoChatCodeDontAllowLogin)
{
BeWoApp.UserName = lUserName;
BeWoApp.UserPassword = lPassword;

View File

@@ -78,10 +78,17 @@ namespace BeWo
KeyDown += MainControl_KeyDown;
NavigateToHomeView();
#if DEBUG
if (DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.SelectView is UIContext context)
{
NavigateTo(GetViewForUIContext(context));
}
#endif
// ToDo: Neuer Kalender nur im Debug-Modus!
#if DEBUG
ButtonScheduling.Visibility = Visibility.Visible;
ButtonScheduling.Visibility = Visibility.Visible;
#else
ButtonScheduling.Visibility = Visibility.Collapsed;
#endif
@@ -133,7 +140,7 @@ namespace BeWo
AufOffeneTerminePruefen();
//BeWoApp.InitBlubb();
//BeWoApp.InitBlubb();
#if !DEBUG
if (this.button_Scheduler.Visibility == Visibility.Visible && !BeWoApp.AppSettings.IsSchedulerAllowed)
@@ -156,10 +163,10 @@ namespace BeWo
this.button_Dokumente.Visibility = Visibility.Collapsed;
#endif
#if DEBUG
//DebugHelperViewButton.Visibility = Visibility.Visible;
#if DEBUG
//DebugHelperViewButton.Visibility = Visibility.Visible;
#endif
}
}
public List<ModalViewWindow> OpenedModalViewWindows { get; set; }
@@ -191,6 +198,8 @@ namespace BeWo
public bool IsMaximized { get; set; }
public bool IsModalPopupOpen => _CurrentModalPopup is object;
private bool _HatNeueTermine;
public bool HatNeueTermine
{

View File

@@ -4,6 +4,6 @@
Title="BeWoPlaner" Height="768" Width="1024" WindowStartupLocation="CenterScreen" WindowState="Maximized"
BorderThickness="1" Closing="MainWindow_OnClosing">
<Grid x:Name="rootGrid">
<ComboBox Width="100"></ComboBox>
</Grid>
</Window>

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Windows;
using System.Windows.Media;
using BS.Shared.DataContracts;
@@ -17,6 +18,16 @@ namespace BeWo.Scheduler.ViewModel
{
var result = Subject;
// Man darf den Betreff nicht sehen, wenn man der Originator ist und nicht in der nicht leeren EmployeeList ist oder man weder Originator noch in der EmployeeList ist
var isInEmployeeList = EmployeeList.Any(e2A => e2A.Employee.Equals(BeWoApp.CompactLoggedOnEmployee));
var isOriginator = Originator.Equals(BeWoApp.CompactLoggedOnEmployee);
if(IsPrivate && (!isOriginator && !isInEmployeeList || !isInEmployeeList))
{
result = "Privat";
}
if(IsTask)
{
result = result ?? string.Empty;

View File

@@ -1,382 +1,612 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:conv="clr-namespace:BeWo.Converter" xmlns:localcore="clr-namespace:BeWo.Core" mc:Ignorable="d">
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:localcore="clr-namespace:BeWo.Core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<LinearGradientBrush x:Key="ExpanderArrowHoverFill" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFF0F8FE" Offset="0" />
<GradientStop Color="#FFE0F3FE" Offset="0.3" />
<GradientStop Color="#FF6FA7C5" Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ExpanderArrowPressedFill" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="#FFDCF0FA" Offset="0" />
<GradientStop Color="#FFC5E6F7" Offset="0.2" />
<GradientStop Color="#FF5690D0" Offset="1" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ExpanderArrowFill" EndPoint="0,1" StartPoint="0,0">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="#FFBFBFBF" Offset="0.5" />
<GradientStop Color="#FF878787" Offset="1" />
</LinearGradientBrush>
<Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid SnapsToDevicePixels="False" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="19" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="-90" />
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" />
<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5" />
</Grid>
<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" Grid.Row="1" RecognizesAccessKey="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B" />
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid SnapsToDevicePixels="False" Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="19" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="180" />
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" />
<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5" />
</Grid>
<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" Grid.Column="1" RecognizesAccessKey="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B" />
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid SnapsToDevicePixels="False" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="19" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="90" />
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" />
<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5" />
</Grid>
<ContentPresenter HorizontalAlignment="Center" Margin="0,4,0,0" VerticalAlignment="Top" SnapsToDevicePixels="True" Grid.Row="1" RecognizesAccessKey="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B" />
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderHeaderFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Border>
<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="0" SnapsToDevicePixels="true" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid SnapsToDevicePixels="False" Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="19" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Ellipse Fill="{DynamicResource ExpanderArrowFill}" Stroke="DarkGray" HorizontalAlignment="Center" x:Name="circle" VerticalAlignment="Center" Width="19" Height="19" />
<Path Stroke="#666" StrokeThickness="2" HorizontalAlignment="Center" x:Name="arrow" VerticalAlignment="Center" SnapsToDevicePixels="false" Data="M 1,1.5 L 4.5,5 L 8,1.5" />
<ContentPresenter HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" Grid.Column="1" RecognizesAccessKey="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter Property="Data" TargetName="arrow" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF3C7FB1" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Stroke" TargetName="circle" Value="#FF526C7B" />
<Setter Property="StrokeThickness" TargetName="circle" Value="1.5" />
<Setter Property="Fill" TargetName="circle" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter Property="Stroke" TargetName="arrow" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="analysisExpander" TargetType="{x:Type Expander}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
<DockPanel>
<ToggleButton localcore:BeWoWpfUtils.IsExpanderButtonVisible="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{DynamicResource AnalysisExpanderToggleButton}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top" />
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="false" Visibility="Collapsed" DockPanel.Dock="Bottom" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="true">
<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="AnalysisExpanderToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<ControlTemplate.Resources>
<Storyboard x:Key="Storyboard1">
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Border BorderBrush="#14FFFFFF" BorderThickness="1,1,1,0" CornerRadius="5,5,5,5">
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#4C000000" Offset="1" />
</LinearGradientBrush>
</Border.Background>
<Grid Margin="3,0,10,0" SnapsToDevicePixels="False" Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" x:Name="columnDefinition" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter HorizontalAlignment="Stretch" Margin="4,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" Grid.Column="1" RecognizesAccessKey="True" />
<Rectangle Visibility="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible, Converter={StaticResource BoolVisibilityConverter}}" Stroke="#4C000000" RadiusX="2" RadiusY="2" x:Name="rectangle" Width="14" Height="14" Grid.ColumnSpan="1" Margin="5,5,5,5">
<Rectangle.Fill>
<RadialGradientBrush>
<GradientStop Color="#19000000" Offset="0" />
<GradientStop Color="#4C000000" Offset="1" />
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Path Visibility="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible, Converter={StaticResource BoolVisibilityConverter}}" Fill="{x:Null}" Stretch="Fill" Stroke="White" HorizontalAlignment="Center" x:Name="path1" VerticalAlignment="Center" Width="1" Height="8" RenderTransformOrigin="0.5,0.5" Data="M9.375,4.125 L9.375,10.375" d:LayoutOverrides="Width">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="-90" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path Visibility="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible, Converter={StaticResource BoolVisibilityConverter}}" Fill="{x:Null}" Stretch="Fill" Stroke="White" HorizontalAlignment="Center" x:Name="path" VerticalAlignment="Center" Height="8" Data="M9.625,4.625 L9.625,10.125" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
<BeginStoryboard x:Name="Storyboard1_BeginStoryboard" Storyboard="{StaticResource Storyboard1}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<RemoveStoryboard BeginStoryboardName="Storyboard1_BeginStoryboard" />
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" />
<Trigger Property="IsPressed" Value="true" />
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<LinearGradientBrush x:Key="ExpanderArrowHoverFill" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#FFF0F8FE" />
<GradientStop Offset="0.3" Color="#FFE0F3FE" />
<GradientStop Offset="1" Color="#FF6FA7C5" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ExpanderArrowPressedFill" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#FFDCF0FA" />
<GradientStop Offset="0.2" Color="#FFC5E6F7" />
<GradientStop Offset="1" Color="#FF5690D0" />
</LinearGradientBrush>
<LinearGradientBrush x:Key="ExpanderArrowFill" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="White" />
<GradientStop Offset="0.5" Color="#FFBFBFBF" />
<GradientStop Offset="1" Color="#FF878787" />
</LinearGradientBrush>
<Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.RowDefinitions>
<RowDefinition Height="19" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="-90" />
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse
x:Name="circle"
Width="19"
Height="19"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{DynamicResource ExpanderArrowFill}"
Stroke="DarkGray" />
<Path
x:Name="arrow"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
SnapsToDevicePixels="false"
Stroke="#666"
StrokeThickness="2" />
</Grid>
<ContentPresenter
Grid.Row="1"
Margin="0,4,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
RecognizesAccessKey="True"
SnapsToDevicePixels="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF3C7FB1" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF526C7B" />
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="19" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="180" />
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse
x:Name="circle"
Width="19"
Height="19"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{DynamicResource ExpanderArrowFill}"
Stroke="DarkGray" />
<Path
x:Name="arrow"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
SnapsToDevicePixels="false"
Stroke="#666"
StrokeThickness="2" />
</Grid>
<ContentPresenter
Grid.Column="1"
Margin="4,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
RecognizesAccessKey="True"
SnapsToDevicePixels="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF3C7FB1" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF526C7B" />
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.RowDefinitions>
<RowDefinition Height="19" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.LayoutTransform>
<TransformGroup>
<TransformGroup.Children>
<TransformCollection>
<RotateTransform Angle="90" />
</TransformCollection>
</TransformGroup.Children>
</TransformGroup>
</Grid.LayoutTransform>
<Ellipse
x:Name="circle"
Width="19"
Height="19"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{DynamicResource ExpanderArrowFill}"
Stroke="DarkGray" />
<Path
x:Name="arrow"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
SnapsToDevicePixels="false"
Stroke="#666"
StrokeThickness="2" />
</Grid>
<ContentPresenter
Grid.Row="1"
Margin="0,4,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Top"
RecognizesAccessKey="True"
SnapsToDevicePixels="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF3C7FB1" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF526C7B" />
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderHeaderFocusVisual">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Border>
<Rectangle
Margin="0"
SnapsToDevicePixels="true"
Stroke="Black"
StrokeDashArray="1 2"
StrokeThickness="1" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border Padding="{TemplateBinding Padding}">
<Grid Background="Transparent" SnapsToDevicePixels="False">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="19" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Ellipse
x:Name="circle"
Width="19"
Height="19"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="{DynamicResource ExpanderArrowFill}"
Stroke="DarkGray" />
<Path
x:Name="arrow"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M 1,1.5 L 4.5,5 L 8,1.5"
SnapsToDevicePixels="false"
Stroke="#666"
StrokeThickness="2" />
<ContentPresenter
Grid.Column="1"
Margin="4,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
RecognizesAccessKey="True"
SnapsToDevicePixels="True" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF3C7FB1" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowHoverFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#222" />
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="circle" Property="Stroke" Value="#FF526C7B" />
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
<Setter TargetName="circle" Property="Fill" Value="{DynamicResource ExpanderArrowPressedFill}" />
<Setter TargetName="arrow" Property="Stroke" Value="#FF003366" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="analysisExpander" TargetType="{x:Type Expander}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="3"
SnapsToDevicePixels="true">
<DockPanel>
<ToggleButton
x:Name="HeaderSite"
MinWidth="0"
MinHeight="0"
Margin="1"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
localcore:BeWoWpfUtils.IsExpanderButtonVisible="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
DockPanel.Dock="Top"
FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}"
Style="{DynamicResource AnalysisExpanderToggleButton}" />
<ContentPresenter
x:Name="ExpandSite"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
DockPanel.Dock="Bottom"
Focusable="false"
Visibility="Collapsed" />
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="true">
<Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="AnalysisExpanderToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<ControlTemplate.Resources>
<Storyboard x:Key="Storyboard1">
<ObjectAnimationUsingKeyFrames
BeginTime="00:00:00"
Storyboard.TargetName="path"
Storyboard.TargetProperty="(UIElement.Visibility)"
Duration="00:00:00.0010000">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Border
BorderBrush="#14FFFFFF"
BorderThickness="1,1,1,0"
CornerRadius="5,5,5,5">
<Border.Background>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#4C000000" />
</LinearGradientBrush>
</Border.Background>
<Grid
Margin="3,0,10,0"
Background="Transparent"
SnapsToDevicePixels="False">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="columnDefinition" Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter
Grid.Column="1"
Margin="4,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
RecognizesAccessKey="True"
SnapsToDevicePixels="True" />
<Rectangle
x:Name="rectangle"
Grid.ColumnSpan="1"
Width="14"
Height="14"
Margin="5,5,5,5"
RadiusX="2"
RadiusY="2"
Stroke="#4C000000"
Visibility="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible,
Converter={StaticResource BoolVisibilityConverter}}">
<Rectangle.Fill>
<RadialGradientBrush>
<GradientStop Offset="0" Color="#19000000" />
<GradientStop Offset="1" Color="#4C000000" />
</RadialGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Path
x:Name="path1"
Width="1"
Height="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M9.375,4.125 L9.375,10.375"
Fill="{x:Null}"
RenderTransformOrigin="0.5,0.5"
Stretch="Fill"
Stroke="White"
Visibility="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible,
Converter={StaticResource BoolVisibilityConverter}}"
d:LayoutOverrides="Width">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="-90" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Path.RenderTransform>
</Path>
<Path
x:Name="path"
Height="8"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Data="M9.625,4.625 L9.625,10.125"
Fill="{x:Null}"
Stretch="Fill"
Stroke="White"
Visibility="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible,
Converter={StaticResource BoolVisibilityConverter}}" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
<BeginStoryboard x:Name="Storyboard1_BeginStoryboard" Storyboard="{StaticResource Storyboard1}" />
</Trigger.EnterActions>
<Trigger.ExitActions>
<RemoveStoryboard BeginStoryboardName="Storyboard1_BeginStoryboard" />
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsMouseOver" Value="true" />
<Trigger Property="IsPressed" Value="true" />
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FlatLineExpander" TargetType="{x:Type Expander}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="#5F5F5F" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
<Style x:Key="FlatLineExpander" TargetType="{x:Type Expander}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="BorderBrush" Value="#5F5F5F" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
<DockPanel>
<Border SnapsToDevicePixels="true" Background="Transparent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,1" DockPanel.Dock="Top">
<ToggleButton localcore:BeWoWpfUtils.IsExpanderButtonVisible="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}"
IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{DynamicResource TriangleToggleButton}" Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
</Border>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="ExpandSite"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="false" Visibility="Collapsed" DockPanel.Dock="Bottom" />
</DockPanel>
<DockPanel>
<Border
Background="Transparent"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="0,0,0,1"
DockPanel.Dock="Top"
SnapsToDevicePixels="true">
<ToggleButton
x:Name="HeaderSite"
MinWidth="0"
MinHeight="0"
Margin="1"
Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
localcore:BeWoWpfUtils.IsExpanderButtonVisible="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
FontFamily="{TemplateBinding FontFamily}"
FontSize="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
FontStyle="{TemplateBinding FontStyle}"
FontWeight="{TemplateBinding FontWeight}"
Foreground="{TemplateBinding Foreground}"
IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}"
Style="{DynamicResource TriangleToggleButton}" />
</Border>
<ContentPresenter
x:Name="ExpandSite"
Margin="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
DockPanel.Dock="Bottom"
Focusable="false"
Visibility="Collapsed" />
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="true">
<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="true">
<Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TriangleToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<ControlTemplate.Resources>
<Storyboard x:Key="Storyboard1">
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.Visibility)">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid Margin="3,0,10,0" SnapsToDevicePixels="False" Background="Transparent">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" x:Name="columnDefinition" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter HorizontalAlignment="Stretch" Margin="8,0,0,0" VerticalAlignment="Center" SnapsToDevicePixels="True" Grid.Column="1" RecognizesAccessKey="True" />
<Grid x:Name="expander_button" Grid.Column="0" Height="12" Width="12" Margin="1" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<RotateTransform Angle="0" />
</Grid.RenderTransform>
<!--<Path SnapsToDevicePixels="True" HorizontalAlignment="Center" x:Name="Path_Arrow" VerticalAlignment="Center" Fill="#FF000000" Data="M0,0L4,7 8,0z" Margin="0,2,0,0" />-->
<Polygon
SnapsToDevicePixels="True" HorizontalAlignment="Center" x:Name="Path_Arrow" VerticalAlignment="Center" Margin="0,0,0,0"
Points="0,0 7,4 0,8 0,0" StrokeThickness="0"
Fill="#FF000000">
<Style x:Key="TriangleToggleButton" TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<ControlTemplate.Resources>
<Storyboard x:Key="Storyboard1">
<ObjectAnimationUsingKeyFrames
BeginTime="00:00:00"
Storyboard.TargetName="path"
Storyboard.TargetProperty="(UIElement.Visibility)"
Duration="00:00:00.0010000">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</ControlTemplate.Resources>
<Grid
Margin="3,0,10,0"
Background="Transparent"
SnapsToDevicePixels="False">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="columnDefinition" Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ContentPresenter
Grid.Column="1"
Margin="8,0,0,0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
RecognizesAccessKey="True"
SnapsToDevicePixels="True" />
<Grid
x:Name="expander_button"
Grid.Column="0"
Width="12"
Height="12"
Margin="1"
VerticalAlignment="Center"
RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<RotateTransform Angle="0" />
</Grid.RenderTransform>
<!--<Path SnapsToDevicePixels="True" HorizontalAlignment="Center" x:Name="Path_Arrow" VerticalAlignment="Center" Fill="#FF000000" Data="M0,0L4,7 8,0z" Margin="0,2,0,0" />-->
<Polygon
x:Name="Path_Arrow"
Margin="0,0,0,0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Fill="#FF000000"
Points="0,0 7,4 0,8 0,0"
SnapsToDevicePixels="True"
StrokeThickness="0" />
</Grid>
</Polygon>
</Grid>
</Grid>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="true">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="expander_button" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" To="90" Duration="0" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="expander_button" Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)" To="0" Duration="0" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="expander_button"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
To="90"
Duration="0" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation
Storyboard.TargetName="expander_button"
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
To="0"
Duration="0" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@@ -1 +1,4 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"></ResourceDictionary>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core" />

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,124 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxei="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls">
<Style x:Key="TitleLabel" TargetType="Label">
<Setter Property="TextElement.FontSize" Value="16" />
<Setter Property="TextElement.Foreground" Value="{StaticResource TabItemHotTextBrush}" />
<Setter Property="TextElement.FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Padding" Value="3,0,3,0" />
<Setter Property="MinHeight" Value="20" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="Margin" Value="3,-6,3,6" />
</Style>
<Style BasedOn="{StaticResource {x:Type uc:NullItemComboBox}}" TargetType="uc:NullItemComboBox">
<Setter Property="Margin" Value="3" />
</Style>
<Style BasedOn="{StaticResource {x:Type ComboBox}}" TargetType="ComboBox">
<Setter Property="Margin" Value="3" />
<Setter Property="Height" Value="23" />
</Style>
<Style BasedOn="{StaticResource {x:Type CheckBox}}" TargetType="{x:Type CheckBox}">
<Setter Property="Margin" Value="5" />
<Setter Property="Padding" Value="0" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<!--<Style TargetType="dxe:DateEdit" BasedOn="{StaticResource {x:Type dxe:DateEdit}}" x:Shared="False">
<Setter Property="Margin" Value="3"/>
<Setter Property="Height" Value="23"/>
<Setter Property="AllowDefaultButton" Value="False"/>
<Setter Property="Buttons">
<Setter.Value>
<dxe:ButtonInfoCollection >
<dxe:ButtonInfo IsDefaultButton="True" x:Shared="False">
<dxe:ButtonInfo.Template>
<DataTemplate>
<ToggleButton x:Name="PART_Item" Style="{StaticResource ComboBoxTransparentButtonStyle}"/>
</DataTemplate>
</dxe:ButtonInfo.Template>
</dxe:ButtonInfo>
</dxe:ButtonInfoCollection>
</Setter.Value>
</Setter>
</Style>-->
<Style BasedOn="{StaticResource {x:Type dxe:DateEdit}}" TargetType="{x:Type dxe:DateEdit}">
<Setter Property="Margin" Value="3" />
<Setter Property="Padding" Value="1" />
<Setter Property="Height" Value="23" />
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Style.Resources>
<DataTemplate x:Key="{dxet:ButtonsThemeKey ResourceKey=ToggleButtonInfoTemplate, IsThemeIndependent=True}">
<dx:ToggleStateButton
x:Name="PART_Item"
Margin="2"
dxei:SetIsCheckedToButtonInfoBehavior.IsEnabled="True"
IsChecked="{Binding Path=IsChecked, Mode=TwoWay}"
Style="{StaticResource ComboBoxTransparentButtonStyle}" />
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsDefaultButton}" Value="True">
<Setter TargetName="PART_Item" Property="IsChecked" Value="{Binding Path=(dxe:BaseEdit.OwnerEdit).IsPopupOpen, RelativeSource={RelativeSource Self}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsDefaultButton}" Value="False">
<Setter TargetName="PART_Item" Property="HandleToggle" Value="False" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</Style.Resources>
</Style>
<Style BasedOn="{StaticResource {x:Type dxe:TextEdit}}" TargetType="{x:Type dxe:TextEdit}">
<Setter Property="Margin" Value="3" />
<Setter Property="Height" Value="23" />
</Style>
<Style BasedOn="{StaticResource {x:Type Button}}" TargetType="{x:Type Button}">
<Setter Property="Margin" Value="3" />
<Setter Property="Visibility" Value="Visible" />
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsEnabled}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
<Style BasedOn="{StaticResource {x:Type Label}}" TargetType="{x:Type Label}">
<Setter Property="IsEnabled" Value="True" />
<Setter Property="Margin" Value="3" />
<Setter Property="Padding" Value="3" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type TextBox}">
<Setter Property="Margin" Value="3" />
<Setter Property="Padding" Value="3" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="HorizontalAlignment" Value="Stretch" />
</Style>
<Style TargetType="RadioButton">
<Setter Property="Margin" Value="3" />
<Setter Property="VerticalAlignment" Value="Top" />
</Style>
<DataTemplate x:Key="ListItemView">
<TextBlock
Text="{Binding Path=., Converter={StaticResource EnumTranslationConverter}}"
TextWrapping="Wrap"
ToolTip="{Binding Path=Text, RelativeSource={RelativeSource Self}}" />
</DataTemplate>
<Style
x:Key="EnumTranslationNullItemComboBox"
BasedOn="{StaticResource {x:Type uc:NullItemComboBox}}"
TargetType="{x:Type uc:NullItemComboBox}">
<Setter Property="ItemTemplate" Value="{StaticResource ListItemView}" />
</Style>
<Style
x:Key="EnumTranslationComboBox"
BasedOn="{StaticResource {x:Type ComboBox}}"
TargetType="{x:Type ComboBox}">
<Setter Property="ItemTemplate" Value="{StaticResource ListItemView}" />
</Style>
</ResourceDictionary>

View File

@@ -1,35 +1,58 @@
<UserControl x:Class="BeWo.View.Controls.BehinderungsartenSelectionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl
x:Class="BeWo.View.Controls.BehinderungsartenSelectionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="300"
d:DesignWidth="300"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0" x:Name="listbox_result" ItemsSource="{Binding Path=PossibleBehinderungsarten}" Background="{DynamicResource ObjectEditBackgroundBrush}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Border BorderBrush="{x:Null}" Height="23" CornerRadius="5">
<CheckBox Margin="6,0,0,0" VerticalAlignment="Center" FontFamily="Microsoft Sans Serif" Tag="{Binding}" IsChecked="{Binding Path=IsChecked}"
Content="{Binding Path=Name}" Checked="BehinderungsartCB_OnChecked" Unchecked="BehinderungsartCB_OnChecked"/>
</Border>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox
x:Name="listbox_result"
Grid.Row="0"
Background="{DynamicResource ObjectEditBackgroundBrush}"
ItemsSource="{Binding Path=PossibleBehinderungsarten}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Border
Height="23"
BorderBrush="{x:Null}"
CornerRadius="5">
<CheckBox
Margin="6,0,0,0"
VerticalAlignment="Center"
Checked="BehinderungsartCB_OnChecked"
Content="{Binding Path=Name}"
FontFamily="Microsoft Sans Serif"
IsChecked="{Binding Path=IsChecked}"
Tag="{Binding}"
Unchecked="BehinderungsartCB_OnChecked" />
</Border>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button HorizontalAlignment="Right" Grid.Column="1" Margin="3" Content="Schließen" Width="70" Height="25" Command="ApplicationCommands.Close" />
</Grid>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="1"
Width="70"
Height="25"
Margin="3"
HorizontalAlignment="Right"
Command="ApplicationCommands.Close"
Content="Schließen" />
</Grid>
</Grid>
</UserControl>

View File

@@ -0,0 +1,324 @@
<UserControl
x:Class="BeWo.View.Controls.CustomerVermittlungArbeitControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
d:DesignHeight="1450"
d:DesignWidth="1800"
mc:Ignorable="d">
<d:DesignerProperties.DesignStyle>
<Style TargetType="UserControl">
<Setter Property="Background" Value="White" />
<Setter Property="Height" Value="1366" />
<Setter Property="Width" Value="768" />
</Style>
</d:DesignerProperties.DesignStyle>
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\PrototypeStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource ObjectEditGroupBox}" TargetType="{x:Type GroupBox}">
<Setter Property="Margin" Value="15" />
<Setter Property="Padding" Value="10,7,7,5" />
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" MaxWidth="500" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<GroupBox
Grid.RowSpan="3"
Grid.Column="1"
Width="{Binding Path=Width, ElementName=grid}"
HorizontalAlignment="Stretch"
Header="Falldaten">
<Grid x:Name="grid">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="column1" Width="Auto" />
<ColumnDefinition
x:Name="column2"
Width="*"
MinWidth="200"
MaxWidth="300" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Content="Eigenes Aktenzeichen" />
<TextBox
Grid.Row="0"
Grid.Column="1"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Text="{Binding Path=EigenesAktenzeichen, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="1"
Grid.Column="0"
Content="Auftragseingang" />
<dxe:DateEdit
Grid.Row="1"
Grid.Column="1"
EditValue="{Binding Path=Auftragseingang, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"
ShowClearButton="False" />
<Label
Grid.Row="2"
Grid.Column="0"
Content="Auftragsherkunft" />
<uc:NullItemComboBox
x:Name="comboBox_Auftragsherkunft"
Grid.Row="2"
Grid.Column="1"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"
ItemsSource="{Binding Path=Auftragsherkunfte}"
SelectedValue="{Binding Path=Auftragsherkunft, Mode=TwoWay}" />
<Label
Grid.Row="3"
Grid.Column="0"
Content="Vermittlungsgrundlage" />
<uc:NullItemComboBox
x:Name="comboBox_Vermittlungsgrundlage"
Grid.Row="3"
Grid.Column="1"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"
ItemsSource="{Binding Path=Vermittlungsgrundlagen}"
SelectedValue="{Binding Path=Vermittlungsgrundlage, Mode=TwoWay}" />
<Label
Grid.Row="4"
Grid.Column="0"
Content="Tagessätze" />
<dxe:TextEdit
Grid.Row="4"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=Tagessatze, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Mask="########0.##"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="5"
Grid.Column="0"
Content="Tagessatzhöhe" />
<dxe:TextEdit
Grid.Row="5"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=Tagessatzhohe, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Mask="########0.00 $"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="6"
Grid.Column="0"
Content="Höhe der Geldstrafe" />
<dxe:TextEdit
Grid.Row="6"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=HoheDerGeldstrafe, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="True"
Mask="########0.00 $"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="7"
Grid.Column="0"
Content="Zu leistende Arbeitsstunden" />
<dxe:TextEdit
Grid.Row="7"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=ZuLeistendeArbeitsstunden, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Mask="########0.## Std"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="8"
Grid.Column="0"
Content="Hinweis" />
<TextBox
Grid.Row="8"
Grid.Column="1"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Text="{Binding Path=Hinweis, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="9"
Grid.Column="0"
Content="Termin" />
<dxe:DateEdit
Grid.Row="9"
Grid.Column="1"
EditValue="{Binding Path=Termin, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"
Mask="G"
MaskUseAsDisplayFormat="True"
ShowClearButton="True">
<dxe:DateEdit.StyleSettings>
<dxe:DateEditNavigatorWithTimePickerStyleSettings />
</dxe:DateEdit.StyleSettings>
</dxe:DateEdit>
<Label
Grid.Row="10"
Grid.Column="0"
Content="Bearbeitungsstatus" />
<uc:NullItemComboBox
x:Name="combobox_bearbeitungsstatus"
Grid.Row="10"
Grid.Column="1"
HorizontalAlignment="Stretch"
Style="{StaticResource EnumTranslationNullItemComboBox}"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"
ItemsSource="{Binding Path=FalldatenBearbeitungsstatusTypes}"
SelectedValue="{Binding Path=FalldatenBearbeitungsstatus}" />
<Label
Grid.Row="11"
Grid.Column="0"
Content="Auftragsrückgabe" />
<TextBox
Grid.Row="11"
Grid.Column="1"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Text="{Binding Path=Auftragsruckgabe, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="12"
Grid.Column="0"
Content="Verlauf" />
<TextBox
Grid.Row="12"
Grid.Column="1"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Text="{Binding Path=Verlauf, UpdateSourceTrigger=PropertyChanged}" />
<Label
Grid.Row="13"
Grid.Column="0"
Content="Abgeleistete Stunden" />
<dxe:TextEdit
Grid.Row="13"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=AbgeleisteteStunden, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Mask="########0.## Std"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="14"
Grid.Column="0"
Content="Ersparte Hafttage" />
<dxe:TextEdit
Grid.Row="14"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=ErsparteHafttage, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Mask="########0.## Tage"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="15"
Grid.Column="0"
Content="Geleistete Ratenzahlung" />
<dxe:TextEdit
Grid.Row="15"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=GeleisteteRatenzahlung, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Mask="########0.00 $"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="16"
Grid.Column="0"
Content="Geleistete Einmalzahlung" />
<dxe:TextEdit
Grid.Row="16"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=GeleisteteEinmalzahlung, UpdateSourceTrigger=PropertyChanged}"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Mask="########0.00 $"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label
Grid.Row="17"
Grid.Column="0"
Content="Bemerkung" />
<TextBox
Grid.Row="17"
Grid.Column="1"
Height="92"
MaxHeight="184"
AcceptsReturn="True"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"
Text="{Binding Path=Bemerkung, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
</Grid>
</GroupBox>
<GroupBox
Grid.Column="0"
VerticalAlignment="Top"
Header="Gründe für Abbruch">
<StackPanel>
<CheckBox Content="{markup:Translate GrundArbeitsunfahig}" IsChecked="{Binding Path=GrundArbeitsunfahig, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundSuchtproblem}" IsChecked="{Binding Path=GrundSuchtproblem, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundPsychischeProbleme}" IsChecked="{Binding Path=GrundPsychischeProbleme, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundKeineMotivation}" IsChecked="{Binding Path=GrundKeineMotivation, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundInHaft}" IsChecked="{Binding Path=GrundInHaft, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundUnbekannt}" IsChecked="{Binding Path=GrundUnbekannt, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundKeinKontakt}" IsChecked="{Binding Path=GrundKeinKontakt, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundNichtAngetreten}" IsChecked="{Binding Path=GrundNichtAngetreten, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundAbbruchDerTatigkeit}" IsChecked="{Binding Path=GrundAbbruchDerTatigkeit, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundWiderruf}" IsChecked="{Binding Path=GrundWiderruf, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate Grund459StPO}" IsChecked="{Binding Path=Grund459StPO, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate GrundAusbleibenDerZahlung}" IsChecked="{Binding Path=GrundAusbleibenDerZahlung, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</GroupBox>
<GroupBox
Grid.Row="1"
Grid.Column="0"
Header="Besonderheiten">
<StackPanel>
<CheckBox Content="{markup:Translate BesonderheitMehrfacheBeauftragung}" IsChecked="{Binding Path=BesonderheitMehrfacheBeauftragung, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate BesonderheitMehrfacheVermittlung}" IsChecked="{Binding Path=BesonderheitMehrfacheVermittlung, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate BesonderheitVermittlungAusHaft}" IsChecked="{Binding Path=BesonderheitVermittlungAusHaft, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Content="{markup:Translate BesonderheitDurchBGBWAufgesucht}" IsChecked="{Binding Path=BesonderheitDurchBGBWAufgesucht, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</GroupBox>
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Controls
{
/// <summary>
/// Interaktionslogik für CustomerVermittlungArbeitControl.xaml
/// </summary>
public partial class CustomerVermittlungArbeitControl : UserControl
{
public CustomerVermittlungArbeitControl()
{
InitializeComponent();
}
}
}

View File

@@ -1,35 +1,58 @@
<UserControl x:Class="BeWo.View.Controls.MerkzeichenSelectionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="230" d:DesignWidth="300">
<UserControl
x:Class="BeWo.View.Controls.MerkzeichenSelectionControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
d:DesignHeight="230"
d:DesignWidth="300"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ListBox Grid.Row="0" x:Name="listbox_result" ItemsSource="{Binding Path=PossibleMerkzeichen}" Background="{DynamicResource ObjectEditBackgroundBrush}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Border BorderBrush="{x:Null}" Height="23" CornerRadius="5">
<CheckBox Margin="6,0,0,0" VerticalAlignment="Center" FontFamily="Microsoft Sans Serif" Tag="{Binding}" IsChecked="{Binding Path=IsChecked}"
Content="{Binding Path=Name}" Checked="MerkzeichenCB_OnChecked" Unchecked="MerkzeichenCB_OnChecked"/>
</Border>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<ListBox
x:Name="listbox_result"
Grid.Row="0"
Background="{DynamicResource ObjectEditBackgroundBrush}"
ItemsSource="{Binding Path=PossibleMerkzeichen}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
<Border
Height="23"
BorderBrush="{x:Null}"
CornerRadius="5">
<CheckBox
Margin="6,0,0,0"
VerticalAlignment="Center"
Checked="MerkzeichenCB_OnChecked"
Content="{Binding Path=Name}"
FontFamily="Microsoft Sans Serif"
IsChecked="{Binding Path=IsChecked}"
Tag="{Binding}"
Unchecked="MerkzeichenCB_OnChecked" />
</Border>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button HorizontalAlignment="Right" Grid.Column="1" Margin="3" Content="Schließen" Width="70" Height="25" Command="ApplicationCommands.Close" />
</Grid>
</Grid>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Button
Grid.Column="1"
Width="70"
Height="25"
Margin="3"
HorizontalAlignment="Right"
Command="ApplicationCommands.Close"
Content="Schließen" />
</Grid>
</Grid>
</UserControl>

View File

@@ -1,11 +1,16 @@
<UserControl x:Class="BeWo.View.Controls.MonthPicker"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl
x:Class="BeWo.View.Controls.MonthPicker"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<dxe:ComboBoxEdit x:Name="_MonthPicker" IsManipulationEnabled="False" IsTextEditable="False" HorizontalAlignment="Stretch"/>
<dxe:ComboBoxEdit
x:Name="_MonthPicker"
HorizontalAlignment="Stretch"
IsManipulationEnabled="False"
IsTextEditable="False" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,583 @@
<UserControl
x:Class="BeWo.View.Controls.Wohnhilfe.CustomerWohnhilfeControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cs="ignorablePrefix"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxei="http://schemas.devexpress.com/winfx/2008/xaml/editors/internal"
xmlns:dxepc="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxet="http://schemas.devexpress.com/winfx/2008/xaml/editors/themekeys"
xmlns:local="clr-namespace:BeWo.View.Controls.Wohnhilfe"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
xmlns:wohnhilfe="clr-namespace:BeWo.View.Controls.Wohnhilfe"
x:Name="root_usercontrol"
d:DataContext="{d:DesignInstance d:Type=viewmodel:CustomerWohnhilfeVM,
IsDesignTimeCreatable=True}"
d:DesignHeight="1450"
d:DesignWidth="1800"
SizeChanged="UserControl_SizeChanged"
mc:Ignorable="d cs">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\..\Styles\PrototypeStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource ObjectEditGroupBox}" TargetType="{x:Type GroupBox}">
<Setter Property="Margin" Value="15" />
<Setter Property="Padding" Value="10,7,7,5" />
</Style>
<Style x:Key="StackpanelDetailsStyle" TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="40,-1,0,3" />
</Style>
<Style BasedOn="{StaticResource EnumTranslationNullItemComboBox}" TargetType="{x:Type uc:NullItemComboBox}" />
<Style BasedOn="{StaticResource EnumTranslationComboBox}" TargetType="{x:Type ComboBox}" />
</ResourceDictionary>
</UserControl.Resources>
<ScrollViewer
x:Name="scrollviewer"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto">
<Grid x:Name="grid">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition x:Name="grid_secondcolumn" Width="2*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<!--<GroupBox Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="4" x:Name="EintraegeGrid" Style="{StaticResource ObjectEditGroupBox}" Header="Notizen">
</GroupBox>-->
<GroupBox
x:Name="groupbox_1"
Grid.Row="0"
Grid.Column="0"
DataContext="{Binding BereichBundVM}"
Header="Bereich Bund">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0">B1010 Verbandszugehörigkeit der Eintrichtung</Label>
<uc:NullItemComboBox
Grid.Row="0"
Grid.Column="1"
ItemsSource="{Binding VerbandszugehorigkeitTypes}"
SelectedValue="{Binding Verbandszugehorigkeit}" />
<Label Grid.Row="1" Grid.Column="0">B1020 Geschlecht nach Personenstandsurkunde</Label>
<uc:NullItemComboBox
Grid.Row="1"
Grid.Column="1"
ItemsSource="{Binding GeschlechtTypes}"
SelectedValue="{Binding Geschlecht}" />
<Label Grid.Row="2" Grid.Column="0">B1030 Alter am Stichtag</Label>
<dxe:TextEdit
Grid.Row="2"
Grid.Column="1"
Height="23"
Margin="3"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=AlterAmStichtag, UpdateSourceTrigger=PropertyChanged}"
Mask="#########"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label Grid.Row="3" Grid.Column="0">B1040 Haushaltsgröße</Label>
<dxe:TextEdit
Grid.Row="3"
Grid.Column="1"
Height="23"
Margin="3"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=Haushaltsgrosse, UpdateSourceTrigger=PropertyChanged}"
Mask="N0"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label Grid.Row="4" Grid.Column="0">B1050 BerichtseinheitID</Label>
<dxe:TextEdit
Grid.Row="4"
Grid.Column="1"
Height="23"
Margin="3"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=BerichtseinheitID, UpdateSourceTrigger=PropertyChanged}"
Mask="00000000000"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label Grid.Row="5" Grid.Column="0">B1060 Unterbringungsort</Label>
<uc:NullItemComboBox
Grid.Row="5"
Grid.Column="1"
ItemsSource="{Binding UnterbringungsartTypes}"
SelectedValue="{Binding Unterbringungsart}" />
<Label Grid.Row="6" Grid.Column="0">B1070 Ort der Unterbringung</Label>
<dxe:TextEdit
Grid.Row="6"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=OrtDerEinrichtung, UpdateSourceTrigger=PropertyChanged}"
Mask="00000000"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label Grid.Row="7" Grid.Column="0">B1080 Angebot</Label>
<uc:NullItemComboBox
Grid.Row="7"
Grid.Column="1"
ItemsSource="{Binding AngebotTypes}"
SelectedValue="{Binding Angebot}" />
</Grid>
<!--<Label Grid.Row="0" Grid.Column="0" Content="Eigenes Aktenzeichen" />
<TextBox Grid.Row="0" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=EigenesAktenzeichen, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="1" Grid.Column="0" Content="Auftragseingang" IsEnabled="True" />
<dxe:DateEdit Grid.Row="1" Grid.Column="1" Margin="3" Height="23" ShowClearButton="False" EditValue="{Binding Path=Auftragseingang, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"/>
<Label Grid.Row="2" Grid.Column="0" Content="Auftragsherkunft" />
<uc:NullItemComboBox x:Name="comboBox_Auftragsherkunft" Grid.Row="2" Grid.Column="1" Margin="3" Height="23" SelectedValue="{Binding Path=Auftragsherkunft, Mode=TwoWay}"
ItemsSource="{Binding Path=Auftragsherkunfte}" MinWidth="30" HorizontalAlignment="Stretch"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"/>-->
</GroupBox>
<GroupBox
x:Name="groupbox_2"
Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="1"
DataContext="{Binding BereichEinkommenUndArbeitVM}"
Header="Bereich Einkommen und Arbeit">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Style="{StaticResource TitleLabel}">
zu Beginn
</Label>
<Rectangle
Grid.Row="0"
Grid.RowSpan="20"
Grid.Column="2"
Width="1"
Margin="10,0,10,0"
VerticalAlignment="Stretch"
Fill="Black" />
<Label
Grid.Row="0"
Grid.Column="3"
Grid.ColumnSpan="2"
Style="{StaticResource TitleLabel}">
am Ende
</Label>
<Label Grid.Row="1" Grid.Column="0">W2010 Einkommenssituation</Label>
<ComboBox
Grid.Row="1"
Grid.Column="1"
ItemsSource="{Binding EinkommenssituationTypes}"
SelectedValue="{Binding BeginnEinkommenssituation}" />
<Label Grid.Row="1" Grid.Column="3">W2030 Einkommenssituation</Label>
<ComboBox
Grid.Row="1"
Grid.Column="4"
ItemsSource="{Binding EinkommenssituationTypes}"
SelectedValue="{Binding EndeEinkommenssituation}" />
<Label Grid.Row="2" Grid.Column="0">W2020 Aufstockung des Einkommens</Label>
<ComboBox
Grid.Row="2"
Grid.Column="1"
ItemsSource="{Binding AufstockungEinkommenTypes}"
SelectedValue="{Binding BeginnAufstockungEinkommen}" />
<Label Grid.Row="2" Grid.Column="3">W2040 Aufstockung des Einkommens</Label>
<ComboBox
Grid.Row="2"
Grid.Column="4"
ItemsSource="{Binding AufstockungEinkommenTypes}"
SelectedValue="{Binding EndeAufstockungEinkommen}" />
<Label Grid.Row="3" Grid.Column="0">W2050 Eigenes Bankkonto</Label>
<ComboBox
Grid.Row="3"
Grid.Column="1"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding BeginnEigenesBankkonto}" />
<Label Grid.Row="3" Grid.Column="3">W2060 Eigenes Bankkonto</Label>
<ComboBox
x:Name="Combobox"
Grid.Row="3"
Grid.Column="4"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding EndeEigenesBankkonto}" />
<Label Grid.Row="4" Grid.Column="0">W2070 Überschuldung</Label>
<ComboBox
Grid.Row="4"
Grid.Column="1"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding Uberschuldung}" />
<Label Grid.Row="5" Grid.Column="0">G2080 Höchster erreichter Berufsabschluss</Label>
<ComboBox
Grid.Row="5"
Grid.Column="1"
ItemsSource="{Binding BerufsschulabschlussTypes}"
SelectedValue="{Binding Berufsabschluss}" />
<Label Grid.Row="6" Grid.Column="0">W2090 Erwerbsfähigkeit im Sinne des SGB:</Label>
<ComboBox
Grid.Row="6"
Grid.Column="1"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding ErwerbsfahigkeitSinnSGB}" />
<Label Grid.Row="7" Grid.Column="0">W2100 Arbeits- und Beschäftigungssituation</Label>
<ComboBox
Grid.Row="7"
Grid.Column="1"
ItemsSource="{Binding BeschaftigungsstatusTypes}"
SelectedValue="{Binding BeginnBeschaftigungsstatus}" />
<Label Grid.Row="7" Grid.Column="3">W2110 Arbeits- und Beschäftigungssituation</Label>
<ComboBox
Grid.Row="7"
Grid.Column="4"
ItemsSource="{Binding BeschaftigungsstatusTypes}"
SelectedValue="{Binding EndeBeschaftigungsstatus}" />
<Label Grid.Row="8" Grid.Column="0">W2120 Dauer der Arbeitslosigkeit</Label>
<ComboBox
Grid.Row="8"
Grid.Column="1"
ItemsSource="{Binding DauerArbeitslosigkeitTypes}"
SelectedValue="{Binding DauerArbeitslosigkeit}" />
</Grid>
</GroupBox>
<GroupBox
x:Name="groupbox_3"
Grid.Row="1"
Grid.Column="0"
DataContext="{Binding BereichSozialstrukturVM}"
Header="Bereich Sozialstruktur">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0">K0110 Bundesland</Label>
<ComboBox
Grid.Row="0"
Grid.Column="1"
ItemsSource="{Binding BundeslandTypes}"
SelectedValue="{Binding Bundesland}" />
<Label Grid.Row="1" Grid.Column="0">K0120 Art des Hilfefelds</Label>
<StackPanel
Grid.Row="1"
Grid.Column="1"
Orientation="Horizontal">
<RadioButton GroupName="Art" IsChecked="{Binding IsWohnungslosenhilfeSafe}">Wohnungslosenhilfe</RadioButton>
<RadioButton GroupName="Art" IsChecked="{Binding IsStraffaligenhilfeSafe}">Straffälligenhilfe</RadioButton>
</StackPanel>
<Label Grid.Row="2" Grid.Column="0">K0130 Art des Hilfeangebots</Label>
<ComboBox
Grid.Row="2"
Grid.Column="1"
ItemsSource="{Binding ArtDesHilfeangebotsTypes}"
SelectedValue="{Binding ArtDesHilfeangebots}" />
<Label Grid.Row="3" Grid.Column="0">K0140 Betreuungsbeginn</Label>
<dxe:DateEdit
Grid.Row="3"
Grid.Column="1"
EditValue="{Binding Path=Betreuungsbeginn, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="4" Grid.Column="0">K0150 Betreuungsende</Label>
<dxe:DateEdit
Grid.Row="4"
Grid.Column="1"
EditValue="{Binding Path=Betreuungsende, UpdateSourceTrigger=PropertyChanged}"
ShowClearButton="True" />
<Label Grid.Row="5" Grid.Column="0">K0160 Betreuungsdauer in Tagen</Label>
<dxe:TextEdit
Grid.Row="5"
Grid.Column="1"
Height="23"
Margin="3"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=BetreuungsdauerInTagen, UpdateSourceTrigger=PropertyChanged}"
Mask="#######"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<Label Grid.Row="6" Grid.Column="0">G7010 Art der Beendigung</Label>
<ComboBox
Grid.Row="6"
Grid.Column="1"
ItemsSource="{Binding ArtDerBeendigungTypes}"
SelectedValue="{Binding ArtDerBeendigung}" />
<Label Grid.Row="7" Grid.Column="0">G1010 Geburtsdatum</Label>
<dxe:DateEdit
x:Name="Dateedit"
Grid.Row="7"
Grid.Column="1"
EditValue="{Binding Path=Geburtsdatum, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="8" Grid.Column="0">G1020 Geschlechtsidentität</Label>
<ComboBox
Grid.Row="8"
Grid.Column="1"
ItemsSource="{Binding GeschlechtidentitatTypes}"
SelectedValue="{Binding Geschlechtidentitat}" />
<Label Grid.Row="9" Grid.Column="0">G1030 Staatsangehörigkeit</Label>
<ComboBox
Grid.Row="9"
Grid.Column="1"
ItemsSource="{Binding StaatsangehorigkeitTypes}"
SelectedValue="{Binding Staatsangehorigkeit}" />
<Label Grid.Row="10" Grid.Column="0">G1040 Aufenthaltsstatus</Label>
<ComboBox
Grid.Row="10"
Grid.Column="1"
ItemsSource="{Binding AufenthaltsstatusTypes}"
SelectedValue="{Binding Aufenthaltsstatus}" />
<Label Grid.Row="11" Grid.Column="0">G1050 Migrationshintergrund</Label>
<ComboBox
Grid.Row="11"
Grid.Column="1"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding Migrationshintergrund}" />
<Label Grid.Row="12" Grid.Column="0">W1060 Höchster erreichter Schulabschluss</Label>
<ComboBox
Grid.Row="12"
Grid.Column="1"
ItemsSource="{Binding HochsterSchulabschlussTypes}"
SelectedValue="{Binding HochsterSchulabschluss}" />
<Label Grid.Row="13" Grid.Column="0">G1070 Familienstand</Label>
<ComboBox
Grid.Row="13"
Grid.Column="1"
ItemsSource="{Binding FamilienstandTypes}"
SelectedValue="{Binding Familienstand}" />
<Label Grid.Row="14" Grid.Column="0">G1080 Haushaltsstruktur</Label>
<ComboBox
Grid.Row="14"
Grid.Column="1"
ItemsSource="{Binding HaushaltsstrukturTypes}"
SelectedValue="{Binding Haushaltsstruktur}" />
<Label
Grid.Row="15"
Grid.Column="0"
Grid.ColumnSpan="2">
G1090 Eigene minderjährige Kinder außerhalb der Haushaltsstruktur
</Label>
<ComboBox
Grid.Row="16"
Grid.Column="1"
Margin="3,-2,3,3"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding EigeneMindKinderAuserhalbHaushaltsstruktur}" />
</Grid>
</GroupBox>
<GroupBox
x:Name="groupbox_4"
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="1"
DataContext="{Binding BereichSozialeKontakteVM}"
Header="Bereich Soziale Kontakte">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Label
Grid.Row="0"
Grid.Column="0"
Grid.ColumnSpan="2"
Style="{StaticResource TitleLabel}">
zu Beginn
</Label>
<Rectangle
Grid.Row="0"
Grid.RowSpan="20"
Grid.Column="2"
Width="1"
Margin="5,0,5,0"
VerticalAlignment="Stretch"
Fill="Black" />
<Label
Grid.Row="0"
Grid.Column="3"
Grid.ColumnSpan="2"
Style="{StaticResource TitleLabel}">
am Ende
</Label>
<Label Grid.Row="1" Grid.Column="0">W4010 Soziale Kontakte</Label>
<ComboBox
Grid.Row="1"
Grid.Column="1"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding BeginnSozialeKontakte}" />
<Label Grid.Row="1" Grid.Column="3">W4020 Soziale Kontakte</Label>
<ComboBox
Grid.Row="1"
Grid.Column="4"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding EndeSozialeKontakte}" />
<StackPanel
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
IsEnabled="{Binding CanEditBeginnKontakt}"
Style="{StaticResource StackpanelDetailsStyle}">
<CheckBox IsChecked="{Binding BeginnKontaktPartner}">zu Partner/Partnerin</CheckBox>
<CheckBox IsChecked="{Binding BeginnKontaktMindKinder}">zu eigenen minderjährigen Kindern</CheckBox>
<CheckBox IsChecked="{Binding BeginnKontaktVolljahrKinderElternVerwandten}">zu volljährigen Kindern, Eltern, Verwandten</CheckBox>
<CheckBox IsChecked="{Binding BeginnKontaktFreundenBekannten}">zu Freunden/Freundinnen, Bekannten</CheckBox>
<CheckBox IsChecked="{Binding BeginnKontaktSelbsthilfe}">zu Selbsthilfeorganisationen, Nachbarn, Vereinen, Kirchengemeinden u. ä.</CheckBox>
<CheckBox IsChecked="{Binding BeginnKontaktSonstige}">sonstige</CheckBox>
</StackPanel>
<StackPanel
Grid.Row="2"
Grid.Column="3"
Grid.ColumnSpan="2"
IsEnabled="{Binding CanEditEndeKontakt}"
Style="{StaticResource StackpanelDetailsStyle}">
<CheckBox IsChecked="{Binding EndeKontaktPartner}">zu Partner/Partnerin</CheckBox>
<CheckBox IsChecked="{Binding EndeKontaktMindKinder}">zu eigenen minderjährigen Kindern</CheckBox>
<CheckBox IsChecked="{Binding EndeKontaktVolljahrKinderElternVerwandten}">zu volljährigen Kindern, Eltern, Verwandten</CheckBox>
<CheckBox IsChecked="{Binding EndeKontaktFreundenBekannten}">zu Freunden/Freundinnen, Bekannten</CheckBox>
<CheckBox IsChecked="{Binding EndeKontaktSelbsthilfe}">zu Selbsthilfeorganisationen, Nachbarn, Vereinen, Kirchengemeinden u. ä.</CheckBox>
<CheckBox IsChecked="{Binding EndeKontaktSonstige}">sonstige</CheckBox>
</StackPanel>
<Label Grid.Row="3" Grid.Column="0">W4030 Krankenversicherung</Label>
<ComboBox
Grid.Row="3"
Grid.Column="1"
ItemsSource="{Binding KrankenversicherungTypes}"
SelectedValue="{Binding BeginnKrankenversicherung}" />
<Label Grid.Row="3" Grid.Column="3">W4040 Krankenversicherung</Label>
<ComboBox
Grid.Row="3"
Grid.Column="4"
ItemsSource="{Binding KrankenversicherungTypes}"
SelectedValue="{Binding EndeKrankenversicherung}" />
<Label Grid.Row="4" Grid.Column="0">W4050 Kontakt zu e. Arzt innerhalb der letzten 6 Monate</Label>
<ComboBox
Grid.Row="4"
Grid.Column="1"
ItemsSource="{Binding KontaktArztTypes}"
SelectedValue="{Binding BeginnKontaktArzt}" />
<Label Grid.Row="4" Grid.Column="3">W4060 Kontakt zu e. Arzt innerhalb der letzten 6 Monate</Label>
<ComboBox
Grid.Row="4"
Grid.Column="4"
ItemsSource="{Binding KontaktArztTypes}"
SelectedValue="{Binding EndeKontaktArzt}" />
<Label Grid.Row="5" Grid.Column="0">W4070 Vorlage eines Schwerbegindertenausweises</Label>
<ComboBox
Grid.Row="5"
Grid.Column="1"
ItemsSource="{Binding WohnhilfeBoolDataTypes}"
SelectedValue="{Binding VorlageSchwerbehindertenausweises}" />
</Grid>
</GroupBox>
</Grid>
</ScrollViewer>
</UserControl>

View File

@@ -0,0 +1,120 @@
using BeWo.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Controls.Wohnhilfe
{
/// <summary>
/// Interaktionslogik für CustomerWohnhilfeControl.xaml
/// </summary>
public partial class CustomerWohnhilfeControl : UserControl
{
public bool IsLarge
{
get { return (bool)GetValue(IsLargeProperty); }
set
{
SetValue(IsLargeProperty, value);
}
}
// Using a DependencyProperty as the backing store for IsLarge. This enables animation, styling, binding, etc...
public static readonly DependencyProperty IsLargeProperty =
DependencyProperty.Register("IsLarge", typeof(bool), typeof(CustomerWohnhilfeControl),
new PropertyMetadata(false, OnIsLargeChanged));
public double MinWidthGrid { get; set; }
public double ParentWidth
{
get { return (double)GetValue(ParentWidthProperty); }
set { SetValue(ParentWidthProperty, value); }
}
// Using a DependencyProperty as the backing store for ParentWidth. This enables animation, styling, binding, etc...
public static readonly DependencyProperty ParentWidthProperty =
DependencyProperty.Register("ParentWidth", typeof(double), typeof(CustomerWohnhilfeControl), new PropertyMetadata(0.0d));
public CustomerWohnhilfeControl()
{
InitializeComponent();
root_usercontrol.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
var size = root_usercontrol.DesiredSize;
MinWidthGrid = size.Width;
}
private static void OnIsLargeChanged(DependencyObject defectImageControl, DependencyPropertyChangedEventArgs eventArgs)
{
var control = defectImageControl as CustomerWohnhilfeControl;
if(control is null)
{
return;
}
if (control.IsLarge)
{
control.SetLarge();
}
else
{
control.SetSmall();
}
}
private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
{
if (e.WidthChanged)
{
var parent_width = ParentWidth;
if (parent_width > MinWidthGrid + 50)
{
IsLarge = true;
}
else
{
IsLarge = false;
}
}
}
private void SetLarge()
{
grid_secondcolumn.Width = new GridLength(2, GridUnitType.Star);
Grid.SetColumn(groupbox_2, 1);
Grid.SetRow(groupbox_2, 0);
Grid.SetColumn(groupbox_3, 0);
Grid.SetRow(groupbox_3, 1);
Grid.SetColumn(groupbox_4, 1);
Grid.SetRow(groupbox_4, 1);
}
private void SetSmall()
{
grid_secondcolumn.Width = new GridLength(0);
Grid.SetColumn(groupbox_2, 0);
Grid.SetRow(groupbox_2, 1);
Grid.SetColumn(groupbox_3, 0);
Grid.SetRow(groupbox_3, 2);
Grid.SetColumn(groupbox_4, 0);
Grid.SetRow(groupbox_4, 3);
}
}
}

View File

@@ -1,18 +1,19 @@
<UserControl x:Class="BeWo.View.Detail.AbsenceTimesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
mc:Ignorable="d"
x:Name="AbsenceTimeViewUserControl"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignData Type=AbsenceTimesView}">
<UserControl.Resources>
</UserControl.Resources>
<UserControl
x:Class="BeWo.View.Detail.AbsenceTimesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:validation="clr-namespace:BeWo.Validation"
x:Name="AbsenceTimeViewUserControl"
d:DataContext="{d:DesignData Type=AbsenceTimesView}"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.Resources />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -24,8 +25,14 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Grid.Row="1" Grid.Column="0" x:Name="GroupBoxNewAbsenceTime" Grid.ColumnSpan="2" Header="Abwesenheit hinzufügen" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox
x:Name="GroupBoxNewAbsenceTime"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Header="Abwesenheit hinzufügen"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -45,26 +52,85 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0">Startdatum</Label>
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="{Binding AbsenceTimes.NewVM.DateEditColumnSpan, UpdateSourceTrigger=PropertyChanged}" Height="23" Margin="3" EditValue="{Binding Path=AbsenceTimes.NewVM.Start, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" AllowNullInput="False" />
<Label Grid.Row="0" Grid.Column="0">Startdatum</Label>
<dxe:DateEdit
Grid.Row="0"
Grid.Column="1"
Grid.ColumnSpan="{Binding AbsenceTimes.NewVM.DateEditColumnSpan, UpdateSourceTrigger=PropertyChanged}"
Height="23"
Margin="3"
AllowNullInput="False"
EditValue="{Binding Path=AbsenceTimes.NewVM.Start, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
MaskType="DateTimeAdvancingCaret" />
<dxe:TextEdit Grid.Column="2" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" x:Name="StartTimeTextEdit"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
Height="23" Visibility="{Binding Path=AbsenceTimes.NewVM.IsAllDay, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, UpdateSourceTrigger=PropertyChanged}" ValidateOnEnterKeyPressed="True" ValidateOnTextInput="True"
Margin="3" EditValue="{Binding Path=AbsenceTimes.NewVM.StartTime, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" ToolTipService.Placement="Mouse" />
<dxe:TextEdit
x:Name="StartTimeTextEdit"
Grid.Row="0"
Grid.Column="2"
Height="23"
Margin="3"
EditValue="{Binding Path=AbsenceTimes.NewVM.StartTime, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"
InvalidValueBehavior="AllowLeaveEditor"
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ShowError="False"
ToolTipService.Placement="Mouse"
ValidateOnEnterKeyPressed="True"
ValidateOnTextInput="True"
Visibility="{Binding Path=AbsenceTimes.NewVM.IsAllDay, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Column="3" Grid.Row="0">Enddatum</Label>
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="4" Grid.Row="0" Height="23" Margin="3" Grid.ColumnSpan="{Binding AbsenceTimes.NewVM.DateEditColumnSpan, UpdateSourceTrigger=PropertyChanged}" EditValue="{Binding Path=AbsenceTimes.NewVM.End, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" AllowNullInput="True" />
<Label Grid.Row="0" Grid.Column="3">Enddatum</Label>
<dxe:DateEdit
Grid.Row="0"
Grid.Column="4"
Grid.ColumnSpan="{Binding AbsenceTimes.NewVM.DateEditColumnSpan, UpdateSourceTrigger=PropertyChanged}"
Height="23"
Margin="3"
AllowNullInput="True"
EditValue="{Binding Path=AbsenceTimes.NewVM.End, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
MaskType="DateTimeAdvancingCaret" />
<dxe:TextEdit Grid.Column="5" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True" x:Name="EndTimeTextEdit"
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
Height="23" Visibility="{Binding Path=AbsenceTimes.NewVM.IsAllDay, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, UpdateSourceTrigger=PropertyChanged}" ValidateOnEnterKeyPressed="True" ValidateOnTextInput="True"
Margin="3" EditValue="{Binding Path=AbsenceTimes.NewVM.EndTime, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" ToolTipService.Placement="Mouse" />
<dxe:TextEdit
x:Name="EndTimeTextEdit"
Grid.Row="0"
Grid.Column="5"
Height="23"
Margin="3"
EditValue="{Binding Path=AbsenceTimes.NewVM.EndTime, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}"
InvalidValueBehavior="AllowLeaveEditor"
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ShowError="False"
ToolTipService.Placement="Mouse"
ValidateOnEnterKeyPressed="True"
ValidateOnTextInput="True"
Visibility="{Binding Path=AbsenceTimes.NewVM.IsAllDay, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, UpdateSourceTrigger=PropertyChanged}" />
<CheckBox Grid.Row="0" Grid.Column="6" Margin="3" VerticalContentAlignment="Center" Foreground="Black" IsChecked="{Binding Path=AbsenceTimes.NewVM.IsAllDay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center">Ganztägig</CheckBox>
<CheckBox
Grid.Row="0"
Grid.Column="6"
Margin="3"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Foreground="Black"
IsChecked="{Binding Path=AbsenceTimes.NewVM.IsAllDay, UpdateSourceTrigger=PropertyChanged}">
Ganztägig
</CheckBox>
<Label Grid.Column="0" Grid.Row="1">Kategorie</Label>
<controls:NullItemComboBox Name="ComboBoxReasons" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="1" Height="23" Margin="3" ItemsSource="{Binding Path=AbsenceTimes.PossibleReasons}" SelectedItem="{validation:ValidationBinding Path=AbsenceTimes.NewVM.Reason}">
<Label Grid.Row="1" Grid.Column="0">Kategorie</Label>
<controls:NullItemComboBox
Name="ComboBoxReasons"
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="2"
Height="23"
Margin="3"
ItemsSource="{Binding Path=AbsenceTimes.PossibleReasons}"
SelectedItem="{validation:ValidationBinding Path=AbsenceTimes.NewVM.Reason}">
<ComboBox.ItemContainerStyle>
<Style>
<Setter Property="Control.HorizontalContentAlignment" Value="Stretch" />
@@ -72,52 +138,126 @@
</ComboBox.ItemContainerStyle>
</controls:NullItemComboBox>
<Label Grid.Column="3" Grid.Row="1">Erläuterung</Label>
<TextBox Grid.Column="4" Grid.ColumnSpan="3" Grid.Row="1" Height="23" Margin="3" Text="{Binding Path=AbsenceTimes.NewVM.Notice, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="1" Grid.Column="3">Erläuterung</Label>
<TextBox
Grid.Row="1"
Grid.Column="4"
Grid.ColumnSpan="3"
Height="23"
Margin="3"
Text="{Binding Path=AbsenceTimes.NewVM.Notice, UpdateSourceTrigger=PropertyChanged}" />
<Button Grid.Row="2" Grid.ColumnSpan="7" Grid.Column="0" Command="{Binding AddAbsenceTimesCommand}" HorizontalAlignment="Right" Margin="1,10,0,3" Style="{DynamicResource {x:Type Button}}" Content="Abwesenheit hinzufügen" />
<Button
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="7"
Margin="1,10,0,3"
HorizontalAlignment="Right"
Command="{Binding AddAbsenceTimesCommand}"
Content="Abwesenheit hinzufügen"
Style="{DynamicResource {x:Type Button}}" />
</Grid>
</GroupBox>
<GroupBox x:Name="GroupBoxAbsenceTimes" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Header="Erfasste Abwesenheiten" Style="{StaticResource ObjectEditGroupBox}">
<dxg:GridControl VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" ItemsSource="{Binding Path=AbsenceTimes.VMList}" HorizontalAlignment="Stretch" x:Name="DataGridAbsenceTimes">
<GroupBox
x:Name="GroupBoxAbsenceTimes"
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
Header="Erfasste Abwesenheiten"
Style="{StaticResource ObjectEditGroupBox}">
<dxg:GridControl
x:Name="DataGridAbsenceTimes"
Grid.Row="1"
Grid.Column="0"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
ItemsSource="{Binding Path=AbsenceTimes.VMList}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Notice" Header="" FixedWidth="True" Width="24" ReadOnly="True">
<dxg:GridColumn
Width="24"
FieldName="Notice"
FixedWidth="True"
Header=""
ReadOnly="True">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button Content="r" Command="{Binding RemoveAbsenceTimeCommand, ElementName=AbsenceTimeViewUserControl}" FontFamily="Webdings" Width="18" Height="18" VerticalAlignment="Center" />
<Button
Width="18"
Height="18"
VerticalAlignment="Center"
Command="{Binding RemoveAbsenceTimeCommand, ElementName=AbsenceTimeViewUserControl}"
Content="r"
FontFamily="Webdings" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Start" Header="Startdatum" AllowBestFit="True" SortOrder="Descending">
<dxg:GridColumn
AllowBestFit="True"
FieldName="Start"
Header="Startdatum"
SortOrder="Descending">
<dxg:GridColumn.EditSettings>
<dxe:DateEditSettings DisplayFormat="d" AllowNullInput="False" />
<dxe:DateEditSettings AllowNullInput="False" DisplayFormat="d" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="StartTime" Header="Startzeit" AllowBestFit="True" BestFitMode="Smart">
<dxg:GridColumn
AllowBestFit="True"
BestFitMode="Smart"
FieldName="StartTime"
Header="Startzeit">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" MaskShowPlaceHolders="True" MaskUseAsDisplayFormat="True" ValidateOnEnterKeyPressed="True" />
<dxe:TextEditSettings
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ValidateOnEnterKeyPressed="True" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="End" Header="Enddatum" AllowBestFit="True">
<dxg:GridColumn
AllowBestFit="True"
FieldName="End"
Header="Enddatum">
<dxg:GridColumn.EditSettings>
<dxe:DateSettings AllowNullInput="True" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="EndTime" Header="Endzeit" AllowBestFit="True" BestFitMode="Smart">
<dxg:GridColumn
AllowBestFit="True"
BestFitMode="Smart"
FieldName="EndTime"
Header="Endzeit">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" MaskShowPlaceHolders="True" MaskUseAsDisplayFormat="True" ValidateOnEnterKeyPressed="True" />
<dxe:TextEditSettings
Mask="(0?\d|1\d|2[0-3]):[0-5]\d"
MaskShowPlaceHolders="True"
MaskType="RegEx"
MaskUseAsDisplayFormat="True"
ValidateOnEnterKeyPressed="True" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Reason" Header="Kategorie" AllowBestFit="True">
<dxg:GridColumn
AllowBestFit="True"
FieldName="Reason"
Header="Kategorie">
<dxg:GridColumn.EditSettings>
<dxe:ComboBoxEditSettings x:Name="AbsenceReasonComboBox"/>
<dxe:ComboBoxEditSettings x:Name="AbsenceReasonComboBox" />
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Notice" Header="Erläuterung" AllowBestFit="True" />
<dxg:GridColumn
AllowBestFit="True"
FieldName="Notice"
Header="Erläuterung" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False"
NavigationStyle="Cell" AllowBestFit="True" BestFitMode="Smart"/>
<dxg:TableView
AllowBestFit="True"
AutoWidth="true"
BestFitMode="Smart"
NavigationStyle="Cell"
ShowGroupPanel="False"
ShowGroupedColumns="false"
ShowTotalSummary="False" />
</dxg:GridControl.View>
</dxg:GridControl>
</GroupBox>

View File

@@ -65,7 +65,7 @@
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="TypeString" Header="Art der Rechnung" Width="150" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="CustomerName" Header="{markup:Translate Klient/in}" Width="100" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="AccountingPeriodString" SortFieldName="AccountingPeriodStart" Header="Zeitraum" Width="100" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceNumber" Header="Nummer" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceNumber" Header="Nummer" SortOrder="Ascending" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="InvoiceDate" Header="Datum" EditSettings="{dxe:DateSettings DisplayFormat=d}" MinWidth="70" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="RecipientString" Header="{markup:Translate EmpfängerSingular}" />
<!--<dxg:GridColumn FieldName="AccountingPeriodString" Header="Abrechnungszeitraum" />-->

View File

@@ -0,0 +1,215 @@
<UserControl x:Class="BeWo.View.Detail.CustomerFalldatenView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
HorizontalAlignment="Stretch"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
VerticalAlignment="Stretch" Focusable="True">
<UserControl.Resources>
<ResourceDictionary>
<Style TargetType="{x:Type Label}">
<Setter Property="IsEnabled" Value="True"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Margin" Value="3"/>
</Style>
<Style TargetType="{x:Type CheckBox}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="IsHitTestVisible" Value="{Binding PermissionFalldatenEdit, Mode=OneTime}"/>
<Setter Property="Focusable" Value="{Binding PermissionFalldatenEdit, Mode=OneTime}"/>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Grid.RowSpan="3" Grid.Column="0" Padding="5" Style="{StaticResource ObjectEditGroupBox}" Header="Falldaten">
<Grid>
<Grid.Resources>
<ResourceDictionary>
</ResourceDictionary>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" MinWidth="200"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Eigenes Aktenzeichen" />
<TextBox Grid.Row="0" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=EigenesAktenzeichen, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="1" Grid.Column="0" Content="Auftragseingang" IsEnabled="True" />
<dxe:DateEdit Grid.Row="1" Grid.Column="1" Margin="3" Height="23" ShowClearButton="False" EditValue="{Binding Path=Auftragseingang, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"/>
<Label Grid.Row="2" Grid.Column="0" Content="Auftragsherkunft" />
<uc:NullItemComboBox x:Name="comboBox_Auftragsherkunft" Grid.Row="2" Grid.Column="1" Margin="3" Height="23" SelectedValue="{Binding Path=Auftragsherkunft, Mode=TwoWay}"
ItemsSource="{Binding Path=Auftragsherkunfte}" MinWidth="30" HorizontalAlignment="Stretch"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"/>
<Label Grid.Row="3" Grid.Column="0" Content="Vermittlungsgrundlage" />
<uc:NullItemComboBox x:Name="comboBox_Vermittlungsgrundlage" Grid.Row="3" Grid.Column="1" Margin="3" Height="23" SelectedValue="{Binding Path=Vermittlungsgrundlage, Mode=TwoWay}"
ItemsSource="{Binding Path=Vermittlungsgrundlagen}" MinWidth="30" HorizontalAlignment="Stretch"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"/>
<Label Grid.Row="4" Grid.Column="0" Content="Tagessätze" />
<dxe:TextEdit Grid.Row="4" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=Tagessatze, UpdateSourceTrigger=PropertyChanged}" Mask="########0.##"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="5" Grid.Column="0" Content="Tagessatzhöhe" />
<dxe:TextEdit Grid.Row="5" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=Tagessatzhohe, UpdateSourceTrigger=PropertyChanged}" Mask="########0.00 $"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="6" Grid.Column="0" Content="Höhe der Geldstrafe" />
<dxe:TextEdit Grid.Row="6" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True" IsReadOnly="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=HoheDerGeldstrafe, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" Mask="########0.00 $"
/>
<Label Grid.Row="7" Grid.Column="0" Content="Zu leistende Arbeitsstunden" />
<dxe:TextEdit Grid.Row="7" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=ZuLeistendeArbeitsstunden, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## Std"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="8" Grid.Column="0" Content="Hinweis" />
<TextBox Grid.Row="8" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=Hinweis, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="9" Grid.Column="0" Content="Termin" />
<dxe:DateEdit Grid.Row="9" Grid.Column="1" Margin="3" Height="23" ShowClearButton="True" EditValue="{Binding Path=Termin, UpdateSourceTrigger=PropertyChanged}"
Mask="G" MaskUseAsDisplayFormat="True" IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}">
<dxe:DateEdit.StyleSettings>
<dxe:DateEditNavigatorWithTimePickerStyleSettings />
</dxe:DateEdit.StyleSettings>
</dxe:DateEdit>
<Label Grid.Row="10" Grid.Column="0" Content="Bearbeitungsstatus" />
<uc:NullItemComboBox x:Name="combobox_bearbeitungsstatus" Grid.Row="10" Grid.Column="1" Margin="3" Height="23" SelectedValue="{Binding Path=FalldatenBearbeitungsstatus, Mode=TwoWay}" MinWidth="30" HorizontalAlignment="Stretch"
IsEnabled="{Binding Path=PermissionFalldatenEdit, Mode=OneTime}"/>
<Label Grid.Row="11" Grid.Column="0" Content="Auftragsrückgabe" />
<TextBox Grid.Row="11" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=Auftragsruckgabe, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="12" Grid.Column="0" Content="Verlauf" />
<TextBox Grid.Row="12" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=Verlauf, UpdateSourceTrigger=PropertyChanged}" IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="13" Grid.Column="0" Content="Abgeleistete Stunden" />
<dxe:TextEdit Grid.Row="13" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=AbgeleisteteStunden, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## Std"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="14" Grid.Column="0" Content="Ersparte Hafttage" />
<dxe:TextEdit Grid.Row="14" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=ErsparteHafttage, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## Tage"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="15" Grid.Column="0" Content="Geleistete Ratenzahlung" />
<dxe:TextEdit Grid.Row="15" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=GeleisteteRatenzahlung, UpdateSourceTrigger=PropertyChanged}" Mask="########0.00 $"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="16" Grid.Column="0" Content="Geleistete Einmalzahlung" />
<dxe:TextEdit Grid.Row="16" Grid.Column="1" Margin="3" Height="23" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=GeleisteteEinmalzahlung, UpdateSourceTrigger=PropertyChanged}" Mask="########0.00 $"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
<Label Grid.Row="17" Grid.Column="0" Content="Bemerkung" />
<TextBox Grid.Row="17" Grid.Column="1" Margin="3" Height="60" Text="{Binding Path=Bemerkung, UpdateSourceTrigger=PropertyChanged}" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
IsReadOnly="{Binding Path=PermissionFalldatenEdit, Mode=OneTime, Converter={StaticResource BoolReverseConverter}}"/>
</Grid>
</GroupBox>
<GroupBox Padding="5" Grid.Column="2" Style="{StaticResource ObjectEditGroupBox}" Header="Gründe für Abbruch" VerticalAlignment="Top">
<Grid>
<Grid.Resources>
<ResourceDictionary>
</ResourceDictionary>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Grid.Row="0" Grid.Column="0" IsChecked="{Binding Path=GrundArbeitsunfahig, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="0" Grid.Column="1" Content="{markup:Translate GrundArbeitsunfahig}" />
<CheckBox Grid.Row="1" Grid.Column="0" IsChecked="{Binding Path=GrundSuchtproblem, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="1" Grid.Column="1" Content="{markup:Translate GrundSuchtproblem}" />
<CheckBox Grid.Row="2" Grid.Column="0" IsChecked="{Binding Path=GrundPsychischeProbleme, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="2" Grid.Column="1" Content="{markup:Translate GrundPsychischeProbleme}" />
<CheckBox Grid.Row="3" Grid.Column="0" IsChecked="{Binding Path=GrundKeineMotivation, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="3" Grid.Column="1" Content="{markup:Translate GrundKeineMotivation}" />
<CheckBox Grid.Row="4" Grid.Column="0" IsChecked="{Binding Path=GrundInHaft, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="4" Grid.Column="1" Content="{markup:Translate GrundInHaft}" />
<CheckBox Grid.Row="5" Grid.Column="0" IsChecked="{Binding Path=GrundUnbekannt, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="5" Grid.Column="1" Content="{markup:Translate GrundUnbekannt}" />
<CheckBox Grid.Row="6" Grid.Column="0" IsChecked="{Binding Path=GrundKeinKontakt, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="6" Grid.Column="1" Content="{markup:Translate GrundKeinKontakt}" />
<CheckBox Grid.Row="7" Grid.Column="0" IsChecked="{Binding Path=GrundNichtAngetreten, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="7" Grid.Column="1" Content="{markup:Translate GrundNichtAngetreten}" />
<CheckBox Grid.Row="8" Grid.Column="0" IsChecked="{Binding Path=GrundAbbruchDerTatigkeit, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="8" Grid.Column="1" Content="{markup:Translate GrundAbbruchDerTatigkeit}" />
<CheckBox Grid.Row="9" Grid.Column="0" IsChecked="{Binding Path=GrundWiderruf, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="9" Grid.Column="1" Content="{markup:Translate GrundWiderruf}" />
<CheckBox Grid.Row="10" Grid.Column="0" IsChecked="{Binding Path=Grund459StPO, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="10" Grid.Column="1" Content="{markup:Translate Grund459StPO}" />
<CheckBox Grid.Row="11" Grid.Column="0" IsChecked="{Binding Path=GrundAusbleibenDerZahlung, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="11" Grid.Column="1" Content="{markup:Translate GrundAusbleibenDerZahlung}" />
</Grid>
</GroupBox>
<GroupBox Grid.Row="1" Grid.Column="2" Style="{StaticResource ObjectEditGroupBox}" Header="Besonderheiten" VerticalAlignment="Top" Grid.RowSpan="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Grid.Row="0" Grid.Column="0" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{Binding Path=BesonderheitMehrfacheBeauftragung, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="0" Grid.Column="1" Margin="0" Content="{markup:Translate BesonderheitMehrfacheBeauftragung}" />
<CheckBox Grid.Row="1" Grid.Column="0" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{Binding Path=BesonderheitMehrfacheVermittlung, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="1" Grid.Column="1" Margin="0" Content="{markup:Translate BesonderheitMehrfacheVermittlung}" />
<CheckBox Grid.Row="2" Grid.Column="0" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{Binding Path=BesonderheitVermittlungAusHaft, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="2" Grid.Column="1" Margin="0" Content="{markup:Translate BesonderheitVermittlungAusHaft}" />
<CheckBox Grid.Row="3" Grid.Column="0" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{Binding Path=BesonderheitDurchBGBWAufgesucht, UpdateSourceTrigger=PropertyChanged}"/>
<Label Grid.Row="3" Grid.Column="1" Margin="0" Content="{markup:Translate BesonderheitDurchBGBWAufgesucht}" />
</Grid>
</GroupBox>
</Grid>
</UserControl>

View File

@@ -0,0 +1,85 @@
using BeWo.ViewModel;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Wohnhilfe;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail
{
/// <summary>
/// Interaktionslogik für CustomerFalldatenView.xaml
/// </summary>
public partial class CustomerFalldatenView : UserControl
{
private CustomerFalldatenVM _ViewModel;
public CustomerFalldatenVM ViewModel
{
get { return _ViewModel; }
set
{
_ViewModel = value;
DataContext = value;
}
}
public CustomerFalldatenView(CustomerFalldatenVM vM)
{
InitializeComponent();
ViewModel = vM;
combobox_bearbeitungsstatus.ItemsSource = Enum.GetValues(typeof(FalldatenBearbeitungsstatus));
foreach (var label in FindVisualChildren<Label>(this))
{
label.IsEnabled = true;
}
}
public IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
{
if (depObj != null)
{
int depObjCount = VisualTreeHelper.GetChildrenCount(depObj);
for (int i = 0; i < depObjCount; i++)
{
DependencyObject child = VisualTreeHelper.GetChild(depObj, i);
if (child != null && child is T)
{
yield return (T)child;
}
if (child is GroupBox)
{
GroupBox gb = child as GroupBox;
Object gpchild = gb.Content;
if (gpchild is T)
{
yield return (T)child;
child = gpchild as T;
}
}
foreach (T childOfChild in FindVisualChildren<T>(child))
{
yield return childOfChild;
}
}
}
}
}
}

View File

@@ -0,0 +1,59 @@
<UserControl x:Class="BeWo.View.Detail.CustomerVermittlungArbeitView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Detail" xmlns:controls="clr-namespace:BeWo.View.Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\PrototypeStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid DataContext="{Binding CustomerGemeinnutzigeArbeitListVM}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Button Content="Neuen Fall hinzufügen" Command="{Binding AddVMCommand}">
</Button>
</StackPanel>
<TabControl Grid.Row="1" Margin="5"
ItemsSource="{Binding VMList}"
SelectedItem="{Binding SelectedVM}" x:Name="tabcontrol_NotizenKategorien"
Visibility="{Binding VMList.Count, Converter={StaticResource CollectionCountToVisibilityConverter}}">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Displayname}" />
<Button VerticalAlignment="Center" Height="20"
Tag="{Binding}"
ToolTip="Wohnhilfe entfernen"
Style="{DynamicResource CloseButtonStyle}"
Command="{Binding Path=DataContext.DeleteSelectedVMCommand, RelativeSource={RelativeSource AncestorType=TabControl}}">
<Button.Visibility>
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
<Binding Path="PermissionCustomerWohnhilfeDelete" ElementName="root_control" />
</MultiBinding>
</Button.Visibility>
</Button>
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<controls:CustomerVermittlungArbeitControl/>
</ScrollViewer>
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
</Grid>
</Grid>
</UserControl>

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail
{
/// <summary>
/// Interaktionslogik für CustomerVgAView.xaml
/// </summary>
public partial class CustomerVermittlungArbeitView : UserControl
{
public bool PermissionCustomerWohnhilfeCreate { get; } = BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_GemeinnutzigeArbeit_Create);
public bool PermissionCustomerWohnhilfeEdit { get; } = BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_GemeinnutzigeArbeit_Edit);
public bool PermissionCustomerWohnhilfeDelete { get; } = BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_GemeinnutzigeArbeit_Delete);
public CustomerVermittlungArbeitView()
{
InitializeComponent();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -199,7 +199,6 @@ namespace BeWo.View.Detail
return;
}
var p = e.GetPosition(btnSave);
if (p.X >= 0 && p.X < btnSave.ActualWidth && p.Y >= 0 && p.Y < btnSave.ActualHeight)
{
@@ -275,6 +274,13 @@ namespace BeWo.View.Detail
}
Img.EditValueChanged += Image_EditValueChanged;
#if DEBUG
if(DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.DebugConfigMode == DebugConfigMode.FeatureWohnhilfe)
{
tabroot.SelectedItem = tabitem_gemeinnutzigearbeit;
}
#endif
}
void Image_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
@@ -328,11 +334,17 @@ namespace BeWo.View.Detail
view.ViewModel = value.Arbeitszeiten;
view.RefreshView();
}
} else if(tabitem_stundenplan.Content != null && tabitem_stundenplan.Content is StundenplanView stundenplanView)
}
else if(tabitem_stundenplan.Content != null && tabitem_stundenplan.Content is StundenplanView stundenplanView)
{
stundenplanView.ViewModel = value.Arbeitszeiten;
stundenplanView.RefreshView();
}
if (tabitem_falldaten.Content != null && tabitem_falldaten.Content is CustomerFalldatenView falldatenView)
{
falldatenView.ViewModel = value.CustomerFalldatenVM;
}
_saveInProgress = false;
@@ -1081,6 +1093,14 @@ namespace BeWo.View.Detail
}
}
private void tabitem_falldaten_Selected(object sender, RoutedEventArgs e)
{
if (tabitem_falldaten.Content == null)
{
tabitem_falldaten.Content = new CustomerFalldatenView(ViewModel.CustomerFalldatenVM);
}
}
private void tabitem_notizen_Selected(object sender, RoutedEventArgs e)
{
if (ViewModel.IsNew)

View File

@@ -0,0 +1,110 @@
<UserControl x:Class="BeWo.View.Detail.CustomerWohnhilfeView"
x:Name="root_control"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Detail"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:wohnhilfe="clr-namespace:BeWo.View.Controls.Wohnhilfe"
xmlns:converter="clr-namespace:BeWo.Converter"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewmodel:CustomerVM, IsDesignTimeCreatable=true}"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="..\..\Styles\PrototypeStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid DataContext="{Binding CustomerWohnhilfeListVM}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
<Button Content="Neue Wohnhilfe hinzufügen" Command="{Binding AddVMCommand}">
</Button>
<Button Content="Übertragen" ToolTip="Daten aus den Stammdaten in aktuelle Wohnhilfe übernehmen" Command="{Binding InsertDetailsCommand}">
<Button.Visibility>
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
<Binding Path="VMList.Count" Converter="{StaticResource CollectionCountToBoolConverter}"/>
<Binding Path="PermissionCustomerWohnhilfeEdit" ElementName="root_control" />
</MultiBinding>
</Button.Visibility>
</Button>
<Button Content="Kopieren" ToolTip="Aktuelle Wohnhilfe kopieren" Command="{Binding CopySelectedVMCommand}">
<Button.Visibility>
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
<Binding Path="VMList.Count" Converter="{StaticResource CollectionCountToBoolConverter}"/>
<Binding Path="PermissionCustomerWohnhilfeCreate" ElementName="root_control" />
</MultiBinding>
</Button.Visibility>
</Button>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<CheckBox x:Name="checkbox_size" IsChecked="{Binding Path=IsLarge, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">Groß</CheckBox>
</StackPanel>
<TabControl Grid.Row="1" Margin="5"
ItemsSource="{Binding VMList}"
SelectedItem="{Binding SelectedVM}" x:Name="tabcontrol_NotizenKategorien"
Visibility="{Binding VMList.Count, Converter={StaticResource CollectionCountToVisibilityConverter}}">
<TabControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Displayname}" />
<Button VerticalAlignment="Center" Height="20"
ToolTip="Wohnhilfe umbenennen"
Content="!" FontFamily="Wingdings"
Click="Wohnhilfe_Display_Edit_Button_Click">
<Button.Visibility>
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
<Binding Path="PermissionCustomerWohnhilfeEdit" ElementName="root_control" />
</MultiBinding>
</Button.Visibility>
</Button>
<Button VerticalAlignment="Center" Height="20"
Tag="{Binding}"
ToolTip="Wohnhilfe entfernen"
Style="{DynamicResource CloseButtonStyle}"
Command="{Binding Path=DataContext.DeleteSelectedVMCommand, RelativeSource={RelativeSource AncestorType=TabControl}}">
<Button.Visibility>
<MultiBinding Converter="{StaticResource BoolVisibilityMultiConverter }">
<Binding Path="IsSelected" RelativeSource="{RelativeSource AncestorType={x:Type TabItem}}" />
<Binding Path="PermissionCustomerWohnhilfeDelete" ElementName="root_control" />
</MultiBinding>
</Button.Visibility>
</Button>
</StackPanel>
</DataTemplate>
</TabControl.ItemTemplate>
<TabControl.ContentTemplate>
<DataTemplate>
<wohnhilfe:CustomerWohnhilfeControl
ParentWidth="{Binding Path=ActualWidth, ElementName=tabcontrol_NotizenKategorien}"
IsLarge="{Binding DataContext.IsLarge, ElementName=tabcontrol_NotizenKategorien, Mode=TwoWay}" />
</DataTemplate>
</TabControl.ContentTemplate>
</TabControl>
<Popup x:Name="popup_Wohnhilfe_Displayname_Edit"
Placement="Mouse"
StaysOpen="False"
Focusable="False"
Opened="popup_Wohnhilfe_Displayname_Edit_Opened">
<Border Background="White"
Padding="3"
BorderThickness="1"
BorderBrush="Gray"
Focusable="False">
<TextBox x:Name="txt_Wohnhilfe_Displayname_Edit" Width="200" Grid.Row="0" Grid.Column="0" Height="23" Margin="3" Text="{Binding Path=SelectedVM.Displayname, UpdateSourceTrigger=PropertyChanged}" />
</Border>
</Popup>
</Grid>
</Grid>
</UserControl>

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail
{
/// <summary>
/// Interaktionslogik für CustomerWohnhilfeView.xaml
/// </summary>
public partial class CustomerWohnhilfeView : UserControl
{
public bool PermissionCustomerWohnhilfeCreate { get; } = BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_Wohnhilfe_Create);
public bool PermissionCustomerWohnhilfeEdit { get; } = BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_Wohnhilfe_Edit);
public bool PermissionCustomerWohnhilfeDelete { get; } = BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_Wohnhilfe_Delete);
public CustomerWohnhilfeView()
{
InitializeComponent();
}
private void Wohnhilfe_Display_Edit_Button_Click(object sender, RoutedEventArgs e)
{
popup_Wohnhilfe_Displayname_Edit.IsOpen = true;
}
private void popup_Wohnhilfe_Displayname_Edit_Opened(object sender, EventArgs e)
{
Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Input, new Action(Textbox_SelectAll));
}
private void Textbox_SelectAll()
{
txt_Wohnhilfe_Displayname_Edit.Focus();
txt_Wohnhilfe_Displayname_Edit.SelectAll();
}
}
}

View File

@@ -61,9 +61,16 @@ namespace BeWo.View.Detail
#if DEBUG
var url2 = ServiceFacade.DoOperationsServiceSync(s => s.GetOwnChatSettingsUrl());
HyperlinkOwnChatSettings.NavigateUri = new Uri(url2);
GroupOwnChatSettings.Visibility = Visibility.Visible;
try
{
var url2 = ServiceFacade.DoOperationsServiceSync(s => s.GetOwnChatSettingsUrl());
HyperlinkOwnChatSettings.NavigateUri = new Uri(url2);
GroupOwnChatSettings.Visibility = Visibility.Visible;
}
catch(Exception e)
{
}
#endif
}

View File

@@ -82,10 +82,22 @@
<TextBox Grid.Column="1" Margin="1" VerticalContentAlignment="Center" Text="{Binding ViewModel.NewVM.Description, UpdateSourceTrigger=PropertyChanged}" />
<Button Grid.Column="2" Height="25" Content="Hinzufügen" Margin="3" Click="ZielHinzufuegenButton_Click" />
<Button Grid.Column="3" Height="25" Content="Icf Importieren" Margin="3" Click="IcfImport_Click" />
<ToggleButton Grid.Column="4" Height="25" Content="Bearbeiten" Margin="3" Checked="ToggleButton_Checked" Unchecked="ToggleButton_Unchecked" Visibility="Collapsed"/>
<StackPanel Orientation="Horizontal" Grid.Column="5" Grid.Row="0" Grid.ColumnSpan="10" HorizontalAlignment="Right" Visibility="Collapsed">
<Button x:Name="PrevButton" Height="25" Content="Prev" Margin="3" Click="PrevButton_Click" />
<Button x:Name="NextButton" Height="25" Content="Next" Margin="3" Click="NextButton_Click" />
<ToggleButton x:Name="EditToggleButton" Grid.Column="4" Width="157" Height="25" Content="Bearbeiten aktivieren" Margin="3" Checked="ToggleButton_Checked" Unchecked="ToggleButton_Unchecked" Visibility="Visible" ToolTip="Wenn der Bearbeiten Modus aktiviert ist, können Sie Elemente mit Drag und Drop verschieben"/>
<StackPanel Orientation="Horizontal" Grid.Column="5" Grid.Row="0" Grid.ColumnSpan="10" HorizontalAlignment="Right" Visibility="Visible">
<Button x:Name="PrevButton" Height="25" Width="25" Margin="3" Click="PrevButton_Click" ToolTip="Letzte Änderung rückgängig machen">
<Image Source="..\..\Ressources\Icons\Undo.png" Height="18" VerticalAlignment="Center" HorizontalAlignment="Center" Width="20" Margin="0,3,0,0" />
</Button>
<Button x:Name="NextButton" Height="25" Width="25" Margin="3" Click="NextButton_Click">
<Image Source="..\..\Ressources\Icons\Undo.png" Height="18" VerticalAlignment="Center" HorizontalAlignment="Center" Width="20" Margin="0,3,0,0" />
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-1" />
<TranslateTransform X="25" />
</TransformGroup>
</Button.RenderTransform>
</Button>
</StackPanel>
</Grid>

View File

@@ -341,10 +341,12 @@ namespace BeWo.View.Detail
private void ToggleButton_Checked(object sender, RoutedEventArgs e)
{
Bearbeitungsmodus = true;
EditToggleButton.Content = "Bearbeiten deaktivieren";
}
private void ToggleButton_Unchecked(object sender, RoutedEventArgs e)
{
Bearbeitungsmodus = false;
EditToggleButton.Content = "Bearbeiten aktivieren";
}
private void StartCopyItem(SupportConceptGoalTreeItem _item, SupportConceptGoalTreeItem _copy)

View File

@@ -1,17 +1,36 @@
<UserControl x:Class="BeWo.View.Detail.Report.AbwesenheitsEmployeeHeader"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
mc:Ignorable="d"
Height="Auto" Width="Auto">
<Grid >
<UserControl
x:Class="BeWo.View.Detail.Report.AbwesenheitsEmployeeHeader"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="Auto"
Height="Auto"
mc:Ignorable="d">
<Grid>
<StackPanel Orientation="Vertical">
<TextBlock x:Name="_EmployeeName" Text="Max, Mustermann" FontWeight="SemiBold" HorizontalAlignment="Left" Foreground="White" />
<TextBlock x:Name="_EmployeeUrlaub" Text="40 Urlaubstage" HorizontalAlignment="Left" Foreground="White" />
<TextBlock x:Name="_EmployeeUrlaubDieserMonat" Text="Urlaub/Monat: 0 Tage" HorizontalAlignment="Left" Foreground="White" />
<TextBlock x:Name="_EmployeeKrankheitDieserMonat" Text="Krankheit/Monat: 0 Tage" HorizontalAlignment="Left" Foreground="White" />
<TextBlock
x:Name="_EmployeeName"
HorizontalAlignment="Left"
FontWeight="SemiBold"
Foreground="White"
Text="Max, Mustermann" />
<TextBlock
x:Name="_EmployeeUrlaub"
HorizontalAlignment="Left"
Foreground="White"
Text="40 Urlaubstage" />
<TextBlock
x:Name="_EmployeeUrlaubDieserMonat"
HorizontalAlignment="Left"
Foreground="White"
Text="Urlaub/Monat: 0 Tage" />
<TextBlock
x:Name="_EmployeeKrankheitDieserMonat"
HorizontalAlignment="Left"
Foreground="White"
Text="Krankheit/Monat: 0 Tage" />
</StackPanel>
</Grid>
</UserControl>

View File

@@ -489,7 +489,6 @@ namespace BeWo.View.Detail.Report
}
}
linkPdfExport.NavigateUri = new Uri(url);
}

View File

@@ -133,7 +133,7 @@
<dxg:GridColumn x:Name="column_interval" FieldName="AccountingInterval" Header="Abrechnungsintervall" Width="130" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
</dxg:GridControl.View>
</dxg:GridControl>
<Popup x:Name="popup_costrateperiods" StaysOpen="false" Placement="MousePoint">

View File

@@ -16,8 +16,8 @@
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -26,9 +26,8 @@
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="180" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -39,9 +38,9 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0">Bezeichnung</Label>
<TextBox Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Margin="3" Height="23" Text="{val:ValidationBinding Path=NewVM.Name, UpdateSourceTrigger=PropertyChanged}" />
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Text="{val:ValidationBinding Path=NewVM.Name, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Column="0" Grid.Row="1">Kategorie</Label>
<controls:NullItemComboBox Name="combobox_categories" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" Height="23" ItemsSource="{Binding Path=PossibleCategories, Mode=OneWay}" Margin="3" SelectedItem="{val:ValidationBinding Path=NewVM.ServiceCategory}" SelectionChanged="Combobox_categories_OnSelected">
<controls:NullItemComboBox Name="combobox_categories" Grid.Column="1" Grid.Row="1" Height="23" ItemsSource="{Binding Path=PossibleCategories, Mode=OneWay}" Margin="3" SelectedItem="{val:ValidationBinding Path=NewVM.ServiceCategory}" SelectionChanged="Combobox_categories_OnSelected">
<ComboBox.Resources>
<DataTemplate x:Key="DropDownItemTemplate">
<Grid>
@@ -66,17 +65,17 @@
</ComboBox.ItemContainerStyle>
</controls:NullItemComboBox>
<Label Content="Position" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Grid.ColumnSpan="2" />
<Label Content="Position" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" />
<dxe:SpinEdit EditValueType="{x:Type sys:Int32}" MinValue="0" Margin="3" IsFloatValue="False" Grid.Column="2" Grid.Row="2" Height="23" EditValue="{Binding Path=NewVM.Position, UpdateSourceTrigger=PropertyChanged}" />
<dxe:SpinEdit EditValueType="{x:Type sys:Int32}" MinValue="0" Margin="3" IsFloatValue="False" Grid.Column="1" Grid.Row="2" Height="23" EditValue="{Binding Path=NewVM.Position, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Content="{t:Translate Prozent Abrechenbar}"/>
<Label Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Content="{t:Translate Prozent Budget}"/>
<Label Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" Content="{t:Translate Prozent Stundenkonto}"/>
<Label Grid.Column="0" Grid.Row="3" Content="{t:Translate Prozent Abrechenbar}"/>
<Label Grid.Column="0" Grid.Row="4" Content="{t:Translate Prozent Budget}"/>
<Label Grid.Column="0" Grid.Row="5" Content="{t:Translate Prozent Stundenkonto}"/>
<dxe:SpinEdit IsFloatValue="True" MinValue="0" MaxValue="100" Increment="10" Grid.Column="2" Grid.Row="3" Margin="3" Height="23" EditValue="{Binding Path=NewVM.ProzentAbrechenbar, UpdateSourceTrigger=PropertyChanged}" />
<dxe:SpinEdit IsFloatValue="True" MinValue="0" MaxValue="100" Increment="10" Grid.Column="2" Grid.Row="4" Margin="3" Height="23" EditValue="{Binding Path=NewVM.ProzentBudget, UpdateSourceTrigger=PropertyChanged}" />
<dxe:SpinEdit IsFloatValue="True" MinValue="0" MaxValue="100" Increment="10" Grid.Column="2" Grid.Row="5" Margin="3" Height="23" EditValue="{Binding Path=NewVM.ProzentStundenkonto, UpdateSourceTrigger=PropertyChanged}" />
<dxe:SpinEdit IsFloatValue="True" MinValue="0" MaxValue="100" Increment="10" Grid.Column="1" Grid.Row="3" Margin="3" Height="23" EditValue="{Binding Path=NewVM.ProzentAbrechenbar, UpdateSourceTrigger=PropertyChanged}" />
<dxe:SpinEdit IsFloatValue="True" MinValue="0" MaxValue="100" Increment="10" Grid.Column="1" Grid.Row="4" Margin="3" Height="23" EditValue="{Binding Path=NewVM.ProzentBudget, UpdateSourceTrigger=PropertyChanged}" />
<dxe:SpinEdit IsFloatValue="True" MinValue="0" MaxValue="100" Increment="10" Grid.Column="1" Grid.Row="5" Margin="3" Height="23" EditValue="{Binding Path=NewVM.ProzentStundenkonto, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
@@ -112,7 +111,7 @@
</Grid>
</Border>
<Button Name="button_addServiceDescription" Click="button_addServiceDescription_Click" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Height="25" Margin="3,3,3,3" Padding="5 0" IsDefault="True" HorizontalAlignment="Right">Hinzufügen</Button>
<dxg:GridControl x:Name="datagrid_descriptions" Margin="0,10,0,0" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="7" DataSource="{Binding VMList}">
<dxg:GridControl x:Name="datagrid_descriptions" Margin="0,10,0,0" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" DataSource="{Binding VMList}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
<dxg:GridColumn.CellTemplate>
@@ -140,7 +139,7 @@
<dxg:GridColumn FieldName="ProzentStundenkonto" Header="Prozent Stundenkonto" Width="130" EditSettings="{dxe:TextSettings DisplayFormat=0.##, Mask=f2, MaskType=Numeric}"/>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
<dxg:TableView AutoWidth="True" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
</dxg:GridControl.View>
</dxg:GridControl>
<Popup x:Name="popup_costrateperiods" StaysOpen="false" Placement="MousePoint">

View File

@@ -57,28 +57,31 @@ namespace BeWo.View.Detail
}
private void _YearPicker_EditValueChanged(object sender, EditValueChangedEventArgs e)
{
if (_GridLeaveDays == null)
if (_YearPicker.SelectedItem != null)
{
_GridLeaveDays = rootGrid.Resources["datagrid_leavedays"] as GridControl;
WPFGridLeaveDays.Children.Add(_GridLeaveDays);
}
var urlaubskonto = ServiceFacade.DoEmployeeServiceSync(s => s.ErstelleUrlaubskontoDarstellung(DataContract, (int)_YearPicker.SelectedItem));
if (urlaubskonto == null)
{
urlaubskonto = new List<UrlaubskontoDarstellungDC>();
urlaubskonto.Add(new UrlaubskontoDarstellungDC()
if (_GridLeaveDays == null)
{
Erlaeuterung = "Es existiert kein Vertrag für ausgewähltes Jahr",
});
button_openLeaveDayDialogue.Visibility = Visibility.Collapsed;
}
else
button_openLeaveDayDialogue.Visibility = Visibility.Visible;
_GridLeaveDays = rootGrid.Resources["datagrid_leavedays"] as GridControl;
_GridLeaveDays.ItemsSource = urlaubskonto;
WPFGridLeaveDays.Children.Add(_GridLeaveDays);
}
var urlaubskonto = ServiceFacade.DoEmployeeServiceSync(s => s.ErstelleUrlaubskontoDarstellung(DataContract, (int)_YearPicker.SelectedItem));
if (urlaubskonto == null)
{
urlaubskonto = new List<UrlaubskontoDarstellungDC>();
urlaubskonto.Add(new UrlaubskontoDarstellungDC()
{
Erlaeuterung = "Es existiert kein Vertrag für ausgewähltes Jahr",
});
button_openLeaveDayDialogue.Visibility = Visibility.Collapsed;
}
else
button_openLeaveDayDialogue.Visibility = Visibility.Visible;
_GridLeaveDays.ItemsSource = urlaubskonto;
}
}
private void button_addLeaveDay_Click(object sender, RoutedEventArgs e)

View File

@@ -0,0 +1,60 @@
<UserControl x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitBelegungEditControl"
x:Name="root"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:BeWo.View.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
mc:Ignorable="d"
Background="White" DataContextChanged="root_DataContextChanged">
<GroupBox x:Name="groupbox_newBelegung" Header="Belegung erstellen" Style="{StaticResource ObjectEditGroupBox}">
<Grid DataContext="{Binding Path=WohneinheitBelegungListVM.CurrentVM}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2*" MinWidth="200" />
</Grid.ColumnDefinitions>
<Label VerticalAlignment="Center" Grid.Row="0" Margin="3">Klient</Label>
<controls:CustomerSelectionControl Grid.Row="0" Grid.Column="1" Margin="3" x:Name="customer_selection_control" ItemSelected="CustomerSelectionControl_ItemSelected" >
</controls:CustomerSelectionControl >
<Label VerticalAlignment="Center" Grid.Row="1" Margin="3">Wohneinheit</Label>
<ComboBox Grid.Row="1" Grid.Column="1" Margin="3" x:Name="combobox_Wohneinheit" SelectedItem="{Binding Path=Wohneinheit}" ItemsSource="{Binding ElementName=root, Path=DataContext.WohneinheitListVM.VMList}">
</ComboBox>
<Label VerticalAlignment="Center" Grid.Row="4" Margin="3">Beginn</Label>
<dxe:DateEdit Height="23" Grid.Row="4" Margin="3" Grid.Column="1" ShowClearButton="False"
EditValue="{Binding Path=StartDate, UpdateSourceTrigger=PropertyChanged}"/>
<Label VerticalAlignment="Center" Grid.Row="5" Margin="3">Ende</Label>
<dxe:DateEdit Height="23" Grid.Row="5" Margin="3" Grid.Column="1" ShowClearButton="True"
EditValue="{Binding Path=EndDate, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="Notiz" Grid.Row="8" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="8" Grid.Column="1" MinHeight="23" Margin="3" VerticalContentAlignment="Stretch" MaxHeight="150"
AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
Text="{Binding Path=Kommentar, UpdateSourceTrigger=PropertyChanged}"
/>
<StackPanel Grid.Row="9" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="3">
<Button Margin="3" x:Name="btn_save" Click="Save_Button_Click" IsEnabled="{Binding Path=CanSave, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">Hinzufügen</Button>
<Button Margin="3" x:Name="btn_cancel" Click="Cancel_Button_Click" >Abbrechen</Button>
</StackPanel>
</Grid>
</GroupBox>
</UserControl>

View File

@@ -0,0 +1,79 @@
using BeWo.ViewModel;
using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using DevExpress.Xpf.Scheduling;
using DevExpress.Xpf.Scheduling.VisualData;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitBelegungControl.xaml
/// </summary>
public partial class WohneinheitBelegungEditControl : UserControl
{
public EventHandler EventHandler2 { get; set; }
public WohnheimVM ViewModel => DataContext as WohnheimVM;
public WohneinheitBelegungEditControl()
{
InitializeComponent();
}
private void Save_Button_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitBelegungListVM.AddNewVMToList();
Window.GetWindow(this).Close();
}
private void Cancel_Button_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitBelegungListVM.CloseNewVM();
Window.GetWindow(this).Close();
}
private void CustomerSelectionControl_ItemSelected(object sender, EventArgs<CompactCustomerDC> e)
{
var customer = e.Data;
ViewModel.WohneinheitBelegungListVM.CurrentVM.Customer = customer;
}
private void root_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (e.OldValue != null)
return;
var avm = e.NewValue as AppointmentWindowViewModel;
if(avm.Appointment.SourceObject is WohneinheitBelegungVM vm)
{
groupbox_newBelegung.Header = avm.IsNewAppointment ? "Belegung erstellen" : "Belegung bearbeiten";
btn_save.Visibility = avm.IsNewAppointment ? Visibility.Visible : Visibility.Collapsed;
btn_cancel.Visibility = avm.IsNewAppointment ? Visibility.Visible : Visibility.Collapsed;
if (vm.Customer is object)
{
customer_selection_control.SelectedItem = vm.Customer;
//customer_selection_control.SetSelectedCustomerOid(vm.Customer.CustomerOid);
}
}
}
}
}

View File

@@ -0,0 +1,63 @@
<Popup x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitBelegungEditPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:BeWo.View.Controls"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
d:DataContext="{d:DesignInstance Type=viewmodel:WohnheimVM}"
x:Name="root_Popup"
StaysOpen="True" Placement="MousePoint" Opened="Popup_Opened" Closed="root_Popup_Closed">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray" VerticalAlignment="Stretch">
<GroupBox x:Name="groupbox_newBelegung" Header="Belegung erstellen" Style="{StaticResource ObjectEditGroupBox}">
<Grid DataContext="{Binding Path=WohneinheitBelegungListVM.CurrentVM}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2*" MinWidth="200" />
</Grid.ColumnDefinitions>
<Label VerticalAlignment="Center" Grid.Row="0" Margin="3">Klient</Label>
<local:CustomerSelectionControl Grid.Row="0" Grid.Column="1" Margin="3" x:Name="customer_selection_control" ItemSelected="CustomerSelectionControl_ItemSelected">
</local:CustomerSelectionControl >
<Label VerticalAlignment="Center" Grid.Row="1" Margin="3">Wohneinheit</Label>
<ComboBox Grid.Row="1" Grid.Column="1" Margin="3" x:Name="combobox_Wohneinheit" SelectedItem="{Binding Path=Wohneinheit}" ItemsSource="{Binding ElementName=root_Popup, Path=DataContext.WohneinheitListVM.VMList}">
</ComboBox>
<Label VerticalAlignment="Center" Grid.Row="4" Margin="3">Beginn</Label>
<dxe:DateEdit Height="23" Grid.Row="4" Margin="3" Grid.Column="1" ShowClearButton="False"
EditValue="{Binding Path=StartDate, UpdateSourceTrigger=PropertyChanged}"/>
<Label VerticalAlignment="Center" Grid.Row="5" Margin="3">Ende</Label>
<dxe:DateEdit Height="23" Grid.Row="5" Margin="3" Grid.Column="1" ShowClearButton="True"
EditValue="{Binding Path=EndDate, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="Notiz" Grid.Row="8" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="8" Grid.Column="1" MinHeight="23" Margin="3" VerticalContentAlignment="Stretch" MaxHeight="150"
AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
Text="{Binding Path=Kommentar, UpdateSourceTrigger=PropertyChanged}"
/>
<StackPanel Grid.Row="9" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="3">
<Button Margin="3" x:Name="btn_save" Click="Save_Button_Click" IsEnabled="{Binding Path=CanSave, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}">Hinzufügen</Button>
<Button Margin="3" x:Name="btn_cancel" Click="Cancel_Button_Click">Abbrechen</Button>
</StackPanel>
</Grid>
</GroupBox>
</Border>
</Popup>

View File

@@ -0,0 +1,115 @@
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitBelegungEditPopup.xaml
/// </summary>
public partial class WohneinheitBelegungEditPopup : Popup
{
public static readonly DependencyProperty ViewModelProperty =
DependencyProperty.Register("ViewModel", typeof(WohnheimVM), typeof(WohneinheitBelegungEditPopup), new PropertyMetadata(null));
public WohnheimVM ViewModel
{
get { return DataContext as WohnheimVM; }
set { DataContext = value; }
}
public bool AddMode { get; set; }
public WohneinheitBelegungEditPopup()
{
InitializeComponent();
}
private void Save_Button_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitBelegungListVM.AddNewVMToList();
IsOpen = false;
}
private void Cancel_Button_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitBelegungListVM.CloseNewVM();
IsOpen = false;
}
private void Popup_Opened(object sender, EventArgs e)
{
var listvm = ViewModel.WohneinheitBelegungListVM;
AddMode = listvm.EditVM is null;
if (AddMode)
{
btn_cancel.Visibility = Visibility.Visible;
btn_save.Visibility = Visibility.Visible;
StaysOpen = true;
groupbox_newBelegung.Header = "Belegung erstellen";
customer_selection_control.SelectedItem = null;
}
else
{
btn_cancel.Visibility = Visibility.Collapsed;
btn_save.Visibility = Visibility.Collapsed;
StaysOpen = false;
groupbox_newBelegung.Header = "Belegung bearbeiten";
if (listvm.CurrentVM.Customer is object)
{
customer_selection_control.SetSelectedCustomerOid(listvm.CurrentVM.Customer.CustomerOid);
}
}
}
private void CustomerSelectionControl_ItemSelected(object sender, EventArgs<CompactCustomerDC> e)
{
var customer = e.Data;
ViewModel.WohneinheitBelegungListVM.CurrentVM.Customer = customer;
}
private void root_Popup_Closed(object sender, EventArgs e)
{
var vmlist = ViewModel.WohneinheitBelegungListVM;
var currentvm = vmlist.CurrentVM;
root_Popup.Focus();
if (currentvm is object)
{
if (AddMode)
{
vmlist.CloseNewVM();
}
else
{
vmlist.CloseEditVM();
}
}
}
}
}

View File

@@ -0,0 +1,200 @@
<UserControl x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitBelegungSchedulerView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduling"
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewmodel:WohnheimVM, IsDesignTimeCreatable=true}"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<DataTemplate x:Key="resourceHeaderContentTemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel>
<TextBlock
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{Binding Resource.SourceObject.Displayname}" />
</StackPanel>
</Grid>
</DataTemplate>
<DataTemplate x:Key="Options.TimelineView.Ribbon">
<dxr:RibbonControl>
<dxr:RibbonPage Style="{StaticResource Options.RibbonPage}">
<dxr:RibbonPageGroup Caption="Scheduler Settings">
<dxb:BarSubItem Style="{StaticResource Options.BarSubItem.WorkDays}"/>
<dxb:BarEditItem Style="{StaticResource Options.BarEditItem.StartWorkTime}"/>
<dxb:BarEditItem Style="{StaticResource Options.BarEditItem.EndWorkTime}"/>
<dxb:BarSubItem Style="{StaticResource Options.BarSubItem.FirstDayOfWeek}"/>
</dxr:RibbonPageGroup>
<dxr:RibbonPageGroup Caption="View Settings">
<dxb:BarSubItem Style="{StaticResource Options.BarSubItem.HeadersVisibility}"/>
<dxb:BarSubItem Style="{StaticResource Options.BarSubItem.NavigationButtonsVisibility}"/>
<dxb:BarSubItem Style="{StaticResource Options.BarSubItem.MoreButtonsVisibility}"/>
<dxb:BarEditItem Style="{StaticResource Options.BarEditItem.TimelineAppointmentMinHeight}"/>
<dxb:BarEditItem Style="{StaticResource Options.BarEditItem.TimelineResourceMinHeight}"/>
<dxb:BarEditItem Style="{StaticResource Options.BarEditItem.TimelineResourceMaxHeight}"/>
<dxb:BarEditItem Style="{StaticResource Options.BarEditItem.TimelineStretchAppointments}"/>
</dxr:RibbonPageGroup>
</dxr:RibbonPage>
</dxr:RibbonControl>
</DataTemplate>
<Style x:Key="timelineView.Style" TargetType="dxsch:TimelineView">
<Setter Property="ShowInCommandBar" Value="False"/>
<Setter Property="AppointmentMinHeight" Value="20"/>
<Setter Property="AppointmentMinWidth" Value="40"/>
<Setter Property="ResourceMinHeight" Value="44"/>
<Setter Property="ResourceMaxHeight" Value="116"/>
<Setter Property="SnapToCellsMode" Value="Never"/>
<Setter Property="MoreButtonsVisibility" Value="Never"/>
<Setter Property="ShowAppointmentStatus" Value="False"/>
<Setter Property="ShowAppointmentInterval" Value="False"/>
<Setter Property="NavigationButtonsVisibility" Value="Never"/>
<Setter Property="ResourceWidth" Value="150"/>
<Setter Property="ResourceHeaderContentTemplate" Value="{StaticResource resourceHeaderContentTemplate}"/>
</Style>
<Style x:Key="radiobutton" TargetType="{x:Type RadioButton}">
<Setter Property="Margin" Value="3"/>
</Style>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Visibility="Visible" x:Name="groupbox_buchungsplan" Header="{markup:Translate Buchungsplan}" Style="{StaticResource ObjectEditGroupBox}">
<Grid Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="*" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<dxlc:LayoutControl Name="PART_Options" Grid.Column="1" Grid.RowSpan="3" Margin="3" Orientation="Vertical" Padding="0"
dx:ScrollBarExtensions.ScrollBarMode="TouchOverlap" Background="Transparent"
>
<dxe:DateNavigator Background="Transparent"
RowCount="3"
x:Name="dateNavigator"
ShowTodayButton="False" ShowWeekNumbers="False" IsMultiSelect="False"
VerticalAlignment="Top" dxlc:LayoutControl.AllowVerticalSizing="True"
>
<dxe:DateNavigator.StyleSettings>
<dxsch:SchedulerDateNavigatorStyleSettings x:Name="dateNavigatorSettings"
AllowChangeSchedulerView="False"
Scheduler="{Binding ElementName=scheduler_buchungsplan}"
CustomizeSelectedDates="dateNavigatorSettings_CustomizeSelectedDates"/>
</dxe:DateNavigator.StyleSettings>
</dxe:DateNavigator>
<dxsch:ResourceTreeControl Scheduler="{Binding ElementName=scheduler_buchungsplan}" AllowResourceCreate="False" AllowResourceDelete="False" Margin="3,3,-1,-1" ShowBorder="False" Background="Transparent"/>
</dxlc:LayoutControl>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<!--<RadioButton GroupName="schedular_time" Content="Unbegrenzt" IsEnabled="True" Click="{DXEvent '@e(timelineView).IsActive = true'}" Style="{StaticResource radiobutton}"/>-->
<RadioButton x:Name="radioButtonYear" GroupName="schedular_time" Content="Jahr" Click="{DXEvent '@e(timelineViewYear).IsActive = true'}" Style="{StaticResource radiobutton}"/>
<RadioButton GroupName="schedular_time" Content="Quartal" Click="{DXEvent '@e(timelineViewQuartal).IsActive = true'}" Style="{StaticResource radiobutton}"/>
<RadioButton GroupName="schedular_time" Content="Monat" Click="{DXEvent '@e(timelineViewMonth).IsActive = true'}" Style="{StaticResource radiobutton}"/>
<RadioButton GroupName="schedular_time" Content="4 Wochen" Click="{DXEvent '@e(timelineView4Week).IsActive = true'}" Style="{StaticResource radiobutton}"/>
<RadioButton GroupName="schedular_time" Content="Wochen" Click="{DXEvent '@e(timelineViewWeek).IsActive = true'}" Style="{StaticResource radiobutton}"/>
<RadioButton GroupName="schedular_time" Content="Liste" Click="{DXEvent '@e(listview).IsActive = true'}" Style="{StaticResource radiobutton}"/>
</StackPanel>
<dxsch:SchedulerControl x:Name="scheduler_buchungsplan"
Grid.Row="1"
Width="auto"
Height="auto"
ShowBorder="False"
FirstDayOfWeek="Monday"
dx:ThemeManager.ThemeName="Office2010Black"
VerticalAlignment="Stretch"
GroupType="Resource"
ShowDateNavigationPanel="False"
PopupMenuShowing="scheduler_buchungsplan_PopupMenuShowing"
ActiveViewChanged="scheduler_ActiveViewChanged"
ActiveViewIndex="1"
AllowAppointmentCopy="False" AllowAppointmentCreate="{Binding Path=PermissionWohneinheitBelegungCreate}"
AllowAppointmentDelete="{Binding Path=PermissionWohneinheitBelegungDelete}" AllowAppointmentDrag="False"
AllowAppointmentDragBetweenResources="False" AllowAppointmentEdit="{Binding Path=PermissionWohneinheitBelegungEdit}"
AllowAppointmentMultiSelect="False" AllowAppointmentResize="False"
AllowCellMultiSelect="False" AllowInplaceEditor="False"
AllowReminders="False" AllowAppointmentConflicts="False" AppointmentWindowShowing="scheduler_buchungsplan_AppointmentWindowShowing"
>
<dxsch:SchedulerControl.OptionsWindows>
<dxsch:OptionsWindows AppointmentWindowType="{x:Type local:WohneinheitBelegungWindow}"/>
</dxsch:SchedulerControl.OptionsWindows>
<dxsch:SchedulerControl.OptionsContextMenu>
<dxsch:OptionsContextMenu>
<dxsch:OptionsContextMenu.AppointmentContextMenuActions>
<!--Remove the "Copy" item-->
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Copy}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Cut}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_EditSeries}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_Paste}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Appointment_Actions_RestoreOccurrence}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Appointment_Options_ShowTimeAs}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Appointment_Options_LabelAs}"/>
</dxsch:OptionsContextMenu.AppointmentContextMenuActions>
<dxsch:OptionsContextMenu.CellContextMenuActions>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Cell_Actions_NewAllDayEvent}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Cell_Actions_NewRecurringAppointment}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Cell_Actions_NewRecurringEvent}"/>
<dxb:RemoveAction ElementName="{x:Static Member=dxsch:DefaultBarItemNames.ContextMenu_Items_Cell_Actions_Paste}"/>
</dxsch:OptionsContextMenu.CellContextMenuActions>
</dxsch:OptionsContextMenu>
</dxsch:SchedulerControl.OptionsContextMenu>
<!--<dxsch:TimelineView x:Name="timelineView" ViewMode="Standard" Style="{StaticResource timelineView.Style}"/>-->
<dxsch:TimelineView x:Name="timelineViewYear" Style="{StaticResource timelineView.Style}"/>
<dxsch:TimelineView x:Name="timelineViewQuartal" Style="{StaticResource timelineView.Style}"/>
<dxsch:TimelineView x:Name="timelineView4Week" Style="{StaticResource timelineView.Style}"/>
<dxsch:TimelineView x:Name="timelineViewWeek" Style="{StaticResource timelineView.Style}"/>
<dxsch:TimelineView x:Name="timelineViewMonth" Style="{StaticResource timelineView.Style}"/>
<dxsch:ListView x:Name="listview"></dxsch:ListView>
<dxsch:SchedulerControl.DataSource>
<dxsch:DataSource
ResourcesSource="{Binding WohneinheitListVM.VMList}"
AppointmentLabelsSource="{Binding Customers}"
AppointmentsSource="{Binding WohneinheitBelegungListVM.VMList}">
<dxsch:DataSource.ResourceMappings>
<dxsch:ResourceMappings Id="Oid" Caption="Caption" Group="Group" />
</dxsch:DataSource.ResourceMappings>
<dxsch:DataSource.AppointmentLabelMappings>
<dxsch:AppointmentLabelMappings Id="CustomerOid" Caption="VollerName"/>
</dxsch:DataSource.AppointmentLabelMappings>
<dxsch:DataSource.AppointmentMappings>
<dxsch:AppointmentMappings
Start="StartDate"
End="EndDateDisplay"
ResourceId="Wohneinheit.Oid"
LabelId="Customer.CustomerOid"
Subject="Customer.VollerName">
</dxsch:AppointmentMappings>
</dxsch:DataSource.AppointmentMappings>
</dxsch:DataSource>
</dxsch:SchedulerControl.DataSource>
</dxsch:SchedulerControl>
</Grid>
</GroupBox>
</Grid>
</UserControl>

View File

@@ -0,0 +1,283 @@
using BeWo.ViewModel;
using BS.Shared.Translation;
using DevExpress.Mvvm;
using DevExpress.Xpf.Bars;
using DevExpress.Xpf.Core;
using DevExpress.Xpf.Scheduling;
using DevExpress.XtraScheduler.Native;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ViewBase = DevExpress.Xpf.Scheduling.ViewBase;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitBelegungSchedulerControl.xaml
/// </summary>
public partial class WohneinheitBelegungSchedulerView : UserControl
{
public WohnheimVM ViewModel => DataContext as WohnheimVM;
private Window _BelegungPopupWindow;
public WohneinheitBelegungSchedulerView()
{
InitializeComponent();
InitScheduler();
}
private void InitScheduler()
{
radioButtonYear.IsChecked = true;
timelineViewYear.IsActive = true;
timelineViewYear.TimeScales.Clear();
timelineViewYear.TimeScales.AddRange(new List<TimeScale>() {
new TimeScale(TimeScaleUnit.Year) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Month) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Day) { MinWidth = 0 }
});
timelineViewQuartal.TimeScales.Clear();
timelineViewQuartal.TimeScales.AddRange(new List<TimeScale>() {
new TimeScale(TimeScaleUnit.Year) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Quarter) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Month) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Day) { MinWidth = 0}
});
timelineViewMonth.TimeScales.Clear();
timelineViewMonth.TimeScales.AddRange(new List<TimeScale>() {
new TimeScale(TimeScaleUnit.Year) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Month) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Day) { MinWidth = 0 }
});
timelineView4Week.TimeScales.Clear();
timelineView4Week.TimeScales.AddRange(new List<TimeScale>() {
new TimeScale(TimeScaleUnit.Year) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Month) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Week) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Day) { MinWidth = 0 }
});
timelineViewWeek.TimeScales.Clear();
timelineViewWeek.TimeScales.AddRange(new List<TimeScale>() {
new TimeScale(TimeScaleUnit.Year) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Month) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Week) { MinWidth = 0 },
new TimeScale(TimeScaleUnit.Day) { MinWidth = 0 }
});
}
void scheduler_ActiveViewChanged(object sender, ValueChangedEventArgs<ViewBase> e)
{
if (e.NewValue == null) return;
var selectionStart = scheduler_buchungsplan.SelectedInterval.Start;
var dates = new List<DateTime>() { selectionStart.Date };
if (!CoerceDateNavigatorSelectedDates(dates))
{
return;
}
try
{
UpdateSelectionView();
}
catch (Exception)
{
UpdateSelectionView();
}
var min = dates.Min();
scheduler_buchungsplan.Start = min;
var intervalDuration = dates.Max().AddDays(1) - min;
var timeline = (TimelineView)e.NewValue;
timeline.IntervalDuration = intervalDuration;
timeline.ViewportStart = min;
timeline.Zoom = TimeSpan.MinValue;
timeline.Zoom = TimeSpan.MaxValue;
scheduler_buchungsplan.SelectedInterval = new DateTimeRange(selectionStart, TimeSpan.Zero);
}
private void UpdateSelectionView()
{
if (timelineViewWeek.IsActive)
{
dateNavigator.CalendarView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
dateNavigator.SelectionView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
}
else if (timelineView4Week.IsActive)
{
dateNavigator.CalendarView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
dateNavigator.SelectionView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
}
else if (timelineViewMonth.IsActive)
{
dateNavigator.CalendarView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
dateNavigator.SelectionView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
}
else if (timelineViewQuartal.IsActive)
{
dateNavigator.CalendarView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
dateNavigator.SelectionView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Month;
}
else if (timelineViewYear.IsActive)
{
dateNavigator.CalendarView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Years;
dateNavigator.SelectionView = DevExpress.Xpf.Editors.DateNavigator.DateNavigatorCalendarView.Years;
}
}
void dateNavigatorSettings_CustomizeSelectedDates(object sender, CustomizeSelectedDatesEventArgs e)
{
e.Handled = CoerceDateNavigatorSelectedDates(e.Dates);
if (scheduler_buchungsplan.ActiveView is TimelineView timeline)
{
var intervalDuration = e.Dates.Max().AddDays(1) - e.Dates.Min();
if (!ViewModel.IntervalChanging && timeline.IntervalDuration != intervalDuration)
{
ViewModel.IntervalChanging = true;
timeline.IntervalDuration = intervalDuration;
timeline.Zoom = TimeSpan.MinValue;
timeline.Zoom = TimeSpan.MaxValue;
ViewModel.IntervalChanging = false;
}
}
}
bool CoerceDateNavigatorSelectedDates(IList<DateTime> dates)
{
if (dates.Count == 0) return false;
var start = dates.Min();
var end = dates.Max();
if (timelineViewWeek.IsActive)
{
var actualStart = DateTimeHelper.GetStartOfWeekUI(start, scheduler_buchungsplan.FirstDayOfWeek);
var actualEnd = actualStart.AddDays(7);
dates.Clear();
while (actualStart < actualEnd)
{
dates.Add(actualStart);
actualStart = actualStart.AddDays(1);
}
return true;
}
if (timelineView4Week.IsActive)
{
var actualStart = DateTimeHelper.GetStartOfWeekUI(start, scheduler_buchungsplan.FirstDayOfWeek);
var actualEnd = actualStart.AddDays(28);
dates.Clear();
while (actualStart < actualEnd)
{
dates.Add(actualStart);
actualStart = actualStart.AddDays(1);
}
return true;
}
if (timelineViewMonth.IsActive)
{
var actualStart = new DateTime(start.Year, start.Month, 1);
var actualEnd = actualStart.AddMonths(1);
dates.Clear();
while (actualStart < actualEnd)
{
dates.Add(actualStart);
actualStart = actualStart.AddDays(1);
}
return true;
}
if (timelineViewYear.IsActive)
{
var actualStart = new DateTime(start.Year, 1, 1);
var actualEnd = actualStart.AddYears(1);
dates.Clear();
while (actualStart < actualEnd)
{
dates.Add(actualStart);
actualStart = actualStart.AddDays(1);
}
return true;
}
if (timelineViewQuartal.IsActive)
{
var actualStart = new DateTime(start.Year, start.Month, 1);
var actualEnd = actualStart.AddMonths(3);
dates.Clear();
while (actualStart < actualEnd)
{
dates.Add(actualStart);
actualStart = actualStart.AddDays(1);
}
return true;
}
return false;
}
private void scheduler_buchungsplan_PopupMenuShowing(object sender, DevExpress.Xpf.Scheduling.PopupMenuShowingEventArgs e)
{
var accept = new ContextMenuType[] { ContextMenuType.AppointmentContextMenu, ContextMenuType.CellContextMenu };
if (!accept.Contains(e.MenuType))
{
e.Cancel = true;
return;
}
PopupMenu menu = (PopupMenu)e.Menu;
foreach (var menuItem in menu.Items)
{
var barItem = menuItem as BarItem;
if (barItem is null)
continue;
barItem.Content = Translator.TranslateKey(barItem.Name, "???");
}
}
private void scheduler_buchungsplan_AppointmentWindowShowing(object sender, AppointmentWindowShowingEventArgs e)
{
if (_BelegungPopupWindow is object && _BelegungPopupWindow.IsVisible)
{
e.Handled = true;
e.Cancel = true;
return;
}
var vm = e.Appointment.SourceObject as WohneinheitBelegungVM;
bool success = vm.IsNew ? ViewModel.AddBelegung(e.Appointment.ResourceId, e.Appointment.Start.Date) : ViewModel.EditBelegung(vm);
if (success)
{
_BelegungPopupWindow = e.Window;
e.Window.DataContext = ViewModel;
}
else
{
e.Cancel = true;
}
}
}
}

View File

@@ -0,0 +1,69 @@
<UserControl x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitBelegungTableView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
DataContextChanged="UserControl_DataContextChanged"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewmodel:WohnheimVM, IsDesignTimeCreatable=true}"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Visibility="Visible" x:Name="groupbox_Wohneinheit_Buchung" Header="{markup:Translate Buchungen}" Style="{StaticResource ObjectEditGroupBox}">
<Grid Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="26*"/>
<ColumnDefinition Width="29*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Click="Button_NewBelegung_Click" Content="Belegung hinzufügen" HorizontalAlignment="Right" Grid.ColumnSpan="2" Margin="3" Visibility="{Binding Path=PermissionWohneinheitBelegungCreate, Converter={StaticResource BoolVisibilityConverter}}"/>
<dxg:GridControl Grid.Row="1" x:Name="datagrid_belegung"
DataSource="{Binding WohneinheitBelegungListVM.VMList}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.ColumnSpan="2">
<dxg:GridColumn x:Name="ColumnButtons2" AllowEditing="False" Width="Auto" FieldName="ReportLink" Header=" " Visible="{Binding Path=PermissionWohneinheitBelegungDelete}">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<StackPanel Orientation="Horizontal" Margin="1">
<Button Click="btn_belegung_delete_Click" Content="r" Padding="0" Margin="1" ToolTip="Löschen" Foreground="#FFFFFF" FontSize="11" FontFamily="Webdings" x:Name="btn_delete" Height="18" Width="20" VerticalAlignment="Center" />
</StackPanel>
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
</dxg:GridColumn>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Oid" Header="Nr." Width="70"/>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Customer.Name" Header="{t:Translate Klient}" Width="200" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Wohneinheit.Wohnname" Header="Wohnungsname" Width="200"/>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Wohneinheit.Zimmername" Header="Zimmername" Width="150"/>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="StartDate" Header="Start" Width="100">
<dxg:GridColumn.EditSettings>
<dxe:DateEditSettings DisplayFormat="d" HorizontalContentAlignment="Right"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="EndDate" Header="Ende" Width="100">
<dxg:GridColumn.EditSettings>
<dxe:DateEditSettings DisplayFormat="d" HorizontalContentAlignment="Right"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Kommentar" Header="Kommentar" MinWidth="50" Width="*" AllowEditing="{Binding Path=PermissionWohneinheitBelegungEdit}"/>
<dxg:GridControl.View>
<dxg:TableView x:Name="datagridview2" NavigationStyle="Cell" BestFitModeOnSourceChange="AllRows" BestFitMode="AllRows" RowDoubleClick="datagridview2_RowDoubleClick"/>
</dxg:GridControl.View>
</dxg:GridControl>
<local:WohneinheitBelegungEditPopup x:Name="popup_newBelegung" ViewModel="{Binding}"/>
</Grid>
</GroupBox>
</Grid>
</UserControl>

View File

@@ -0,0 +1,87 @@
using BeWo.ViewModel;
using BS.Shared.Extensions;
using DevExpress.Xpf.Grid;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitBelegungTableView.xaml
/// </summary>
public partial class WohneinheitBelegungTableView : UserControl
{
public WohnheimVM ViewModel => DataContext as WohnheimVM;
public WohneinheitBelegungTableView()
{
InitializeComponent();
}
private void Button_NewBelegung_Click(object sender, RoutedEventArgs e)
{
if (popup_newBelegung.IsOpen)
return;
var success = ViewModel.AddBelegung();
if (success)
popup_newBelegung.IsOpen = true;
}
private void btn_belegung_delete_Click(object sender, RoutedEventArgs e)
{
if (!ViewModel.PermissionWohneinheitBelegungDelete)
return;
var listvm = ViewModel.WohneinheitBelegungListVM;
if (listvm.EditVM is object)
return;
var vm = datagrid_belegung.GetCurrentValue<WohneinheitBelegungVM>();
_ = listvm.VMList.Remove(vm);
e.Handled = true;
}
private void datagridview2_RowDoubleClick(object sender, RowDoubleClickEventArgs e)
{
if (popup_newBelegung.IsOpen)
return;
var vm = datagrid_belegung.GetCurrentValue<WohneinheitBelegungVM>();
var success = ViewModel.EditBelegung(vm);
if (success)
popup_newBelegung.IsOpen = true;
}
private void UserControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if (e.OldValue is WohnheimVM vm)
{
vm.WohneinheitBelegungListVM.PropertyChanged -= (s, args) => datagridview2.BestFitColumns();
}
if (e.NewValue is WohnheimVM vm2)
{
vm2.WohneinheitBelegungListVM.PropertyChanged += (s, args) => datagridview2.BestFitColumns();
}
}
}
}

View File

@@ -0,0 +1,25 @@
<dx:ThemedWindow x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitBelegungWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
mc:Ignorable="d"
Title="WohneinheitBelegungWindow" SizeToContent="WidthAndHeight">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:CurrentWindowService ClosingCommand="{Binding WindowClosingCommand}" />
</dxmvvm:Interaction.Behaviors>
<!--Buttons-->
<StackPanel
HorizontalAlignment="Right"
Orientation="Vertical">
<local:WohneinheitBelegungEditControl >
</local:WohneinheitBelegungEditControl>
</StackPanel>
</dx:ThemedWindow>

View File

@@ -0,0 +1,28 @@
using DevExpress.Xpf.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitBelegungWindow.xaml
/// </summary>
public partial class WohneinheitBelegungWindow : ThemedWindow
{
public WohneinheitBelegungWindow()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,123 @@
<Popup x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitEditPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:BeWo.View.Controls"
mc:Ignorable="d"
Width="500"
StaysOpen="True" Placement="MousePoint" Opened="Popup_Opened" Closed="Popup_Closed">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray" VerticalAlignment="Stretch">
<GroupBox x:Name="groupbox_newWohneinheit" Header="Wohneinheit erstellen" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label VerticalAlignment="Center" Grid.Row="0" Margin="3">Wohnungsname</Label>
<ComboBox Grid.Row="0" Grid.Column="1" Margin="3" IsReadOnly="False"
x:Name="combobox_wohnungsname" IsEditable="True" IsTextSearchEnabled="False"
ItemsSource="{Binding Path=WohneinheitListVM.Wohnungsnamen}"
DropDownClosed="combobox_wohnungsname_DropDownClosed"
Text="{Binding Path=WohneinheitListVM.CurrentVM.Wohnname, UpdateSourceTrigger=PropertyChanged}"
ToolTip="Liste der Wohneinheiten ohne Zimmer Bezeichnung"/>
<Label VerticalAlignment="Center" Grid.Row="1" Margin="3">Zimmername</Label>
<TextBox Grid.Row="1" Grid.Column="1" Margin="3"
Text="{Binding Path=WohneinheitListVM.CurrentVM.Zimmername, UpdateSourceTrigger=PropertyChanged}" />
<Label VerticalAlignment="Center" Grid.Row="2" Margin="3">Baujahr</Label>
<dxe:TextEdit Height="23" Grid.Row="2" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.Baujahr, UpdateSourceTrigger=PropertyChanged}" Mask="0000"/>
<Label Content="Stock" Grid.Row="3" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="3" Grid.Column="1" Height="23" Margin="3" VerticalContentAlignment="Stretch"
Text="{Binding Path=WohneinheitListVM.CurrentVM.Stock, UpdateSourceTrigger=PropertyChanged}"/>
<Label VerticalAlignment="Center" Grid.Row="4" Margin="3">Fläche</Label>
<dxe:TextEdit Height="23" Grid.Row="4" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="1"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.QM, UpdateSourceTrigger=PropertyChanged}" Mask="######0.00 qm"/>
<Label VerticalAlignment="Center" Grid.Row="5" Margin="3">Kaution</Label>
<dxe:TextEdit Height="23" Grid.Row="5" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.Kaution, UpdateSourceTrigger=PropertyChanged}" Mask="######0.## $"/>
<Grid Grid.Row="6" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7*" />
<ColumnDefinition Width="15*" />
<ColumnDefinition Width="12*" />
<ColumnDefinition Width="15*" />
</Grid.ColumnDefinitions>
<Label VerticalAlignment="Center" Grid.Row="0" Margin="3">Miete</Label>
<dxe:TextEdit Height="23" Grid.Row="0" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.Miete, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" Margin="3">Heizung</Label>
<dxe:TextEdit Height="23" Grid.Row="1" Margin="3" Grid.Column="1" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.Heizung, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" Margin="3">Strom</Label>
<dxe:TextEdit Height="23" Grid.Row="2" Margin="3" Grid.Column="1" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.Strom, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="0" Grid.Column="2" Margin="3">Betriebskosten</Label>
<dxe:TextEdit Height="23" Grid.Row="0" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="3"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.Betriebskosten, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="2" Margin="3">Sonstige Kosten</Label>
<dxe:TextEdit Height="23" Grid.Row="1" Margin="3" Grid.Column="3" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.SonstigeKosten, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" Margin="3">Brutto</Label>
<dxe:TextEdit Height="23" Grid.Row="2" Margin="3" Grid.Column="3" MaskType="Numeric" MaskUseAsDisplayFormat="True"
IsReadOnly="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.CurrentVM.Brutto, Mode=OneWay}" Mask="########0.## $"/>
</Grid>
<Label Content="Möbilierung" Grid.Row="7" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="7" Grid.Column="1" MinHeight="23" Margin="3" VerticalContentAlignment="Stretch" MaxHeight="150"
AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
Text="{Binding Path=WohneinheitListVM.CurrentVM.Mobilierung, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="Notiz" Grid.Row="8" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="8" Grid.Column="1" MinHeight="23" Margin="3" VerticalContentAlignment="Stretch" MaxHeight="150"
AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
Text="{Binding Path=WohneinheitListVM.CurrentVM.Zusatznotiz, UpdateSourceTrigger=PropertyChanged}"/>
<StackPanel Grid.Row="9" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="3">
<Button Margin="3" x:Name="btn_save" Click="Save_Button_Click">Hinzufügen</Button>
<Button Margin="3" x:Name="btn_cancel" Click="Cancel_Button_Click">Abbrechen</Button>
</StackPanel>
</Grid>
</GroupBox>
</Border>
</Popup>

View File

@@ -0,0 +1,141 @@
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitEditControl.xaml
/// </summary>
public partial class WohneinheitEditPopup : Popup
{
public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register(
"ViewModel", typeof(WohnheimVM),
typeof(WohneinheitEditPopup),
new PropertyMetadata(null)
);
public WohnheimVM ViewModel
{
get => (WohnheimVM)GetValue(ViewModelProperty);
set => SetValue(ViewModelProperty, value);
}
public bool AddMode { get; set; }
public WohneinheitEditPopup()
{
InitializeComponent();
}
private void Save_Button_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitListVM.AddNewVMToList();
IsOpen = false;
}
private void Cancel_Button_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitListVM.ResetNewVM();
IsOpen = false;
}
private void Popup_Opened(object sender, EventArgs e)
{
var vmlist = ViewModel.WohneinheitListVM;
AddMode = vmlist.EditVM is null;
if (AddMode)
{
btn_cancel.Visibility = Visibility.Visible;
btn_save.Visibility = Visibility.Visible;
StaysOpen = true;
groupbox_newWohneinheit.Header = "Wohneinheit erstellen";
}
else
{
btn_cancel.Visibility = Visibility.Collapsed;
btn_save.Visibility = Visibility.Collapsed;
StaysOpen = false;
groupbox_newWohneinheit.Header = "Wohneinheit bearbeiten";
var current = vmlist.CurrentVM;
if (!string.IsNullOrEmpty(current.Wohnname) && combobox_wohnungsname.Items.Contains(current.Wohnname))
{
combobox_wohnungsname.SelectedItem = current.Wohnname;
}
else
{
combobox_wohnungsname.SelectedItem = null;
}
}
}
private void Popup_Closed(object sender, EventArgs e)
{
var vmlist = ViewModel.WohneinheitListVM;
var currentvm = vmlist.CurrentVM;
if (currentvm is object)
{
if (AddMode)
{
vmlist.CurrentVM = null;
vmlist.NewVM = null;
}
else
{
vmlist.CloseEditVM();
}
}
}
private void SetValuesFromParent(WohneinheitVM vm, WohneinheitVM parent_vm)
{
if (vm is null || parent_vm is null)
return;
if (vm.Stock.IsNullOrEmpty() && parent_vm.Stock.IsNotNullOrEmpty())
{
vm.Stock = parent_vm.Stock;
}
if (!vm.Baujahr.HasValue && parent_vm.Baujahr.HasValue)
{
vm.Baujahr = parent_vm.Baujahr;
}
}
private void combobox_wohnungsname_DropDownClosed(object sender, EventArgs e)
{
var vm = ViewModel.WohneinheitListVM.CurrentVM;
if (vm is null)
return;
var selected_item = combobox_wohnungsname.SelectedItem as string;
var selected_vm = ViewModel.WohneinheitListVM.VMList.FirstOrDefault(x => x.Wohnname == selected_item);
SetValuesFromParent(vm, selected_vm);
}
}
}

View File

@@ -0,0 +1,73 @@
<localView:BeWoView x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitGrundrissModalPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
xmlns:localView="clr-namespace:BeWo.View"
mc:Ignorable="d">
<localView:BeWoView.Resources>
<Style TargetType="{x:Type ListBox}" x:Key="PhotoListBoxStyle">
<Setter Property="Foreground" Value="Black" />
<Setter Property="Margin" Value="5" />
<Setter Property="MinHeight" Value="100" />
<Setter Property="MaxHeight" Value="800" />
<Setter Property="IsSynchronizedWithCurrentItem" Value="True" />
<Setter Property="SelectionMode" Value="Single" />
</Style>
<Style TargetType="ListBoxItem">
<Style.Resources>
<!--SelectedItem with focus-->
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="LightBlue" Opacity=".4"/>
<!--SelectedItem without focus-->
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey }" Color="LightBlue" Opacity=".4"/>
</Style.Resources>
</Style>
</localView:BeWoView.Resources>
<GroupBox Width="1400" Style="{StaticResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
<TextBox Margin="10,4,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}"
FontSize="20" BorderBrush="{x:Null}" VerticalAlignment="Stretch" BorderThickness="0,0,0,0"
Padding="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<GroupBox Margin="10" Header="Grundrissverwaltung" Style="{StaticResource ObjectEditGroupBox}">
<ListBox
Name="PhotosListBox"
ItemsSource="{Binding}"
Style="{StaticResource PhotoListBoxStyle}"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto"
SelectedIndex="0">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Hinzufügen" Click="MenuItem_Add_Click" />
<MenuItem Header="Löschen" Click="MenuItem_Del_Click" />
</ContextMenu>
</ListBox.ContextMenu>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="3"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel MouseDown="StackPanel_MouseDown">
<Image Source="{Binding Original}" Height="150" Stretch="Uniform"></Image>
<Label Content="{Binding Filename}" HorizontalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</GroupBox>
</Grid>
</GroupBox>
</localView:BeWoView>

View File

@@ -0,0 +1,99 @@
using BeWo.Core;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitGrundrissControl.xaml
/// </summary>
public partial class WohneinheitGrundrissModalPopup : BeWoView
{
public ImageListVM Images { get; set; }
public WohneinheitGrundrissModalPopup(ImageListVM images)
{
InitializeComponent();
this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close,
(s, e) =>
{
BeWoApp.MainControl.CloseCurrentPopUp();
}));
Images = images;
DataContext = Images.VMList;
}
private void MenuItem_Add_Click(object sender, RoutedEventArgs e)
{
var dialog = new Microsoft.Win32.OpenFileDialog();
dialog.Title = "Wähle einen Grundriss aus";
dialog.Filter = "ALL supported Graphics| *.jpeg; *.jpg;*.png;";
// Show open file dialog box
bool? result = dialog.ShowDialog();
if (result != true)
return;
var info = new FileInfo(dialog.FileName);
if (!info.Exists)
return;
var vm = new ImageVM();
vm.Filename = info.Name;
vm.Fullname = info.FullName;
vm.Original = File.ReadAllBytes(info.FullName);
Images.VMList.Add(vm);
}
private void MenuItem_Del_Click(object sender, RoutedEventArgs e)
{
var t = PhotosListBox.SelectedItem as ImageVM;
if (t is null)
return;
Images.VMList.Remove(t);
}
private void StackPanel_MouseDown(object sender, MouseButtonEventArgs e)
{
var stackpanel = sender as StackPanel;
var image = stackpanel?.Children?[0] as Image;
var image_source = image?.Source;
if (image_source is object)
{
if(e.ClickCount >= 2)
{
BeWoUtils.ShowImageForm(image_source);
}
}
}
}
}

View File

@@ -0,0 +1,75 @@
<UserControl x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitVerwaltungViewV1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
DataContextChanged="UserControl_DataContextChanged"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewmodel:WohnheimVM, IsDesignTimeCreatable=true}"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Visibility="Visible" x:Name="groupbox_Wohneinheit" Header="{markup:Translate Verwaltung}" Style="{StaticResource ObjectEditGroupBox}">
<Grid Margin="3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="26*"/>
<ColumnDefinition Width="29*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Click="Button_NewWohneinheit_Click" Content="Wohneinheit hinzufügen" HorizontalAlignment="Right" Grid.ColumnSpan="2" Margin="3" Visibility="{Binding Path=PermissionWohneinheitCreate, Converter={StaticResource BoolVisibilityConverter}}"/>
<dxg:GridControl Grid.Row="1" x:Name="datagrid_wohneinheiten"
DefaultSorting="DisplayName"
DataSource="{Binding WohneinheitListVM.VMList}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.ColumnSpan="2">
<dxg:GridColumn x:Name="ColumnButtons" AllowEditing="False" Width="Auto" FieldName="ReportLink" Header=" " Visible="{Binding Path=PermissionWohneinheitButton}">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<StackPanel Orientation="Horizontal" Margin="1">
<Button Click="btn_gallery_Click" Visibility="{Binding Path=DataContext.PermissionWohneinheitGallery, ElementName=rootView, Converter={StaticResource BoolVisibilityConverter}}" Content="1" Padding="0" Margin="1" ToolTip="Grundrisse" Foreground="#FFFFFF" FontSize="11" FontFamily="Wingdings" x:Name="btn_gallery" Height="18" Width="22" VerticalAlignment="Center" />
<Button Click="btn_delete_Click" Visibility="{Binding Path=DataContext.PermissionWohneinheitDelete, ElementName=rootView, Converter={StaticResource BoolVisibilityConverter}}" Content="r" Padding="0" Margin="1,1,1,1" ToolTip="Löschen" Foreground="#FFFFFF" FontSize="11" FontFamily="Webdings" x:Name="btn_delete" Height="18" Width="20" VerticalAlignment="Center" />
</StackPanel>
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
</dxg:GridColumn>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Oid" Header="Nr."/>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Wohnname" Header="Wohnungsname" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Zimmername" Header="Zimmername" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Baujahr" Header="Baujahr" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Stock" Header="Stock" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="FlacheString" Header="Fläche" />
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Kaution" Header="Kaution" >
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric" HorizontalContentAlignment="Right"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Miete" Header="Miete" >
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric" HorizontalContentAlignment="Right"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn ReadOnly="True" AllowEditing="False" FieldName="Brutto" Header="Brutto" >
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings DisplayFormat="c" Mask="c" MaskType="Numeric" HorizontalContentAlignment="Right"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="Mobilierung" Header="Möbilierung" MinWidth="50" Width="*" AllowEditing="{Binding Path=PermissionWohneinheitEdit}"/>
<dxg:GridColumn FieldName="Zusatznotiz" Header="Notiz" MinWidth="50" Width="*" AllowEditing="{Binding Path=PermissionWohneinheitEdit}"/>
<dxg:GridControl.View>
<dxg:TableView x:Name="datagridview" NavigationStyle="Cell" BestFitModeOnSourceChange="AllRows" BestFitMode="AllRows" RowDoubleClick="datagridview_RowDoubleClick" />
</dxg:GridControl.View>
</dxg:GridControl>
<local:WohneinheitEditPopup x:Name="popup_newWohneinheit" ViewModel="{Binding}"/>
</Grid>
</GroupBox>
</Grid>
</UserControl>

View File

@@ -0,0 +1,103 @@
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared.Extensions;
using DevExpress.Xpf.Grid;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitVerwaltungControlV1.xaml
/// </summary>
public partial class WohneinheitVerwaltungViewV1 : UserControl
{
public WohnheimVM ViewModel => DataContext as WohnheimVM;
public WohneinheitVerwaltungViewV1()
{
InitializeComponent();
}
private void Button_NewWohneinheit_Click(object sender, RoutedEventArgs e)
{
if (popup_newWohneinheit.IsOpen)
return;
var success = ViewModel.AddWohneinheit();
if (success)
popup_newWohneinheit.IsOpen = true;
}
private void datagridview_RowDoubleClick(object sender, RowDoubleClickEventArgs e)
{
if (popup_newWohneinheit.IsOpen)
return;
var vm = datagrid_wohneinheiten.GetCurrentValue<WohneinheitVM>();
var success = ViewModel.EditWohneinheit(vm);
if (success)
popup_newWohneinheit.IsOpen = true;
}
private void btn_delete_Click(object sender, RoutedEventArgs e)
{
if (!ViewModel.PermissionWohneinheitDelete)
return;
if (ViewModel.WohneinheitListVM.EditVM is object)
return;
var vm = datagrid_wohneinheiten.GetCurrentValue<WohneinheitVM>();
ViewModel.WohneinheitListVM.AskRemoveVM(vm);
e.Handled = true;
}
private void btn_gallery_Click(object sender, RoutedEventArgs e)
{
if (!ViewModel.PermissionWohneinheitGallery)
return;
if (BeWoApp.MainControl.IsModalPopupOpen)
return;
var vm = datagrid_wohneinheiten.GetCurrentValue<WohneinheitVM>();
var control = new WohneinheitGrundrissModalPopup(vm.ImageListVM);
BeWoApp.MainControl.ShowControlAsModalPopup(control);
e.Handled = true;
}
private void UserControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
{
if(e.OldValue is WohnheimVM vm)
{
vm.WohneinheitListVM.PropertyChanged -= (s, args) => datagridview.BestFitColumns();
}
if (e.NewValue is WohnheimVM vm2)
{
vm2.WohneinheitListVM.PropertyChanged += (s, args) => datagridview.BestFitColumns();
}
}
}
}

View File

@@ -0,0 +1,148 @@
<UserControl x:Class="BeWo.View.Detail.Wohneinheit.WohneinheitVerwaltungViewV2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:local="clr-namespace:BeWo.View.Detail.Wohneinheit"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=viewmodel:WohnheimVM, IsDesignTimeCreatable=true}"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox x:Name="groupbox_Wohneinheit_2" Header="{markup:Translate Verwaltung}" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="5*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<ListBox VerticalAlignment="Stretch" ItemsSource="{Binding WohneinheitListVM.VMList}" SelectedItem="{Binding WohneinheitListVM.EditVM}" DisplayMemberPath="Displayname2"/>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Width="25" Margin="3" Content="+" Click="Button_Click"/>
<Button Width="25" Margin="3" Content="-" Click="Button_Click_1"/>
</StackPanel>
</Grid>
<GroupBox Grid.Column="2" x:Name="groupbox_newWohneinheit" Header="Allgemeine Informationen" Style="{StaticResource ObjectEditGroupBox}" Margin="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Label VerticalAlignment="Center" Grid.Row="0" Margin="3">Wohnungsname</Label>
<ComboBox Grid.Row="0" Grid.Column="1" Margin="3" IsReadOnly="False"
x:Name="combobox_wohnungsname" IsEditable="True" IsTextSearchEnabled="False"
ItemsSource="{Binding Path=WohneinheitListVM.Wohnungsnamen}"
DropDownClosed="combobox_wohnungsname_DropDownClosed"
Text="{Binding Path=WohneinheitListVM.EditVM.Wohnname, UpdateSourceTrigger=PropertyChanged}"
ToolTip="Liste der Wohneinheiten ohne Zimmer Bezeichnung"/>
<Label VerticalAlignment="Center" Grid.Row="1" Margin="3">Zimmername</Label>
<TextBox Grid.Row="1" Grid.Column="1" Margin="3"
Text="{Binding Path=WohneinheitListVM.EditVM.Zimmername, UpdateSourceTrigger=PropertyChanged}" />
<Label VerticalAlignment="Center" Grid.Row="2" Margin="3">Baujahr</Label>
<dxe:TextEdit Height="23" Grid.Row="2" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True"
Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.Baujahr, UpdateSourceTrigger=PropertyChanged}" Mask="0000"/>
<Label Content="Stock" Grid.Row="3" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="3" Grid.Column="1" Height="23" Margin="3" VerticalContentAlignment="Stretch"
Text="{Binding Path=WohneinheitListVM.EditVM.Stock, UpdateSourceTrigger=PropertyChanged}"/>
<Label VerticalAlignment="Center" Grid.Row="4" Margin="3">Fläche</Label>
<dxe:TextEdit Height="23" Grid.Row="4" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="1"
EditValue="{Binding Path=WohneinheitListVM.EditVM.QM, UpdateSourceTrigger=PropertyChanged}" Mask="######0.00 qm"/>
<Label VerticalAlignment="Center" Grid.Row="5" Margin="3">Kaution</Label>
<dxe:TextEdit Height="23" Grid.Row="5" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.Kaution, UpdateSourceTrigger=PropertyChanged}" Mask="######0.## $"/>
<Grid Grid.Row="6" Grid.ColumnSpan="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7*" />
<ColumnDefinition Width="15*" />
<ColumnDefinition Width="12*" />
<ColumnDefinition Width="15*" />
</Grid.ColumnDefinitions>
<Label VerticalAlignment="Center" Grid.Row="0" Margin="3">Miete</Label>
<dxe:TextEdit Height="23" Grid.Row="0" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="1"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.Miete, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" Margin="3">Heizung</Label>
<dxe:TextEdit Height="23" Grid.Row="1" Margin="3" Grid.Column="1" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.Heizung, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" Margin="3">Strom</Label>
<dxe:TextEdit Height="23" Grid.Row="2" Margin="3" Grid.Column="1" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.Strom, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="0" Grid.Column="2" Margin="3">Betriebskosten</Label>
<dxe:TextEdit Height="23" Grid.Row="0" Margin="3" MaskType="Numeric" MaskUseAsDisplayFormat="True" Grid.Column="3"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.Betriebskosten, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="2" Margin="3">Sonstige Kosten</Label>
<dxe:TextEdit Height="23" Grid.Row="1" Margin="3" Grid.Column="3" MaskType="Numeric" MaskUseAsDisplayFormat="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.SonstigeKosten, UpdateSourceTrigger=PropertyChanged}" Mask="########0.## $"/>
<Label VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" Margin="3">Brutto</Label>
<dxe:TextEdit Height="23" Grid.Row="2" Margin="3" Grid.Column="3" MaskType="Numeric" MaskUseAsDisplayFormat="True"
IsReadOnly="True"
dxe:NumericMaskOptions.AlwaysShowDecimalSeparator="False"
EditValue="{Binding Path=WohneinheitListVM.EditVM.Brutto, Mode=OneWay}" Mask="########0.## $"/>
</Grid>
<Label Content="Möbilierung" Grid.Row="7" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="7" Grid.Column="1" MinHeight="23" Margin="3" VerticalContentAlignment="Stretch" MaxHeight="150"
AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
Text="{Binding Path=WohneinheitListVM.EditVM.Mobilierung, UpdateSourceTrigger=PropertyChanged}"/>
<Label Content="Notiz" Grid.Row="8" Grid.Column="0" VerticalAlignment="Top" Margin="3"/>
<TextBox Grid.Row="8" Grid.Column="1" MinHeight="23" Margin="3" VerticalContentAlignment="Stretch" MaxHeight="150"
AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
Text="{Binding Path=WohneinheitListVM.EditVM.Zusatznotiz, UpdateSourceTrigger=PropertyChanged}"/>
</Grid>
</GroupBox>
</Grid>
</GroupBox>
</Grid>
</UserControl>

View File

@@ -0,0 +1,72 @@
using BeWo.ViewModel;
using BS.Shared.Extensions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Wohneinheit
{
/// <summary>
/// Interaktionslogik für WohneinheitVerwaltungControl.xaml
/// </summary>
public partial class WohneinheitVerwaltungViewV2 : UserControl
{
public WohnheimVM ViewModel => DataContext as WohnheimVM;
public WohneinheitVerwaltungViewV2()
{
InitializeComponent();
}
private void SetValuesFromParent(WohneinheitVM vm, WohneinheitVM parent_vm)
{
if (vm is null || parent_vm is null)
return;
if (vm.Stock.IsNullOrEmpty() && parent_vm.Stock.IsNotNullOrEmpty())
{
vm.Stock = parent_vm.Stock;
}
if (!vm.Baujahr.HasValue && parent_vm.Baujahr.HasValue)
{
vm.Baujahr = parent_vm.Baujahr;
}
}
private void combobox_wohnungsname_DropDownClosed(object sender, EventArgs e)
{
var vm = ViewModel.WohneinheitListVM.CurrentVM;
if (vm is null)
return;
var selected_item = combobox_wohnungsname.SelectedItem as string;
var selected_vm = ViewModel.WohneinheitListVM.VMList.FirstOrDefault(x => x.Wohnname == selected_item);
SetValuesFromParent(vm, selected_vm);
}
private void Button_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitListVM.AddNewVMToList(true);
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
ViewModel.WohneinheitListVM.AskRemoveEditVM();
}
}
}

View File

@@ -1,15 +1,31 @@
<localView:BeWoView x:Class="BeWo.View.Detail.WohnheimView"
x:Name="rootView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:uvc="clr-namespace:BeWo.View.Controls"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduling"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:localWohneinheit="clr-namespace:BeWo.View.Detail.Wohneinheit"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:val="clr-namespace:BeWo.Validation" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
d:DataContext="{d:DesignInstance Type=viewmodel:WohnheimVM, IsDesignTimeCreatable=true}"
d:DesignHeight="800" d:DesignWidth="1400"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True" GotFocus="UserControl_GotFocus">
VerticalAlignment="Stretch" Focusable="True" GotFocus="UserControl_GotFocus" >
<Grid x:Name="rootGrid">
<uc:ShadowChrome>
<GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
@@ -35,7 +51,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Fill="{DynamicResource WohnheimContentBrush}" Height="6" />
<TabControl x:Name="root" Grid.Row="1" Style="{StaticResource ObjectEditTabControl}" BorderThickness="0,0,0,0" Padding="4,4,4,4">
<TabControl x:Name="root" Grid.Row="1" Style="{StaticResource ObjectEditTabControl}" BorderThickness="0,0,0,0" Padding="0">
<TabItem Header="Details" IsSelected="True">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid x:Name="grid_details">
@@ -101,7 +117,7 @@
</Grid>
</ScrollViewer>
</TabItem>
<TabItem Header="{markup:Translate Klienten}">
<TabItem Header="{t:Translate Klienten}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40*"/>
@@ -110,14 +126,14 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Visibility="Visible" x:Name="groupbox_newWohnheimRel" Header="{markup:Translate Zugeordnete Klienten}" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2">
<GroupBox Visibility="Visible" x:Name="groupbox_newWohnheimRel" Header="{t:Translate Zugeordnete Klienten}" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Grid.Row="0" Grid.ColumnSpan="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="25" Margin="3" Content="{markup:Translate Klient hinzufügen}" x:Name="button_addKlientRelation" Click="button_addKlientRelation_Klick" />
<Button Grid.Row="0" Grid.ColumnSpan="1" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="25" Margin="3" Content="{t:Translate Klient hinzufügen}" x:Name="button_addKlientRelation" Click="button_addKlientRelation_Klick" />
<dxg:GridControl x:Name="grid_CustomerRelation" Grid.Row="1" VerticalAlignment="Stretch" DataSource="{Binding Path=WohnheimCustomerRelations.VMList}"
HorizontalAlignment="Stretch">
@@ -130,7 +146,7 @@
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn AllowEditing="False" FieldName="Customer" Header="{markup:Translate Klient}" Width="150" />
<dxg:GridColumn AllowEditing="False" FieldName="Customer" Header="{t:Translate Klient}" Width="150" />
<dxg:GridColumn FieldName="Notice" Header="Bemerkung" Width="250" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
@@ -141,7 +157,7 @@
<Popup Grid.Row="0" x:Name="popup_newKlientRel" Width="350" StaysOpen="True" Placement="MousePoint">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox x:Name="groupbox_newKlientRel" Header="{markup:Translate Klienten zuordnen}" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox x:Name="groupbox_newKlientRel" Header="{t:Translate Klienten zuordnen}" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -154,7 +170,7 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label VerticalAlignment="Center" Content="{markup:Translate Klient}" />
<Label VerticalAlignment="Center" Content="{t:Translate Klient}" />
<uc:PopUpEdit IsReadOnly="True"
DeleteButtonVisibility="Collapsed"
Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" Margin="3" Height="23" x:Name="popupedit_KlientRelations"
@@ -188,7 +204,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Visibility="Visible" x:Name="groupbox_newMitarbeiterRel" Header="{markup:Translate Zugeordnete Mitarbeiter}" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox Visibility="Visible" x:Name="groupbox_newMitarbeiterRel" Header="{t:Translate Zugeordnete Mitarbeiter}" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="26*"/>
@@ -199,13 +215,13 @@
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.ColumnSpan="2">
<Button x:Name="button_addMitarbeiterRelation_Click" Height="25" Margin="3" Content="{markup:Translate Mitarbeiter hinzufügen}" Click="button_addMitarbeiterRelation_Klick" />
<Button x:Name="button_addMitarbeiterRelation_Click" Height="25" Margin="3" Content="{t:Translate Mitarbeiter hinzufügen}" Click="button_addMitarbeiterRelation_Klick" />
<Button x:Name="button_openTeamRelation" Height="25" Margin="3" Content="Ganzes Team hinzufügen" Click="button_openTeamRelation_Click"/>
</WrapPanel>
<Popup Grid.Row="0" x:Name="popup_newEmployeeRel" Width="350" StaysOpen="True" Placement="MousePoint" Grid.ColumnSpan="2" Margin="45,0">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox x:Name="groupbox_newEmployeeRel" Header="{markup:Translate Mitarbeiter zuordnen}" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox x:Name="groupbox_newEmployeeRel" Header="{t:Translate Mitarbeiter zuordnen}" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -297,7 +313,7 @@
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn AllowEditing="False" FieldName="Employee" Header="{markup:Translate Betreuer(in)}" Width="150" />
<dxg:GridColumn AllowEditing="False" FieldName="Employee" Header="{t:Translate Betreuer(in)}" Width="150" />
<dxg:GridColumn FieldName="Notice" Header="Bemerkung" Width="250" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
@@ -308,6 +324,27 @@
</GroupBox>
</Grid>
</TabItem>
<TabItem Header="{t:Translate Wohneinheit}" x:Name="tabitem_wohneinheit" Visibility="{Binding Path=PermissionWohneinheitTabitemView, Converter={StaticResource BoolVisibilityConverter}}"
IsEnabled="{Binding Path=IsNew, Converter={StaticResource BoolReverseConverter}}"
ToolTip="{Binding Path=IsNew, Converter={StaticResource IsNewToTooltip}, ConverterParameter='Sie müssen zuerst das Wohnheim speichern'}"
Foreground="{Binding Path=IsNew, Converter={StaticResource IsNewToTabitemBackground}}"
ToolTipService.ShowOnDisabled="True"
>
<TabControl x:Name="root_wohneinheit" Grid.Row="1" Style="{StaticResource ObjectEditTabControl}" BorderThickness="0,0,0,0" Padding="0" Margin="-15" SelectionChanged="root_wohneinheit_SelectionChanged">
<TabItem Header="{t:Translate Verwaltung}" Visibility="{Binding Path=PermissionWohneinheitView, Converter={StaticResource BoolVisibilityConverter}}">
<localWohneinheit:WohneinheitVerwaltungViewV1/>
</TabItem>
<TabItem Header="{t:Translate VerwaltungV2}" Visibility="{Binding Path=PermissionWohneinheitView, Converter={StaticResource BoolVisibilityConverter}}">
<localWohneinheit:WohneinheitVerwaltungViewV2/>
</TabItem>
<TabItem Header="{t:Translate Buchungen}" Visibility="{Binding Path=PermissionWohneinheitBelegungView, Converter={StaticResource BoolVisibilityConverter}}">
<localWohneinheit:WohneinheitBelegungTableView/>
</TabItem>
<TabItem Header="{t:Translate Buchungsplan}" Visibility="{Binding Path=Permission1, Converter={StaticResource BoolVisibilityConverter}}">
<localWohneinheit:WohneinheitBelegungSchedulerView/>
</TabItem>
</TabControl>
</TabItem>
</TabControl>
<Border Grid.Row="2" Grid.ColumnSpan="3" Height="40" Margin="0,10,0,0" VerticalAlignment="Stretch" Background="#FF000000">
<Border.OpacityMask>

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text.RegularExpressions;
using System.Windows;
@@ -10,58 +11,65 @@ using BeWo.Core;
using BeWo.Core.Service;
using BeWo.ServiceProxy;
using BeWo.Validation;
using BeWo.View.Detail.Wohneinheit;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Translation;
using DevExpress.Mvvm;
using DevExpress.Xpf.Bars;
using DevExpress.Xpf.Core;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Scheduling;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraScheduler.Native;
namespace BeWo.View.Detail
{
public partial class WohnheimView : BeWoView
{
private WohnheimVM _ViewModel;
public partial class WohnheimView : BeWoView
{
private WohnheimVM _ViewModel;
private List<CompactCustomerDC> _Customers;
private bool initTabIndex;
private bool initTabIndex;
private List<CompactEmployeeDC> regelmaessigeDiensteVonMitarbeiternLoeschen;
private CompactTeamDC gewaehltesTeam;
public WohnheimView(WohnheimVM pWohnheimDC)
{
InitializeComponent();
ViewModel = pWohnheimDC;
private int _WohneinheitTabitemIndex;
public WohnheimView(WohnheimVM vm)
{
SchedulerControl.AllowInfiniteSize = true;
ViewModel = vm;
_Customers = vm.Customers;
InitializeComponent();
regelmaessigeDiensteVonMitarbeiternLoeschen = new List<CompactEmployeeDC>();
// HACK: Force the devexpress grid to end editing when the mouse is over savebutton
// by setting the focus to another element.
MouseMove += (s, e) =>
{
if ((grid_EmployeeRelation == null || !grid_EmployeeRelation.IsVisible) &&
(grid_CustomerRelation == null || !grid_CustomerRelation.IsVisible))
{
return;
}
var p = e.GetPosition(btnSave);
if (p.X >= 0 && p.X < btnSave.ActualWidth && p.Y >= 0 && p.Y < btnSave.ActualHeight)
{
root.Focus();
}
};
//ich glaub es ist alles gesagt
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Wohnheim_AllowArchiving))
// HACK: Force the devexpress grid to end editing when the mouse is over savebutton
// by setting the focus to another element.
MouseMove += (s, e) =>
{
lblArchiviert.Visibility = Visibility.Hidden;
chkArchiviert.Visibility = Visibility.Hidden;
}
if ((grid_EmployeeRelation == null || !grid_EmployeeRelation.IsVisible) &&
(grid_CustomerRelation == null || !grid_CustomerRelation.IsVisible))
{
return;
}
var p = e.GetPosition(btnSave);
if (p.X >= 0 && p.X < btnSave.ActualWidth && p.Y >= 0 && p.Y < btnSave.ActualHeight)
{
root.Focus();
}
};
var b = Convert.ToBoolean(ViewModel.PflichtbesetzungEinblenden);
if (!b)
@@ -80,8 +88,12 @@ namespace BeWo.View.Detail
combobox_Sortierungsarten.ItemsSource = sortierungsartenFuerCombobox;
if (combobox_Sortierungsarten.SelectedIndex == -1)
combobox_Sortierungsarten.SelectedIndex = 0;
//popup_newBelegung.Wohneinheiten = ViewModel.WohneinheitListVM.VMList;
InitUserRights();
}
private void UserControl_GotFocus(object sender, RoutedEventArgs e)
{
if (e.OriginalSource.Equals(this))
@@ -90,59 +102,61 @@ namespace BeWo.View.Detail
}
}
public override bool IsDirty
{
get { return ViewModel != null && ViewModel.IsDirty; }
}
public override bool IsDirty
{
get { return ViewModel != null && ViewModel.IsDirty; }
}
public override string Title
{
get { return Translator.Translate("Wohnprojekt"); }
}
public override string Title
{
get { return Translator.Translate("Wohnprojekt"); }
}
internal override DependencyObject ValidationOnSaveRootElement
{
get { return grid_details; }
}
internal override DependencyObject ValidationOnSaveRootElement
{
get { return grid_details; }
}
internal WohnheimVM ViewModel
{
get { return _ViewModel; }
internal WohnheimVM ViewModel
{
get { return _ViewModel; }
set
{
set
{
_ViewModel = value;
DataContext = value;
}
}
}
}
protected override UserRightType[] GetSaveDemands()
{
return ViewModel.IsNew ? new[] {UserRightType.CreateAll, UserRightType.WohnheimView_Create} : new[] {UserRightType.EditAll, UserRightType.WohnheimView_Edit};
}
protected override UserRightType[] GetSaveDemands()
{
return ViewModel.IsNew ? new[] { UserRightType.CreateAll, UserRightType.WohnheimView_Create } : new[] { UserRightType.EditAll, UserRightType.WohnheimView_Edit };
}
protected override void Save()
{
var lDataContract = ViewModel.CommitToDataContract();
protected override void Save()
{
var lDataContract = ViewModel.CommitToDataContract();
//Abfrage if Name is null or empty -> Message Bitte den Namen eingeben
if(textbox_first.Text.Equals("")){
textbox_first.Focus();
if (textbox_first.Text.Equals(""))
{
textbox_first.Focus();
MessageBox.Show("Bitte dem Wohnprojekt einen Namen geben.");
}
else{
//sonst
try
{
if (ViewModel.IsNew)
{
IsDoneWithInsertOrUpdate = false;
else
{
//sonst
try
{
if (ViewModel.IsNew)
{
IsDoneWithInsertOrUpdate = false;
ServiceFacade.DoCustomerServiceAsync(s => s.InsertNewWohnheim(lDataContract), ReloadViewModel);
}
else
{
IsDoneWithInsertOrUpdate = false;
}
else
{
IsDoneWithInsertOrUpdate = false;
ServiceFacade.DoCustomerServiceAsync(s => s.UpdateWohnheim(lDataContract, regelmaessigeDiensteVonMitarbeiternLoeschen), ReloadViewModel);
}
//if (regelmaessigeDiensteVonMitarbeiternLoeschen.Count > 0 && ViewModel.DataContract.WohnheimOid != null)
@@ -150,41 +164,54 @@ namespace BeWo.View.Detail
// ServiceFacade.DoOperationsServiceSync(s => s.DeleteRegelmaessigeDiensteOfRemovedEmployee(regelmaessigeDiensteVonMitarbeiternLoeschen, (long)ViewModel.DataContract.WohnheimOid));
//}
Cache.GetInstance().ClearEmployees();
BeWoApp.MainControl.ResetView(UIContext.Wohnheim);
}
catch (FaultException<BeWoFault>)
{
MessageBox.Show(
"Dieser Datensatz wurde in der Zwischenzeit von " + Translator.Translate("einem anderen Benutzer") + " geändert. Klicken Sie Ok um den Datensatz erneut zu laden. Ihre Änderungen gehen dabei leider verloren.");
ReloadViewModel(lDataContract.WohnheimOid.Value);
}
Cache.GetInstance().ClearEmployees();
BeWoApp.MainControl.ResetView(UIContext.Wohnheim);
}
catch (FaultException<BeWoFault>)
{
MessageBox.Show(
"Dieser Datensatz wurde in der Zwischenzeit von " + Translator.Translate("einem anderen Benutzer") + " geändert. Klicken Sie Ok um den Datensatz erneut zu laden. Ihre Änderungen gehen dabei leider verloren.");
ReloadViewModel(lDataContract.WohnheimOid.Value);
}
}
}
}
private void ReloadViewModel(long pOid)
{
VMFactory.CreateWohnheimVMAsync(pOid, cb => this.Dispatch(delegate { ViewModel = cb; }));
IsDoneWithInsertOrUpdate = true;
}
private void InitUserRights()
{
//ich glaub es ist alles gesagt
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Wohnheim_AllowArchiving))
{
lblArchiviert.Visibility = Visibility.Hidden;
chkArchiviert.Visibility = Visibility.Hidden;
}
else
{
lblArchiviert.Visibility = Visibility.Visible;
chkArchiviert.Visibility = Visibility.Visible;
}
}
private void ReloadViewModel(long pOid)
{
VMFactory.CreateWohnheimVMAsync(pOid, _Customers, cb => this.Dispatch(delegate { ViewModel = cb; })); ;
private void button_addMitarbeiterRelation_Klick(object sender, RoutedEventArgs e)
{
IsDoneWithInsertOrUpdate = true;
}
private void button_addMitarbeiterRelation_Klick(object sender, RoutedEventArgs e)
{
popup_newEmployeeRel.IsOpen = true;
}
}
private void button_addKlientRelation_Klick(object sender, RoutedEventArgs e)
{
popup_newKlientRel.IsOpen = true;
}
private void button_addEmployeeRelation_Click(object sender, RoutedEventArgs e)
{
if (ValidationTrigger.Validate(groupbox_newEmployeeRel))
{
bool contains = false;
foreach (var item in ViewModel.WohnheimEmployeeRelations.VMList)
{
@@ -225,7 +252,7 @@ namespace BeWo.View.Detail
continue;
ViewModel.WohnheimEmployeeRelations.NewVM.Employee = emp;
ViewModel.WohnheimEmployeeRelations.NewVM.Notice= notice;
ViewModel.WohnheimEmployeeRelations.NewVM.Notice = notice;
ViewModel.WohnheimEmployeeRelations.AddNewVMToList();
}
@@ -235,7 +262,6 @@ namespace BeWo.View.Detail
{
popup_newTeamRel.IsOpen = true;
}
private void button_cancelEmployeeRelation_Click(object sender, RoutedEventArgs e)
{
popup_newEmployeeRel.IsOpen = false;
@@ -252,13 +278,11 @@ namespace BeWo.View.Detail
ViewModel.WohnheimEmployeeRelations.NewVM.Employee = e.Data;
popup_employee.Focus();
}
private void popupedit_EmployeeRelations_PopUpClick(object sender, RoutedEventArgs e)
{
employeesearchview.ItemSelected += Employeesearchview_EnvironmentEmployeeSelected;
popup_employee.IsOpen = true;
}
private void Teamsearchview_EnvironmentTeamSelected(object sender, EventArgs<CompactTeamDC> e)
{
popup_team.IsOpen = false;
@@ -275,7 +299,6 @@ namespace BeWo.View.Detail
teamsearchview.ItemSelected += Teamsearchview_EnvironmentTeamSelected;
popup_team.IsOpen = true;
}
private void Popupedit_EmployeeRelations_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
@@ -312,7 +335,6 @@ namespace BeWo.View.Detail
BeWoWpfUtils.RefreshDXGrid(grid_EmployeeRelation);
}
private void button_addKlientRelation_Click(object sender, RoutedEventArgs e)
{
bool contains = false;
@@ -330,12 +352,10 @@ namespace BeWo.View.Detail
popup_newKlientRel.IsOpen = false;
ViewModel.WohnheimCustomerRelations.AddNewVMToList();
}
private void button_cancelKlientRelation_Click(object sender, RoutedEventArgs e)
{
popup_newKlientRel.IsOpen = false;
}
private void Klientsearchview_EnvironmentKlientSelected(object sender, EventArgs<CompactCustomerDC> e)
{
popup_klient.IsOpen = false;
@@ -343,29 +363,25 @@ namespace BeWo.View.Detail
ViewModel.WohnheimCustomerRelations.NewVM.Customer = e.Data;
popup_klient.Focus();
}
private void popupedit_KlientRelations_PopUpClick(object sender, RoutedEventArgs e)
{
klientsearchview.ItemSelected += Klientsearchview_EnvironmentKlientSelected;
popup_klient.IsOpen = true;
}
private void Popupedit_KlientRelations_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit) sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.WohnheimView_View))
if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.WohnheimView_View))
{
return;
}
CreateModalViewWindow(ViewModel.WohnheimCustomerRelations.NewVM.Customer);
}
public void Button_RemoveCustomerRelation_Click(object sender, RoutedEventArgs e)
{
ViewModel.WohnheimCustomerRelations.VMList.Remove(grid_CustomerRelation.GetCurrentValue<WohnheimCustomerRelationVM>());
BeWoWpfUtils.RefreshDXGrid(grid_CustomerRelation);
}
private void TableViewCustomer_OnRowDoubleClick(object sender, RowDoubleClickEventArgs e)
{
var tableView = (TableView)sender;
@@ -378,11 +394,10 @@ namespace BeWo.View.Detail
CreateModalViewWindow((selectedVM).Customer);
}
private void TableViewEmployee_OnRowDoubleClick(object sender, RowDoubleClickEventArgs e)
{
var tableView = (TableView) sender;
var selectedVM = (WohnheimEmployeeRelationVM) tableView.Grid.GetRow(e.HitInfo.RowHandle);
var tableView = (TableView)sender;
var selectedVM = (WohnheimEmployeeRelationVM)tableView.Grid.GetRow(e.HitInfo.RowHandle);
if (selectedVM == null)
{
@@ -391,7 +406,6 @@ namespace BeWo.View.Detail
CreateModalViewWindow((selectedVM).Employee);
}
private void CreateModalViewWindow<T>(T pDC) where T : IDataContract
{
if (pDC == null)
@@ -401,13 +415,13 @@ namespace BeWo.View.Detail
if (pDCType == typeof(CompactEmployeeDC))
{
VMFactory.CreateEmployeeVMAsync((pDC as CompactEmployeeDC).EmployeeOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<EmployeeVM, EmployeeDC, WohnheimView>(cb, this, () => this.Dispatch(
() => BeWoUtils.UpdateAllViews((pDC as CompactEmployeeDC))))));
VMFactory.CreateEmployeeVMAsync((pDC as CompactEmployeeDC).EmployeeOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<EmployeeVM, EmployeeDC, WohnheimView>(cb, this, () => this.Dispatch(
() => BeWoUtils.UpdateAllViews((pDC as CompactEmployeeDC))))));
}
if (pDCType == typeof (CompactCustomerDC))
if (pDCType == typeof(CompactCustomerDC))
{
VMFactory.CreateCustomerVMAsync((pDC as CompactCustomerDC).CustomerOid,
cb => this.Dispatch(
@@ -415,7 +429,6 @@ namespace BeWo.View.Detail
() => BeWoUtils.UpdateAllViews((pDC as CompactCustomerDC))))));
}
}
private void chkStatuszeile_Checked(object sender, RoutedEventArgs e)
{
//textedit_pflichtStart.IsEnabled = true;
@@ -430,13 +443,12 @@ namespace BeWo.View.Detail
//textedit_pflichtStart.Opacity = 50;
//textedit_pflichtEnde.Opacity = 50;
}
private void chkStatuszeile_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
{
var checkbox = sender as CheckEdit;
if ((bool)checkbox.EditValue == false)
{
textedit_pflichtStart.IsEnabled = false;
textedit_pflichtStart.IsEnabled = false;
textedit_pflichtEnde.IsEnabled = false;
textedit_pflichtStart.Opacity = 50;
textedit_pflichtEnde.Opacity = 50;
@@ -449,5 +461,74 @@ namespace BeWo.View.Detail
textedit_pflichtEnde.Opacity = 100;
}
}
private void root_wohneinheit_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
{
if(e.Source != root_wohneinheit || root_wohneinheit.SelectedIndex == _WohneinheitTabitemIndex)
{
return;
}
bool isDirty = false;
if (_WohneinheitTabitemIndex == 0)
{
isDirty |= ViewModel.WohneinheitListVM.IsDirty;
}
else if (_WohneinheitTabitemIndex == 1)
{
isDirty |= ViewModel.WohneinheitListVM.IsDirty;
}
else if (_WohneinheitTabitemIndex == 2)
{
isDirty |= ViewModel.WohneinheitBelegungListVM.IsDirty;
}
else if (_WohneinheitTabitemIndex == 3)
{
isDirty |= ViewModel.WohneinheitBelegungListVM.IsDirty;
}
else
{
throw new NotImplementedException("Tabindex unbekannt");
}
_WohneinheitTabitemIndex = root_wohneinheit.SelectedIndex;
if (_WohneinheitTabitemIndex == 0)
{
ViewModel.WohneinheitListVM.EditVM = null;
}
else if (_WohneinheitTabitemIndex == 1)
{
ViewModel.WohneinheitListVM.EditVM = null;
}
else if (_WohneinheitTabitemIndex == 2)
{
ViewModel.WohneinheitBelegungListVM.CloseCurrentVM();
}
else if (_WohneinheitTabitemIndex == 3)
{
ViewModel.WohneinheitBelegungListVM.CloseCurrentVM();
}
//if (isDirty)
//{
// var result = MessageBox.Show("Sie müssen zuvor Speichern", "Hinweis", MessageBoxButton.OKCancel);
// if(result == MessageBoxResult.OK)
// {
// Save();
// _WohneinheitTabitemIndex = root_wohneinheit.SelectedIndex;
// }
// else
// {
// root_wohneinheit.SelectedIndex = _WohneinheitTabitemIndex;
// e.Handled = true;
// }
//}
//else
//{
// _WohneinheitTabitemIndex = root_wohneinheit.SelectedIndex;
//}
}
}
}

View File

@@ -13,11 +13,27 @@ namespace BeWo.View.Detail.Zeiterfassung
{
public partial class ServiceRecordCreationView
{
private DateTime _StartDatum;
private DateTime _EndDatum;
public DateTime StartDatum { get; set; }
public DateTime StartDatum
{
get { return _StartDatum; }
set
{
_StartDatum = value;
UpdateSelectedArbeitszeitVm();
}
}
public DateTime EndDatum { get; set; }
public DateTime EndDatum {
get { return _EndDatum; }
set
{
_EndDatum = value;
UpdateSelectedArbeitszeitVm();
}
}
public SupportConceptCostBearerRelDC SupportConceptCostBearerRel { get; set; }
@@ -44,7 +60,13 @@ namespace BeWo.View.Detail.Zeiterfassung
private void UpdateSelectedArbeitszeitVm()
{
SelectedArbeitszeitVM = ArbeitszeitListVM.VMList[0];
foreach (var item in ArbeitszeitListVM.VMList)
{
if ((!item.GueltigVon.HasValue || item.GueltigVon <= EndDatum) && (!item.GueltigBis.HasValue || item.GueltigBis >= StartDatum))
{
SelectedArbeitszeitVM = item;
}
}
}

View File

@@ -2634,6 +2634,10 @@ namespace BeWo.View.Detail.Zeiterfassung
lHeaderCaptions.Add("Angelegt von");
lHeaderCaptions.Add("Angelegt am");
}
if (!BeWoApp.AppSettings.ShowSignatures)
{
lHeaderCaptions.Add("Unterschrieben");
}
if (list != null)
{
foreach (var vm in list)
@@ -2701,7 +2705,10 @@ namespace BeWo.View.Detail.Zeiterfassung
row.Add(vm.InsUser);
row.Add(vm.InsertedOn);
}
if (!BeWoApp.AppSettings.ShowSignatures)
{
row.Add(vm.SignatureOid.HasValue ? "Ja" : "Nein");
}
//lContent.AddRange(list.Select(vm => new List<string>
// {

View File

@@ -37,87 +37,92 @@
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Rectangle Fill="{DynamicResource AdministrationContentBrush}" Height="6" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<Rectangle Fill="{DynamicResource AdministrationContentBrush}" Height="6" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="255"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Border Margin="5" VerticalAlignment="Stretch" Background="Transparent" >
<dxa:AccordionControl x:Name="Root" Background="Transparent" VerticalAlignment="Top" dx:ThemeManager.ThemeName="Office2013" BorderThickness="0" RootItemExpandButtonPosition="Left">
</Grid.ColumnDefinitions>
<Border Margin="5" VerticalAlignment="Stretch" Background="Transparent" >
<dxa:AccordionControl x:Name="Root" Background="Transparent" VerticalAlignment="Top" dx:ThemeManager.ThemeName="Office2013" BorderThickness="0" RootItemExpandButtonPosition="Left">
<dxa:AccordionItem Header="{markup:Translate Allgemein}" Tag="Header" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Einstellungen}" Name="TabitemMandator" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ankündigungen}" Name="TabitemNews" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Einstellungen}" Name="TabitemMandator" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ankündigungen}" Name="TabitemNews" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Klienten}" Foreground="{StaticResource TabItemTextBrush}" >
<dxa:AccordionItem Header="{markup:Translate Behinderungskategorien}" Name="TabitemDisablityTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Betreuungsarten}" Name="TabitemCustomerCareTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Gründe für Beendigung der Betreuung}" Name="TabitemTerminationReasons" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Medikamentenarten}" Name="TabitemMedikamentenarten" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Rollen des Umfeldes}" Name="TabitemEnvironmentRoles" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Vermittlung}" Name="TabitemPlacementObjectives" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{t:Translate Falldaten}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Auftragsherkunft}" Name="TabitemAuftragsherkunft" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Vermittlungsgrundlage}" Name="TabitemVermittlungsgrundlage" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{t:Translate MitarbeiterPlural}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Qualifikationen}" Name="TabitemQualificationTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Beschäftigungsarten}" Name="TabitemEmploymentTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Qualifikationsbedarf}" Name="TabitemQualifikationsbedarf" Selected="Tabitem_Selected" Foreground="Black" Visibility="Collapsed"/>
<dxa:AccordionItem Header="{markup:Translate Rollen des Personals}" Name="TabitemRoles" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Schwerpunkte des Personals}" Name="TabitemActivityFocus" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Überstunden Auszahlungsarten}" Name="TabitemAuszahlungsarten" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Vertragsarten}" Name="TabitemContracttypes" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Klienten}" Foreground="{StaticResource TabItemTextBrush}" >
<dxa:AccordionItem Header="{markup:Translate Behinderungskategorien}" Name="TabitemDisablityTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Betreuungsarten}" Name="TabitemCustomerCareTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Gründe für Beendigung der Betreuung}" Name="TabitemTerminationReasons" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Medikamentenarten}" Name="TabitemMedikamentenarten" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Rollen des Umfeldes}" Name="TabitemEnvironmentRoles" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Vermittlung}" Name="TabitemPlacementObjectives" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{t:Translate MitarbeiterPlural}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Qualifikationen}" Name="TabitemQualificationTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Beschäftigungsarten}" Name="TabitemEmploymentTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Qualifikationsbedarf}" Name="TabitemQualifikationsbedarf" Selected="Tabitem_Selected" Foreground="Black" Visibility="Collapsed"/>
<dxa:AccordionItem Header="{markup:Translate Rollen des Personals}" Name="TabitemRoles" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Schwerpunkte des Personals}" Name="TabitemActivityFocus" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Überstunden Auszahlungsarten}" Name="TabitemAuszahlungsarten" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Vertragsarten}" Name="TabitemContracttypes" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Personen}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Aufenthaltsstatus}" Name="TabitemAufenthaltsstatus" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Funktionen}" Name="TabitemFunctions" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Nationalitäten}" Name="TabitemNationality" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Titel}" Name="TabitemTitles" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Zeiterfassung}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Angebote}" Name="TabitemAdditionalServiceRegions" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Bereiche}" Name="TabitemAdditionalServices" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Bewertungsskala}" Name="TabitemRatingTypes" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Dokumentationsfelder}" Name="TabitemDokumenttype" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Leistungskategorien}" Name="TabitemServiceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Leistungen}" Name="TabitemServiceDescriptions" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Leistungskategorien}" Name="TabitemServiceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Leistungen}" Name="TabitemServiceDescriptions" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Punktebogen Werte}" Name="TabitemAssessmentSheetValues" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Punktebogen Kategorien}" Name="TabitemAssessmentSheetCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Textbausteine}" Name="TabitemTextbausteine" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Textbausteine}" Name="TabitemTextbausteine" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ziele und Maßnahmen}" Name="TabitemGoalcategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ziele und Maßnahmen}" Name="TabitemGoalcategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Maßnahmenkatalog}" Name="TabitemMassnahmen" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Kalender}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Ressourcenkategorien}" Name="TabitemResourceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ressource}" Name="TabitemResources" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="{markup:Translate Kalender}" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Ressourcenkategorien}" Name="TabitemResourceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Ressource}" Name="TabitemResources" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
<dxa:AccordionItem Header="Sonstiges" Foreground="{StaticResource TabItemTextBrush}">
<dxa:AccordionItem Header="{markup:Translate Abwesenheitskategorien}" Name="TabitemAbsenceCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Budgets}" Name="TabitemBudgets" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Preise}" Name="TabitemPreise" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Dienste}" Name="TabitemDienste" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Finanzkategorien}" Name="TabitemFinazCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Dienste}" Name="TabitemDienste" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Finanzkategorien}" Name="TabitemFinazCategories" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Notizenkategorie}" Name="TabitemNotizenkategorie" Selected="Tabitem_Selected" Foreground="Black"/>
<dxa:AccordionItem Header="{markup:Translate Schulbegleitender Dienst}" Name="TabitemSbd" Selected="Tabitem_Selected" Foreground="Black"/>
</dxa:AccordionItem>
</dxa:AccordionControl>
</Border>
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
</dxa:AccordionControl>
</Border>
<ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto">
<Border Margin="5" VerticalAlignment="Stretch" x:Name="ContentBorder" >
</Border>
</ScrollViewer>
</Grid>
</ScrollViewer>
</Grid>
<Border Grid.Row="2" Grid.ColumnSpan="3" Height="40" Margin="0,0,0,0" VerticalAlignment="Stretch"
Background="#FF000000">
<Border.OpacityMask>

View File

@@ -18,15 +18,10 @@ namespace BeWo.View.Master
{
public partial class AdministrationView
{
#region Fields
private readonly Dictionary<String, BeWoView> _OpenViews = new Dictionary<String, BeWoView>();
private BeWoView _SelectedView;
#endregion
#region Konstruktor
public AdministrationView()
{
@@ -137,10 +132,6 @@ namespace BeWo.View.Master
}
}
#endregion
#region Events
private void Tabitem_Selected(object sender, RoutedEventArgs e)
{
if (!(sender is AccordionItem selectedAccordionItem))
@@ -152,10 +143,6 @@ namespace BeWo.View.Master
GenerateNewView(selectedAccordionItem);
}
#endregion
#region Propeties
public override bool IsDirty => SelectedView != null &&
SelectedView.IsDirty;
@@ -174,10 +161,6 @@ namespace BeWo.View.Master
internal override DependencyObject ValidationOnSaveRootElement =>
SelectedView.ValidationOnSaveRootElement;
#endregion
#region Methoden
internal override bool DoSaveCheck()
{
BeWoApp.AppSettings.ExpandedAdministrationItems = "";
@@ -422,14 +405,17 @@ namespace BeWo.View.Master
VMFactory.CreateRatingTypeListVMAsync(r =>
this.Dispatch(() => AddView(TabitemRatingTypes, new RatingTypeView(r))));
return;
//case nameof(TabitemOwnChatSettings):
// AddView(TabitemOwnChatSettings, new OwnChatSettingsView());
// return;
case nameof(TabitemAuftragsherkunft):
VMFactory.CreateValueListVMAsync(ValueListEntryType.Auftragsherkunft,
r => this.Dispatch(() => AddView(TabitemAuftragsherkunft, new ValueListView(r))));
return;
case nameof(TabitemVermittlungsgrundlage):
VMFactory.CreateValueListVMAsync(ValueListEntryType.Vermittlungsgrundlage,
r => this.Dispatch(() => AddView(TabitemVermittlungsgrundlage, new ValueListView(r))));
return;
}
throw new ArgumentOutOfRangeException(nameof(accordionItem));
}
#endregion
}
}

View File

@@ -338,7 +338,14 @@ namespace BeWo.View.Navigation
}
mainNavigationView.ShowHistory(recentList);
})
#if DEBUG
if(DebugConfig.CurrentConfig is object && DebugConfig.CurrentConfig.SelectView == UIContext.Customer)
{
mainNavigationView_OpenObject(recentList.FirstOrDefault() ?? objectList.FirstOrDefault());
}
#endif
})
);
}
else

View File

@@ -54,7 +54,8 @@ namespace BeWo.View.Navigation
{
textblock_link.Visibility = Visibility.Collapsed;
}
//###CB SERIENBRIEF mainNavigationView.MailMergeButton.Visibility = Visibility.Collapsed;
mainNavigationView.chkShowDeleted.Visibility = Visibility.Collapsed;
//###CB SERIENBRIEF mainNavigationView.MailMergeButton.Visibility = Visibility.Collapsed;
}
private void OnLoaded(object sender, RoutedEventArgs e)

View File

@@ -23,6 +23,7 @@ namespace BeWo.View.Navigation
/// </summary>
public partial class WohnheimNavigationView : BeWoView
{
private List<CompactCustomerDC> _Customers;
private IEnumerable<IFilterableDC> objectList;// = null;
private IEnumerable<IFilterableDC> recentList = null;
@@ -81,7 +82,7 @@ namespace BeWo.View.Navigation
private void wohnheimNavigationView_CreateNewObject()
{
VMFactory.CreateWohnheimVMAsync(cb => this.Dispatch(delegate { this.MainControl.NavigateTo(new WohnheimView(cb) { ParentView = this }); }));
VMFactory.CreateWohnheimVMAsync(_Customers, cb => this.Dispatch(delegate { this.MainControl.NavigateTo(new WohnheimView(cb) { ParentView = this }); }));
}
private bool wohnheimNavigationView_DeleteObject(IFilterableDC obj)
@@ -129,7 +130,7 @@ namespace BeWo.View.Navigation
CompactWohnheimDC dc = ofbj as CompactWohnheimDC;
if (dc != null)
{
VMFactory.CreateWohnheimVMAsync(dc.WohnheimOid, cb => this.Dispatch(delegate { this.MainControl.NavigateTo(new WohnheimView(cb) { ParentView = this }); }));
VMFactory.CreateWohnheimVMAsync(dc.WohnheimOid, _Customers, cb => this.Dispatch(delegate { this.MainControl.NavigateTo(new WohnheimView(cb) { ParentView = this }); }));
}
}
@@ -161,6 +162,8 @@ namespace BeWo.View.Navigation
recentList = r.Cast<IFilterableDC>();
this.wohnheimNavigationView.ShowHistory(recentList);
}));
ServiceFacade.DoCustomerServiceAsync(c => c.GetAllCompactCustomers(), cb => _Customers = cb);
}
else
{

View File

@@ -99,9 +99,13 @@
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="1" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigVon, UpdateSourceTrigger=PropertyChanged}" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="3" Grid.Row="0" Margin="3" Width="125" Height="23" EditValue="{Binding Path=GueltigBis, UpdateSourceTrigger=PropertyChanged}" />
<Button Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="{markup:Translate Neuen Eintrag hinzufügen}" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0" />
<StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5" Orientation="Horizontal">
<Button Content="{markup:Translate Neuen Eintrag hinzufügen}" HorizontalAlignment="Left" Click="AddArbeitszeitToView_Click" Height="23" Margin="0,10,0,0" />
<Button Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Content="{markup:Translate Gesamte Betreuungszeiten kopieren}" HorizontalAlignment="Left" Click="CopyArbeitszeit_Click" Height="23" Margin="10,10,0,0" />
<controls:PopupNonTopmost x:Name="popup_newArbeitszeitEintrag" Placement="MousePoint" StaysOpen="True">
</StackPanel>
<controls:PopupNonTopmost x:Name="popup_newArbeitszeitEintrag" Placement="MousePoint" StaysOpen="True">
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
<GroupBox Name="groupbox_newArbeistzeit" Header="Neuen Eintrag hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
@@ -203,9 +207,10 @@
</dxg:GridColumn.EditTemplate>
</dxg:GridColumn>
<dxg:GridColumn Header="Bemerkungen" FieldName="Notice" />
</dxg:GridControl.Columns>
<dxg:GridColumn Header="" FieldName="Infos" AllowEditing="False" AllowSorting="False" Width="150"/>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView NavigationStyle="Cell" Margin="2,2,2,2" AllowBestFit="True" BestFitMode="AllRows" AutoWidth="True" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="False" HorizontalContentAlignment="Left" ShowingEditor="GridViewBase_OnShowingEditor" />
<dxg:TableView NavigationStyle="Cell" Margin="2,2,2,2" AllowBestFit="True" BestFitMode="AllRows" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="False" HorizontalContentAlignment="Left" ShowingEditor="GridViewBase_OnShowingEditor" />
</dxg:GridControl.View>
</dxg:GridControl>
</GroupBox>

View File

@@ -11,6 +11,8 @@ using BS.Shared.Core;
using BS.Shared.DataContracts.Compact;
using DevExpress.Xpf.Grid;
using System;
using BS.Shared.DataContracts;
using System.Collections.Generic;
namespace BeWo.View
{
@@ -61,8 +63,6 @@ namespace BeWo.View
{
tabcontrol_Arbeitszeit.SelectedIndex = tabcontrol_Arbeitszeit.Items.Count - 1;
}
}
@@ -114,11 +114,11 @@ namespace BeWo.View
private void AddArbeitszeitToView_Click(object sender, RoutedEventArgs e)
{
var popup = tabcontrol_Arbeitszeit.GetAllChildren().OfType<PopupNonTopmost>();
var popup = tabcontrol_Arbeitszeit.GetAllChildren().OfType<PopupNonTopmost>();
var popup_NewArbeitszeitEintrag = popup.First(x => x.Name.Equals("popup_newArbeitszeitEintrag"));
var popup_NewArbeitszeitEintrag = popup.First(x => x.Name.Equals("popup_newArbeitszeitEintrag"));
popup_NewArbeitszeitEintrag.IsOpen = true;
popup_NewArbeitszeitEintrag.IsOpen = true;
}
private void PopupArbeitszeitClose_Click(object sender, RoutedEventArgs e)
@@ -163,6 +163,33 @@ namespace BeWo.View
grid_ArbeitszeitEintrag.RefreshData();
}
private void CopyArbeitszeit_Click(object sender, RoutedEventArgs e)
{
var arbeitszeit = tabcontrol_Arbeitszeit.SelectedItem as ArbeitszeitVM;
var dc = new ArbeitszeitDC();
if (arbeitszeit.GueltigBis.HasValue)
{
dc.GueltigVon = arbeitszeit.GueltigBis.Value.AddDays(1);
}
dc.Eintraege = new List<ArbeitszeitEintragDC>();
foreach (var ae in arbeitszeit.ArbeitszeitEintraege.VMList)
{
var copy = new ArbeitszeitEintragDC();
copy.Tag = ae.Tag;
copy.UhrzeitVon = ae.UhrzeitVon;
copy.UhrzeitBis = ae.UhrzeitBis;
copy.Notice = ae.Notice;
copy.Employee = ae.Employee;
dc.Eintraege.Add(copy);
}
var copyVm = new ArbeitszeitVM(dc);
ViewModel.VMList.Add(copyVm);
tabcontrol_Arbeitszeit.SelectedIndex = tabcontrol_Arbeitszeit.Items.Count - 1;
}
private void GridControl_OnCustomColumnSort(object sender, CustomColumnSortEventArgs e)
{
var comparer = new WochentagComparerClass();

View File

@@ -16,6 +16,7 @@ namespace BeWo.View
{
private String username;
private String password;
private bool showCodeField = true;
public TwoFactorAuthMessageDialog(String username, String password)
{
@@ -35,7 +36,7 @@ namespace BeWo.View
{
try
{
if(XamlReader.Parse(xamlCode) is UIElement element)
if (XamlReader.Parse(xamlCode) is UIElement element)
{
txtMessage.Visibility = Visibility.Collapsed;
rootGrid.Children.Add(element);
@@ -52,10 +53,22 @@ namespace BeWo.View
get => txtMessage.Text;
set => txtMessage.Text = value;
}
public bool ShowCodeField { get { return showCodeField; }
set
{
showCodeField = value;
if (!showCodeField)
{
textbox.Visibility = Visibility.Collapsed;
OkayButton.Visibility = Visibility.Collapsed;
CancelButton.Content = "OK";
}
}
}
private void CancelButton_OnClick(object sender, RoutedEventArgs e)
{
DialogResult = false;
DialogResult = !showCodeField;
}

View File

@@ -1,51 +1,116 @@
<UserControl x:Class="BeWo.View.VarFieldEditControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
xmlns:localcore="clr-namespace:BeWo.Core" HorizontalAlignment="Stretch" VerticalAlignment="Top">
<UserControl
x:Class="BeWo.View.VarFieldEditControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:localcore="clr-namespace:BeWo.Core"
xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
HorizontalAlignment="Stretch"
VerticalAlignment="Top">
<UserControl.Resources>
<UserControl.Resources>
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" VerticalAlignment="Top" Margin="3" x:Key="{x:Static shared:ControlType.DatePicker}" EditValue="{Binding VarFieldValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Grid.Column="1" AllowNullInput="True" />
<CheckBox Foreground="Black" Margin="3,6,3,3" x:Key="{x:Static shared:ControlType.CheckBox}" IsThreeState="False" IsChecked="{Binding VarFieldValueBoolean}" Grid.Column="1" />
<TextBox Foreground="Black" Margin="3" x:Key="{x:Static shared:ControlType.TextBox}" Text="{Binding VarFieldValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Grid.Column="1" Height="{Binding Height, Mode=OneWay}" VerticalContentAlignment="Center"/>
<TextBox Foreground="Black" Margin="3" x:Key="{x:Static shared:ControlType.MemoBox}" Text="{Binding VarFieldValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Height="{Binding Height, Mode=OneWay}" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap" AcceptsReturn="True" AutoWordSelection="True" Grid.Column="1" />
<dxe:TextEdit MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" x:Name="tb_numeric" Margin="3" x:Key="{x:Static shared:ControlType.NumericTextBox}" EditValue="{Binding VarFieldValue}" Height="{Binding Height, Mode=OneWay}" Grid.Column="1" />
<ComboBox Foreground="Black" Margin="3" x:Key="{x:Static shared:ControlType.ComboBox}" ItemsSource="{Binding PossibleItems}" SelectedItem="{Binding VarFieldValue}" Grid.Column="1" />
<dxe:DateEdit
x:Key="{x:Static shared:ControlType.DatePicker}"
Grid.Column="1"
Margin="3"
VerticalAlignment="Top"
AllowNullInput="True"
EditValue="{Binding VarFieldValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
MaskType="DateTimeAdvancingCaret" />
<CheckBox
x:Key="{x:Static shared:ControlType.CheckBox}"
Grid.Column="1"
Margin="3,6,3,3"
Foreground="Black"
IsChecked="{Binding VarFieldValueBoolean}"
IsThreeState="False" />
<TextBox
x:Key="{x:Static shared:ControlType.TextBox}"
Grid.Column="1"
Height="{Binding Height, Mode=OneWay}"
Margin="3"
VerticalContentAlignment="Center"
Foreground="Black"
Text="{Binding VarFieldValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<TextBox
x:Key="{x:Static shared:ControlType.MemoBox}"
Grid.Column="1"
Height="{Binding Height, Mode=OneWay}"
Margin="3"
AcceptsReturn="True"
AutoWordSelection="True"
Foreground="Black"
HorizontalScrollBarVisibility="Hidden"
Text="{Binding VarFieldValue, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto" />
<dxe:TextEdit
x:Key="{x:Static shared:ControlType.NumericTextBox}"
x:Name="tb_numeric"
Grid.Column="1"
Height="{Binding Height, Mode=OneWay}"
Margin="3"
EditValue="{Binding VarFieldValue}"
Mask="########0.00"
MaskType="Numeric"
MaskUseAsDisplayFormat="True" />
<ComboBox
x:Key="{x:Static shared:ControlType.ComboBox}"
Grid.Column="1"
Margin="3"
Foreground="Black"
ItemsSource="{Binding PossibleItems}"
SelectedItem="{Binding VarFieldValue}" />
<ListBox Foreground="Black" Margin="3" x:Key="{x:Static shared:ControlType.CheckBoxList}" ItemsSource="{Binding PossibleItems}" SelectionMode="Multiple" Grid.Column="1" Height="{Binding Height, Mode=OneWay}" localcore:BeWoWpfUtils.SelectedItemsList="{Binding VarFieldValue}">
<ListBox.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
<Style TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent" />
</Style>
</ListBox.Resources>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Vertical" MaxHeight="{Binding ElementName=ItemsControlScroller, Path=ActualHeight}" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<DockPanel Margin="4,0,4,0">
<CheckBox IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Path=IsSelected, Mode=TwoWay}" VerticalAlignment="Center" />
<Label Content="{Binding}" />
</DockPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</UserControl.Resources>
<ListBox
x:Key="{x:Static shared:ControlType.CheckBoxList}"
Grid.Column="1"
Height="{Binding Height, Mode=OneWay}"
Margin="3"
localcore:BeWoWpfUtils.SelectedItemsList="{Binding VarFieldValue}"
Foreground="Black"
ItemsSource="{Binding PossibleItems}"
SelectionMode="Multiple">
<ListBox.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
<Style TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent" />
</Style>
</ListBox.Resources>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel MaxHeight="{Binding ElementName=ItemsControlScroller, Path=ActualHeight}" Orientation="Vertical" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<DockPanel Margin="4,0,4,0">
<CheckBox VerticalAlignment="Center" IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Path=IsSelected, Mode=TwoWay}" />
<Label Content="{Binding}" />
</DockPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</UserControl.Resources>
<Grid Grid.Column="{Binding XCoordinate}" HorizontalAlignment="Stretch" VerticalAlignment="Top" x:Name="grid_root" Grid.Row="{Binding YCoordinate}">
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="{Binding XCoordinate,StringFormat=lblCol{0}}" Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="Black" Text="{Binding Label}" Margin="3 6 3 3" />
</Grid>
<Grid
x:Name="grid_root"
Grid.Row="{Binding YCoordinate}"
Grid.Column="{Binding XCoordinate}"
HorizontalAlignment="Stretch"
VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="{Binding XCoordinate, StringFormat=lblCol{0}}" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Margin="3,6,3,3"
Foreground="Black"
Text="{Binding Label}" />
</Grid>
</UserControl>

View File

@@ -1,44 +1,60 @@
<UserControl x:Class="BeWo.View.VarFieldView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True" xmlns:localcore="clr-namespace:BeWo.Core" >
<UserControl
x:Class="BeWo.View.VarFieldView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localcore="clr-namespace:BeWo.Core"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<Grid>
<ItemsControl Name="lv_root" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<GroupBox Margin="3" x:Name="GROUPBOX" Header="{Binding Key.GroupName}" VerticalAlignment="Top" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<ItemsControl ItemsSource="{Binding Value}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid Grid.IsSharedSizeScope="True" localcore:BeWoWpfUtils.AutoHeightRowCount="{Binding Key.RowCount}" localcore:BeWoWpfUtils.AutoWidthColumnCount="{Binding Key.ColumnCount}" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<localView:VarFieldEditControl VarFieldVM="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemContainerStyle>
<Style TargetType="{x:Type ContentPresenter}">
<Setter Property="Grid.Row" Value="{Binding YCoordinate}" />
<Setter Property="Grid.Column" Value="{Binding XCoordinate}" />
<Setter Property="Grid.RowSpan" Value="{Binding RowSpan}" />
<Setter Property="Grid.ColumnSpan" Value="{Binding ColumnSpan}" />
</Style>
</ItemsControl.ItemContainerStyle>
</ItemsControl>
</Grid>
</GroupBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
<ItemsControl
Name="lv_root"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Auto">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<GroupBox
x:Name="GROUPBOX"
Margin="3"
VerticalAlignment="Top"
Header="{Binding Key.GroupName}"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<ItemsControl ItemsSource="{Binding Value}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid
localcore:BeWoWpfUtils.AutoHeightRowCount="{Binding Key.RowCount}"
localcore:BeWoWpfUtils.AutoWidthColumnCount="{Binding Key.ColumnCount}"
Grid.IsSharedSizeScope="True" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<localView:VarFieldEditControl VarFieldVM="{Binding}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
<ItemsControl.ItemContainerStyle>
<Style TargetType="{x:Type ContentPresenter}">
<Setter Property="Grid.Row" Value="{Binding YCoordinate}" />
<Setter Property="Grid.Column" Value="{Binding XCoordinate}" />
<Setter Property="Grid.RowSpan" Value="{Binding RowSpan}" />
<Setter Property="Grid.ColumnSpan" Value="{Binding ColumnSpan}" />
</Style>
</ItemsControl.ItemContainerStyle>
</ItemsControl>
</Grid>
</GroupBox>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>

View File

@@ -1,6 +1,6 @@
using System;
using System.ComponentModel;
using BS.Shared;
using BS.Shared.Core;
namespace BeWo.ViewModel
@@ -49,10 +49,40 @@ namespace BeWo.ViewModel
: !lResult.Different;
}
//public bool HasLoggedOnUserRight(UserRightType type)
// {
// return BeWoApp.HasLoggedOnUserRight(type);
// }
protected virtual void FirePropertyChanged(string pPropertyName)
{
FirePropertyChanged(PropertyChanged, this, pPropertyName);
}
protected void FirePropertyChanged(PropertyChangedEventHandler handler, string pPropertyName)
{
FirePropertyChanged(handler, this, pPropertyName);
}
protected void FirePropertyChanged(object sender, string pPropertyName)
{
FirePropertyChanged(PropertyChanged, sender, pPropertyName);
}
protected void FirePropertyChanged(object sender, PropertyChangedEventArgs e)
{
FirePropertyChanged(PropertyChanged, sender, e);
}
protected void FirePropertyChanged(PropertyChangedEventHandler handler, object sender, string pPropertyName)
{
FirePropertyChanged(handler, sender, new PropertyChangedEventArgs(pPropertyName));
}
protected void FirePropertyChanged(PropertyChangedEventHandler handler, object sender, PropertyChangedEventArgs e)
{
_IsDirty = true;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(pPropertyName));
handler?.Invoke(sender, e);
}
}
}

View File

@@ -5,30 +5,19 @@ namespace BeWo.ViewModel
{
public abstract class AbstractDCMapperVM<DCType> : AbstractBaseVM where DCType : new()
{
#region Constants and Fields
private readonly List<string> _DirtyProps = new List<string>();
private bool? _IsNew;
#endregion
#region Constructors and Destructors
public AbstractDCMapperVM() { }
public AbstractDCMapperVM(DCType pDataContract, bool pIsNew)
{
_IsNew = pIsNew;
DataContract = pDataContract;
InitByDataContract(DataContract);
}
#endregion
#region Properties
public override bool IsDirty
{
get { return _DirtyProps.Count > 0; }
@@ -54,10 +43,6 @@ namespace BeWo.ViewModel
internal DCType DataContract { get; set; }
#endregion
#region Public Methods
public DCType CommitToDataContract()
{
return MapToDataContract(DataContract, true);
@@ -76,10 +61,6 @@ namespace BeWo.ViewModel
}
}
#endregion
#region Methods
protected abstract void InitByDataContract(DCType pDataContract);
protected abstract DCType MapToDataContract(DCType pDataContract, bool doCommit);
@@ -95,7 +76,5 @@ namespace BeWo.ViewModel
_DirtyProps.Add(pPropName);
}
}
#endregion
}
}

View File

@@ -2,6 +2,7 @@ using BS.Shared;
using BS.Shared.DataContracts;
using BeWo.Validation;
using BS.Shared.DataContracts.Compact;
using System;
namespace BeWo.ViewModel
{
@@ -49,6 +50,7 @@ namespace BeWo.ViewModel
_UhrzeitVon = value;
StoreDirtyInformation(AreDifferent(DataContract.UhrzeitVon, value), PropertyName_UhrzeitVon);
FirePropertyChanged(PropertyName_UhrzeitVon);
FirePropertyChanged("Infos");
}
}
}
@@ -64,7 +66,7 @@ namespace BeWo.ViewModel
{
_UhrzeitBis = value;
StoreDirtyInformation(AreDifferent(DataContract.UhrzeitBis, value), PropertyName_UhrzeitBis);
FirePropertyChanged(PropertyName_UhrzeitBis);
FirePropertyChanged("Infos");
}
}
}
@@ -101,6 +103,30 @@ namespace BeWo.ViewModel
}
}
public string Infos
{
get
{
if (!string.IsNullOrEmpty(UhrzeitVon) && !string.IsNullOrEmpty(UhrzeitVon))
{
String dateStr1 = String.Format("{0:dd.MM.yyyy} {1}", DateTime.Now, UhrzeitVon);
String dateStr2 = String.Format("{0:dd.MM.yyyy} {1}", DateTime.Now, UhrzeitBis);
DateTime date1;
DateTime date2;
if (DateTime.TryParse(dateStr1, out date1) && DateTime.TryParse(dateStr2, out date2))
{
return String.Format("Gesamtstunden: {0:0.00}", date2.Subtract(date1).TotalHours);
}
}
return "";
}
}
public string Klient => _CompactCustomer?.FullName;
public CompactCustomerDC CompactCustomer

View File

@@ -0,0 +1,606 @@
using System;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Wohnhilfe;
namespace BeWo.ViewModel
{
public class CustomerFalldatenVM : AbstractDCMapperVM<FalldatenDC>
{
private string _EigenesAktenzeichen;
private DateTime? _Auftragseingang;
private ValueListEntryDC _Auftragsherkunft;
private ObservableSortCollection<ValueListEntryDC> _Auftragsherkunfte;
private ValueListEntryDC _Vermittlungsgrundlage;
private ObservableSortCollection<ValueListEntryDC> _Vermittlungsgrundlagen;
private decimal? _Tagessatze;
private decimal? _Tagessatzhohe;
private decimal? _HoheDerGeldstrafe;
private decimal? _ZuLeistendeArbeitsstunden;
private string _Hinweis;
private DateTime? _Termin;
private FalldatenBearbeitungsstatus? _FalldatenBearbeitungsstatus;
private string _Auftragsruckgabe;
private string _Verlauf;
private decimal? _AbgeleisteteStunden;
private decimal? _ErsparteHafttage;
private decimal? _GeleisteteRatenzahlung;
private string _Bemerkung;
private decimal? _GeleisteteEinmalzahlung;
private bool _GrundArbeitsunfahig;
private bool _GrundSuchtproblem;
private bool _GrundPsychischeProbleme;
private bool _GrundKeineMotivation;
private bool _GrundInHaft;
private bool _GrundUnbekannt;
private bool _GrundKeinKontakt;
private bool _GrundNichtAngetreten;
private bool _GrundAbbruchDerTatigkeit;
private bool _GrundWiderruf;
private bool _Grund459StPO;
private bool _GrundAusbleibenDerZahlung;
private bool _BesonderheitMehrfacheBeauftragung;
private bool _BesonderheitMehrfacheVermittlung;
private bool _BesonderheitVermittlungAusHaft;
private bool _BesonderheitDurchBGBWAufgesucht;
public CustomerFalldatenVM(CustomerVM cust, FalldatenDC dc) : base(dc, dc.IsNew)
{
Customer = cust;
}
public CustomerVM Customer { get; set; }
public bool PermissionFalldatenEdit { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.Customer_GemeinnutzigeArbeit_Edit);
public bool NoPermissionFalldatenEdit => !PermissionFalldatenEdit;
public string EigenesAktenzeichen
{
get { return _EigenesAktenzeichen; }
set
{
if (!AreDifferent(_EigenesAktenzeichen, value))
return;
_EigenesAktenzeichen = value;
StoreDirtyInformation(AreDifferent(DataContract.EigenesAktenzeichen, value), nameof(EigenesAktenzeichen));
FirePropertyChanged(nameof(EigenesAktenzeichen));
}
}
public DateTime? Auftragseingang
{
get { return _Auftragseingang; }
set
{
if (!AreDifferent(_Auftragseingang, value))
return;
_Auftragseingang = value;
StoreDirtyInformation(AreDifferent(DataContract.Auftragseingang, value), nameof(Auftragseingang));
FirePropertyChanged(nameof(Auftragseingang));
}
}
public ValueListEntryDC Auftragsherkunft
{
get { return _Auftragsherkunft; }
set
{
if (!AreDifferent(_Auftragsherkunft, value))
return;
_Auftragsherkunft = value;
StoreDirtyInformation(AreDifferent(DataContract.Auftragsherkunft, value), nameof(Auftragsherkunft));
FirePropertyChanged(nameof(Auftragsherkunft));
}
}
public ObservableSortCollection<ValueListEntryDC> Auftragsherkunfte
{
get { return _Auftragsherkunfte ?? (_Auftragsherkunfte = new ObservableSortCollection<ValueListEntryDC>()); }
set { _Auftragsherkunfte = value; }
}
public ValueListEntryDC Vermittlungsgrundlage
{
get { return _Vermittlungsgrundlage; }
set
{
if (!AreDifferent(_Vermittlungsgrundlage, value))
return;
_Vermittlungsgrundlage = value;
StoreDirtyInformation(AreDifferent(DataContract.Vermittlungsgrundlage, value), nameof(Vermittlungsgrundlage));
FirePropertyChanged(nameof(Vermittlungsgrundlage));
}
}
public ObservableSortCollection<ValueListEntryDC> Vermittlungsgrundlagen
{
get { return _Vermittlungsgrundlagen ?? (_Vermittlungsgrundlagen = new ObservableSortCollection<ValueListEntryDC>()); }
set { _Vermittlungsgrundlagen = value; }
}
public decimal? Tagessatze
{
get { return _Tagessatze; }
set
{
if (!AreDifferent(_Tagessatze, value))
return;
_Tagessatze = value;
StoreDirtyInformation(AreDifferent(DataContract.Tagessatze, value), nameof(Tagessatze));
FirePropertyChanged(nameof(Tagessatze));
UpdateHoheDerGeldstrafe();
}
}
public decimal? Tagessatzhohe
{
get { return _Tagessatzhohe; }
set
{
if (!AreDifferent(_Tagessatzhohe, value))
return;
_Tagessatzhohe = value;
StoreDirtyInformation(AreDifferent(DataContract.Tagessatzhohe, value), nameof(Tagessatzhohe));
FirePropertyChanged(nameof(Tagessatzhohe));
UpdateHoheDerGeldstrafe();
}
}
public decimal? HoheDerGeldstrafe
{
get { return _HoheDerGeldstrafe; }
set
{
if (!AreDifferent(_HoheDerGeldstrafe, value))
return;
_HoheDerGeldstrafe = value;
StoreDirtyInformation(AreDifferent(DataContract.HoheDerGeldstrafe, value), nameof(HoheDerGeldstrafe));
FirePropertyChanged(nameof(HoheDerGeldstrafe));
}
}
public decimal? ZuLeistendeArbeitsstunden
{
get { return _ZuLeistendeArbeitsstunden; }
set
{
if (!AreDifferent(_ZuLeistendeArbeitsstunden, value))
return;
_ZuLeistendeArbeitsstunden = value;
StoreDirtyInformation(AreDifferent(DataContract.ZuLeistendeArbeitsstunden, value), nameof(ZuLeistendeArbeitsstunden));
FirePropertyChanged(nameof(ZuLeistendeArbeitsstunden));
}
}
public string Hinweis
{
get { return _Hinweis; }
set
{
if (!AreDifferent(_Hinweis, value))
return;
_Hinweis = value;
StoreDirtyInformation(AreDifferent(DataContract.Hinweis, value), nameof(Hinweis));
FirePropertyChanged(nameof(Hinweis));
}
}
public DateTime? Termin
{
get { return _Termin; }
set
{
if (!AreDifferent(_Termin, value))
return;
_Termin = value;
StoreDirtyInformation(AreDifferent(DataContract.Termin, value), nameof(Termin));
FirePropertyChanged(nameof(Termin));
}
}
public FalldatenBearbeitungsstatus? FalldatenBearbeitungsstatus
{
get { return _FalldatenBearbeitungsstatus; }
set
{
if (!AreDifferent(_FalldatenBearbeitungsstatus, value))
return;
_FalldatenBearbeitungsstatus = value;
StoreDirtyInformation(AreDifferent(DataContract.FalldatenBearbeitungsstatus, value), nameof(FalldatenBearbeitungsstatus));
FirePropertyChanged(nameof(FalldatenBearbeitungsstatus));
}
}
public string Auftragsruckgabe
{
get { return _Auftragsruckgabe; }
set
{
if (!AreDifferent(_Auftragsruckgabe, value))
return;
_Auftragsruckgabe = value;
StoreDirtyInformation(AreDifferent(DataContract.Auftragsruckgabe, value), nameof(Auftragsruckgabe));
FirePropertyChanged(nameof(Auftragsruckgabe));
}
}
public string Verlauf
{
get { return _Verlauf; }
set
{
if (!AreDifferent(_Verlauf, value))
return;
_Verlauf = value;
StoreDirtyInformation(AreDifferent(DataContract.Verlauf, value), nameof(Verlauf));
FirePropertyChanged(nameof(Verlauf));
}
}
public decimal? AbgeleisteteStunden
{
get { return _AbgeleisteteStunden; }
set
{
if (!AreDifferent(_AbgeleisteteStunden, value))
return;
_AbgeleisteteStunden = value;
StoreDirtyInformation(AreDifferent(DataContract.AbgeleisteteStunden, value), nameof(AbgeleisteteStunden));
FirePropertyChanged(nameof(AbgeleisteteStunden));
}
}
public decimal? ErsparteHafttage
{
get { return _ErsparteHafttage; }
set
{
if (!AreDifferent(_ErsparteHafttage, value))
return;
_ErsparteHafttage = value;
StoreDirtyInformation(AreDifferent(DataContract.ErsparteHafttage, value), nameof(ErsparteHafttage));
FirePropertyChanged(nameof(ErsparteHafttage));
}
}
public decimal? GeleisteteRatenzahlung
{
get { return _GeleisteteRatenzahlung; }
set
{
if (!AreDifferent(_GeleisteteRatenzahlung, value))
return;
_GeleisteteRatenzahlung = value;
StoreDirtyInformation(AreDifferent(DataContract.GeleisteteRatenzahlung, value), nameof(GeleisteteRatenzahlung));
FirePropertyChanged(nameof(GeleisteteRatenzahlung));
}
}
public string Bemerkung
{
get { return _Bemerkung; }
set
{
if (!AreDifferent(_Bemerkung, value))
return;
_Bemerkung = value;
StoreDirtyInformation(AreDifferent(DataContract.Bemerkung, value), nameof(Bemerkung));
FirePropertyChanged(nameof(Bemerkung));
}
}
public decimal? GeleisteteEinmalzahlung
{
get { return _GeleisteteEinmalzahlung; }
set
{
if (!AreDifferent(_GeleisteteEinmalzahlung, value))
return;
_GeleisteteEinmalzahlung = value;
StoreDirtyInformation(AreDifferent(DataContract.GeleisteteEinmalzahlung, value), nameof(GeleisteteEinmalzahlung));
FirePropertyChanged(nameof(GeleisteteEinmalzahlung));
}
}
public bool GrundArbeitsunfahig
{
get { return _GrundArbeitsunfahig; }
set
{
if (!AreDifferent(_GrundArbeitsunfahig, value))
return;
_GrundArbeitsunfahig = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundArbeitsunfahig, value), nameof(GrundArbeitsunfahig));
FirePropertyChanged(nameof(GrundArbeitsunfahig));
}
}
public bool GrundSuchtproblem
{
get { return _GrundSuchtproblem; }
set
{
if (!AreDifferent(_GrundSuchtproblem, value))
return;
_GrundSuchtproblem = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundSuchtproblem, value), nameof(GrundSuchtproblem));
FirePropertyChanged(nameof(GrundSuchtproblem));
}
}
public bool GrundPsychischeProbleme
{
get { return _GrundPsychischeProbleme; }
set
{
if (!AreDifferent(_GrundPsychischeProbleme, value))
return;
_GrundPsychischeProbleme = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundPsychischeProbleme, value), nameof(GrundPsychischeProbleme));
FirePropertyChanged(nameof(GrundPsychischeProbleme));
}
}
public bool GrundKeineMotivation
{
get { return _GrundKeineMotivation; }
set
{
if (!AreDifferent(_GrundKeineMotivation, value))
return;
_GrundKeineMotivation = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundKeineMotivation, value), nameof(GrundKeineMotivation));
FirePropertyChanged(nameof(GrundKeineMotivation));
}
}
public bool GrundInHaft
{
get { return _GrundInHaft; }
set
{
if (!AreDifferent(_GrundInHaft, value))
return;
_GrundInHaft = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundInHaft, value), nameof(GrundInHaft));
FirePropertyChanged(nameof(GrundInHaft));
}
}
public bool GrundUnbekannt
{
get { return _GrundUnbekannt; }
set
{
if (!AreDifferent(_GrundUnbekannt, value))
return;
_GrundUnbekannt = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundUnbekannt, value), nameof(GrundUnbekannt));
FirePropertyChanged(nameof(GrundUnbekannt));
}
}
public bool GrundKeinKontakt
{
get { return _GrundKeinKontakt; }
set
{
if (!AreDifferent(_GrundKeinKontakt, value))
return;
_GrundKeinKontakt = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundKeinKontakt, value), nameof(GrundKeinKontakt));
FirePropertyChanged(nameof(GrundKeinKontakt));
}
}
public bool GrundNichtAngetreten
{
get { return _GrundNichtAngetreten; }
set
{
if (!AreDifferent(_GrundNichtAngetreten, value))
return;
_GrundNichtAngetreten = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundNichtAngetreten, value), nameof(GrundNichtAngetreten));
FirePropertyChanged(nameof(GrundNichtAngetreten));
}
}
public bool GrundAbbruchDerTatigkeit
{
get { return _GrundAbbruchDerTatigkeit; }
set
{
if (!AreDifferent(_GrundAbbruchDerTatigkeit, value))
return;
_GrundAbbruchDerTatigkeit = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundAbbruchDerTatigkeit, value), nameof(GrundAbbruchDerTatigkeit));
FirePropertyChanged(nameof(GrundAbbruchDerTatigkeit));
}
}
public bool GrundWiderruf
{
get { return _GrundWiderruf; }
set
{
if (!AreDifferent(_GrundWiderruf, value))
return;
_GrundWiderruf = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundWiderruf, value), nameof(GrundWiderruf));
FirePropertyChanged(nameof(GrundWiderruf));
}
}
public bool Grund459StPO
{
get { return _Grund459StPO; }
set
{
if (!AreDifferent(_Grund459StPO, value))
return;
_Grund459StPO = value;
StoreDirtyInformation(AreDifferent(DataContract.Grund459StPO, value), nameof(Grund459StPO));
FirePropertyChanged(nameof(Grund459StPO));
}
}
public bool GrundAusbleibenDerZahlung
{
get { return _GrundAusbleibenDerZahlung; }
set
{
if (!AreDifferent(_GrundAusbleibenDerZahlung, value))
return;
_GrundAusbleibenDerZahlung = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundAusbleibenDerZahlung, value), nameof(GrundAusbleibenDerZahlung));
FirePropertyChanged(nameof(GrundAusbleibenDerZahlung));
}
}
public bool BesonderheitMehrfacheBeauftragung
{
get { return _BesonderheitMehrfacheBeauftragung; }
set
{
if (!AreDifferent(_BesonderheitMehrfacheBeauftragung, value))
return;
_BesonderheitMehrfacheBeauftragung = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitMehrfacheBeauftragung, value), nameof(BesonderheitMehrfacheBeauftragung));
FirePropertyChanged(nameof(BesonderheitMehrfacheBeauftragung));
}
}
public bool BesonderheitMehrfacheVermittlung
{
get { return _BesonderheitMehrfacheVermittlung; }
set
{
if (!AreDifferent(_BesonderheitMehrfacheVermittlung, value))
return;
_BesonderheitMehrfacheVermittlung = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitMehrfacheVermittlung, value), nameof(BesonderheitMehrfacheVermittlung));
FirePropertyChanged(nameof(BesonderheitMehrfacheVermittlung));
}
}
public bool BesonderheitVermittlungAusHaft
{
get { return _BesonderheitVermittlungAusHaft; }
set
{
if (!AreDifferent(_BesonderheitVermittlungAusHaft, value))
return;
_BesonderheitVermittlungAusHaft = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitVermittlungAusHaft, value), nameof(BesonderheitVermittlungAusHaft));
FirePropertyChanged(nameof(BesonderheitVermittlungAusHaft));
}
}
public bool BesonderheitDurchBGBWAufgesucht
{
get { return _BesonderheitDurchBGBWAufgesucht; }
set
{
if (!AreDifferent(_BesonderheitDurchBGBWAufgesucht, value))
return;
_BesonderheitDurchBGBWAufgesucht = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitDurchBGBWAufgesucht, value), nameof(BesonderheitDurchBGBWAufgesucht));
FirePropertyChanged(nameof(BesonderheitDurchBGBWAufgesucht));
}
}
public void UpdateHoheDerGeldstrafe()
{
if (!Tagessatze.HasValue || !Tagessatzhohe.HasValue)
return;
HoheDerGeldstrafe = Tagessatze * Tagessatzhohe;
}
protected override void InitByDataContract(FalldatenDC pDataContract)
{
_EigenesAktenzeichen = pDataContract.EigenesAktenzeichen;
_Auftragseingang = pDataContract.Auftragseingang;
_Auftragsherkunft = pDataContract.Auftragsherkunft;
_Vermittlungsgrundlage = pDataContract.Vermittlungsgrundlage;
_Tagessatze = pDataContract.Tagessatze;
_Tagessatzhohe = pDataContract.Tagessatzhohe;
_HoheDerGeldstrafe = pDataContract.HoheDerGeldstrafe;
_ZuLeistendeArbeitsstunden = pDataContract.ZuLeistendeArbeitsstunden;
_Hinweis = pDataContract.Hinweis;
_Termin = pDataContract.Termin;
_FalldatenBearbeitungsstatus = pDataContract.FalldatenBearbeitungsstatus;
_Auftragsruckgabe = pDataContract.Auftragsruckgabe;
_Verlauf = pDataContract.Verlauf;
_AbgeleisteteStunden = pDataContract.AbgeleisteteStunden;
_ErsparteHafttage = pDataContract.ErsparteHafttage;
_GeleisteteRatenzahlung = pDataContract.GeleisteteRatenzahlung;
_Bemerkung = pDataContract.Bemerkung;
_GeleisteteEinmalzahlung = pDataContract.GeleisteteEinmalzahlung;
_GrundArbeitsunfahig = pDataContract.GrundArbeitsunfahig;
_GrundSuchtproblem = pDataContract.GrundSuchtproblem;
_GrundPsychischeProbleme = pDataContract.GrundPsychischeProbleme;
_GrundKeineMotivation = pDataContract.GrundKeineMotivation;
_GrundInHaft = pDataContract.GrundInHaft;
_GrundUnbekannt = pDataContract.GrundUnbekannt;
_GrundKeinKontakt = pDataContract.GrundKeinKontakt;
_GrundNichtAngetreten = pDataContract.GrundNichtAngetreten;
_GrundAbbruchDerTatigkeit = pDataContract.GrundAbbruchDerTatigkeit;
_GrundWiderruf = pDataContract.GrundWiderruf;
_Grund459StPO = pDataContract.Grund459StPO;
_GrundAusbleibenDerZahlung = pDataContract.GrundAusbleibenDerZahlung;
_BesonderheitMehrfacheBeauftragung = pDataContract.BesonderheitMehrfacheBeauftragung;
_BesonderheitMehrfacheVermittlung = pDataContract.BesonderheitMehrfacheVermittlung;
_BesonderheitVermittlungAusHaft = pDataContract.BesonderheitVermittlungAusHaft;
_BesonderheitDurchBGBWAufgesucht = pDataContract.BesonderheitDurchBGBWAufgesucht;
}
internal void InitValueListEntrys(ObservableSortCollection<ValueListEntryDC> auftragsherkunfte, ObservableSortCollection<ValueListEntryDC> vermittlungsgrundlage)
{
_Auftragsherkunfte = auftragsherkunfte;
_Vermittlungsgrundlagen = vermittlungsgrundlage;
}
protected override FalldatenDC MapToDataContract(FalldatenDC pDataContract, bool doCommit)
{
pDataContract.EigenesAktenzeichen = _EigenesAktenzeichen;
pDataContract.Auftragseingang = _Auftragseingang;
pDataContract.Auftragsherkunft = _Auftragsherkunft;
pDataContract.Vermittlungsgrundlage = _Vermittlungsgrundlage;
pDataContract.Tagessatze = _Tagessatze;
pDataContract.Tagessatzhohe = _Tagessatzhohe;
pDataContract.HoheDerGeldstrafe = _HoheDerGeldstrafe;
pDataContract.ZuLeistendeArbeitsstunden = _ZuLeistendeArbeitsstunden;
pDataContract.Hinweis = _Hinweis;
pDataContract.Termin = _Termin;
pDataContract.FalldatenBearbeitungsstatus = _FalldatenBearbeitungsstatus;
pDataContract.Auftragsruckgabe = _Auftragsruckgabe;
pDataContract.Verlauf = _Verlauf;
pDataContract.AbgeleisteteStunden = _AbgeleisteteStunden;
pDataContract.ErsparteHafttage = _ErsparteHafttage;
pDataContract.GeleisteteRatenzahlung = _GeleisteteRatenzahlung;
pDataContract.Bemerkung = _Bemerkung;
pDataContract.GeleisteteEinmalzahlung = _GeleisteteEinmalzahlung;
pDataContract.GrundArbeitsunfahig = _GrundArbeitsunfahig;
pDataContract.GrundSuchtproblem = _GrundSuchtproblem;
pDataContract.GrundPsychischeProbleme = _GrundPsychischeProbleme;
pDataContract.GrundKeineMotivation = _GrundKeineMotivation;
pDataContract.GrundInHaft = _GrundInHaft;
pDataContract.GrundUnbekannt = _GrundUnbekannt;
pDataContract.GrundKeinKontakt = _GrundKeinKontakt;
pDataContract.GrundNichtAngetreten = _GrundNichtAngetreten;
pDataContract.GrundAbbruchDerTatigkeit = _GrundAbbruchDerTatigkeit;
pDataContract.GrundWiderruf = _GrundWiderruf;
pDataContract.Grund459StPO = _Grund459StPO;
pDataContract.GrundAusbleibenDerZahlung = _GrundAusbleibenDerZahlung;
pDataContract.BesonderheitMehrfacheBeauftragung = _BesonderheitMehrfacheBeauftragung;
pDataContract.BesonderheitMehrfacheVermittlung = _BesonderheitMehrfacheVermittlung;
pDataContract.BesonderheitVermittlungAusHaft = _BesonderheitVermittlungAusHaft;
pDataContract.BesonderheitDurchBGBWAufgesucht = _BesonderheitDurchBGBWAufgesucht;
return pDataContract;
}
}
}

View File

@@ -0,0 +1,610 @@
using BS.Shared.Core;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.ViewModel
{
public class CustomerGemeinnutzigeArbeitVM : AbstractDCMapperVM<FalldatenDC>
{
private string _EigenesAktenzeichen;
private DateTime? _Auftragseingang;
private ValueListEntryDC _Auftragsherkunft;
private ObservableSortCollection<ValueListEntryDC> _Auftragsherkunfte;
private ValueListEntryDC _Vermittlungsgrundlage;
private ObservableSortCollection<ValueListEntryDC> _Vermittlungsgrundlagen;
private decimal? _Tagessatze;
private decimal? _Tagessatzhohe;
private decimal? _HoheDerGeldstrafe;
private decimal? _ZuLeistendeArbeitsstunden;
private string _Hinweis;
private DateTime? _Termin;
private FalldatenBearbeitungsstatus? _FalldatenBearbeitungsstatus;
private string _Auftragsruckgabe;
private string _Verlauf;
private decimal? _AbgeleisteteStunden;
private decimal? _ErsparteHafttage;
private decimal? _GeleisteteRatenzahlung;
private string _Bemerkung;
private decimal? _GeleisteteEinmalzahlung;
private bool _GrundArbeitsunfahig;
private bool _GrundSuchtproblem;
private bool _GrundPsychischeProbleme;
private bool _GrundKeineMotivation;
private bool _GrundInHaft;
private bool _GrundUnbekannt;
private bool _GrundKeinKontakt;
private bool _GrundNichtAngetreten;
private bool _GrundAbbruchDerTatigkeit;
private bool _GrundWiderruf;
private bool _Grund459StPO;
private bool _GrundAusbleibenDerZahlung;
private bool _BesonderheitMehrfacheBeauftragung;
private bool _BesonderheitMehrfacheVermittlung;
private bool _BesonderheitVermittlungAusHaft;
private bool _BesonderheitDurchBGBWAufgesucht;
public CustomerGemeinnutzigeArbeitVM()
{
}
public CustomerGemeinnutzigeArbeitVM(FalldatenDC falldatenDC) : base(falldatenDC, falldatenDC.IsNew)
{
}
public string Displayname => $"AZ: {EigenesAktenzeichen}";
public string EigenesAktenzeichen
{
get { return _EigenesAktenzeichen; }
set
{
if (!AreDifferent(_EigenesAktenzeichen, value))
return;
_EigenesAktenzeichen = value;
StoreDirtyInformation(AreDifferent(DataContract.EigenesAktenzeichen, value), nameof(EigenesAktenzeichen));
FirePropertyChanged(nameof(EigenesAktenzeichen));
FirePropertyChanged(nameof(Displayname));
}
}
public DateTime? Auftragseingang
{
get { return _Auftragseingang; }
set
{
if (!AreDifferent(_Auftragseingang, value))
return;
_Auftragseingang = value;
StoreDirtyInformation(AreDifferent(DataContract.Auftragseingang, value), nameof(Auftragseingang));
FirePropertyChanged(nameof(Auftragseingang));
}
}
public ValueListEntryDC Auftragsherkunft
{
get { return _Auftragsherkunft; }
set
{
if (!AreDifferent(_Auftragsherkunft, value))
return;
_Auftragsherkunft = value;
StoreDirtyInformation(AreDifferent(DataContract.Auftragsherkunft, value), nameof(Auftragsherkunft));
FirePropertyChanged(nameof(Auftragsherkunft));
}
}
public ObservableSortCollection<ValueListEntryDC> Auftragsherkunfte
{
get { return _Auftragsherkunfte ?? (_Auftragsherkunfte = new ObservableSortCollection<ValueListEntryDC>()); }
set { _Auftragsherkunfte = value; }
}
public ValueListEntryDC Vermittlungsgrundlage
{
get { return _Vermittlungsgrundlage; }
set
{
if (!AreDifferent(_Vermittlungsgrundlage, value))
return;
_Vermittlungsgrundlage = value;
StoreDirtyInformation(AreDifferent(DataContract.Vermittlungsgrundlage, value), nameof(Vermittlungsgrundlage));
FirePropertyChanged(nameof(Vermittlungsgrundlage));
}
}
public ObservableSortCollection<ValueListEntryDC> Vermittlungsgrundlagen
{
get { return _Vermittlungsgrundlagen ?? (_Vermittlungsgrundlagen = new ObservableSortCollection<ValueListEntryDC>()); }
set { _Vermittlungsgrundlagen = value; }
}
public decimal? Tagessatze
{
get { return _Tagessatze; }
set
{
if (!AreDifferent(_Tagessatze, value))
return;
_Tagessatze = value;
StoreDirtyInformation(AreDifferent(DataContract.Tagessatze, value), nameof(Tagessatze));
FirePropertyChanged(nameof(Tagessatze));
UpdateHoheDerGeldstrafe();
}
}
public decimal? Tagessatzhohe
{
get { return _Tagessatzhohe; }
set
{
if (!AreDifferent(_Tagessatzhohe, value))
return;
_Tagessatzhohe = value;
StoreDirtyInformation(AreDifferent(DataContract.Tagessatzhohe, value), nameof(Tagessatzhohe));
FirePropertyChanged(nameof(Tagessatzhohe));
UpdateHoheDerGeldstrafe();
}
}
public decimal? HoheDerGeldstrafe
{
get { return _HoheDerGeldstrafe; }
set
{
if (!AreDifferent(_HoheDerGeldstrafe, value))
return;
_HoheDerGeldstrafe = value;
StoreDirtyInformation(AreDifferent(DataContract.HoheDerGeldstrafe, value), nameof(HoheDerGeldstrafe));
FirePropertyChanged(nameof(HoheDerGeldstrafe));
}
}
public decimal? ZuLeistendeArbeitsstunden
{
get { return _ZuLeistendeArbeitsstunden; }
set
{
if (!AreDifferent(_ZuLeistendeArbeitsstunden, value))
return;
_ZuLeistendeArbeitsstunden = value;
StoreDirtyInformation(AreDifferent(DataContract.ZuLeistendeArbeitsstunden, value), nameof(ZuLeistendeArbeitsstunden));
FirePropertyChanged(nameof(ZuLeistendeArbeitsstunden));
}
}
public string Hinweis
{
get { return _Hinweis; }
set
{
if (!AreDifferent(_Hinweis, value))
return;
_Hinweis = value;
StoreDirtyInformation(AreDifferent(DataContract.Hinweis, value), nameof(Hinweis));
FirePropertyChanged(nameof(Hinweis));
}
}
public DateTime? Termin
{
get { return _Termin; }
set
{
if (!AreDifferent(_Termin, value))
return;
_Termin = value;
StoreDirtyInformation(AreDifferent(DataContract.Termin, value), nameof(Termin));
FirePropertyChanged(nameof(Termin));
}
}
public IEnumerable<FalldatenBearbeitungsstatus> FalldatenBearbeitungsstatusTypes => Utils.GetAllEnumValues<FalldatenBearbeitungsstatus>();
public FalldatenBearbeitungsstatus? FalldatenBearbeitungsstatus
{
get { return _FalldatenBearbeitungsstatus; }
set
{
if (!AreDifferent(_FalldatenBearbeitungsstatus, value))
return;
_FalldatenBearbeitungsstatus = value;
StoreDirtyInformation(AreDifferent(DataContract.FalldatenBearbeitungsstatus, value), nameof(FalldatenBearbeitungsstatus));
FirePropertyChanged(nameof(FalldatenBearbeitungsstatus));
}
}
public string Auftragsruckgabe
{
get { return _Auftragsruckgabe; }
set
{
if (!AreDifferent(_Auftragsruckgabe, value))
return;
_Auftragsruckgabe = value;
StoreDirtyInformation(AreDifferent(DataContract.Auftragsruckgabe, value), nameof(Auftragsruckgabe));
FirePropertyChanged(nameof(Auftragsruckgabe));
}
}
public string Verlauf
{
get { return _Verlauf; }
set
{
if (!AreDifferent(_Verlauf, value))
return;
_Verlauf = value;
StoreDirtyInformation(AreDifferent(DataContract.Verlauf, value), nameof(Verlauf));
FirePropertyChanged(nameof(Verlauf));
}
}
public decimal? AbgeleisteteStunden
{
get { return _AbgeleisteteStunden; }
set
{
if (!AreDifferent(_AbgeleisteteStunden, value))
return;
_AbgeleisteteStunden = value;
StoreDirtyInformation(AreDifferent(DataContract.AbgeleisteteStunden, value), nameof(AbgeleisteteStunden));
FirePropertyChanged(nameof(AbgeleisteteStunden));
}
}
public decimal? ErsparteHafttage
{
get { return _ErsparteHafttage; }
set
{
if (!AreDifferent(_ErsparteHafttage, value))
return;
_ErsparteHafttage = value;
StoreDirtyInformation(AreDifferent(DataContract.ErsparteHafttage, value), nameof(ErsparteHafttage));
FirePropertyChanged(nameof(ErsparteHafttage));
}
}
public decimal? GeleisteteRatenzahlung
{
get { return _GeleisteteRatenzahlung; }
set
{
if (!AreDifferent(_GeleisteteRatenzahlung, value))
return;
_GeleisteteRatenzahlung = value;
StoreDirtyInformation(AreDifferent(DataContract.GeleisteteRatenzahlung, value), nameof(GeleisteteRatenzahlung));
FirePropertyChanged(nameof(GeleisteteRatenzahlung));
}
}
public string Bemerkung
{
get { return _Bemerkung; }
set
{
if (!AreDifferent(_Bemerkung, value))
return;
_Bemerkung = value;
StoreDirtyInformation(AreDifferent(DataContract.Bemerkung, value), nameof(Bemerkung));
FirePropertyChanged(nameof(Bemerkung));
}
}
public decimal? GeleisteteEinmalzahlung
{
get { return _GeleisteteEinmalzahlung; }
set
{
if (!AreDifferent(_GeleisteteEinmalzahlung, value))
return;
_GeleisteteEinmalzahlung = value;
StoreDirtyInformation(AreDifferent(DataContract.GeleisteteEinmalzahlung, value), nameof(GeleisteteEinmalzahlung));
FirePropertyChanged(nameof(GeleisteteEinmalzahlung));
}
}
public bool GrundArbeitsunfahig
{
get { return _GrundArbeitsunfahig; }
set
{
if (!AreDifferent(_GrundArbeitsunfahig, value))
return;
_GrundArbeitsunfahig = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundArbeitsunfahig, value), nameof(GrundArbeitsunfahig));
FirePropertyChanged(nameof(GrundArbeitsunfahig));
}
}
public bool GrundSuchtproblem
{
get { return _GrundSuchtproblem; }
set
{
if (!AreDifferent(_GrundSuchtproblem, value))
return;
_GrundSuchtproblem = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundSuchtproblem, value), nameof(GrundSuchtproblem));
FirePropertyChanged(nameof(GrundSuchtproblem));
}
}
public bool GrundPsychischeProbleme
{
get { return _GrundPsychischeProbleme; }
set
{
if (!AreDifferent(_GrundPsychischeProbleme, value))
return;
_GrundPsychischeProbleme = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundPsychischeProbleme, value), nameof(GrundPsychischeProbleme));
FirePropertyChanged(nameof(GrundPsychischeProbleme));
}
}
public bool GrundKeineMotivation
{
get { return _GrundKeineMotivation; }
set
{
if (!AreDifferent(_GrundKeineMotivation, value))
return;
_GrundKeineMotivation = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundKeineMotivation, value), nameof(GrundKeineMotivation));
FirePropertyChanged(nameof(GrundKeineMotivation));
}
}
public bool GrundInHaft
{
get { return _GrundInHaft; }
set
{
if (!AreDifferent(_GrundInHaft, value))
return;
_GrundInHaft = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundInHaft, value), nameof(GrundInHaft));
FirePropertyChanged(nameof(GrundInHaft));
}
}
public bool GrundUnbekannt
{
get { return _GrundUnbekannt; }
set
{
if (!AreDifferent(_GrundUnbekannt, value))
return;
_GrundUnbekannt = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundUnbekannt, value), nameof(GrundUnbekannt));
FirePropertyChanged(nameof(GrundUnbekannt));
}
}
public bool GrundKeinKontakt
{
get { return _GrundKeinKontakt; }
set
{
if (!AreDifferent(_GrundKeinKontakt, value))
return;
_GrundKeinKontakt = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundKeinKontakt, value), nameof(GrundKeinKontakt));
FirePropertyChanged(nameof(GrundKeinKontakt));
}
}
public bool GrundNichtAngetreten
{
get { return _GrundNichtAngetreten; }
set
{
if (!AreDifferent(_GrundNichtAngetreten, value))
return;
_GrundNichtAngetreten = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundNichtAngetreten, value), nameof(GrundNichtAngetreten));
FirePropertyChanged(nameof(GrundNichtAngetreten));
}
}
public bool GrundAbbruchDerTatigkeit
{
get { return _GrundAbbruchDerTatigkeit; }
set
{
if (!AreDifferent(_GrundAbbruchDerTatigkeit, value))
return;
_GrundAbbruchDerTatigkeit = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundAbbruchDerTatigkeit, value), nameof(GrundAbbruchDerTatigkeit));
FirePropertyChanged(nameof(GrundAbbruchDerTatigkeit));
}
}
public bool GrundWiderruf
{
get { return _GrundWiderruf; }
set
{
if (!AreDifferent(_GrundWiderruf, value))
return;
_GrundWiderruf = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundWiderruf, value), nameof(GrundWiderruf));
FirePropertyChanged(nameof(GrundWiderruf));
}
}
public bool Grund459StPO
{
get { return _Grund459StPO; }
set
{
if (!AreDifferent(_Grund459StPO, value))
return;
_Grund459StPO = value;
StoreDirtyInformation(AreDifferent(DataContract.Grund459StPO, value), nameof(Grund459StPO));
FirePropertyChanged(nameof(Grund459StPO));
}
}
public bool GrundAusbleibenDerZahlung
{
get { return _GrundAusbleibenDerZahlung; }
set
{
if (!AreDifferent(_GrundAusbleibenDerZahlung, value))
return;
_GrundAusbleibenDerZahlung = value;
StoreDirtyInformation(AreDifferent(DataContract.GrundAusbleibenDerZahlung, value), nameof(GrundAusbleibenDerZahlung));
FirePropertyChanged(nameof(GrundAusbleibenDerZahlung));
}
}
public bool BesonderheitMehrfacheBeauftragung
{
get { return _BesonderheitMehrfacheBeauftragung; }
set
{
if (!AreDifferent(_BesonderheitMehrfacheBeauftragung, value))
return;
_BesonderheitMehrfacheBeauftragung = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitMehrfacheBeauftragung, value), nameof(BesonderheitMehrfacheBeauftragung));
FirePropertyChanged(nameof(BesonderheitMehrfacheBeauftragung));
}
}
public bool BesonderheitMehrfacheVermittlung
{
get { return _BesonderheitMehrfacheVermittlung; }
set
{
if (!AreDifferent(_BesonderheitMehrfacheVermittlung, value))
return;
_BesonderheitMehrfacheVermittlung = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitMehrfacheVermittlung, value), nameof(BesonderheitMehrfacheVermittlung));
FirePropertyChanged(nameof(BesonderheitMehrfacheVermittlung));
}
}
public bool BesonderheitVermittlungAusHaft
{
get { return _BesonderheitVermittlungAusHaft; }
set
{
if (!AreDifferent(_BesonderheitVermittlungAusHaft, value))
return;
_BesonderheitVermittlungAusHaft = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitVermittlungAusHaft, value), nameof(BesonderheitVermittlungAusHaft));
FirePropertyChanged(nameof(BesonderheitVermittlungAusHaft));
}
}
public bool BesonderheitDurchBGBWAufgesucht
{
get { return _BesonderheitDurchBGBWAufgesucht; }
set
{
if (!AreDifferent(_BesonderheitDurchBGBWAufgesucht, value))
return;
_BesonderheitDurchBGBWAufgesucht = value;
StoreDirtyInformation(AreDifferent(DataContract.BesonderheitDurchBGBWAufgesucht, value), nameof(BesonderheitDurchBGBWAufgesucht));
FirePropertyChanged(nameof(BesonderheitDurchBGBWAufgesucht));
}
}
public void UpdateHoheDerGeldstrafe()
{
if (!Tagessatze.HasValue || !Tagessatzhohe.HasValue)
return;
HoheDerGeldstrafe = Tagessatze * Tagessatzhohe;
}
protected override void InitByDataContract(FalldatenDC pDataContract)
{
_EigenesAktenzeichen = pDataContract.EigenesAktenzeichen;
_Auftragseingang = pDataContract.Auftragseingang;
_Auftragsherkunft = pDataContract.Auftragsherkunft;
_Vermittlungsgrundlage = pDataContract.Vermittlungsgrundlage;
_Tagessatze = pDataContract.Tagessatze;
_Tagessatzhohe = pDataContract.Tagessatzhohe;
_HoheDerGeldstrafe = pDataContract.HoheDerGeldstrafe;
_ZuLeistendeArbeitsstunden = pDataContract.ZuLeistendeArbeitsstunden;
_Hinweis = pDataContract.Hinweis;
_Termin = pDataContract.Termin;
_FalldatenBearbeitungsstatus = pDataContract.FalldatenBearbeitungsstatus;
_Auftragsruckgabe = pDataContract.Auftragsruckgabe;
_Verlauf = pDataContract.Verlauf;
_AbgeleisteteStunden = pDataContract.AbgeleisteteStunden;
_ErsparteHafttage = pDataContract.ErsparteHafttage;
_GeleisteteRatenzahlung = pDataContract.GeleisteteRatenzahlung;
_Bemerkung = pDataContract.Bemerkung;
_GeleisteteEinmalzahlung = pDataContract.GeleisteteEinmalzahlung;
_GrundArbeitsunfahig = pDataContract.GrundArbeitsunfahig;
_GrundSuchtproblem = pDataContract.GrundSuchtproblem;
_GrundPsychischeProbleme = pDataContract.GrundPsychischeProbleme;
_GrundKeineMotivation = pDataContract.GrundKeineMotivation;
_GrundInHaft = pDataContract.GrundInHaft;
_GrundUnbekannt = pDataContract.GrundUnbekannt;
_GrundKeinKontakt = pDataContract.GrundKeinKontakt;
_GrundNichtAngetreten = pDataContract.GrundNichtAngetreten;
_GrundAbbruchDerTatigkeit = pDataContract.GrundAbbruchDerTatigkeit;
_GrundWiderruf = pDataContract.GrundWiderruf;
_Grund459StPO = pDataContract.Grund459StPO;
_GrundAusbleibenDerZahlung = pDataContract.GrundAusbleibenDerZahlung;
_BesonderheitMehrfacheBeauftragung = pDataContract.BesonderheitMehrfacheBeauftragung;
_BesonderheitMehrfacheVermittlung = pDataContract.BesonderheitMehrfacheVermittlung;
_BesonderheitVermittlungAusHaft = pDataContract.BesonderheitVermittlungAusHaft;
_BesonderheitDurchBGBWAufgesucht = pDataContract.BesonderheitDurchBGBWAufgesucht;
}
internal void InitValueListEntrys(ObservableSortCollection<ValueListEntryDC> auftragsherkunfte, ObservableSortCollection<ValueListEntryDC> vermittlungsgrundlage)
{
_Auftragsherkunfte = auftragsherkunfte;
_Vermittlungsgrundlagen = vermittlungsgrundlage;
}
protected override FalldatenDC MapToDataContract(FalldatenDC pDataContract, bool doCommit)
{
pDataContract.EigenesAktenzeichen = _EigenesAktenzeichen;
pDataContract.Auftragseingang = _Auftragseingang;
pDataContract.Auftragsherkunft = _Auftragsherkunft;
pDataContract.Vermittlungsgrundlage = _Vermittlungsgrundlage;
pDataContract.Tagessatze = _Tagessatze;
pDataContract.Tagessatzhohe = _Tagessatzhohe;
pDataContract.HoheDerGeldstrafe = _HoheDerGeldstrafe;
pDataContract.ZuLeistendeArbeitsstunden = _ZuLeistendeArbeitsstunden;
pDataContract.Hinweis = _Hinweis;
pDataContract.Termin = _Termin;
pDataContract.FalldatenBearbeitungsstatus = _FalldatenBearbeitungsstatus;
pDataContract.Auftragsruckgabe = _Auftragsruckgabe;
pDataContract.Verlauf = _Verlauf;
pDataContract.AbgeleisteteStunden = _AbgeleisteteStunden;
pDataContract.ErsparteHafttage = _ErsparteHafttage;
pDataContract.GeleisteteRatenzahlung = _GeleisteteRatenzahlung;
pDataContract.Bemerkung = _Bemerkung;
pDataContract.GeleisteteEinmalzahlung = _GeleisteteEinmalzahlung;
pDataContract.GrundArbeitsunfahig = _GrundArbeitsunfahig;
pDataContract.GrundSuchtproblem = _GrundSuchtproblem;
pDataContract.GrundPsychischeProbleme = _GrundPsychischeProbleme;
pDataContract.GrundKeineMotivation = _GrundKeineMotivation;
pDataContract.GrundInHaft = _GrundInHaft;
pDataContract.GrundUnbekannt = _GrundUnbekannt;
pDataContract.GrundKeinKontakt = _GrundKeinKontakt;
pDataContract.GrundNichtAngetreten = _GrundNichtAngetreten;
pDataContract.GrundAbbruchDerTatigkeit = _GrundAbbruchDerTatigkeit;
pDataContract.GrundWiderruf = _GrundWiderruf;
pDataContract.Grund459StPO = _Grund459StPO;
pDataContract.GrundAusbleibenDerZahlung = _GrundAusbleibenDerZahlung;
pDataContract.BesonderheitMehrfacheBeauftragung = _BesonderheitMehrfacheBeauftragung;
pDataContract.BesonderheitMehrfacheVermittlung = _BesonderheitMehrfacheVermittlung;
pDataContract.BesonderheitVermittlungAusHaft = _BesonderheitVermittlungAusHaft;
pDataContract.BesonderheitDurchBGBWAufgesucht = _BesonderheitDurchBGBWAufgesucht;
return pDataContract;
}
}
}

View File

@@ -14,6 +14,7 @@ using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.DataContracts.Wohnhilfe;
using BS.Shared.Extensions;
namespace BeWo.ViewModel
@@ -231,25 +232,32 @@ namespace BeWo.ViewModel
private ValueListEntryDC _AufenthaltsStatus;
private ObservableSortCollection<ValueListEntryDC> _AufenthaltsStatuse;
private ObservableSortCollection<ValueListEntryDC> _RoleInFamilys;
private ObservableSortCollection<ValueListEntryDC> _EintragKategorien;
private SubstitutionNeed _SubstitutionNeed;
private CustomerFalldatenVM _CustomerFalldatenVM;
private CustomerWohnhilfeListVM _CustomerWohnhilfeListVM;
private CustomerGemeinnutzigeArbeitListVM _CustomerGemeinnutzigeArbeitListVM;
public CustomerVM()
{
}
public CustomerVM(CustomerDC pDataContract, IEnumerable<ValueListEntryDC> pValueList, List<AssessmentSheetCategoryDC> pPossibleASCs, List<AssessmentSheetValueDC> pPossibleASVs, List<MedArtDC> pPossibleMedArten) : base(pDataContract, pDataContract.CustomerOid == null)
{
var possibleDisabilities = pValueList.Where(vle => vle.Type == ValueListEntryType.DisabilityType);
var possibleCustomerCareTypes = pValueList.Where(vle => vle.Type == ValueListEntryType.CustomerCareType);
var possibleTerminationReasons = pValueList.Where(vle => vle.Type == ValueListEntryType.TerminationReasonType);
var possiblePlacementObjectives = pValueList.Where(vle => vle.Type == ValueListEntryType.PlacementObjectiveType);
var possibleNationalitaeten = pValueList.Where(vle => vle.Type == ValueListEntryType.Nationality);
var possibleAufenthaltsStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.Aufenthaltsstatus);
var possibleFamilyStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.RoleInFamily);
var possibleEintragKategorien = pValueList.Where(vle => vle.Type == ValueListEntryType.NotizenKategorieCustomer);
var possibleDisabilities = pValueList.Where(vle => vle.Type == ValueListEntryType.DisabilityType);
var possibleCustomerCareTypes = pValueList.Where(vle => vle.Type == ValueListEntryType.CustomerCareType);
var possibleTerminationReasons = pValueList.Where(vle => vle.Type == ValueListEntryType.TerminationReasonType);
var possiblePlacementObjectives = pValueList.Where(vle => vle.Type == ValueListEntryType.PlacementObjectiveType);
var possibleNationalitaeten = pValueList.Where(vle => vle.Type == ValueListEntryType.Nationality);
var possibleAufenthaltsStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.Aufenthaltsstatus);
var possibleFamilyStatuse = pValueList.Where(vle => vle.Type == ValueListEntryType.RoleInFamily);
var possibleEintragKategorien = pValueList.Where(vle => vle.Type == ValueListEntryType.NotizenKategorieCustomer);
var possibleauftragsherkunfte = pValueList.Where(vle => vle.Type == ValueListEntryType.Auftragsherkunft);
var possiblevermittlungsgrundlage = pValueList.Where(vle => vle.Type == ValueListEntryType.Vermittlungsgrundlage);
_PossibleDisabilities = pDataContract.Disabilities != null
_PossibleDisabilities = pDataContract.Disabilities != null
? new ObservableSortCollection<ValueListEntryDC>(possibleDisabilities.Except(pDataContract.Disabilities), Comparer.ValueListEntryDCComparer)
: new ObservableSortCollection<ValueListEntryDC>(possibleDisabilities, Comparer.ValueListEntryDCComparer);
@@ -260,8 +268,13 @@ namespace BeWo.ViewModel
_AufenthaltsStatuse = new ObservableSortCollection<ValueListEntryDC>(possibleAufenthaltsStatuse, Comparer.ValueListEntryDCComparer);
_RoleInFamilys = new ObservableSortCollection<ValueListEntryDC>(possibleFamilyStatuse,Comparer.ValueListEntryDCComparer);
_EintragKategorien = new ObservableSortCollection<ValueListEntryDC>(possibleEintragKategorien, Comparer.ValueListEntryDCComparer);
var auftragsherkunfte = new ObservableSortCollection<ValueListEntryDC>(possibleauftragsherkunfte, Comparer.ValueListEntryDCComparer);
var vermittlungsgrundlage = new ObservableSortCollection<ValueListEntryDC>(possiblevermittlungsgrundlage, Comparer.ValueListEntryDCComparer);
_MedArten = new BindingList<MedArtDC>(pPossibleMedArten);
_CustomerFalldatenVM.InitValueListEntrys(auftragsherkunfte, vermittlungsgrundlage);
_CustomerGemeinnutzigeArbeitListVM.InitValueListEntrys(auftragsherkunfte, vermittlungsgrundlage);
_MedArten = new BindingList<MedArtDC>(pPossibleMedArten);
pPossibleASCs.Sort((x, y) => x.Position.CompareTo(y.Position));
_AssessmentSheetCategories = new BindingList<AssessmentSheetCategoryDC>(pPossibleASCs);
@@ -290,7 +303,11 @@ namespace BeWo.ViewModel
Arbeitszeiten = new ArbeitszeitListVM(DataContract.Arbeitszeiten);
}
public ArbeitszeitListVM Arbeitszeiten
public bool PermissionFalldatenView { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.Customer_GemeinnutzigeArbeit_View);
public bool PermissionGemeinnutzigeArbeitView { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.Customer_GemeinnutzigeArbeit_View);
public bool PermissionWohnhilfeView { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.Customer_Wohnhilfe_View);
public ArbeitszeitListVM Arbeitszeiten
{
get => _Arbeitszeiten;
@@ -300,8 +317,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Arbeitszeiten);
}
}
public SubstitutionNeed SubstitutionNeed
{
get => _SubstitutionNeed;
@@ -316,7 +331,6 @@ namespace BeWo.ViewModel
}
}
}
//Wird noch benötigt
//public BargeldverwaltungsVM Bargeldverwaltung
//{
@@ -329,7 +343,6 @@ namespace BeWo.ViewModel
// FirePropertyChanged(PropertyName_Bargeldverwaltung);
// }
//}
public AbsenceTimeListVM AbsenceTimes
{
get => _AbsenceTimes;
@@ -340,7 +353,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_AbsenceTimes);
}
}
public CompactPersonDC Ansprechpartner
{
get { return _Ansprechpartner; }
@@ -355,7 +367,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Ansprechpartner);
}
}
public BindingList<MedArtDC> MedArten
{
get { return _MedArten; }
@@ -365,7 +376,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_MedArten);
}
}
public BindingList<AssessmentSheetCategoryDC> AssessmentSheetCategories
{
get { return _AssessmentSheetCategories; }
@@ -376,7 +386,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_AssessmentSheetCategories);
}
}
public AssessmentSheetCategoryListVM IndividualAssessmentSheetCategories
{
get { return _IndividualAssessmentSheetCategories; }
@@ -387,7 +396,6 @@ namespace BeWo.ViewModel
FirePropertyChanged("IndividualAssessmentSheetCategories");
}
}
public string Childs
{
get { return _Childs; }
@@ -404,7 +412,6 @@ namespace BeWo.ViewModel
}
}
}
public CustomerCostBearerRelationListVM CostBearers
{
get { return _CostBearers; }
@@ -415,12 +422,10 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_CostBearers);
}
}
public ObservableSortCollection<ValueListEntryDC> CustomerCareTypes
{
get { return _CustomerCareTypes ?? (_CustomerCareTypes = new ObservableSortCollection<ValueListEntryDC>(Comparer.ValueListEntryDCComparer)); }
}
public DateTime? DateOfBirth
{
get { return _DateOfBirth; }
@@ -437,7 +442,6 @@ namespace BeWo.ViewModel
}
}
}
public DateTime? AufenthaltGueltigBis
{
get { return _AufenthaltGueltigBis; }
@@ -454,8 +458,6 @@ namespace BeWo.ViewModel
}
}
}
public string DebitorNumber
{
get { return _DebitorNumber; }
@@ -472,7 +474,6 @@ namespace BeWo.ViewModel
}
}
}
public string CostCenter
{
get { return _CostCenter; }
@@ -489,7 +490,6 @@ namespace BeWo.ViewModel
}
}
}
public string Diagnosis
{
get { return _Diagnosis; }
@@ -506,12 +506,10 @@ namespace BeWo.ViewModel
}
}
}
public ObservableSortCollection<ValueListEntryDC> Disabilities
{
get { return _Disabilities ?? (_Disabilities = new ObservableSortCollection<ValueListEntryDC>(Comparer.ValueListEntryDCComparer)); }
}
public string EMail
{
get { return _EMail; }
@@ -529,7 +527,6 @@ namespace BeWo.ViewModel
}
}
}
public CustomerEmployeeRelationListVM EmployeeRelations
{
get { return _EmployeeRelations; }
@@ -540,7 +537,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_EmployeeRelations);
}
}
public WohnheimCustomerRelationListVM WohnheimRelations
{
get { return _WohnheimRelations; }
@@ -551,7 +547,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_WohnheimRelations);
}
}
public CustomerTeamRelationListVM TeamRelations
{
get { return _TeamRelations; }
@@ -561,8 +556,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_TeamRelations);
}
}
public CustomerPersonRelationListVM EnvironmentPersons
{
get
@@ -576,8 +569,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_EnvironmentPersons);
}
}
public CustomerPersonRelationListVM EnvironmentPersonsWithFamily
{
get
@@ -590,7 +581,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_EnvironmentPersonsWithFamily);
}
}
public CustomerOrganisationRelationListVM EnvironmentOrganisations
{
get { return _EnvironmentOrganisations; }
@@ -601,7 +591,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_EnvironmentOrganisations);
}
}
public string EquityContribution
{
get { return String.Format("{0:n}", _EquityContribution); }
@@ -620,7 +609,6 @@ namespace BeWo.ViewModel
}
}
}
public FamilyStatus? FamilyStatus
{
get { return _FamilyStatus; }
@@ -635,7 +623,6 @@ namespace BeWo.ViewModel
}
}
}
public string Fax
{
get { return _Fax; }
@@ -671,9 +658,7 @@ namespace BeWo.ViewModel
}
}
}
public BindingList<String> ICD10Codes { get; set; }
public string ICD10Diagnosis
{
get { return _ICD10Diagnosis; }
@@ -690,7 +675,6 @@ namespace BeWo.ViewModel
}
}
}
public string InvoiceAddressLine1
{
get { return _InvoiceAddressLine1; }
@@ -705,7 +689,6 @@ namespace BeWo.ViewModel
}
}
}
public string InvoiceAddressLine2
{
get { return _InvoiceAddressLine2; }
@@ -720,7 +703,6 @@ namespace BeWo.ViewModel
}
}
}
public string InvoiceAddressPostalCode
{
get { return _InvoiceAddressPostalCode; }
@@ -735,7 +717,6 @@ namespace BeWo.ViewModel
}
}
}
public string InvoiceAddressStreet
{
get { return _InvoiceAddressStreet; }
@@ -750,7 +731,6 @@ namespace BeWo.ViewModel
}
}
}
public string InvoiceAddressTown
{
get { return _InvoiceAddressTown; }
@@ -765,7 +745,6 @@ namespace BeWo.ViewModel
}
}
}
public bool IsAdvised
{
get { return _IsAdvised; }
@@ -784,7 +763,6 @@ namespace BeWo.ViewModel
}
}
}
public bool IsArchived
{
get => _IsArchived;
@@ -801,7 +779,6 @@ namespace BeWo.ViewModel
}
}
}
public ActivationTypeId ActivationType
{
get => _ActivationType;
@@ -816,8 +793,7 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_ActivationType);
}
}
}
}
public bool IsMigrant
{
get { return _IsMigrant; }
@@ -832,7 +808,6 @@ namespace BeWo.ViewModel
}
}
}
public bool IsAttended
{
get { return _IsAttended; }
@@ -851,7 +826,6 @@ namespace BeWo.ViewModel
}
}
}
public override bool IsDirty
{
get
@@ -864,10 +838,12 @@ namespace BeWo.ViewModel
return base.IsDirty || TeamRelations.IsDirty || EmployeeRelations.IsDirty || _EnvironmentPersons.IsDirty ||
_EnvironmentOrganisations.IsDirty || _AbsenceTimes.IsDirty || _VarFields.IsDirty ||
CostBearers.IsDirty || _IndividualAssessmentSheetCategories.IsDirty ||
_PlacementList.IsDirty || _MedVerordnungslisten.IsDirty || _EnvironmentPersonsWithFamily.IsDirty || _Arbeitszeiten.IsDirty;
_PlacementList.IsDirty || _MedVerordnungslisten.IsDirty || _EnvironmentPersonsWithFamily.IsDirty || _Arbeitszeiten.IsDirty ||
_CustomerFalldatenVM.IsDirty
//|| _CustomerWohnhilfeListVM.IsDirty
;
}
}
public bool IsFemale
{
get { return _IsFemale; }
@@ -888,7 +864,6 @@ namespace BeWo.ViewModel
}
}
}
public bool IsMale
{
get { return _IsMale; }
@@ -909,7 +884,6 @@ namespace BeWo.ViewModel
}
}
}
public bool IsDivers
{
get { return _IsDivers; }
@@ -930,7 +904,6 @@ namespace BeWo.ViewModel
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string LastName
{
@@ -948,7 +921,6 @@ namespace BeWo.ViewModel
}
}
}
public string Medication
{
get { return _Medication; }
@@ -963,7 +935,6 @@ namespace BeWo.ViewModel
}
}
}
public string VersichertenStatus
{
get { return _VersichertenStatus; }
@@ -978,7 +949,6 @@ namespace BeWo.ViewModel
}
}
}
public string Environment
{
get { return _Environment; }
@@ -993,7 +963,6 @@ namespace BeWo.ViewModel
}
}
}
public string MobilePhone
{
get { return _MobilePhone; }
@@ -1012,7 +981,6 @@ namespace BeWo.ViewModel
}
}
}
public string Migrationshintergrund
{
get { return this._Migrationshintergrund; }
@@ -1029,7 +997,6 @@ namespace BeWo.ViewModel
}
}
}
public string Notice
{
get { return _Notice; }
@@ -1050,7 +1017,6 @@ namespace BeWo.ViewModel
}
}
}
public CompactOrganisationDC Jugendamt
{
get { return _Jugendamt; }
@@ -1065,7 +1031,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Jugendamt);
}
}
public string Phone
{
get { return _Phone; }
@@ -1083,7 +1048,6 @@ namespace BeWo.ViewModel
}
}
}
public PlacementListVM PlacementList
{
get { return _PlacementList; }
@@ -1094,7 +1058,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_PlacementList);
}
}
public ObservableSortCollection<ValueListEntryDC> PlacementObjectives
{
get
@@ -1107,17 +1070,14 @@ namespace BeWo.ViewModel
return _PlacementObjectives;
}
}
public ObservableSortCollection<ValueListEntryDC> PossibleCustomerCareTypes
{
get { return _PossibleCustomerCareTypes; }
}
public ObservableSortCollection<ValueListEntryDC> PossibleDisabilities
{
get { return _PossibleDisabilities; }
}
public string PostalCode
{
get { return _PostalCode; }
@@ -1134,7 +1094,6 @@ namespace BeWo.ViewModel
}
}
}
public string Profession
{
get { return _Profession; }
@@ -1151,7 +1110,6 @@ namespace BeWo.ViewModel
}
}
}
public string ReferenceNumber
{
get { return _ReferenceNumber; }
@@ -1168,7 +1126,6 @@ namespace BeWo.ViewModel
}
}
}
public string Street
{
get { return _Street; }
@@ -1185,7 +1142,6 @@ namespace BeWo.ViewModel
}
}
}
public int? DistanceInMeter
{
get { return _DistanceInMeter; }
@@ -1200,7 +1156,6 @@ namespace BeWo.ViewModel
}
}
}
public string AddressLine1
{
get { return this._AddressLine1; }
@@ -1215,7 +1170,6 @@ namespace BeWo.ViewModel
}
}
}
public string Kindesmutter
{
get { return _Kindesmutter; }
@@ -1230,7 +1184,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Kindesmutter);
}
}
public string Kindesvater
{
get { return _Kindesvater; }
@@ -1245,7 +1198,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Kindesvater);
}
}
public string Geschwister
{
get { return _Geschwister; }
@@ -1260,7 +1212,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Geschwister);
}
}
public string Vormund
{
get { return _Vormund; }
@@ -1275,7 +1226,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Vormund);
}
}
public DateTime? TerminationDate
{
get { return _TerminationDate; }
@@ -1292,7 +1242,6 @@ namespace BeWo.ViewModel
}
}
}
public DateTime? AssistanceBegin
{
get { return _AssistanceBegin; }
@@ -1309,7 +1258,6 @@ namespace BeWo.ViewModel
}
}
}
public ValueListEntryDC TerminationReason
{
get { return _TerminationReason; }
@@ -1326,12 +1274,10 @@ namespace BeWo.ViewModel
}
}
}
public ObservableSortCollection<ValueListEntryDC> TerminationReasons
{
get { return _TerminationReasons ?? (_TerminationReasons = new ObservableSortCollection<ValueListEntryDC>()); }
}
public string Town
{
get { return _Town; }
@@ -1348,7 +1294,6 @@ namespace BeWo.ViewModel
}
}
}
public VarFieldListVM VarFields
{
get { return _VarFields; }
@@ -1362,7 +1307,6 @@ namespace BeWo.ViewModel
}
}
}
public string AusstVersAmt
{
get { return _AusstVersAmt; }
@@ -1377,8 +1321,7 @@ namespace BeWo.ViewModel
}
}
}
public DateTime? AusweisGueltigVon
public DateTime? AusweisGueltigVon
{
get { return _AusweisGueltigVon; }
@@ -1392,7 +1335,6 @@ namespace BeWo.ViewModel
}
}
}
public DateTime? AusweisGueltigBis
{
get { return _AusweisGueltigBis; }
@@ -1407,7 +1349,6 @@ namespace BeWo.ViewModel
}
}
}
public bool AusweisUnbefristetGueltig
{
get { return _AusweisUnbefristetGueltig; }
@@ -1428,7 +1369,6 @@ namespace BeWo.ViewModel
}
}
}
public string AusweisAktenzeichen
{
get { return _AusweisAktenzeichen; }
@@ -1445,7 +1385,6 @@ namespace BeWo.ViewModel
}
}
}
public DateTime? BeiblattGueltigBis
{
get { return _BeiblattGueltigBis; }
@@ -1460,7 +1399,6 @@ namespace BeWo.ViewModel
}
}
}
public string GradDerBehinderung
{
get { return _GradDerBehinderung; }
@@ -1474,8 +1412,7 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_GradDerBehinderung);
}
}
}
}
public Byte[] CustomerImage
{
get { return _CustomerImage; }
@@ -1490,7 +1427,6 @@ namespace BeWo.ViewModel
}
}
}
public ValueListEntryDC Nationalitaet
{
get { return this._Nationalitaet; }
@@ -1507,7 +1443,6 @@ namespace BeWo.ViewModel
}
}
}
public ValueListEntryDC AufenthaltsStatus
{
get { return this._AufenthaltsStatus; }
@@ -1524,7 +1459,6 @@ namespace BeWo.ViewModel
}
}
}
public ObservableSortCollection<ValueListEntryDC> Nationalitaeten
{
get
@@ -1537,7 +1471,6 @@ namespace BeWo.ViewModel
return this._Nationalitaeten;
}
}
public ObservableSortCollection<ValueListEntryDC> RoleInFamilys
{
get
@@ -1550,7 +1483,6 @@ namespace BeWo.ViewModel
return this._RoleInFamilys;
}
}
public ObservableSortCollection<ValueListEntryDC> AufenthaltsStatuse
{
get
@@ -1563,7 +1495,6 @@ namespace BeWo.ViewModel
return this._AufenthaltsStatuse;
}
}
public ObservableCollection<Behinderungsart> BehinderungsartenListe
{
get { return _BehinderungsartenListe ?? (_BehinderungsartenListe = new ObservableCollection<Behinderungsart>()); }
@@ -1579,7 +1510,6 @@ namespace BeWo.ViewModel
}
}
}
public ObservableCollection<Merkzeichen> MerkzeichenListe
{
get { return _MerkzeichenListe ?? (_MerkzeichenListe = new ObservableCollection<Merkzeichen>()); }
@@ -1595,13 +1525,11 @@ namespace BeWo.ViewModel
}
}
}
public void EnableLogging(bool enable, StringBuilder log)
{
_EnableLogging = enable;
_Log = log;
}
public bool VertretungGewuenscht
{
get { return _VertretungGewuenscht; }
@@ -1616,7 +1544,6 @@ namespace BeWo.ViewModel
}
}
}
public int AbWelchemKrankheitsTag
{
get
@@ -1636,8 +1563,7 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_AbWelchemKrankheitsTag);
}
}
}
}
public bool VertretungDringendErforderlich
{
get { return _VertretungDringendErforderlich ; }
@@ -1652,7 +1578,6 @@ namespace BeWo.ViewModel
}
}
}
public bool Pflege
{
get { return _Pflege; }
@@ -1667,8 +1592,7 @@ namespace BeWo.ViewModel
}
}
}
public bool Toilettengang
public bool Toilettengang
{
get { return _Toilettengang; }
@@ -1682,7 +1606,6 @@ namespace BeWo.ViewModel
}
}
}
public bool Aggressiv
{
get { return _Aggressiv; }
@@ -1697,7 +1620,6 @@ namespace BeWo.ViewModel
}
}
}
public bool Hygienebelehrung
{
get { return _Hygienebelehrung; }
@@ -1712,7 +1634,6 @@ namespace BeWo.ViewModel
}
}
}
public string Schutzstufe
{
get { return _Schutzstufe; }
@@ -1727,7 +1648,6 @@ namespace BeWo.ViewModel
}
}
}
public string Uebernahmeort
{
get { return _Uebernahmeort; }
@@ -1742,7 +1662,6 @@ namespace BeWo.ViewModel
}
}
}
public string Verhalten
{
get { return _Verhalten; }
@@ -1757,7 +1676,6 @@ namespace BeWo.ViewModel
}
}
}
public string Betreuungsbedarf
{
get { return _Betreuungsbedarf; }
@@ -1772,7 +1690,6 @@ namespace BeWo.ViewModel
}
}
}
public string BemerkungenSbd
{
get { return _BemerkungenSbd; }
@@ -1787,7 +1704,6 @@ namespace BeWo.ViewModel
}
}
}
public string HealthInsurance
{
get { return _HealthInsurance; }
@@ -1816,7 +1732,6 @@ namespace BeWo.ViewModel
}
}
}
public ObservableSortCollection<ValueListEntryDC> EintragKategorien
{
get => _EintragKategorien;
@@ -1830,10 +1745,48 @@ namespace BeWo.ViewModel
}
}
}
public CustomerFalldatenVM CustomerFalldatenVM
{
get { return _CustomerFalldatenVM; }
#region Medikamentenverordnungslisten
set
{
if (!AreDifferent(_CustomerFalldatenVM, value))
return;
_CustomerFalldatenVM = value;
FirePropertyChanged(nameof(CustomerFalldatenVM));
}
}
public CustomerWohnhilfeListVM CustomerWohnhilfeListVM
{
get { return _CustomerWohnhilfeListVM; }
private MedikamentenverordnungslisteListVM _MedVerordnungslisten;
set
{
if (!AreDifferent(CustomerWohnhilfeListVM, value))
return;
_CustomerWohnhilfeListVM = value;
FirePropertyChanged(nameof(CustomerWohnhilfeListVM));
}
}
public CustomerGemeinnutzigeArbeitListVM CustomerGemeinnutzigeArbeitListVM
{
get { return _CustomerGemeinnutzigeArbeitListVM; }
set
{
if (!AreDifferent(CustomerGemeinnutzigeArbeitListVM, value))
return;
_CustomerGemeinnutzigeArbeitListVM = value;
FirePropertyChanged(nameof(CustomerGemeinnutzigeArbeitListVM));
}
}
#region Medikamentenverordnungslisten
private MedikamentenverordnungslisteListVM _MedVerordnungslisten;
public MedikamentenverordnungslisteListVM MedVerordnungslisten
{
@@ -1865,17 +1818,14 @@ namespace BeWo.ViewModel
{
get { return MedVerordnungslisten.VMList.FirstOrDefault(vm => vm.Gueltig && false == vm.MedListType); }
}
public MedikamentenverordnungslisteVM Bedarfsmedikamentenverordnungsliste
{
get { return MedVerordnungslisten.VMList.FirstOrDefault(vm => vm.Gueltig && vm.MedListType); }
}
public List<MedikamentenverordnungslisteVM> UngueltigeVerordnungen
{
get { return MedVerordnungslisten.VMList.Where(vm => !vm.Gueltig).ToList(); }
}
public string CustomerAlias
{
get { return _CustomerAlias; }
@@ -1889,8 +1839,7 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_CustomerAlias);
}
}
}
}
public Pflegegrad? Pflegegrad {
get { return _Pflegegrad; }
@@ -2066,7 +2015,9 @@ namespace BeWo.ViewModel
}
}
EnvironmentPersons = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListUmfeld, ValueListEntryType.EnvironmentPersonType);
CustomerFalldatenVM = new CustomerFalldatenVM(this, pDataContract.FalldatenDC ?? (pDataContract.FalldatenDC = new FalldatenDC(true)));
EnvironmentPersons = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListUmfeld, ValueListEntryType.EnvironmentPersonType);
EnvironmentPersonsWithFamily = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListFamily, ValueListEntryType.RoleInFamily);
EnvironmentOrganisations = VMFactory.CreateCustomerEnvironmentOrganisationRelListVM(pDataContract.EnvironmentOrganisations ?? (pDataContract.EnvironmentOrganisations = new List<CustomerOrganisationRelationDC>()));
@@ -2083,8 +2034,11 @@ namespace BeWo.ViewModel
ICD10Codes.ListChanged += (s, e) => StoreDirtyInformation(true, "ICD10Codes");
MedVerordnungslisten = VMFactory.CreateMedikementenverordnungslisteListVM(pDataContract.Medikamentenverordnungslisten);
}
CustomerWohnhilfeListVM = new CustomerWohnhilfeListVM(this, pDataContract.CustomerWohnhilfeDC ?? (pDataContract.CustomerWohnhilfeDC = new List<CustomerWohnhilfeDC>()));
CustomerGemeinnutzigeArbeitListVM = new CustomerGemeinnutzigeArbeitListVM(pDataContract.CustomerGemeinnutzigeArbeitDC ?? (pDataContract.CustomerGemeinnutzigeArbeitDC = new List<FalldatenDC>()));
}
protected override CustomerDC MapToDataContract(CustomerDC pDataContract, bool doCommit)
{
pDataContract.DateOfBirth = _DateOfBirth;
@@ -2146,6 +2100,15 @@ namespace BeWo.ViewModel
pDataContract.SubstitutionNeed = _SubstitutionNeed;
pDataContract.AufenthaltGueltigBis = _AufenthaltGueltigBis;
var falldaten_new_and_no_changed = _CustomerFalldatenVM.IsNew && !_CustomerFalldatenVM.IsDirty;
if (!falldaten_new_and_no_changed)
{
pDataContract.FalldatenDC = _CustomerFalldatenVM.CommitToDataContract();
}
if(_CustomerFalldatenVM.IsNew && !_CustomerFalldatenVM.IsDirty)
if (_MerkzeichenListe != null)
{
pDataContract.MerkzeichenListe = _MerkzeichenListe.ToList();
@@ -2247,9 +2210,13 @@ namespace BeWo.ViewModel
pDataContract.Arbeitszeiten = _Arbeitszeiten.CopyToDCList(doCommit);
}
if(_CustomerWohnhilfeListVM != null)
{
pDataContract.CustomerWohnhilfeDC = _CustomerWohnhilfeListVM.CopyToDCList(doCommit);
}
return pDataContract;
}
private void CommitContact(string pValue, ContactType pContactType)
{
var lOldContactDCs = DataContract.ContactInformations != null ? DataContract.ContactInformations.ToList() : new List<ContactDC>();
@@ -2277,7 +2244,6 @@ namespace BeWo.ViewModel
DataContract.ContactInformations = lOldContactDCs;
}
private void Log(string log)
{
if (_EnableLogging && _Log != null)

View File

@@ -0,0 +1,203 @@
using BeWo.ViewModel.Wohnhilfe;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Wohnhilfe;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.ViewModel
{
public class CustomerWohnhilfeVM : AbstractDCMapperVM<CustomerWohnhilfeDC>
{
private static int counter = 0;
private string _Displayname;
private CustomerWohnhilfeBereichBundVM _BereichBundVM;
private CustomerWohnhilfeBereichEinkommenUndArbeitVM _BereichEinkommenUndArbeitVM;
private CustomerWohnhilfeBereichSozialeKontakteVM _BereichSozialeKontakteVM;
private CustomerWohnhilfeBereichSozialstrukturVM _BereichSozialstrukturVM;
public CustomerWohnhilfeVM()
{
_BereichBundVM = new CustomerWohnhilfeBereichBundVM();
//_BereichBundVM.Verbandszugehorigkeit = Verbandszugehorigkeit.Arbeiterwohlfahrt;
//_BereichBundVM.Geschlecht = Geschlecht.Mannlich;
//_BereichBundVM.AlterAmStichtag = 1000;
//_BereichBundVM.BerichtseinheitID = 192321321;
_BereichEinkommenUndArbeitVM = new CustomerWohnhilfeBereichEinkommenUndArbeitVM();
_BereichSozialeKontakteVM = new CustomerWohnhilfeBereichSozialeKontakteVM();
_BereichSozialstrukturVM = new CustomerWohnhilfeBereichSozialstrukturVM();
}
public CustomerWohnhilfeVM(CustomerWohnhilfeDC dc) : base(dc, dc.Oid == null)
{
}
public override bool IsDirty => base.IsDirty ||
_BereichBundVM.IsDirty ||
_BereichEinkommenUndArbeitVM.IsDirty ||
_BereichSozialeKontakteVM.IsDirty ||
_BereichSozialstrukturVM.IsDirty;
public string Displayname
{
get { return _Displayname; }
set
{
if (!AreDifferent(Displayname, value))
return;
_Displayname = value;
FirePropertyChanged(nameof(Displayname));
}
}
public CustomerWohnhilfeBereichBundVM BereichBundVM
{
get { return _BereichBundVM; }
set
{
if (!AreDifferent(BereichBundVM, value))
return;
_BereichBundVM = value;
FirePropertyChanged(nameof(BereichBundVM));
}
}
public CustomerWohnhilfeBereichEinkommenUndArbeitVM BereichEinkommenUndArbeitVM
{
get { return _BereichEinkommenUndArbeitVM; }
set
{
if (!AreDifferent(BereichEinkommenUndArbeitVM, value))
return;
_BereichEinkommenUndArbeitVM = value;
FirePropertyChanged(nameof(BereichEinkommenUndArbeitVM));
}
}
public CustomerWohnhilfeBereichSozialeKontakteVM BereichSozialeKontakteVM
{
get { return _BereichSozialeKontakteVM; }
set
{
if (!AreDifferent(BereichSozialeKontakteVM, value))
return;
_BereichSozialeKontakteVM = value;
FirePropertyChanged(nameof(BereichSozialeKontakteVM));
}
}
public CustomerWohnhilfeBereichSozialstrukturVM BereichSozialstrukturVM
{
get { return _BereichSozialstrukturVM; }
set
{
if (!AreDifferent(BereichSozialstrukturVM, value))
return;
_BereichSozialstrukturVM = value;
FirePropertyChanged(nameof(BereichSozialstrukturVM));
}
}
protected override void InitByDataContract(CustomerWohnhilfeDC dc)
{
Displayname = "Test " + counter++;
_BereichBundVM = new CustomerWohnhilfeBereichBundVM(dc.BereichBundDC ?? (dc.BereichBundDC = new CustomerWohnhilfeBereichBundDC()));
_BereichEinkommenUndArbeitVM = new CustomerWohnhilfeBereichEinkommenUndArbeitVM(dc.BereichEinkommenUndArbeitDC ?? (dc.BereichEinkommenUndArbeitDC = new CustomerWohnhilfeBereichEinkommenUndArbeitDC())); ;
_BereichSozialeKontakteVM = new CustomerWohnhilfeBereichSozialeKontakteVM(dc.BereichSozialeKontakteDC ?? (dc.BereichSozialeKontakteDC = new CustomerWohnhilfeBereichSozialeKontakteDC()));
_BereichSozialstrukturVM = new CustomerWohnhilfeBereichSozialstrukturVM(dc.BereichSozialstrukturDC ?? (dc.BereichSozialstrukturDC = new CustomerWohnhilfeBereichSozialstrukturDC()));
}
protected override CustomerWohnhilfeDC MapToDataContract(CustomerWohnhilfeDC pDataContract, bool doCommit)
{
pDataContract.Dispalyname = _Displayname;
pDataContract.BereichBundDC = _BereichBundVM.CommitToDataContract();
pDataContract.BereichEinkommenUndArbeitDC = _BereichEinkommenUndArbeitVM.CommitToDataContract();
pDataContract.BereichSozialeKontakteDC = _BereichSozialeKontakteVM.CommitToDataContract();
pDataContract.BereichSozialstrukturDC = _BereichSozialstrukturVM.CommitToDataContract();
return pDataContract;
}
public void InitByViewModel(CustomerWohnhilfeVM old_vm)
{
if (old_vm is null)
return;
BereichBundVM.AlterAmStichtag = old_vm.BereichBundVM.AlterAmStichtag;
BereichBundVM.Angebot = old_vm.BereichBundVM.Angebot;
BereichBundVM.BerichtseinheitID = old_vm.BereichBundVM.BerichtseinheitID;
BereichBundVM.Geschlecht = old_vm.BereichBundVM.Geschlecht;
BereichBundVM.Haushaltsgrosse = old_vm.BereichBundVM.Haushaltsgrosse;
BereichBundVM.OrtDerEinrichtung = old_vm.BereichBundVM.OrtDerEinrichtung;
BereichBundVM.Unterbringungsart = old_vm.BereichBundVM.Unterbringungsart;
BereichBundVM.Verbandszugehorigkeit = old_vm.BereichBundVM.Verbandszugehorigkeit;
BereichEinkommenUndArbeitVM.BeginnAufstockungEinkommen = old_vm.BereichEinkommenUndArbeitVM.BeginnAufstockungEinkommen;
BereichEinkommenUndArbeitVM.BeginnBeschaftigungsstatus = old_vm.BereichEinkommenUndArbeitVM.BeginnBeschaftigungsstatus;
BereichEinkommenUndArbeitVM.BeginnEigenesBankkonto = old_vm.BereichEinkommenUndArbeitVM.BeginnEigenesBankkonto;
BereichEinkommenUndArbeitVM.BeginnEinkommenssituation = old_vm.BereichEinkommenUndArbeitVM.BeginnEinkommenssituation;
BereichEinkommenUndArbeitVM.Berufsabschluss = old_vm.BereichEinkommenUndArbeitVM.Berufsabschluss;
BereichEinkommenUndArbeitVM.DauerArbeitslosigkeit = old_vm.BereichEinkommenUndArbeitVM.DauerArbeitslosigkeit;
BereichEinkommenUndArbeitVM.EndeAufstockungEinkommen = old_vm.BereichEinkommenUndArbeitVM.EndeAufstockungEinkommen;
BereichEinkommenUndArbeitVM.EndeBeschaftigungsstatus = old_vm.BereichEinkommenUndArbeitVM.EndeBeschaftigungsstatus;
BereichEinkommenUndArbeitVM.EndeEigenesBankkonto = old_vm.BereichEinkommenUndArbeitVM.EndeEigenesBankkonto;
BereichEinkommenUndArbeitVM.EndeEinkommenssituation = old_vm.BereichEinkommenUndArbeitVM.EndeEinkommenssituation;
BereichEinkommenUndArbeitVM.ErwerbsfahigkeitSinnSGB = old_vm.BereichEinkommenUndArbeitVM.ErwerbsfahigkeitSinnSGB;
BereichEinkommenUndArbeitVM.Uberschuldung = old_vm.BereichEinkommenUndArbeitVM.Uberschuldung;
BereichSozialeKontakteVM.BeginnKontaktArzt = old_vm.BereichSozialeKontakteVM.BeginnKontaktArzt;
BereichSozialeKontakteVM.BeginnKontaktFreundenBekannten = old_vm.BereichSozialeKontakteVM.BeginnKontaktFreundenBekannten;
BereichSozialeKontakteVM.BeginnKontaktMindKinder = old_vm.BereichSozialeKontakteVM.BeginnKontaktMindKinder;
BereichSozialeKontakteVM.BeginnKontaktPartner = old_vm.BereichSozialeKontakteVM.BeginnKontaktPartner;
BereichSozialeKontakteVM.BeginnKontaktSelbsthilfe = old_vm.BereichSozialeKontakteVM.BeginnKontaktSelbsthilfe;
BereichSozialeKontakteVM.BeginnKontaktSonstige = old_vm.BereichSozialeKontakteVM.BeginnKontaktSonstige;
BereichSozialeKontakteVM.BeginnKontaktVolljahrKinderElternVerwandten = old_vm.BereichSozialeKontakteVM.BeginnKontaktVolljahrKinderElternVerwandten;
BereichSozialeKontakteVM.BeginnKrankenversicherung = old_vm.BereichSozialeKontakteVM.BeginnKrankenversicherung;
BereichSozialeKontakteVM.BeginnSozialeKontakte = old_vm.BereichSozialeKontakteVM.BeginnSozialeKontakte;
BereichSozialeKontakteVM.EndeKontaktArzt = old_vm.BereichSozialeKontakteVM.EndeKontaktArzt;
BereichSozialeKontakteVM.EndeKontaktFreundenBekannten = old_vm.BereichSozialeKontakteVM.EndeKontaktFreundenBekannten;
BereichSozialeKontakteVM.EndeKontaktMindKinder = old_vm.BereichSozialeKontakteVM.EndeKontaktMindKinder;
BereichSozialeKontakteVM.EndeKontaktPartner = old_vm.BereichSozialeKontakteVM.EndeKontaktPartner;
BereichSozialeKontakteVM.EndeKontaktSelbsthilfe = old_vm.BereichSozialeKontakteVM.EndeKontaktSelbsthilfe;
BereichSozialeKontakteVM.EndeKontaktSonstige = old_vm.BereichSozialeKontakteVM.EndeKontaktSonstige;
BereichSozialeKontakteVM.EndeKontaktVolljahrKinderElternVerwandten = old_vm.BereichSozialeKontakteVM.EndeKontaktVolljahrKinderElternVerwandten;
BereichSozialeKontakteVM.EndeKrankenversicherung = old_vm.BereichSozialeKontakteVM.EndeKrankenversicherung;
BereichSozialeKontakteVM.EndeSozialeKontakte = old_vm.BereichSozialeKontakteVM.EndeSozialeKontakte;
BereichSozialeKontakteVM.VorlageSchwerbehindertenausweises = old_vm.BereichSozialeKontakteVM.VorlageSchwerbehindertenausweises;
BereichSozialstrukturVM.Bundesland = old_vm.BereichSozialstrukturVM.Bundesland;
BereichSozialstrukturVM.IsWohnungslosenhilfeSafe = old_vm.BereichSozialstrukturVM.IsWohnungslosenhilfe;
BereichSozialstrukturVM.IsStraffaligenhilfeSafe = old_vm.BereichSozialstrukturVM.IsStraffaligenhilfe;
BereichSozialstrukturVM.ArtDerBeendigung = old_vm.BereichSozialstrukturVM.ArtDerBeendigung;
BereichSozialstrukturVM.ArtDesHilfeangebots = old_vm.BereichSozialstrukturVM.ArtDesHilfeangebots;
BereichSozialstrukturVM.Betreuungsbeginn = old_vm.BereichSozialstrukturVM.Betreuungsbeginn;
BereichSozialstrukturVM.Betreuungsende = old_vm.BereichSozialstrukturVM.Betreuungsende;
BereichSozialstrukturVM.BetreuungsdauerInTagen = old_vm.BereichSozialstrukturVM.BetreuungsdauerInTagen;
BereichSozialstrukturVM.Geburtsdatum = old_vm.BereichSozialstrukturVM.Geburtsdatum;
BereichSozialstrukturVM.Geschlechtidentitat = old_vm.BereichSozialstrukturVM.Geschlechtidentitat;
BereichSozialstrukturVM.Staatsangehorigkeit = old_vm.BereichSozialstrukturVM.Staatsangehorigkeit;
BereichSozialstrukturVM.Aufenthaltsstatus = old_vm.BereichSozialstrukturVM.Aufenthaltsstatus;
BereichSozialstrukturVM.HochsterSchulabschluss = old_vm.BereichSozialstrukturVM.HochsterSchulabschluss;
BereichSozialstrukturVM.Migrationshintergrund = old_vm.BereichSozialstrukturVM.Migrationshintergrund;
BereichSozialstrukturVM.Familienstand = old_vm.BereichSozialstrukturVM.Familienstand;
BereichSozialstrukturVM.Haushaltsstruktur = old_vm.BereichSozialstrukturVM.Haushaltsstruktur;
BereichSozialstrukturVM.EigeneMindKinderAuserhalbHaushaltsstruktur = old_vm.BereichSozialstrukturVM.EigeneMindKinderAuserhalbHaushaltsstruktur;
}
}
}

85
BeWo/ViewModel/ImageVM.cs Normal file
View File

@@ -0,0 +1,85 @@
using System;
using System.Windows.Media.Imaging;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
namespace BeWo.ViewModel
{
public class ImageVM : AbstractDCMapperVM<ImageDC>
{
private string _Filename;
private string _Fullname;
private byte[] _Original;
private byte[] _MediumThumbnail;
private byte[] _SmallThumbnail;
public ImageVM() : this(new ImageDC())
{
}
public ImageVM(ImageDC dc) : base(dc, dc.Oid == null)
{
}
public string Filename
{
get { return _Filename; }
set
{
if (!AreDifferent(_Filename, value))
return;
_Filename = value;
StoreDirtyInformation(AreDifferent(DataContract.Filename, value), nameof(Filename));
FirePropertyChanged(nameof(Filename));
}
}
public string Fullname
{
get { return _Fullname; }
set
{
if (!AreDifferent(_Fullname, value))
return;
_Fullname = value;
StoreDirtyInformation(AreDifferent(DataContract.Fullname, value), nameof(Fullname));
FirePropertyChanged(nameof(Fullname));
}
}
public byte[] Original
{
get { return _Original; }
set
{
if (!AreDifferent(_Original, value))
return;
_Original = value;
StoreDirtyInformation(AreDifferent(DataContract.Original, value), nameof(Original));
FirePropertyChanged(nameof(Original));
FirePropertyChanged(nameof(BitmapImage));
}
}
public BitmapImage BitmapImage => Utils.CreateBitmapImageFromByteArray(Original);
protected override void InitByDataContract(ImageDC pDataContract)
{
_Filename = pDataContract.Filename;
_Fullname = pDataContract.Fullname;
_Original = pDataContract.Original;
}
protected override ImageDC MapToDataContract(ImageDC pDataContract, bool doCommit)
{
pDataContract.Filename = _Filename;
pDataContract.Fullname = _Fullname;
pDataContract.Original = _Original;
return pDataContract;
}
}
}

View File

@@ -3,14 +3,13 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using BS.Shared.Extensions;
namespace BeWo.ViewModel.ListViewModel
{
public abstract class AbstractDCListMapperVM<DCType, VMType> : AbstractBaseVM where VMType : AbstractDCMapperVM<DCType> where DCType : new()
{
#region Constants and Fields
public static string PropertyName_EditVM = "EditVM";
@@ -22,11 +21,22 @@ namespace BeWo.ViewModel.ListViewModel
private VMType _NewVM;
private VMType _SelectedVM;
private BindingList<VMType> _VMList;
#endregion
//public AbstractDCListMapperVM(IEnumerable<AbstractDCListMapperVM<DCType, VMType>> listVMs, bool ignore)
//{
// var dcLists = listVMs.SelectMany(x => x.DCBackup);
#region Constructors and Destructors
// _DCBackup = dcLists != null ? dcLists.ToObservableCollection() : new ObservableCollection<DCType>();
// _DCBackup.CollectionChanged += (s, e) => _VMList.AddRange(e.NewItems.Cast<DCType>().Select(CreateVM));
// var vmLists = listVMs.SelectMany(x => x.VMList).ToList();
// _VMList = new BindingList<VMType>(vmLists);
//}
public AbstractDCListMapperVM(IEnumerable<DCType> pDCList)
{
@@ -37,9 +47,6 @@ namespace BeWo.ViewModel.ListViewModel
public AbstractDCListMapperVM() : this(null) {}
#endregion
#region Properties
public virtual int AddedCount
{
@@ -79,6 +86,16 @@ namespace BeWo.ViewModel.ListViewModel
}
}
public VMType SelectedVM
{
get => _SelectedVM;
set
{
_SelectedVM = value;
FirePropertyChanged(nameof(SelectedVM));
}
}
public override bool IsDirty
{
get
@@ -136,34 +153,47 @@ namespace BeWo.ViewModel.ListViewModel
}
}
#endregion
#region Public Methods
public VMType AddNewVMToList()
public virtual VMType AddNewVMToList()
{
this.VMList.Add(this.NewVM);
VMList.Add(NewVM);
// VMList.Sort();
VMType lVM = this.NewVM;
this.NewVM = null;
VMType lVM = NewVM;
NewVM = null;
// FirePropertyChanged("VMList");
//FirePropertyChanged("VMList");
return lVM;
}
public VMType AddNewVMToList(bool pSetAsEdit)
{
this._VMList.Add(this._NewVM);
_VMList.Add(_NewVM);
// _VMList.Sort();
if (pSetAsEdit)
{
this.EditVM = this._NewVM;
EditVM = _NewVM;
}
this.NewVM = null;
return this.EditVM;
NewVM = null;
return EditVM;
}
public VMType AddNewVMToListAndSelect(bool auto_select)
{
// Wichtig! NewVM, wenn _NewVM null ist
_VMList.Add(NewVM);
// _VMList.Sort();
if (auto_select)
{
SelectedVM = _NewVM;
}
FirePropertyChanged(nameof(VMList));
NewVM = null;
return SelectedVM;
}
public virtual List<DCType> CommitAdded()
@@ -194,14 +224,26 @@ namespace BeWo.ViewModel.ListViewModel
this.EditVM = null;
}
public void DeleteSelectedVM(string displayname = null)
{
if (displayname is object)
{
var res = MessageBox.Show($"Möchten Sie {displayname} wirklich löschen?", "Löschen bestätigen", MessageBoxButton.YesNo);
if (res != MessageBoxResult.Yes)
return;
}
VMList.Remove(SelectedVM);
FirePropertyChanged(nameof(VMList));
}
public virtual List<DCType> GetRemoved()
{
return this._DCBackup.Where(dc => !this._VMList.Select(vm => vm.DataContract).Contains(dc)).ToList();
}
#endregion
#region Methods
protected virtual VMType CreateVM(DCType pDC)
{
@@ -209,7 +251,5 @@ namespace BeWo.ViewModel.ListViewModel
return lConstr.Invoke(new object[] { pDC }) as VMType;
}
#endregion
}
}

View File

@@ -0,0 +1,22 @@
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.ViewModel.ListViewModel
{
public abstract class AbstractListVM<DCType, VMType> : AbstractDCListMapperVM<DCType, VMType> where VMType : AbstractDCMapperVM<DCType> where DCType : new()
{
public DelegateCommand AddVMCommand { get; set; }
public DelegateCommand DeleteSelectedVMCommand { get; set; }
public DelegateCommand CopySelectedVMCommand { get; set; }
public AbstractListVM(IEnumerable<DCType> pDCList) : base(pDCList)
{
}
public AbstractListVM() : base() { }
}
}

View File

@@ -0,0 +1,62 @@
using BS.Shared.Core;
using BS.Shared.DataContracts;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.ViewModel.ListViewModel
{
public class CustomerGemeinnutzigeArbeitListVM : AbstractListVM<FalldatenDC, CustomerGemeinnutzigeArbeitVM>
{
private ObservableSortCollection<ValueListEntryDC> _Auftragsherkunfte;
private ObservableSortCollection<ValueListEntryDC> _Vermittlungsgrundlagen;
public CustomerGemeinnutzigeArbeitListVM(IEnumerable<FalldatenDC> arbeiten) : base(arbeiten)
{
AddVMCommand = new DelegateCommand(() => AddNewVMToListAndSelect(true), CanAddVM);
DeleteSelectedVMCommand = new DelegateCommand(() => DeleteSelectedVM($"Aktenzeichen '{SelectedVM.EigenesAktenzeichen}'"));
// CopySelectedVMCommand = new DelegateCommand(CopySelectedWohnhilfe);
}
public ObservableSortCollection<ValueListEntryDC> Auftragsherkunfte
{
get { return _Auftragsherkunfte; }
set
{
if (!AreDifferent(Auftragsherkunfte, value))
return;
_Auftragsherkunfte = value;
FirePropertyChanged(nameof(Auftragsherkunfte));
}
}
public ObservableSortCollection<ValueListEntryDC> Vermittlungsgrundlagen
{
get { return _Vermittlungsgrundlagen; }
set
{
if (!AreDifferent(Vermittlungsgrundlagen, value))
return;
_Vermittlungsgrundlagen = value;
FirePropertyChanged(nameof(Vermittlungsgrundlagen));
}
}
public bool CanAddVM()
{
return BeWoApp.HasLoggedOnUserRight(BS.Shared.UserRightType.Customer_GemeinnutzigeArbeit_Create); ;
}
internal void InitValueListEntrys(ObservableSortCollection<ValueListEntryDC> auftragsherkunfte, ObservableSortCollection<ValueListEntryDC> vermittlungsgrundlage)
{
_Auftragsherkunfte = auftragsherkunfte;
_Vermittlungsgrundlagen = vermittlungsgrundlage;
}
}
}

View File

@@ -0,0 +1,86 @@
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Wohnhilfe;
using DevExpress.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.ViewModel.ListViewModel
{
public class CustomerWohnhilfeListVM : AbstractListVM<CustomerWohnhilfeDC, CustomerWohnhilfeVM>
{
private bool _IsLarge;
public DelegateCommand InsertDetailsCommand { get; set; }
public CustomerVM Customer { get; set; }
public CustomerWohnhilfeListVM() { }
public CustomerWohnhilfeListVM(CustomerVM vm, IEnumerable<CustomerWohnhilfeDC> wohnhilfe) : base(wohnhilfe)
{
Customer = vm;
AddVMCommand = new DelegateCommand(() => AddNewVMToListAndSelect(true), CanAddWohnhilfe);
DeleteSelectedVMCommand = new DelegateCommand(() => DeleteSelectedVM($"Wohnhilfe '{SelectedVM.Displayname}'"));
CopySelectedVMCommand = new DelegateCommand(CopySelectedWohnhilfe);
InsertDetailsCommand = new DelegateCommand(InsertDetails);
_IsLarge = true;
}
public bool IsLarge
{
get { return _IsLarge; }
set
{
if (!AreDifferent(IsLarge, value))
return;
_IsLarge = value;
FirePropertyChanged(nameof(IsLarge));
}
}
public void CopySelectedWohnhilfe()
{
var old_vm = SelectedVM;
var new_vm = AddNewVMToListAndSelect(true);
new_vm.InitByViewModel(old_vm);
}
public void InsertDetails()
{
var selected_vm = SelectedVM;
selected_vm.BereichSozialstrukturVM.Geburtsdatum = Customer.DateOfBirth;
if (Customer.IsMale)
selected_vm.BereichBundVM.Geschlecht = Geschlecht.Mannlich;
else if (Customer.IsFemale)
selected_vm.BereichBundVM.Geschlecht = Geschlecht.Weiblich;
else if (Customer.IsDivers)
selected_vm.BereichBundVM.Geschlecht = Geschlecht.Divers;
else
selected_vm.BereichBundVM.Geschlecht = Geschlecht.OhneAngabe;
if (Customer.IsMigrant)
selected_vm.BereichSozialstrukturVM.Migrationshintergrund = WohnhilfeBoolData.Ja;
else
selected_vm.BereichSozialstrukturVM.Migrationshintergrund = WohnhilfeBoolData.Nein;
}
public bool CanAddWohnhilfe()
{
return BeWoApp.HasLoggedOnUserRight(UserRightType.Customer_Wohnhilfe_Create);
}
}
}

View File

@@ -0,0 +1,17 @@
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BeWo.ViewModel.ListViewModel
{
public class ImageListVM : AbstractDCListMapperVM<ImageDC, ImageVM>
{
public ImageListVM(List<ImageDC> pDCs) : base(pDCs)
{
}
}
}

View File

@@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace BeWo.ViewModel.ListViewModel
{
public class WohneinheitBelegungListVM : AbstractDCListMapperVM<WohneinheitBelegungDC, WohneinheitBelegungVM>
{
private WohneinheitBelegungVM _Current;
/// <summary>
/// Gesamte Liste
/// </summary>
/// <param name="listVMs"></param>
/// <param name="list"></param>
public WohneinheitBelegungListVM(List<WohneinheitBelegungDC> listDCs) : base(listDCs)
{
}
public WohneinheitBelegungVM CurrentVM
{
get => _Current;
set
{
if (!AreDifferent(CurrentVM, value))
return;
_Current = value;
FirePropertyChanged(nameof(CurrentVM));
}
}
public override WohneinheitBelegungVM AddNewVMToList()
{
// Gesamt Liste -> Beleg VM
var vm = base.AddNewVMToList();
CurrentVM = null;
return vm;
}
public void CloseEditVM()
{
EditVM = null;
CurrentVM = null;
}
public void CloseNewVM()
{
NewVM = null;
CurrentVM = null;
}
public void CloseCurrentVM()
{
if (CurrentVM == EditVM)
CloseEditVM();
else
CloseNewVM();
}
}
}

View File

@@ -0,0 +1,106 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Windows;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace BeWo.ViewModel.ListViewModel
{
public class WohneinheitListVM : AbstractDCListMapperVM<WohneinheitDC, WohneinheitVM>
{
private WohneinheitVM _CurrentVM;
private BindingList<string> _Wohnungsnamen;
public WohneinheitListVM() : base(null)
{
}
public WohneinheitListVM(List<WohneinheitDC> pDCs) : base(pDCs)
{
_Wohnungsnamen = new BindingList<string>(GetWohnungsnamen());
}
public WohneinheitVM CurrentVM
{
get => _CurrentVM;
set
{
if (!AreDifferent(_CurrentVM, value))
return;
_CurrentVM = value;
FirePropertyChanged(nameof(CurrentVM));
}
}
public BindingList<string> Wohnungsnamen => _Wohnungsnamen;
public List<string> GetWohnungsnamen() => VMList?
.Where(x => !string.IsNullOrEmpty(x.Wohnname))
.Where(x => !string.IsNullOrEmpty(x.Zimmername))
.Select(x => x.Wohnname)?
.Distinct()
.OrderBy(x => x)
.ToList() ?? new List<string>();
public override WohneinheitVM AddNewVMToList()
{
var vm = base.AddNewVMToList();
CurrentVM = null;
_Wohnungsnamen.Clear();
_Wohnungsnamen.AddRange(GetWohnungsnamen());
FirePropertyChanged(nameof(VMList));
return vm;
}
public override bool IsDirty => base.IsDirty;
public void CloseEditVM()
{
EditVM = null;
CurrentVM = null;
_Wohnungsnamen.Clear();
_Wohnungsnamen.AddRange(GetWohnungsnamen());
}
public void ResetNewVM()
{
NewVM = null;
CurrentVM = null;
}
public void AskRemoveEditVM()
=> AskRemoveVM(EditVM);
public void AskRemoveVM(WohneinheitVM vm)
{
if (vm is null)
return;
if (MessageBox.Show($"Möchten Sie Wohneinheit '{vm}' wirklich löschen?", "", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
{
RemoveVM(vm);
}
}
internal void RemoveVM(WohneinheitVM vm)
{
VMList.Remove(vm);
FirePropertyChanged(nameof(VMList));
}
}
}

View File

@@ -542,15 +542,18 @@ namespace BeWo.ViewModel
}
else
{
foreach (var ap in ApprovalPeriodList.VMList)
if (!BeWoApp.AppSettings.DontUpdateApprovalPeriodDates)
{
if (!ap.StartDate.HasValue || ap.StartDate < this.StartDate)
foreach (var ap in ApprovalPeriodList.VMList)
{
ap.StartDate = this.StartDate;
}
if (!ap.EndDate.HasValue || ap.EndDate > this.EndDate)
{
ap.EndDate = this.EndDate;
if (!ap.StartDate.HasValue || ap.StartDate < this.StartDate)
{
ap.StartDate = this.StartDate;
}
if (!ap.EndDate.HasValue || ap.EndDate > this.EndDate)
{
ap.EndDate = this.EndDate;
}
}
}
}

View File

@@ -29,23 +29,23 @@ namespace BeWo.ViewModel
ServiceFacade.DoCustomerServiceAsync(s => s.GetAllAbsenceReasons(), cb => pCallBack(new AbsenceTimeListVM(pDCs, cb.Where(a => !a.Sichtbarkeit.HasValue || a.Sichtbarkeit.Value == AbsenceReasonVisibilityType.All || a.Sichtbarkeit.Value == type).ToList())));
}
public static AbsenceTimeListVM CreateAbsenceTimeListVM(IEnumerable<AbsenceTimeDC> pDCs, AbsenceReasonVisibilityType? type)
{
var list = ServiceFacade.DoCustomerServiceSync(s => s.GetAllAbsenceReasons());
public static AbsenceTimeListVM CreateAbsenceTimeListVM(IEnumerable<AbsenceTimeDC> pDCs, AbsenceReasonVisibilityType? type)
{
var list = ServiceFacade.DoCustomerServiceSync(s => s.GetAllAbsenceReasons());
return new AbsenceTimeListVM(pDCs, list.Where(a => !a.Sichtbarkeit.HasValue || a.Sichtbarkeit.Value == AbsenceReasonVisibilityType.All || a.Sichtbarkeit.Value == type).ToList());
}
return new AbsenceTimeListVM(pDCs, list.Where(a => !a.Sichtbarkeit.HasValue || a.Sichtbarkeit.Value == AbsenceReasonVisibilityType.All || a.Sichtbarkeit.Value == type).ToList());
}
public static void CreateOvertimeListVMAsync(IEnumerable<OvertimeDC> pDCs, Action<OvertimeListVM> pCallBack)
{
//ServiceFacade.DoValueListServiceAsync(v => v.GetAllValueListEntrysByType(ValueListEntryType.Auszahlungsart), cb => pCallBack(new OvertimeListVM(pDCs)));
ServiceFacade.DoEmployeeServiceAsync(v => v.GetAllOvertimes(), cb => pCallBack(new OvertimeListVM(pDCs)));
}
public static void CreateOvertimeListVMAsync(IEnumerable<OvertimeDC> pDCs, Action<OvertimeListVM> pCallBack)
{
//ServiceFacade.DoValueListServiceAsync(v => v.GetAllValueListEntrysByType(ValueListEntryType.Auszahlungsart), cb => pCallBack(new OvertimeListVM(pDCs)));
ServiceFacade.DoEmployeeServiceAsync(v => v.GetAllOvertimes(), cb => pCallBack(new OvertimeListVM(pDCs)));
}
public static void CreateAccountingBookingVMAsnyc(Action<AccountingBookingVM> pCallBack)
{
Cache.GetInstance().GetSupportConceptTree(
tree => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.AccountingTransactionType, categories => pCallBack(new AccountingBookingVM(tree, categories))));
tree => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.AccountingTransactionType, categories => pCallBack(new AccountingBookingVM(tree, categories))));
}
public static void CreateAccountingTransactionListVMAsnyc(DateTimeSpan pSpan, long? pSupportConceptOid, long? pCostBearerSupportConceptRelOid, Action<AccountingTransactionListVM> pCallBack)
@@ -69,10 +69,10 @@ namespace BeWo.ViewModel
ServiceFacade.DoResourceServiceAsync(s => s.GetAllBookings(pSpan.StartDateTime, pSpan.EndDateTime), r => pCallBack(new BookingVM(r)));
}
public static CustomerEmployeeRelationListVM CreateCustomerEmployeeRelationListVM(List<CustomerEmployeeRelationDC> pList)
public static CustomerEmployeeRelationListVM CreateCustomerEmployeeRelationListVM(List<CustomerEmployeeRelationDC> pList)
{
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(ValueListEntryType.StaffRoleType);
return new CustomerEmployeeRelationListVM(pList, valueList);
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(ValueListEntryType.StaffRoleType);
return new CustomerEmployeeRelationListVM(pList, valueList);
}
public static WohnheimEmployeeRelationListVM CreateWohnheimEmployeeRelationListVM(List<WohnheimEmployeeRelationDC> pList)
@@ -98,37 +98,37 @@ namespace BeWo.ViewModel
pCallBack(new OrganisationPersonRelationListVM(pDCs));
}
public static CustomerPersonRelationListVM CreateCustomerEnvironmentPersonRelListVM(List<CustomerPersonRelationDC> pList, ValueListEntryType vtype)
public static CustomerPersonRelationListVM CreateCustomerEnvironmentPersonRelListVM(List<CustomerPersonRelationDC> pList, ValueListEntryType vtype)
{
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(vtype);
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(vtype);
return new CustomerPersonRelationListVM(pList, valueList);
return new CustomerPersonRelationListVM(pList, valueList);
}
public static void CreateCustomerEnvironmentOrganisationRelListVMAsync(List<CustomerOrganisationRelationDC> pList, Action<CustomerOrganisationRelationListVM> pCallBack)
{
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.EnvironmentOrganisationType, r => pCallBack(new CustomerOrganisationRelationListVM(pList, r)));
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.EnvironmentOrganisationType, r => pCallBack(new CustomerOrganisationRelationListVM(pList, r)));
}
public static CustomerOrganisationRelationListVM CreateCustomerEnvironmentOrganisationRelListVM(List<CustomerOrganisationRelationDC> pList)
{
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(ValueListEntryType.EnvironmentOrganisationType);
public static CustomerOrganisationRelationListVM CreateCustomerEnvironmentOrganisationRelListVM(List<CustomerOrganisationRelationDC> pList)
{
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(ValueListEntryType.EnvironmentOrganisationType);
return new CustomerOrganisationRelationListVM(pList, valueList);
}
return new CustomerOrganisationRelationListVM(pList, valueList);
}
public static MedikamentenverordnungslisteListVM CreateMedikementenverordnungslisteListVM(IEnumerable<MedikamentenverordnungslisteDC> pList)
{
var darreichungsformen = ServiceFacade.DoCustomerServiceSync(s => s.GetAllDarreichungsformen());
var depotrhythmen = ServiceFacade.DoCustomerServiceSync(s => s.GetAllDepotRhythmen());
public static MedikamentenverordnungslisteListVM CreateMedikementenverordnungslisteListVM(IEnumerable<MedikamentenverordnungslisteDC> pList)
{
var darreichungsformen = ServiceFacade.DoCustomerServiceSync(s => s.GetAllDarreichungsformen());
var depotrhythmen = ServiceFacade.DoCustomerServiceSync(s => s.GetAllDepotRhythmen());
return new MedikamentenverordnungslisteListVM(pList, darreichungsformen, depotrhythmen);
}
return new MedikamentenverordnungslisteListVM(pList, darreichungsformen, depotrhythmen);
}
public static BargeldtransaktionsListVM CreateBargeldtransaktionsListVM(IEnumerable<BargeldtransaktionDC> pList)
{
return new BargeldtransaktionsListVM(pList);
}
public static BargeldtransaktionsListVM CreateBargeldtransaktionsListVM(IEnumerable<BargeldtransaktionDC> pList)
{
return new BargeldtransaktionsListVM(pList);
}
public static void CreateCustomerVMAsync(long pOid, Action<CustomerVM> pCallBack)
{
@@ -138,12 +138,12 @@ namespace BeWo.ViewModel
public static void CreateCustomerVMAsync(Action<CustomerVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(
s => s.GetVarFieldDefs(TableID.Customer),
s => s.GetVarFieldDefs(TableID.Customer),
cb => CreateCustomerVMAsync(
new CustomerDC
{
CustomerVarFields = cb
},
{
CustomerVarFields = cb
},
pCallBack));
}
@@ -152,13 +152,13 @@ namespace BeWo.ViewModel
if (BeWoApp.ICD10Diagnosis == null)
{
ServiceFacade.DoOperationsServiceAsync(
s => s.GetCompressedICD10Diagnosis(),
s => s.GetCompressedICD10Diagnosis(),
st =>
{
st = Utils.Decompress(st);
var ds = st.Split(Environment.NewLine).ToDictionary(line => line.Substring(0, line.IndexOf(';')), line => line.Substring(line.IndexOf(';') + 1));
BeWoApp.ICD10Diagnosis = ds;
BeWoApp.ICD10Diagnosis = ds;
InternalCreateCustomerVM(pCustomerDC, pCallBack);
});
}
@@ -171,7 +171,7 @@ namespace BeWo.ViewModel
public static void CreateEmployeeVMAsync(long pOid, Action<EmployeeVM> pCallBack)
{
ServiceFacade.DoEmployeeServiceAsync(
s => s.LoadEmployee(pOid),
s => s.LoadEmployee(pOid),
r =>
{
CreateEmployeeVMAsync(r, pCallBack);
@@ -180,32 +180,32 @@ namespace BeWo.ViewModel
public static void CreateEmployeeVMAsync(EmployeeDC pEmployeeDC, Action<EmployeeVM> pCallBack)
{
ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllEmploymentTypes(),
r1 =>
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.StaffQualificationsType,
r2 =>
Cache.GetInstance()
.GetAllValueListEntrysByTypeAsync(ValueListEntryType.StaffActivityFocusType,
r3 =>
Cache.GetInstance()
.GetAllValueListEntrysByTypeAsync(ValueListEntryType.ContractType,
r4 =>
Cache.GetInstance()
.GetAllValueListEntrysByTypeAsync(ValueListEntryType.Nationality,
nat =>
ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllEmploymentTypes(),
r1 =>
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.StaffQualificationsType,
r2 =>
Cache.GetInstance()
.GetAllValueListEntrysByTypeAsync(ValueListEntryType.StaffActivityFocusType,
r3 =>
Cache.GetInstance()
.GetAllValueListEntrysByTypeAsync(ValueListEntryType.ContractType,
r4 =>
Cache.GetInstance()
.GetAllValueListEntrysByTypeAsync(ValueListEntryType.Nationality,
nat =>
Cache.GetInstance()
.GetAllValueListEntrysByTypeAsync(ValueListEntryType.NotizenKategorieEmployee,
r7 =>
ServiceFacade.DoEmployeeServiceAsync(
e =>
e.GetAllAuszahlungsarten(),
r6 =>
ServiceFacade.DoOperationsServiceAsync(
s =>
s.GetSbdConfig(),
config =>
pCallBack(new EmployeeVM(pEmployeeDC, r1, nat, r2, r3, r6, r4, config.Stundensaetze, r7))))))))));
ServiceFacade.DoEmployeeServiceAsync(
e =>
e.GetAllAuszahlungsarten(),
r6 =>
ServiceFacade.DoOperationsServiceAsync(
s =>
s.GetSbdConfig(),
config =>
pCallBack(new EmployeeVM(pEmployeeDC, r1, nat, r2, r3, r6, r4, config.Stundensaetze, r7))))))))));
}
public static void CreateEmployeeVMAsync(Action<EmployeeVM> pCallBack)
@@ -213,30 +213,30 @@ namespace BeWo.ViewModel
CreateEmployeeVMAsync(new EmployeeDC(), pCallBack);
}
public static void CreateWohnheimVMAsync(long pOid, Action<WohnheimVM> pCallBack)
public static void CreateWohnheimVMAsync(long pOid, List<CompactCustomerDC> customers, Action<WohnheimVM> pCallBack)
{
ServiceFacade.DoWohnheimServiceAsync(
s => s.LoadWohnheim(pOid),
r =>
{
CreateWohnheimVMAsync(r, pCallBack);
CreateWohnheimVMAsync(r, customers, pCallBack);
});
}
public static void CreateWohnheimVMAsync(WohnheimDC pWohnheimDC, Action<WohnheimVM> pCallBack)
public static void CreateWohnheimVMAsync(WohnheimDC pWohnheimDC, List<CompactCustomerDC> customers, Action<WohnheimVM> pCallBack)
{
pCallBack(new WohnheimVM(pWohnheimDC));
pCallBack(new WohnheimVM(pWohnheimDC, customers));
}
public static void CreateWohnheimVMAsync(Action<WohnheimVM> pCallBack)
public static void CreateWohnheimVMAsync(List<CompactCustomerDC> customers, Action<WohnheimVM> pCallBack)
{
CreateWohnheimVMAsync(new WohnheimDC(), pCallBack);
CreateWohnheimVMAsync(new WohnheimDC(), customers, pCallBack);
}
public static void CreateEquityInvoiceBaselListVMAsync(long supportconeptOid, Action<InvoiceBaseListVM> callback)
{
ServiceFacade.DoAccountingServiceAsync(
s => s.GetInvoiceBasesForSupportConcept(InvoiceType.CustomerEquity, supportconeptOid),
s => s.GetInvoiceBasesForSupportConcept(InvoiceType.CustomerEquity, supportconeptOid),
r =>
{
r.Sort(
@@ -263,7 +263,7 @@ namespace BeWo.ViewModel
if (organisation != null)
{
ServiceFacade.DoAccountingServiceAsync(
s => s.GetGeneralInvoiceBasesForOrganisation(organisation.OrganisationOid),
s => s.GetGeneralInvoiceBasesForOrganisation(organisation.OrganisationOid),
r =>
{
r.Sort(
@@ -287,7 +287,7 @@ namespace BeWo.ViewModel
else if (person != null)
{
ServiceFacade.DoAccountingServiceAsync(
s => s.GetGeneralInvoiceBasesForPerson(person.PersonOid),
s => s.GetGeneralInvoiceBasesForPerson(person.PersonOid),
r =>
{
r.Sort(
@@ -311,7 +311,7 @@ namespace BeWo.ViewModel
else if (customer != null)
{
ServiceFacade.DoAccountingServiceAsync(
s => s.GetGeneralInvoiceBasesForCustomer(customer.CustomerOid),
s => s.GetGeneralInvoiceBasesForCustomer(customer.CustomerOid),
r =>
{
r.Sort(
@@ -337,7 +337,7 @@ namespace BeWo.ViewModel
public static void CreateInvoiceListVMAsync(Action<InvoiceListVM> callback)
{
ServiceFacade.DoCustomerServiceAsync(
s1 => s1.GetAllActiveSupportConceptsCompact(),
s1 => s1.GetAllActiveSupportConceptsCompact(),
r1 =>
ServiceFacade.DoCustomerServiceAsync(
s2 => s2.GetAllActiveOrganisationsCompact(), r2 => ServiceFacade.DoOperationsServiceAsync(s3 => s3.GetAllActiveInvoices(), r3 => callback(new InvoiceListVM(r2, r1, r3)))));
@@ -352,49 +352,49 @@ namespace BeWo.ViewModel
{
ServiceFacade.DoCustomerServiceAsync(
s => s.LoadOrganisation(pOid),
r1 => ServiceFacade.DoValueListServiceAsync(s1 => s1.GetAllValueListEntrysByType(ValueListEntryType.StaffQualificationsType),r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.OrganisationFunctionType,
r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType,
r3 => pCallBack(new OrganisationVM(r1,r2,r4,r3))))));
r1 => ServiceFacade.DoValueListServiceAsync(s1 => s1.GetAllValueListEntrysByType(ValueListEntryType.StaffQualificationsType), r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.OrganisationFunctionType,
r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType,
r3 => pCallBack(new OrganisationVM(r1, r2, r4, r3))))));
}
public static void CreateOrganisationVMAsync(Action<OrganisationVM> pCallBack)
{
ServiceFacade.DoValueListServiceAsync(
s1 => s1.GetAllValueListEntrysByType(ValueListEntryType.StaffQualificationsType),
r1 =>
ServiceFacade.DoOperationsServiceAsync(
s => s.GetVarFieldDefs(TableID.Organisation),
r2 =>Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ServiceFacade.DoValueListServiceAsync(
s1 => s1.GetAllValueListEntrysByType(ValueListEntryType.StaffQualificationsType),
r1 =>
ServiceFacade.DoOperationsServiceAsync(
s => s.GetVarFieldDefs(TableID.Organisation),
r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.OrganisationFunctionType,
r4 =>Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.RoleInOrganisationType,
r3 => pCallBack(new OrganisationVM(
new OrganisationDC
{
VarFields = r2
}, r1,r4,r3))))));
r3 => pCallBack(new OrganisationVM(
new OrganisationDC
{
VarFields = r2
}, r1, r4, r3))))));
}
//public static void CreatePersonOrganisationRelationVMAsync(CompactOrganisationDC pOrganisation, Action<PersonOrganisationRelationVM> pCallBack)
//{
// pCallBack(
// new PersonOrganisationRelationVM(
// new Organisation2PersonDC
// {
// OrganisationOid = pOrganisation.OrganisationOid,
// OrganisationName = pOrganisation.Name,
// OrganisationVersion = pOrganisation.OrganisationVersion
// }));
//}
//public static void CreatePersonOrganisationRelationVMAsync(CompactOrganisationDC pOrganisation, Action<PersonOrganisationRelationVM> pCallBack)
//{
// pCallBack(
// new PersonOrganisationRelationVM(
// new Organisation2PersonDC
// {
// OrganisationOid = pOrganisation.OrganisationOid,
// OrganisationName = pOrganisation.Name,
// OrganisationVersion = pOrganisation.OrganisationVersion
// }));
//}
public static void CreatePersonVMAsync(Action<PersonVM> pCallBack)
{
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.TitleType,
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.TitleType,
r1 =>
ServiceFacade.DoOperationsServiceAsync(
s => s.GetVarFieldDefs(TableID.Person),
r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.FunctionType,
r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.RoleInOrganisationType,
@@ -405,10 +405,10 @@ namespace BeWo.ViewModel
r6 => pCallBack(
new PersonVM(
new PersonDC
{
VarFields = r2
},
r1,
{
VarFields = r2
},
r1,
r4,
r5,
r3,
@@ -418,12 +418,12 @@ namespace BeWo.ViewModel
public static void CreatePersonVMAsync(long pOid, Action<PersonVM> pCallBack)
{
ServiceFacade.DoCustomerServiceAsync(
s => s.LoadPerson(pOid),
s => s.LoadPerson(pOid),
cb =>
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.TitleType,
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.TitleType,
r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.FunctionType,
r3 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType,
r3 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType,
r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.Nationality,
r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.Aufenthaltsstatus,
r5 => pCallBack(new PersonVM(cb, r1, r3, r4, r2, r5))))))));
@@ -433,7 +433,7 @@ namespace BeWo.ViewModel
{
ServiceFacade.DoResourceServiceAsync(
s => s.GetAllResources(),
r1 => ServiceFacade.DoValueListServiceAsync(s => s.GetAllValueListEntrysByType(ValueListEntryType.ResourceCategory), r2 => pCallBack(new ResourceListVM(r1, r2))));
r1 => ServiceFacade.DoValueListServiceAsync(s => s.GetAllValueListEntrysByType(ValueListEntryType.ResourceCategory), r2 => pCallBack(new ResourceListVM(r1, r2))));
}
public static void CreateServiceCategoryListVMAsync(Action<ServiceCategoryListVM> pCallBack)
@@ -442,23 +442,23 @@ namespace BeWo.ViewModel
r => pCallBack(new ServiceCategoryListVM(r.Where(sc => sc.ScopeType == ScopeTypeId.Global).ToList())));
}
public static void CreateAdditionalServiceListVMAsync(Action<AdditionalServiceListVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s => s.GetAllAdditionalService(),
r => pCallBack(new AdditionalServiceListVM(r.ToList())));
}
public static void CreateAdditionalServiceListVMAsync(Action<AdditionalServiceListVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s => s.GetAllAdditionalService(),
r => pCallBack(new AdditionalServiceListVM(r.ToList())));
}
public static void CreateAuszahlungsartenListVMAsync(Action<AuszahlungsartListVM> pCallBack)
{
ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllAuszahlungsarten(),
r => pCallBack(new AuszahlungsartListVM(r.ToList())));
}
public static void CreateAuszahlungsartenListVMAsync(Action<AuszahlungsartListVM> pCallBack)
{
ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllAuszahlungsarten(),
r => pCallBack(new AuszahlungsartListVM(r.ToList())));
}
public static void CreateBudgetListVMAsync(Action<BudgetListVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s => s.GetAllBudgets(),
r => pCallBack(new BudgetListVM(r.ToList())));
}
public static void CreateBudgetListVMAsync(Action<BudgetListVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s => s.GetAllBudgets(),
r => pCallBack(new BudgetListVM(r.ToList())));
}
public static void CreatePreisListVMAsync(Action<PreisListVM> pCallBack)
{
@@ -490,11 +490,11 @@ namespace BeWo.ViewModel
}));
}
public static void CreateMedArtListVMAsync(Action<MedArtListVM> pCallBack)
{
ServiceFacade.DoCustomerServiceAsync(s => s.GetAllMedArten(),
r => pCallBack(new MedArtListVM(r.ToList())));
}
public static void CreateMedArtListVMAsync(Action<MedArtListVM> pCallBack)
{
ServiceFacade.DoCustomerServiceAsync(s => s.GetAllMedArten(),
r => pCallBack(new MedArtListVM(r.ToList())));
}
public static void CreateServiceDescriptionListVMAsync(Action<ServiceDescriptionListVM> pCallBack)
{
@@ -503,10 +503,10 @@ namespace BeWo.ViewModel
r2 => pCallBack(new ServiceDescriptionListVM(r1.Where(sr => sr.ScopeType == ScopeTypeId.Global).ToList(), r2.Where(sc => sc.ScopeType == ScopeTypeId.Global).ToList()))));
}
public static void CreateAdditionalServiceRegionListVMAsync(Action<AdditionalServiceRegionListVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s1 => s1.GetAllAdditionalServiceRegion(), r1 => ServiceFacade.DoOperationsServiceAsync(s2 => s2.GetAllAdditionalService(), r2 => pCallBack(new AdditionalServiceRegionListVM(r1.ToList(), r2.ToList()))));
}
public static void CreateAdditionalServiceRegionListVMAsync(Action<AdditionalServiceRegionListVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s1 => s1.GetAllAdditionalServiceRegion(), r1 => ServiceFacade.DoOperationsServiceAsync(s2 => s2.GetAllAdditionalService(), r2 => pCallBack(new AdditionalServiceRegionListVM(r1.ToList(), r2.ToList()))));
}
public static void CreateServiceRecordVMAsync(long pEmployeeOid, Action<ServiceRecordListVM> pCallBack)
{
@@ -520,7 +520,7 @@ namespace BeWo.ViewModel
iGoalCats =>
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.SupportConceptGoalType,
goals => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.DocumentType,
docTypes =>
docTypes =>
ServiceFacade.DoCustomerServiceAsync(
s => s.GetAllActiveWohnheimeCompact(), cb => ServiceFacade.DoCustomerServiceAsync(s2 => s2.GetAllDarreichungsformen(), abc => pCallBack(new ServiceRecordListVM(dict, goalCats, iGoalCats, goals, cb, docTypes, abc)))))))));
}
@@ -533,7 +533,7 @@ namespace BeWo.ViewModel
public static void CreateSettlementListForCostBearerAndPeriod(long costBearerOid, DateTime periodStart, DateTime periodEnd, Action<SettlementListVM> callback)
{
ServiceFacade.DoAccountingServiceAsync(
s => s.GetSettlementInvoicesForCostBearerAndPeriod(costBearerOid, periodStart, periodEnd),
s => s.GetSettlementInvoicesForCostBearerAndPeriod(costBearerOid, periodStart, periodEnd),
r =>
{
r.Sort(
@@ -558,7 +558,7 @@ namespace BeWo.ViewModel
public static void CreateSettlementListForSupportConceptVMAsync(long supportconceptOid, Action<SettlementListVM> callback)
{
ServiceFacade.DoAccountingServiceAsync(
s => s.GetSettlementInvoicesForSupportConcept(supportconceptOid),
s => s.GetSettlementInvoicesForSupportConcept(supportconceptOid),
r =>
{
r.Sort(
@@ -592,7 +592,7 @@ namespace BeWo.ViewModel
public static void CreateSupportConceptGoalListVMAsync(ValueListEntryType pType, ValueListEntryType pParentType, Action<SupportConceptGoalListVM> pCallBack)
{
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(pType, r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(pParentType, r2 => pCallBack(new SupportConceptGoalListVM(r1, r2))));
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(pType, r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(pParentType, r2 => pCallBack(new SupportConceptGoalListVM(r1, r2))));
}
public static void CreateSupportConceptVMAsync(Action<SupportConceptVM> pCallback)
@@ -602,16 +602,16 @@ namespace BeWo.ViewModel
public static void CreateSupportConceptVMAsync(long pOid, Action<SupportConceptVM> pCallback)
{
ServiceFacade.DoCustomerServiceAsync(s => s.LoadSupportConcept(pOid),
ServiceFacade.DoCustomerServiceAsync(s => s.LoadSupportConcept(pOid),
r => CreateSupportConceptVMAsync(r, pCallback, false));
}
public static void CreateSupportConceptVMAsync(SupportConceptDC dc, Action<SupportConceptVM> pCallBack, bool initOriginator)
{
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.SupportConceptGoalCategoryType,
r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.SupportConceptGoalType,
r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.SupportConceptGoalType,
r2 => Cache.GetInstance().GetServiceCategoryDescriptionDict(
dict => ServiceFacade.DoOperationsServiceAsync(s => s.GetAllBudgets(),
r3 =>
@@ -675,10 +675,10 @@ namespace BeWo.ViewModel
{
ServiceFacade.DoUserServiceAsync(s => s.GetAllUserGroups(), cb => pCallBack(new UserVM(new UserDC(), cb)), true);
}
public static void CreateValueListVMAsync(ValueListEntryType pType, Action<ValueListEntryListVM> pCallBack)
{
ServiceFacade.DoValueListServiceAsync(s => s.GetAllValueListEntrysByType(pType), r => pCallBack(new ValueListEntryListVM(pType, r)));
ServiceFacade.DoValueListServiceAsync(s => s.GetAllValueListEntrysByType(pType), r => pCallBack(new ValueListEntryListVM(pType, r)));
}
@@ -692,9 +692,9 @@ namespace BeWo.ViewModel
}
ServiceFacade.DoValueListServiceAsync(
s => s.GetAllValueListEntrysByTypes(typeList),
s => s.GetAllValueListEntrysByTypes(typeList),
cb => pCallBack(new GenericValueListEntryListVM(cb)));
}
}
public static void CreateEmploymentTypeListVMAsync(Action<EmploymentTypeListVM> pCallBack)
{
@@ -705,22 +705,24 @@ namespace BeWo.ViewModel
{
var list = new List<ValueListEntryType>
{
ValueListEntryType.DisabilityType,
ValueListEntryType.CustomerCareType,
ValueListEntryType.PlacementObjectiveType,
ValueListEntryType.DisabilityType,
ValueListEntryType.CustomerCareType,
ValueListEntryType.PlacementObjectiveType,
ValueListEntryType.TerminationReasonType,
ValueListEntryType.Nationality,
ValueListEntryType.Aufenthaltsstatus,
ValueListEntryType.RoleInFamily,
ValueListEntryType.NotizenKategorieCustomer
ValueListEntryType.NotizenKategorieCustomer,
ValueListEntryType.Auftragsherkunft,
ValueListEntryType.Vermittlungsgrundlage
};
ServiceFacade.DoValueListServiceAsync(
s => s.GetAllValueListEntrysByTypes(list),
cb => ServiceFacade.DoEmployeeServiceAsync(s2 => s2.GetAllAssessmentSheetCategories(),
cb2 => ServiceFacade.DoEmployeeServiceAsync(s3 => s3.GetAllAssessmentSheetValues(),
cb3 => ServiceFacade.DoCustomerServiceAsync(s4 => s4.GetAllMedArten(),
cb4 => pCallBack(new CustomerVM(pCustomerDC, cb, cb2, cb3, cb4))))));
ServiceFacade.DoValueListServiceAsync(
s => s.GetAllValueListEntrysByTypes(list),
cb => ServiceFacade.DoEmployeeServiceAsync(s2 => s2.GetAllAssessmentSheetCategories(),
cb2 => ServiceFacade.DoEmployeeServiceAsync(s3 => s3.GetAllAssessmentSheetValues(),
cb3 => ServiceFacade.DoCustomerServiceAsync(s4 => s4.GetAllMedArten(),
cb4 => pCallBack(new CustomerVM(pCustomerDC, cb, cb2, cb3, cb4))))));
}
public static void CreateAppointmentCategoryListVMAsync(Action<AppointmentCategoryListVM> pCallBack)
@@ -767,7 +769,7 @@ namespace BeWo.ViewModel
public static void CreateSbdAdminVMAsync(Action<SbdConfigVM> pCallBack)
{
ServiceFacade.DoOperationsServiceAsync(s => s.GetSbdConfig(), r =>
ServiceFacade.DoOperationsServiceAsync(s => s.GetSbdConfig(), r =>
{
pCallBack(new SbdConfigVM(r));
});
@@ -790,10 +792,10 @@ namespace BeWo.ViewModel
return activeSupportConcepts;
}
public static List<CompactCustomerDC> CreateCustomerList()
{
{
List<CompactCustomerDC> allCustomers = new List<CompactCustomerDC>();
List<CompactCustomerDC> activeCustomers = new List<CompactCustomerDC>();
allCustomers = ServiceFacade.DoCustomerServiceSync(
s => s.GetAllCustomersCompact(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
@@ -856,7 +858,7 @@ namespace BeWo.ViewModel
public static List<UserGroupDC> CreateUserGroupList()
{
List<UserGroupDC> allUserGroups = new List<UserGroupDC>();
allUserGroups = ServiceFacade.DoUserServiceSync(s => s.GetAllUserGroups());
return allUserGroups;
}
@@ -866,8 +868,39 @@ namespace BeWo.ViewModel
List<BeWoFolderDC> folderList = new List<BeWoFolderDC>();
folderList = ServiceFacade.DoOperationsServiceSync(s => s.GetFolderTree(tid, objectOid));
return folderList;
return folderList;
}
public static void CreateWohneinheitListVMs(List<WohneinheitDC> dcs, out WohneinheitListVM einheit_vm_list, out WohneinheitBelegungListVM beleg_vm_list)
{
einheit_vm_list = new WohneinheitListVM(dcs);
var beleg_dc_list = new List<WohneinheitBelegungDC>();
var beleg_dc2einheit_vm = new Dictionary<WohneinheitBelegungDC, WohneinheitVM>();
foreach (var einheit_vm in einheit_vm_list.VMList)
{
var einheit_dc = einheit_vm.DataContract;
if (einheit_dc.Belegungen is null)
continue;
foreach (var beleg_dc in einheit_dc.Belegungen)
{
beleg_dc_list.Add(beleg_dc);
beleg_dc2einheit_vm.Add(beleg_dc, einheit_vm);
}
}
beleg_vm_list = new WohneinheitBelegungListVM(beleg_dc_list.OrderBy(x => x.Oid).ToList());
foreach (var beleg_vm in beleg_vm_list.VMList)
{
var beleg_dc = beleg_vm.DataContract;
beleg_vm.Wohneinheit = beleg_dc2einheit_vm[beleg_dc];
}
einheit_vm_list.VMList.Sort(WohneinheitVM.Compare);
}
}
}

View File

@@ -0,0 +1,171 @@
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace BeWo.ViewModel
{
public class WohneinheitBelegungVM : AbstractDCMapperVM<WohneinheitBelegungDC>
{
private WohneinheitVM _Wohneinheit;
private long? _Oid;
private CompactCustomerDC _Customer;
private DateTime _StartDate;
private DateTime? _EndDate;
private string _Kommentar;
public bool SoftDelete { get; set; }
public WohneinheitBelegungVM() : base(new WohneinheitBelegungDC(), true)
{
}
public WohneinheitBelegungVM(WohneinheitBelegungDC dc) : base(dc, dc.Oid == null)
{
}
public long? Oid => _Oid;
public bool CanSave
=> Wohneinheit is object && Customer is object;
public WohneinheitVM Wohneinheit
{
get { return _Wohneinheit; }
set
{
if (!AreDifferent(Wohneinheit, value))
return;
if (_Wohneinheit is object)
_Wohneinheit.PropertyChanged -= FirePropertyChanged;
_Wohneinheit = value;
if (_Wohneinheit is object)
_Wohneinheit.PropertyChanged += FirePropertyChanged;
FirePropertyChanged(nameof(Wohneinheit));
FirePropertyChanged(nameof(CanSave));
}
}
public CompactCustomerDC Customer
{
get { return _Customer; }
set
{
if (!AreDifferent(Customer, value))
return;
_Customer = value;
FirePropertyChanged(nameof(Customer));
FirePropertyChanged(nameof(CanSave));
}
}
public DateTime StartDate
{
get { return _StartDate; }
set
{
if (!AreDifferent(StartDate, value))
return;
_StartDate = value;
StoreDirtyInformation(AreDifferent(DataContract.StartDate, value), nameof(StartDate));
FirePropertyChanged(nameof(StartDate));
if (EndDate.HasValue && EndDate.Value < StartDate)
{
EndDate = new DateTime(StartDate.Year, 12, 31);
}
}
}
public DateTime? EndDate
{
get { return _EndDate; }
set
{
if (!AreDifferent(EndDate, value))
return;
_EndDate = value;
StoreDirtyInformation(AreDifferent(DataContract.EndDate, value), nameof(EndDate));
FirePropertyChanged(nameof(EndDate));
FirePropertyChanged(nameof(EndDateDisplay));
if (value.HasValue && value.Value < StartDate)
{
StartDate = new DateTime(value.Value.Year, value.Value.Month, 1);
}
}
}
public string Kommentar
{
get { return _Kommentar; }
set
{
if (!AreDifferent(Kommentar, value))
return;
_Kommentar = value;
StoreDirtyInformation(AreDifferent(DataContract.Kommentar, value), nameof(Kommentar));
FirePropertyChanged(nameof(Kommentar));
}
}
public DateTime EndDateDisplay => EndDate ?? DateTime.MaxValue;
public WohneinheitBelegungVM ViewModel => this;
public override bool Equals(object obj)
{
return Equals(obj as WohneinheitBelegungVM);
}
public bool Equals(WohneinheitBelegungVM other)
{
var equ = other != null &&
Oid == other.Oid &&
Wohneinheit == other.Wohneinheit &&
StartDate == other.StartDate &&
EndDate == other.EndDate &&
Kommentar == other.Kommentar;
if (!equ)
return false;
if (Customer == null && other.Customer == null)
return true;
if (Customer == null && other.Customer != null)
return false;
return Customer.Equals(other.Customer);
}
protected override void InitByDataContract(WohneinheitBelegungDC pDataContract)
{
_Oid = pDataContract.Oid;
_Customer = pDataContract.Customer;
_EndDate = pDataContract.EndDate;
_Kommentar = pDataContract.Kommentar;
_StartDate = pDataContract.StartDate;
}
protected override WohneinheitBelegungDC MapToDataContract(WohneinheitBelegungDC pDataContract, bool doCommit)
{
pDataContract.Oid = _Oid;
pDataContract.Customer = Customer;
pDataContract.EndDate = EndDate;
pDataContract.Kommentar = Kommentar;
pDataContract.StartDate = StartDate;
return pDataContract;
}
}
}

View File

@@ -0,0 +1,356 @@
using BeWo.ViewModel.ListViewModel;
using BS.Shared;
using BS.Shared.DataContracts;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace BeWo.ViewModel
{
public class WohneinheitVM : AbstractDCMapperVM<WohneinheitDC>
{
private long? _Oid;
private long? _Version;
private string _Notice;
private string _Wohnname;
private string _Zimmername;
private decimal? _Miete;
private decimal? _Heizung;
private decimal? _Strom;
private decimal? _Betriebskosten;
private decimal? _SonstigeKosten;
private decimal? _Kaution;
private decimal? _QM;
private int? _Baujahr;
private string _Mobilierung;
private string _Zusatznotiz;
private string _Stock;
private ImageListVM _ImageListVM;
public WohneinheitVM() : this(new WohneinheitDC())
{
Wohnname = "Designer Wohnung";
}
public WohneinheitVM(WohneinheitDC dc) : base(dc, dc.Oid == null)
{
}
public long? Oid => _Oid;
public string Wohnname
{
get { return _Wohnname; }
set
{
if (!AreDifferent(Wohnname, value))
return;
_Wohnname = value;
StoreDirtyInformation(AreDifferent(DataContract.Wohnname, value), nameof(Wohnname));
FirePropertyChanged(nameof(Wohnname));
FirePropertyChanged(nameof(Caption));
FirePropertyChanged(nameof(Group));
FirePropertyChanged(nameof(Displayname));
FirePropertyChanged(nameof(Displayname2));
}
}
public string Zimmername
{
get { return _Zimmername; }
set
{
if (!AreDifferent(Zimmername, value))
return;
_Zimmername = value;
StoreDirtyInformation(AreDifferent(DataContract.Zimmername, value), nameof(Zimmername));
FirePropertyChanged(nameof(Zimmername));
FirePropertyChanged(nameof(Caption));
FirePropertyChanged(nameof(Group));
FirePropertyChanged(nameof(Displayname));
FirePropertyChanged(nameof(Displayname2));
}
}
public string Name => ToString();
public decimal? Miete
{
get { return _Miete; }
set
{
if (!AreDifferent(Miete, value))
return;
_Miete = value;
StoreDirtyInformation(AreDifferent(DataContract.Miete, value), nameof(Miete));
FirePropertyChanged(nameof(Miete));
FirePropertyChanged(nameof(Brutto));
}
}
public decimal? Heizung
{
get { return _Heizung; }
set
{
if (AreDifferent(Heizung, value))
{
_Heizung = value;
StoreDirtyInformation(AreDifferent(DataContract.Heizung, value), nameof(Heizung));
FirePropertyChanged(nameof(Heizung));
FirePropertyChanged(nameof(Brutto));
}
}
}
public decimal? Strom
{
get { return _Strom; }
set
{
if (AreDifferent(Strom, value))
{
_Strom = value;
StoreDirtyInformation(AreDifferent(DataContract.Strom, value), nameof(Strom));
FirePropertyChanged(nameof(Strom));
FirePropertyChanged(nameof(Brutto));
}
}
}
public decimal? Betriebskosten
{
get { return _Betriebskosten; }
set
{
if (AreDifferent(Betriebskosten, value))
{
_Betriebskosten = value;
StoreDirtyInformation(AreDifferent(DataContract.Betriebskosten, value), nameof(Betriebskosten));
FirePropertyChanged(nameof(Betriebskosten));
FirePropertyChanged(nameof(Brutto));
}
}
}
public decimal? SonstigeKosten
{
get { return _SonstigeKosten; }
set
{
if (AreDifferent(SonstigeKosten, value))
{
_SonstigeKosten = value;
StoreDirtyInformation(AreDifferent(DataContract.SonstigeKosten, value), nameof(SonstigeKosten));
FirePropertyChanged(nameof(SonstigeKosten));
FirePropertyChanged(nameof(Brutto));
}
}
}
public decimal? Kaution
{
get { return _Kaution; }
set
{
if (AreDifferent(Kaution, value))
{
_Kaution = value;
StoreDirtyInformation(AreDifferent(DataContract.Kaution, value), nameof(Kaution));
FirePropertyChanged(nameof(Kaution));
}
}
}
public decimal? Brutto
{
get
{
if (!Miete.HasValue
&& !Heizung.HasValue
&& !Strom.HasValue
&& !Betriebskosten.HasValue
&& !SonstigeKosten.HasValue)
return null;
return (Miete ?? 0)
+ (Heizung ?? 0)
+ (Strom ?? 0)
+ (Betriebskosten ?? 0)
+ (SonstigeKosten ?? 0);
}
}
public decimal? QM
{
get { return _QM; }
set
{
if (!AreDifferent(QM, value))
return;
if (value == 0)
value = null;
_QM = value;
StoreDirtyInformation(AreDifferent(DataContract.QM, value), nameof(QM));
FirePropertyChanged(nameof(QM));
FirePropertyChanged(nameof(FlacheString));
}
}
public string FlacheString => QM?.ToString("########0.00 qm");
public int? Baujahr
{
get { return _Baujahr; }
set
{
if (AreDifferent(Baujahr, value))
{
_Baujahr = value;
StoreDirtyInformation(AreDifferent(DataContract.Baujahr, value), nameof(Baujahr));
FirePropertyChanged(nameof(Baujahr));
}
}
}
public string Mobilierung
{
get { return _Mobilierung; }
set
{
if (AreDifferent(Mobilierung, value))
{
_Mobilierung = value;
StoreDirtyInformation(AreDifferent(DataContract.Mobilierung, value), nameof(Mobilierung));
FirePropertyChanged(nameof(Mobilierung));
}
}
}
public string Zusatznotiz
{
get { return _Zusatznotiz; }
set
{
if (AreDifferent(Zusatznotiz, value))
{
_Zusatznotiz = value;
StoreDirtyInformation(AreDifferent(DataContract.Zusatznotiz, value), nameof(Zusatznotiz));
FirePropertyChanged(nameof(Zusatznotiz));
}
}
}
public string Stock
{
get { return _Stock; }
set
{
if (AreDifferent(Stock, value))
{
_Stock = value;
StoreDirtyInformation(AreDifferent(DataContract.Stock, value), nameof(Stock));
FirePropertyChanged(nameof(Stock));
}
}
}
public ImageListVM ImageListVM
{
get { return _ImageListVM; }
set
{
if (_ImageListVM == value)
return;
_ImageListVM = value;
FirePropertyChanged(nameof(ImageListVM));
}
}
public override bool IsDirty => base.IsDirty || ImageListVM.IsDirty;
public bool IsEinzelwohnung => string.IsNullOrEmpty(Zimmername);
public string Caption => IsEinzelwohnung ? Wohnname : Zimmername ;
public string Group => IsEinzelwohnung ? null : Wohnname;
public string Displayname => IsEinzelwohnung ? Wohnname : Wohnname + "\n- " + Zimmername;
public string Displayname2 => IsEinzelwohnung ? Wohnname : Wohnname + " - " + Zimmername;
public bool HasEmptyZimmername()
{
return string.IsNullOrEmpty(Zimmername);
}
public static int Compare(WohneinheitVM vm1, WohneinheitVM vm2)
{
if (vm1 is null)
return 1;
if (vm2 is null)
return -1;
var compare1 = vm1.Wohnname.CompareTo(vm2.Wohnname);
if (compare1 != 0)
return compare1;
var compare2 = vm1.Zimmername.CompareTo(vm2.Zimmername);
return compare2;
}
protected override void InitByDataContract(WohneinheitDC pDataContract)
{
_Oid = pDataContract.Oid;
_Version = pDataContract.Version;
_Notice = pDataContract.Notice;
_Wohnname = pDataContract.Wohnname;
_Zimmername = pDataContract.Zimmername;
_Miete = pDataContract.Miete;
_Heizung = pDataContract.Heizung;
_Strom = pDataContract.Strom;
_Betriebskosten = pDataContract.Betriebskosten;
_SonstigeKosten = pDataContract.SonstigeKosten;
_Kaution = pDataContract.Kaution;
_QM = pDataContract.QM;
_Baujahr = pDataContract.Baujahr;
_Mobilierung = pDataContract.Mobilierung;
_Zusatznotiz = pDataContract.Zusatznotiz;
_Stock = pDataContract.Stock;
_ImageListVM = new ImageListVM(pDataContract.Grundrisse ?? (pDataContract.Grundrisse = new List<ImageDC>()));
}
protected override WohneinheitDC MapToDataContract(WohneinheitDC bDataContract, bool doCommit)
{
bDataContract.Oid = _Oid;
bDataContract.Notice = _Notice;
bDataContract.Version = _Version;
bDataContract.Wohnname = _Wohnname;
bDataContract.Zimmername = _Zimmername;
bDataContract.Miete = _Miete;
bDataContract.Heizung = _Heizung;
bDataContract.Strom = _Strom;
bDataContract.Betriebskosten = _Betriebskosten;
bDataContract.SonstigeKosten = _SonstigeKosten;
bDataContract.Kaution = _Kaution;
bDataContract.QM = _QM;
bDataContract.Baujahr = _Baujahr;
bDataContract.Mobilierung = _Mobilierung;
bDataContract.Zusatznotiz = _Zusatznotiz;
bDataContract.Stock = _Stock;
bDataContract.Belegungen = null;
bDataContract.Grundrisse = ImageListVM.CopyToDCList(doCommit);
return bDataContract;
}
public override string ToString()
{
if (HasEmptyZimmername())
return Wohnname;
return $"{Wohnname}, {Zimmername}";
}
}
}

View File

@@ -57,22 +57,74 @@ namespace BeWo.ViewModel
private WohnheimEmployeeRelationListVM _WohnheimEmployeeRelations;
private WohnheimCustomerRelationListVM _WohnheimCustomerRelations;
private WohneinheitListVM _WohneinheitListVM;
private WohneinheitBelegungListVM _WohneinheitBelegungListVM;
private CompactTeamDC _WohnheimTeamRelations;
public WohnheimVM(WohnheimDC pWohnheimDC)
public WohnheimVM()
{
_WohnheimName = "Design Test";
PermissionWohneinheitView = true;
PermissionWohneinheitCreate = true;
PermissionWohneinheitEdit = true;
PermissionWohneinheitDelete = true;
PermissionWohneinheitBelegungView = true;
PermissionWohneinheitBelegungCreate = true;
PermissionWohneinheitBelegungEdit = true;
PermissionWohneinheitBelegungDelete = true;
var vms = new System.ComponentModel.BindingList<WohneinheitVM>()
{
new WohneinheitVM(),
new WohneinheitVM()
};
WohneinheitListVM = new WohneinheitListVM();
WohneinheitListVM.VMList = vms;
}
public WohnheimVM(WohnheimDC pWohnheimDC, List<CompactCustomerDC> customers)
: base(pWohnheimDC, pWohnheimDC.WohnheimOid == null)
{
Customers = customers;
}
public override bool IsDirty
{
get
{
return base.IsDirty || WohnheimEmployeeRelations.IsDirty || WohnheimCustomerRelations.IsDirty;
return base.IsDirty || WohnheimEmployeeRelations.IsDirty
|| WohnheimCustomerRelations.IsDirty
|| WohneinheitListVM.IsDirty
|| WohneinheitBelegungListVM.IsDirty;
}
}
public List<CompactCustomerDC> Customers { get; set; }
public TimeSpan IntervalRange { get; set; }
public bool IntervalChanging { get; set; }
public bool PermissionWohneinheitTabitemView => PermissionWohneinheitView || PermissionWohneinheitBelegungView;
public bool PermissionWohneinheitButton => PermissionWohneinheitDelete || PermissionWohneinheitGallery;
public bool PermissionWohneinheitGallery => PermissionWohneinheitGalleryEdit || PermissionWohneinheitGalleryView;
public bool PermissionWohneinheitView { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_View);
public bool PermissionWohneinheitCreate { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Create);
public bool PermissionWohneinheitEdit { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Edit);
public bool PermissionWohneinheitDelete { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Delete);
public bool PermissionWohneinheitGalleryEdit { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Gallery_Edit);
public bool PermissionWohneinheitGalleryView { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Gallery_View);
public bool PermissionWohneinheitBelegungView { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Belegung_View);
public bool PermissionWohneinheitBelegungCreate { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Belegung_Create);
public bool PermissionWohneinheitBelegungEdit { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Belegung_Edit);
public bool PermissionWohneinheitBelegungDelete { get; } = BeWoApp.HasLoggedOnUserRight(UserRightType.WohnheimView_Wohneinheit_Belegung_Delete);
public bool Permission1 { get; } = true;
public bool IsArchived
{
get { return _IsArchived; }
@@ -105,7 +157,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_WohnheimName);
}
}
public String Strasse
{
@@ -120,7 +171,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Street);
}
}
public String PLZ
{
get
@@ -134,7 +184,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_PLZ);
}
}
public String Ort
{
get
@@ -148,7 +197,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Ort);
}
}
public String Bemerkung
{
@@ -164,7 +212,6 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_Bemerkung);
}
}
public String PflichtbesetzungStart
{
@@ -278,6 +325,33 @@ namespace BeWo.ViewModel
FirePropertyChanged(PropertyName_WohnheimCustomerRelations);
}
}
public WohneinheitListVM WohneinheitListVM
{
get { return _WohneinheitListVM; }
set
{
if (_WohneinheitListVM == value)
return;
_WohneinheitListVM = value;
FirePropertyChanged(nameof(WohneinheitListVM));
}
}
public WohneinheitBelegungListVM WohneinheitBelegungListVM
{
get { return _WohneinheitBelegungListVM; }
set
{
if (_WohneinheitBelegungListVM == value)
return;
_WohneinheitBelegungListVM = value;
FirePropertyChanged(nameof(WohneinheitBelegungListVM));
}
}
public CompactTeamDC WohnheimTeamRelations
{
get { return _WohnheimTeamRelations; }
@@ -289,14 +363,75 @@ namespace BeWo.ViewModel
}
}
// HACK: Bug bei den RadioButtons, geben false nicht weiter
// TODO nochmal angucken wenn mehr als zwei Optionen, dann in listbox und an selected item binden
// http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2146568&SiteID=1
public bool AddWohneinheit()
{
if (!PermissionWohneinheitCreate)
return false;
var vmlist = WohneinheitListVM;
vmlist.CurrentVM = vmlist.NewVM;
return true;
}
public bool EditWohneinheit(WohneinheitVM vm)
{
if (!PermissionWohneinheitEdit)
return false;
if (vm is null || !WohneinheitListVM.VMList.Contains(vm))
return false;
WohneinheitListVM.EditVM = vm;
WohneinheitListVM.CurrentVM = vm;
return true;
}
public bool AddBelegung(object wohneinheit_oid = null, DateTime? start = null)
{
if (!PermissionWohneinheitBelegungCreate)
return false;
var beleg_list_vm = WohneinheitBelegungListVM;
var vm = beleg_list_vm.NewVM;
var today = DateTime.Today;
var first_next_month = new DateTime(today.Year, today.Month, 1);
vm.StartDate = first_next_month;
if(wohneinheit_oid is long oid)
{
vm.Wohneinheit = WohneinheitListVM.VMList.First(x => x.Oid == oid);
}
if(start is DateTime startDate)
{
vm.StartDate = startDate;
}
beleg_list_vm.CurrentVM = vm;
return true;
}
public bool EditBelegung(WohneinheitBelegungVM vm)
{
if (!PermissionWohneinheitBelegungEdit)
return false;
if (vm is null || !WohneinheitBelegungListVM.VMList.Contains(vm))
return false;
WohneinheitBelegungListVM.EditVM = vm;
WohneinheitBelegungListVM.CurrentVM = vm;
return true;
}
protected override void InitByDataContract(WohnheimDC pDataContract)
{
_WohnheimName = pDataContract.WohnheimName;
_Strasse = pDataContract.Strasse;
_PLZ = pDataContract.PLZ;
@@ -314,11 +449,16 @@ namespace BeWo.ViewModel
WohnheimEmployeeRelations = VMFactory.CreateWohnheimEmployeeRelationListVM(pDataContract.RelatedEmployees ?? (pDataContract.RelatedEmployees = new List<WohnheimEmployeeRelationDC>()));
WohnheimCustomerRelations = VMFactory.CreateWohnheimCustomerRelationListVM(pDataContract.RelatedCustomers ?? (pDataContract.RelatedCustomers = new List<WohnheimCustomerRelationDC>()));
}
if (pDataContract.Wohneinheiten is null)
pDataContract.Wohneinheiten = new List<WohneinheitDC>();
VMFactory.CreateWohneinheitListVMs(pDataContract.Wohneinheiten, out var einheit, out var beleg);
WohneinheitListVM = einheit;
WohneinheitBelegungListVM = beleg;
}
protected override WohnheimDC MapToDataContract(WohnheimDC pDataContract, bool doCommit)
{
pDataContract.WohnheimName = _WohnheimName;
pDataContract.Strasse = _Strasse;
pDataContract.PLZ = _PLZ;
@@ -331,12 +471,38 @@ namespace BeWo.ViewModel
pDataContract.Sortierungsart = _Sortierungsart;
pDataContract.AbsteigendeSortierung = _AbsteigendeSortierung;
pDataContract.ActivationType = _IsArchived ? ActivationTypeId.Archived : ActivationTypeId.Active;
pDataContract.RelatedEmployees = _WohnheimEmployeeRelations.CopyToDCList(doCommit);
pDataContract.RelatedCustomers = _WohnheimCustomerRelations.CopyToDCList(doCommit);
//pDataContract.Wohneinheiten = _WohneinheitListVM.CopyToDCList(doCommit);
pDataContract.Wohneinheiten = null;
var einheit_vm2dc = new Dictionary<WohneinheitVM, WohneinheitDC>();
foreach (var vm in _WohneinheitListVM.VMList)
{
var dc = doCommit ? vm.CommitToDataContract() : vm.CopyToEmptyDataContract();
if (pDataContract.Wohneinheiten is null)
pDataContract.Wohneinheiten = new List<WohneinheitDC>();
einheit_vm2dc.Add(vm, dc);
pDataContract.Wohneinheiten.Add(dc);
}
foreach (var vm in _WohneinheitBelegungListVM.VMList)
{
var dc = doCommit ? vm.CommitToDataContract() : vm.CopyToEmptyDataContract();
if (einheit_vm2dc[vm.Wohneinheit].Belegungen is null)
einheit_vm2dc[vm.Wohneinheit].Belegungen = new List<WohneinheitBelegungDC>();
if (!einheit_vm2dc[vm.Wohneinheit].Belegungen.Contains(dc))
einheit_vm2dc[vm.Wohneinheit].Belegungen.Add(dc);
}
return pDataContract;
}
}

Some files were not shown because too many files have changed in this diff Show More