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" />
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -124,7 +347,7 @@
-
+
@@ -136,31 +359,35 @@
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
@@ -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 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Nur diesen Eintrag bearbeiten
diff --git a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml.cs b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml.cs
index b24375cec..99af4e3b6 100644
--- a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows;
+using System.Windows.Controls;
using System.Windows.Threading;
using BeWo.Core;
using BeWo.Core.Service;
@@ -129,29 +130,9 @@ namespace BeWo.View.Detail
ConfigureDocTypes();
InitSelectionList();
- isEndDateVisible();
+ ConfigureServiceRecordFormats();
}
- private void isEndDateVisible()
- {
-
- var Settings = BeWoApp.AppSettings;
-
- if (Settings.IsEndDateVisible)
- {
- datepicker_newEndDate.Visibility = Visibility.Visible;
- EndDateLabel.Visibility = Visibility.Visible;
- }
- else
- {
- datepicker_newEndDate.Visibility = Visibility.Collapsed;
- EndDateLabel.Visibility = Visibility.Collapsed;
- }
- }
-
-
-
-
public bool IsCustomerChangeAllowed()
{
@@ -670,5 +651,51 @@ namespace BeWo.View.Detail
}
}
+
+ private void ConfigureServiceRecordFormats()
+ {
+
+ var Settings = BeWoApp.AppSettings;
+
+ if (Settings.IsEndDateVisible)
+ {
+ 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
+ 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);
+ }
+
+ }
+
+
+ }
}
}
\ No newline at end of file
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml b/BeWo/View/Detail/ServiceRecordView2.xaml
index 8492b6338..02655fcfa 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml
@@ -650,17 +650,17 @@
Margin="3,0,3,3" />
-
+
+ IsTextEditable="False" x:Name="MinSTDMitEnd" Visibility="Collapsed" />
@@ -709,17 +709,17 @@
-
+
+ IsTextEditable="False" x:Name="MinSTDOhneEnd" Visibility="Collapsed"/>
@@ -742,44 +742,20 @@
-
-
-
+
+
-
-
+
-
-
-
-
-
-
-
+ IsTextEditable="False"
+ ItemsSource="{Binding Path=PrototypeVM.MonateBinden}" />
+
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
index 7702b697a..e21f4e653 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
@@ -260,54 +260,49 @@ namespace BeWo.View.Detail
GridOhneEnddatum.Visibility = Visibility.Collapsed;
EndDatumHeader.Visible = false;
-
- List ahh = new List();
-
- ahh.Add("2015");
- ahh.Add("2016");
- ahh.Add("2017");
- ahh.Add("2014");
- ahh.Add("2013");
-
- OnlyJahrData.ItemsSource = ahh;
-
-
- List behh = new List();
-
- ahh.Add("Januar");
- ahh.Add("Februar");
- ahh.Add("März");
- ahh.Add("April");
- ahh.Add("usw.");
-
-
- ////OnlyMonatData.ItemsSource = behh;
- //OnlyMonatData.Items.Add(behh);
-
+
}else
if (Settings.IsEndDateVisible)
{
GridMitEnddatum.Visibility = Visibility.Visible;
- GridMitJahrMonat.Visibility = Visibility.Collapsed;
- //startDatum1.Visibility = Visibility.Collapsed;
- //datepicker_newDate1.Visibility = Visibility.Collapsed;
- //StartzeitLabel1.Visibility = Visibility.Collapsed;
- GridOhneEnddatum.Visibility = Visibility.Collapsed;
+ GridMitJahrMonat.Visibility = Visibility.Collapsed;
+ GridOhneEnddatum.Visibility = Visibility.Collapsed;
-
+ if (Settings.IsZeiterfassungInStdMin)
+ {
+ MinSTDMitEnd.Visibility = Visibility.Visible;
+ MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0);
+ numeric_duration.SetValue(Grid.ColumnProperty, 1);
+ }
+
EndDatumHeader.Visible = true;
}
else
{
GridMitEnddatum.Visibility = Visibility.Collapsed;
- GridMitJahrMonat.Visibility = Visibility.Collapsed;
- //startDatum1.Visibility = Visibility.Visible;
- //datepicker_newDate1.Visibility = Visibility.Visible;
- //StartzeitLabel1.Visibility = Visibility.Visible;
- GridOhneEnddatum.Visibility = Visibility.Visible;
+ GridMitJahrMonat.Visibility = Visibility.Collapsed;
+ GridOhneEnddatum.Visibility = Visibility.Visible;
+
+ if (Settings.IsZeiterfassungInStdMin)
+ {
+ MinSTDOhneEnd.Visibility = Visibility.Visible;
+ MinStdDauerLabel.SetValue(Grid.ColumnProperty, 0);
+ numerictb_duration.SetValue(Grid.ColumnProperty, 1);
+ }
EndDatumHeader.Visible = false;
}
+
+
+ // ein Bereich für istSTDMin gestzt abfrage
+ if (Settings.IsZeiterfassungInStdMin)
+ {
+
+ }
+ else
+ {
+
+ }
}
private void ConfigureDocTypes()
diff --git a/BeWo/ViewModel/MandatorVM.cs b/BeWo/ViewModel/MandatorVM.cs
index 127f4dac9..2768747f5 100644
--- a/BeWo/ViewModel/MandatorVM.cs
+++ b/BeWo/ViewModel/MandatorVM.cs
@@ -171,6 +171,8 @@ namespace BeWo.ViewModel
{
if (this.AreDifferent(BeWoApp.AppSettings.IsOnlyYearMonthVisible, value))
{
+
+
BeWoApp.AppSettings.IsOnlyYearMonthVisible = value;
this.Settings = BeWoApp.CreateNewSettingValue(this._Settings, "IsOnlyYearMonthVisible", value ? "1" : "0");
@@ -178,6 +180,46 @@ namespace BeWo.ViewModel
}
}
+ public bool IsZeiterfassDateNormal
+ {
+ get
+ {
+
+ if (IsEndDateVisible == false && IsOnlyYearMonthVisible == false && BeWoApp.AppSettings.IsZeiterfassDateNormal == false)
+ {
+ BeWoApp.AppSettings.IsZeiterfassDateNormal = true;
+ }
+
+ return BeWoApp.AppSettings.IsZeiterfassDateNormal;
+ }
+
+ set
+ {
+ if (this.AreDifferent(BeWoApp.AppSettings.IsZeiterfassDateNormal, value))
+ {
+ BeWoApp.AppSettings.IsZeiterfassDateNormal = value;
+
+ this.Settings = BeWoApp.CreateNewSettingValue(this._Settings, "IsZeiterfassDateNormal", value ? "1" : "0");
+ }
+ }
+ }
+
+ public bool IsZeiterfassungInStdMin
+ {
+ get { return BeWoApp.AppSettings.IsZeiterfassungInStdMin; }
+
+ set
+ {
+ if (this.AreDifferent(BeWoApp.AppSettings.IsZeiterfassungInStdMin, value))
+ {
+ BeWoApp.AppSettings.IsZeiterfassungInStdMin = value;
+
+ this.Settings = BeWoApp.CreateNewSettingValue(this._Settings, "IsZeiterfassungInStdMin", value ? "1" : "0");
+ }
+ }
+ }
+
+
public int MaxDaysEditServiceRecordsAllowed
{
get { return BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed; }
diff --git a/BeWo/ViewModel/ServiceRecordVM.cs b/BeWo/ViewModel/ServiceRecordVM.cs
index fec978f36..f78d4565e 100644
--- a/BeWo/ViewModel/ServiceRecordVM.cs
+++ b/BeWo/ViewModel/ServiceRecordVM.cs
@@ -90,8 +90,12 @@ namespace BeWo.ViewModel
public static string PropertyName_DurationInStunden = "DurationInStunden";
+ public static string PropertyName_ServiceRecordFormat = "ServiceRecordFormat";
+
public static string PropertyName_OnlyMonth = "OnlyMonth";
+ public static string PropertyName_OnlyYear = "OnlyYear";
+
public static string PropertyName_DurationSTD = "DurationSTD";
public static string PropertyName_EndDate = "EndDate";
@@ -176,8 +180,13 @@ namespace BeWo.ViewModel
private ZeiterfassungsDauer? _DurationInStunden;
+ private ServiceRecordFormate? _ServiceRecordFormat;
+
private string _OnlyMonth;
-
+
+ private string _OnlyYear;
+
+ private string[] _MonateBinden = {"Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"};
#endregion
@@ -387,6 +396,7 @@ namespace BeWo.ViewModel
var oldDate = _Date;
_Date = value;
TimeCheck();
+
if (BeWoApp.AppSettings.IsEndDateVisible)
{
if (value > EditableEndDate)
@@ -406,9 +416,16 @@ namespace BeWo.ViewModel
// var x = oldDate.Value.Day - _Date.Value.Day;
var x = _Date.Value.Date - oldDate.Value.Date;//_EditableEndDate.Value.Day;
- int daydiff = (int)x.Days * 1440;
-
-
+ int daydiff;
+ if (_DurationInStunden == ZeiterfassungsDauer.Minuten)
+ {
+ daydiff = (int) x.Days * 1440;
+ }
+ else
+ {
+ daydiff = (int)x.Days * 24;
+ }
+
if (DurationSTD.HasValue)
{
@@ -417,7 +434,7 @@ namespace BeWo.ViewModel
{
DurationSTD = 0;
}else{
- DurationSTD = DurationSTD.Value - daydiff; // berechnung ist fehlerhaft
+ DurationSTD = DurationSTD.Value - daydiff;
}
}
else
@@ -430,7 +447,6 @@ namespace BeWo.ViewModel
{
DurationSTD = 0 - daydiff;
}
-
}
}
@@ -1757,10 +1773,33 @@ namespace BeWo.ViewModel
}
}
- //################### Binden des Wert6es über die VM ###########################
+
+ public ServiceRecordFormate? ServiceRecordFormat
+ {
+ get{ return _ServiceRecordFormat; }
+ set
+ {
+ if (AreDifferent(_ServiceRecordFormat, value))
+ {
+ _ServiceRecordFormat = value;
+ StoreDirtyInformation(AreDifferent(DataContract.ServiceRecordFormat, value), PropertyName_ServiceRecordFormat);
+
+ FirePropertyChanged(PropertyName_ServiceRecordFormat);
+ }
+ }
+ }
+ //################### Binden des Wertes über die VM ###########################
public string OnlyMonth
{
- get { return _OnlyMonth; }
+ get
+ {
+ if (_OnlyMonth.IsNullOrEmpty())
+ {
+ _OnlyMonth = DateTime.Now.ToString("MMMM");
+ }
+
+ return _OnlyMonth;
+ }
set
{
if (AreDifferent(_OnlyMonth, value))
@@ -1774,8 +1813,69 @@ namespace BeWo.ViewModel
}
}
+
+
+ //setzen der werte für die Bindings
+
+ public string[] MonateBinden
+ {
+ get { return _MonateBinden; }
+
+ }
+
//###############################################################################
+
+ //################### Binden der Jahre ##########################################
+
+ public string[] JahreBind()
+ {
+ string[] s = new string[11];
+
+ int x = -5;
+ for (int i = 0; i < 11; i++)
+ {
+ var a = DateTime.Now.Year + x;
+ s[i] = a.ToString();
+ x++;
+ }
+
+ return s;
+ }
+
+ public string[] JahreBinden
+ {
+ get { return JahreBind(); }
+
+ }
+
+
+ //So nur noch in die Zeit Übernehmen
+ public string OnlyYear
+ {
+ get
+ {
+ if (_OnlyYear.IsNullOrEmpty())
+ {
+ _OnlyYear = DateTime.Now.Year.ToString();
+ }
+
+ return _OnlyYear;
+ }
+ set
+ {
+ if (AreDifferent(_OnlyYear, value))
+ {
+ _OnlyYear = value;
+
+ //StoreDirtyInformation(!AreEqual(DataContract.ServiceRecordType, value),
+ // PropertyName_ServiceRecordType);
+ FirePropertyChanged(PropertyName_OnlyYear);
+ }
+ }
+ }
+
+ //###############################################################################
[Validation(ValidationRule = ValidationRules.GreaterThanOrEqualZero)]
public int? DurationSTD
@@ -1916,6 +2016,7 @@ namespace BeWo.ViewModel
//??
copy.DurationInStunden = DurationInStunden;
+ copy.ServiceRecordFormat = ServiceRecordFormat;
copy.SelectedGoals.Clear();
foreach (var item in SelectedGoals)
@@ -2001,6 +2102,7 @@ namespace BeWo.ViewModel
_DistanceInMeter = pDataContract.DistanceInMeter;
_DurationInStunden = pDataContract.DurationInStunden;
+ _ServiceRecordFormat = pDataContract.ServiceRecordFormat;
if (pDataContract.Goals != null)
{
@@ -2030,11 +2132,7 @@ namespace BeWo.ViewModel
private ServiceRecordDC CopyToDataContract(ServiceRecordDC pDataContract)
{
- var duration = 0;
- if (_Duration.HasValue)
- {
- duration = _Duration.Value;
- }
+
var date = _Date.Value;
var time = _StartTime.Value;
@@ -2043,22 +2141,45 @@ namespace BeWo.ViewModel
if (BeWoApp.AppSettings.IsEndDateVisible)
{
- if (_EndTime == null || _EndTime.Value.Date < pDataContract.Start.Value.Date)
+ //if (_EndTime == null || _EndTime.Value.Date < pDataContract.Start.Value.Date)
+ //{
+ // _EndTime = pDataContract.Start;
+ //}
+
+ //if (_EndTime == null || pDataContract.Start.Value.Date == _EndTime.Value.Date)
+ //{
+ // pDataContract.End = pDataContract.Start.Value.AddMinutes(duration);
+ //}
+ //else
+ //{
+ // pDataContract.End = new DateTime(_EndTime.Value.Year, _EndTime.Value.Month, _EndTime.Value.Day, _EndTime.Value.Hour, _EndTime.Value.Minute, _EndTime.Value.Second);
+ //}
+
+
+ //Neu schreiben
+ var duration = 0;
+ if (_DurationSTD.HasValue)
{
- _EndTime = pDataContract.Start;
+ duration = _DurationSTD.Value;
}
- if (_EndTime == null || pDataContract.Start.Value.Date == _EndTime.Value.Date)
- {
- pDataContract.End = pDataContract.Start.Value.AddMinutes(duration);
- }
- else
- {
- pDataContract.End = new DateTime(_EndTime.Value.Year, _EndTime.Value.Month, _EndTime.Value.Day, _EndTime.Value.Hour, _EndTime.Value.Minute, _EndTime.Value.Second);
- }
+ //Die Stunden In Minuten umformen
+
+
+ }
+ else if (BeWoApp.AppSettings.IsOnlyYearMonthVisible)
+ {
+ //übergebe hier jahr und monat und gesamt stunden
+ pDataContract.End = pDataContract.Start.Value;
}
else
{
+ var duration = 0;
+ if (_Duration.HasValue)
+ {
+ duration = _Duration.Value;
+ }
+
pDataContract.End = pDataContract.Start.Value.AddMinutes(duration);
}
@@ -2072,6 +2193,7 @@ namespace BeWo.ViewModel
pDataContract.DistanceInMeter = _DistanceInMeter;
pDataContract.DurationInStunden = _DurationInStunden;
+ pDataContract.ServiceRecordFormat = _ServiceRecordFormat;
pDataContract.Employee = _Employee;
pDataContract.Customer = _Customer;
@@ -2199,13 +2321,37 @@ namespace BeWo.ViewModel
}
- if (duration == 0 || (_EndTime.Value.Date <= _EditableEndDate.Value.Date && duration < eintag)) // EditableEnddate hat die 11 dabei ist die date_time 10
+
+ //############### ich probier jetzmal was aus #######################
+
+ if (art == ZeiterfassungsDauer.Minuten)
+ {
+ // Editable enddate muss die Aktuelle Uhrzeit von starttime erhalten und diese Uhrzeit muss dann übergeben werden
+ //_EditableEndDate = _StartTime; //
+
+ _Date = _StartTime;
+ _EditableEndDate = _Date.Value.Date.AddHours(_Date.Value.Hour).AddMinutes(duration);
+
+ //_EditableEndDate = _Date.Value.Date.AddMinutes(duration);
+ }
+ else if (art == ZeiterfassungsDauer.Stunden)
+ {
+
+ _Date = _StartTime;
+ _EditableEndDate = _Date.Value.AddHours(duration);
+ }
+
+ //###################################################################
+
+
+ //########################### Alte Version | Die Halbwegs funktioniert ################################
+ /*if (duration == 0 || (_EndTime.Value.Date <= _EditableEndDate.Value.Date && duration < eintag)) // EditableEnddate hat die 11 dabei ist die date_time 10
{
_EditableEndDate = _Date.Value.Date;
}else
if (duration >= eintag)
{
-
+ //###### bearbeiten ######
decimal dura = duration / eintag;
var x = (double) dura;
@@ -2216,16 +2362,17 @@ namespace BeWo.ViewModel
if (art == ZeiterfassungsDauer.Minuten)
{
- eee = zwischen.TotalMinutes;
+ eee = zwischen.TotalMinutes; // das ist murks
}
else if(art == ZeiterfassungsDauer.Stunden)
{
- eee = zwischen.TotalMinutes;
+ eee = zwischen.TotalMinutes; // das ist murks
}
- if(_EndTime.Value.Hour > 0 && _EndTime.Value.Date != EditableEndDate.Value.Date && x <= eee )
+ if(_EndTime.Value.Hour > 0 && _EndTime.Value.Date != EditableEndDate.Value.Date ) // hmmmmm
{
- _EditableEndDate = _Date.Value.Date.AddDays(x+1);
+ //abfrage um wieviel es sich unterscheidet
+ _EditableEndDate = _Date.Value.Date.AddMinutes(duration);
}
else
{
@@ -2236,7 +2383,7 @@ namespace BeWo.ViewModel
{
if (_EndTime.Value.Date != _EditableEndDate.Value.Date && _EndTime.Value.Date < _EditableEndDate.Value.Date) //man warum 10 != 9 deswegen kommt der rein // die abfrage muss verbessert werden
{
- _EditableEndDate = _Date.Value.Date.AddDays(1);
+ _EditableEndDate = _Date.Value.Date.AddDays(1); // auch hier müssen änderungen vorgenommen werden.
}else{
@@ -2248,12 +2395,13 @@ namespace BeWo.ViewModel
if (_EndTime.Value.Date != _EditableEndDate.Value.Date && _EndTime.Value.Date < _EditableEndDate.Value.Date )
{
- _EditableEndDate = _Date.Value.Date.AddDays(1);
+ _EditableEndDate = _Date.Value.Date.AddDays(1); // auch hier müssen änderungen vorgenommen werden.
}else{
_EditableEndDate = _Date.Value.Date;
}
- }
+ }*/
+ //######################################################################################
}
diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs
index 79188d21d..420d0ffdc 100644
--- a/BeWoPlanerMobil/Controllers/MainController.cs
+++ b/BeWoPlanerMobil/Controllers/MainController.cs
@@ -255,6 +255,24 @@ namespace BeWoPlanerMobil.Controllers
return SerializeObject(yearMonth);
}
+
+ public string CheckIsZeiterfassDateNormal()
+ {
+
+ var m = OperationsService.GetMandator();
+ var normal = GetSettingValue(m.Settings, "IsZeiterfassDateNormal");
+
+ return SerializeObject(normal);
+ }
+
+ public string CheckIsZeiterfassungInStdMin()
+ {
+
+ var m = OperationsService.GetMandator();
+ var zeiterInStdMin = GetSettingValue(m.Settings, "IsZeiterfassungInStdMin");
+
+ return SerializeObject(zeiterInStdMin);
+ }
public string CheckDokuReiter() {
diff --git a/Data/Entities/Mandator.cs b/Data/Entities/Mandator.cs
index aa244377a..72948c76e 100644
--- a/Data/Entities/Mandator.cs
+++ b/Data/Entities/Mandator.cs
@@ -32,6 +32,10 @@ namespace BeWo.Data.Entities
public static string Setting_IsOnlyYearMonthVisible = "IsOnlyYearMonthVisible";
+ public static string Setting_IsZeiterfassDateNormal = "IsZeiterfassDateNormal";
+
+ public static string Setting_IsZeiterfassungInStdMin = "IsZeiterfassungInStdMin";
+
public static string Setting_MaxDaysEditServiceRecordsAllowed = "MaxDaysEditServiceRecordsAllowed";
public static string Setting_HilfeplanAuslaufAuswahl = "HilfeplanAuslaufAuswahl";
@@ -167,6 +171,36 @@ namespace BeWo.Data.Entities
}
}
+ public virtual bool IsZeiterfassDateNormal
+ {
+ get
+ {
+ var val = this.GetSettingValue(Setting_IsZeiterfassDateNormal);
+ if (val != null && val.Equals("0"))
+ {
+ return false;
+ }
+
+ return true;
+ }
+ }
+
+ public virtual bool IsZeiterfassungInStdMin
+ {
+ get
+ {
+ var val = this.GetSettingValue(Setting_IsZeiterfassungInStdMin);
+ if (val != null && val.Equals("0"))
+ {
+ return false;
+ }
+
+ return true;
+ }
+ }
+
+
+
public virtual int? MaxDaysEditServiceRecordsAllowed
{
get
diff --git a/Data/Entities/ServiceRecord.cs b/Data/Entities/ServiceRecord.cs
index acd47b71e..1da31c006 100644
--- a/Data/Entities/ServiceRecord.cs
+++ b/Data/Entities/ServiceRecord.cs
@@ -48,6 +48,8 @@ namespace BeWo.Data.Entities
public static string PropertyName_DurationInStunden = "DurationInStunden";
+ public static string PropertyName_ServiceRecordFormat = "ServiceRecordFormat";
+
private long? _WohnheimbuchungsOid;
private bool _isCreatedInMobileClient;
@@ -98,6 +100,8 @@ namespace BeWo.Data.Entities
private ZeiterfassungsDauer? _DurationInStunden;
+ private ServiceRecordFormate? _ServiceRecordFormat;
+
public virtual bool IsCreatedInMobileClient
{
@@ -553,5 +557,22 @@ namespace BeWo.Data.Entities
}
}
+ public virtual ServiceRecordFormate? ServiceRecordFormat
+ {
+ get
+ {
+ return this._ServiceRecordFormat;
+ }
+
+ set
+ {
+ if (this.AreDifferent(this._ServiceRecordFormat, value))
+ {
+ this._ServiceRecordFormat = value;
+ }
+ }
+ }
+
+
}
}
\ No newline at end of file
diff --git a/Data/Mappings/ServiceRecord.hbm.xml b/Data/Mappings/ServiceRecord.hbm.xml
index ed8d06a51..6a64736b7 100644
--- a/Data/Mappings/ServiceRecord.hbm.xml
+++ b/Data/Mappings/ServiceRecord.hbm.xml
@@ -37,8 +37,10 @@
-
-
+
+
+
+
diff --git a/Model/Changes_2016_12_23.txt b/Model/Changes_2016_12_23.txt
new file mode 100644
index 000000000..e9ab2b6a4
--- /dev/null
+++ b/Model/Changes_2016_12_23.txt
@@ -0,0 +1,4 @@
+ALTER TABLE `1234567890`.`servicerecord`
+ADD COLUMN `DurationInStunden`
+INT(10) NULL DEFAULT NULL COMMENT '' AFTER `Notice5`;
+
diff --git a/Model/Changes_2017_01_19.txt b/Model/Changes_2017_01_19.txt
new file mode 100644
index 000000000..4e591f890
--- /dev/null
+++ b/Model/Changes_2017_01_19.txt
@@ -0,0 +1,3 @@
+ALTER TABLE `1234567890`.`servicerecord`
+ADD COLUMN `ServiceRecordFormat`
+INT(10) NULL DEFAULT NULL COMMENT '' AFTER `DurationInStunden`;
diff --git a/Service/Configuration/AppSettings.cs b/Service/Configuration/AppSettings.cs
index f0d66c77b..7e6ca7369 100644
--- a/Service/Configuration/AppSettings.cs
+++ b/Service/Configuration/AppSettings.cs
@@ -17,6 +17,10 @@ namespace BeWo.Service.Configuration
public bool IsOnlyYearMonthVisible { get; set; }
+ public bool IsZeiterfassDateNormal { get; set; }
+
+ public bool IsZeiterfassungInStdMin { get; set; }
+
public int MaxDaysEditServiceRecordsAllowed { get; set; }
public int HilfeplanAuslaufAuswahl { get; set; }
@@ -58,6 +62,8 @@ namespace BeWo.Service.Configuration
bool isPasswordSecurityActiv = false;
bool isEndDateVisible = true;
bool isOnlyYearMonthVisible = true;
+ bool isZeiterfassDateNormal = true;
+ bool isZeiterfassungInStdMin = true;
bool showServiceRecordsDistanceFields = false;
bool showCustomerDistanceFields = false;
bool showAdditionalService = false;
@@ -100,6 +106,19 @@ namespace BeWo.Service.Configuration
{
isOnlyYearMonthVisible = false;
}
+
+ val = GetSettingValue(mandator.Settings, "IsZeiterfassDateNormal");
+ if (val != null && val.Equals("0"))
+ {
+ isZeiterfassDateNormal = false;
+ }
+
+ val = GetSettingValue(mandator.Settings, "IsZeiterfassungInStdMin");
+ if (val != null && val.Equals("0"))
+ {
+ isZeiterfassungInStdMin = false;
+ }
+
val = GetSettingValue(mandator.Settings, "MaxDaysEditServiceRecordsAllowed");
@@ -173,6 +192,8 @@ namespace BeWo.Service.Configuration
settings.IsPasswordSecurityActiv = isPasswordSecurityActiv;
settings.IsEndDateVisible = isEndDateVisible;
settings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible;
+ settings.IsZeiterfassDateNormal = isZeiterfassDateNormal;
+ settings.IsZeiterfassungInStdMin = isZeiterfassungInStdMin;
settings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed;
settings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl;
settings.AnzTageZeiterfassErfolgt = anzTageZeiterfassErfolgt;
diff --git a/Service/DCEntityMapper/ServiceRecordDC_ServiceRecord.cs b/Service/DCEntityMapper/ServiceRecordDC_ServiceRecord.cs
index 75ee4826e..d97accc10 100644
--- a/Service/DCEntityMapper/ServiceRecordDC_ServiceRecord.cs
+++ b/Service/DCEntityMapper/ServiceRecordDC_ServiceRecord.cs
@@ -37,6 +37,16 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.DurationInStunden = ZeiterfassungsDauer.Minuten;
}
+ if (pEntity.ServiceRecordFormat != null)
+ {
+ pDataContract.ServiceRecordFormat = pEntity.ServiceRecordFormat;
+ }
+ else
+ {
+ pDataContract.ServiceRecordFormat = ServiceRecordFormate.OriginaleZeiterfassung;
+ }
+
+
if (pEntity.ServiceDescription != null)
@@ -116,6 +126,8 @@ namespace BeWo.Service.DCEntityMapper
pEntity.DurationInStunden = pDataContract.DurationInStunden;
+ pEntity.ServiceRecordFormat = pDataContract.ServiceRecordFormat;
+
pEntity.IP = pDataContract.IP;
if (pEntity.ServiceDescription == null || pEntity.ServiceDescription.Oid != pDataContract.ServiceDescription.ServiceDescriptionOid)
diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs
index 11f32546f..1b39b4aa6 100644
--- a/Shared/BeWoEntityEnums.cs
+++ b/Shared/BeWoEntityEnums.cs
@@ -893,4 +893,11 @@ namespace BS.Shared
Minuten,
Stunden
}
+
+ public enum ServiceRecordFormate
+ {
+ OriginaleZeiterfassung,
+ ZeiterfassungMitEndDatum,
+ ZeiterfassungMitMonatJahr
+ }
}
\ No newline at end of file
diff --git a/Shared/Core/EnumTranslations.cs b/Shared/Core/EnumTranslations.cs
index 00b5ddbc2..0731a4a46 100644
--- a/Shared/Core/EnumTranslations.cs
+++ b/Shared/Core/EnumTranslations.cs
@@ -44,6 +44,8 @@ namespace BS.Shared.Core
public static Dictionary