From c4f0254a2cd2c13a0f4837d0cef20be127182d74 Mon Sep 17 00:00:00 2001 From: Waldi Date: Thu, 19 Jan 2017 17:02:07 +0100 Subject: [PATCH] =?UTF-8?q?SQL=20Statements=20und=20update=20f=C3=BCr=20ze?= =?UTF-8?q?iterfassung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeWo/BeWoApp.xaml.cs | 17 ++ BeWo/Core/Config/AppSettings.cs | 17 ++ BeWo/View/Detail/MandatorView.xaml | 25 +- BeWo/View/Detail/MandatorView.xaml.cs | 4 +- BeWo/View/Detail/ServiceRecordEditView.xaml | 263 ++++++++++++++++-- .../View/Detail/ServiceRecordEditView.xaml.cs | 43 ++- .../Detail/ServiceRecordGroupEditView.xaml | 207 +++++++++++++- .../Detail/ServiceRecordGroupEditView.xaml.cs | 69 +++-- BeWo/View/Detail/ServiceRecordView2.xaml | 54 +--- BeWo/View/Detail/ServiceRecordView2.xaml.cs | 65 ++--- BeWo/ViewModel/MandatorVM.cs | 42 +++ BeWo/ViewModel/ServiceRecordVM.cs | 212 +++++++++++--- BeWoPlanerMobil/Controllers/MainController.cs | 18 ++ Data/Entities/Mandator.cs | 34 +++ Data/Entities/ServiceRecord.cs | 21 ++ Data/Mappings/ServiceRecord.hbm.xml | 6 +- Model/Changes_2016_12_23.txt | 4 + Model/Changes_2017_01_19.txt | 3 + Service/Configuration/AppSettings.cs | 21 ++ .../ServiceRecordDC_ServiceRecord.cs | 12 + Shared/BeWoEntityEnums.cs | 7 + Shared/Core/EnumTranslations.cs | 19 ++ Shared/DataContracts/ServiceRecordDC.cs | 4 +- 23 files changed, 992 insertions(+), 175 deletions(-) create mode 100644 Model/Changes_2016_12_23.txt create mode 100644 Model/Changes_2017_01_19.txt diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index cc5b19546..1d64c33a6 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -197,6 +197,8 @@ namespace BeWo var hideServiceRecordInsertedByAndInsertedOn = false; bool isEndDateVisible = false; bool isOnlyYearMonthVisible = false; + bool isZeiterfassDateNormal = false; + bool isZeiterfassungInStdMin = false; AppSettings.ShowAdvisedAttendedFlag = false; String timeRecordingMenuName = "Zeiterfassung"; @@ -236,6 +238,19 @@ namespace BeWo isOnlyYearMonthVisible = true; } + val = GetSettingValue(_Mandator.Settings, "IsZeiterfassungInStdMin"); + if (val != null && val.Equals("1")) + { + isZeiterfassungInStdMin = true; + } + + val = GetSettingValue(_Mandator.Settings, "IsZeiterfassDateNormal"); + if (val != null && val.Equals("1")) + { + isZeiterfassDateNormal = true; + } + + val = GetSettingValue(_Mandator.Settings, "MaxDaysEditServiceRecordsAllowed"); int result; if (Int32.TryParse(val, out result)) @@ -381,6 +396,8 @@ namespace BeWo AppSettings.IsPasswordSecurityActiv = isPasswordSecurityActiv; AppSettings.IsEndDateVisible = isEndDateVisible; AppSettings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible; + AppSettings.IsZeiterfassDateNormal = isZeiterfassDateNormal; + AppSettings.IsZeiterfassungInStdMin = isZeiterfassungInStdMin; AppSettings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed; AppSettings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl; AppSettings.AnzTageZeiterfassErfolgt = anzTageZeiterfassErfolgt; diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs index 85bad7187..7e34f0a23 100644 --- a/BeWo/Core/Config/AppSettings.cs +++ b/BeWo/Core/Config/AppSettings.cs @@ -14,6 +14,10 @@ namespace BeWo.Core.Config private bool misOnlyYearMonthVisible = true; + private bool misZeiterfassDateNormal = true; + + private bool misZeiterfassungInStdMin = true; + private bool mShowOnlyMySupportConcepts = true; private WindowStateType mWindowStateType = WindowStateType.Default; @@ -54,6 +58,19 @@ namespace BeWo.Core.Config set { misOnlyYearMonthVisible = value; } } + public bool IsZeiterfassDateNormal + { + get { return misZeiterfassDateNormal; } + set { misZeiterfassDateNormal = value; } + } + + public bool IsZeiterfassungInStdMin + { + get { return misZeiterfassungInStdMin; } + set { misZeiterfassungInStdMin = value; } + } + + public int MaxDaysEditServiceRecordsAllowed { get; set; } public int HilfeplanAuslaufAuswahl { get; set; } diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml index f9b5a6443..e61e207b2 100644 --- a/BeWo/View/Detail/MandatorView.xaml +++ b/BeWo/View/Detail/MandatorView.xaml @@ -11,6 +11,7 @@ + @@ -85,21 +86,21 @@ - - - - - - - - - - - + + + - + + + + + + + + + diff --git a/BeWo/View/Detail/MandatorView.xaml.cs b/BeWo/View/Detail/MandatorView.xaml.cs index d796c9f63..a35bc83a7 100644 --- a/BeWo/View/Detail/MandatorView.xaml.cs +++ b/BeWo/View/Detail/MandatorView.xaml.cs @@ -1,4 +1,5 @@ -using BeWo.ServiceProxy; +using System.Windows; +using BeWo.ServiceProxy; using BeWo.ViewModel; using BS.Shared.Extensions; @@ -47,5 +48,6 @@ namespace BeWo.View.Detail BeWoApp.Mandator = m; }))); } + } } \ No newline at end of file diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml b/BeWo/View/Detail/ServiceRecordEditView.xaml index 06646730a..db82ba902 100644 --- a/BeWo/View/Detail/ServiceRecordEditView.xaml +++ b/BeWo/View/Detail/ServiceRecordEditView.xaml @@ -102,17 +102,240 @@ x:Name="chkServiceRecordTypeContent" IsChecked="{Binding Path=IsServiceRecordTypeContent}" Visibility="Visible" /> - + + + @@ -234,7 +461,7 @@ - + diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs index 52a82c3ed..e9e93816f 100644 --- a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs +++ b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Windows; +using System.Windows.Controls; using System.Windows.Input; using BeWo.Controls; @@ -194,16 +195,40 @@ namespace BeWo.View.Detail if (Settings.IsEndDateVisible) { - - datepicker_newEndDate.Visibility = Visibility.Visible; - EndDateLabel.Visibility = Visibility.Visible; + GridMitEnddatum.Visibility = Visibility.Visible; + GridOhneEnddatum.Visibility = Visibility.Collapsed; + GridMitJahrMonat.Visibility = Visibility.Collapsed; + + // ein Bereich für istSTDMin gestzt abfrage + if (Settings.IsZeiterfassungInStdMin) + { + MinSTDMitEnd.Visibility = Visibility.Visible; + MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0); + numeric_duration.SetValue(Grid.ColumnProperty, 1); + } } - else - { - datepicker_newEndDate.Visibility = Visibility.Collapsed; - EndDateLabel.Visibility = Visibility.Collapsed; - } - + else + if (Settings.IsOnlyYearMonthVisible) + { + GridMitJahrMonat.Visibility = Visibility.Visible; + GridOhneEnddatum.Visibility = Visibility.Collapsed; + GridMitEnddatum.Visibility = Visibility.Collapsed; + + }else + { + GridOhneEnddatum.Visibility = Visibility.Visible; + GridMitEnddatum.Visibility = Visibility.Collapsed; + GridMitJahrMonat.Visibility = Visibility.Collapsed; + + // ist STDMin gestzt abfrage + if (Settings.IsZeiterfassungInStdMin) + { + MinSTDOhneEnd.Visibility = Visibility.Visible; + MinStdDauerLabel.SetValue(Grid.ColumnProperty,0); + numerictb_duration.SetValue(Grid.ColumnProperty,1); + } + + } } public bool IsCustomerChangeAllowed() diff --git a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml index 63fb2723e..f131aba62 100644 --- a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml +++ b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml @@ -5,6 +5,7 @@ xmlns:localViewControls="clr-namespace:BeWo.View.Controls" xmlns:val="clr-namespace:BeWo.Validation" xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" + xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True"> @@ -99,7 +100,198 @@