FileWatcher System update + Zeiterfassungs zeit änderungen
This commit is contained in:
@@ -196,6 +196,7 @@ namespace BeWo
|
||||
bool printerSettingsUsePaperKind = false;
|
||||
var hideServiceRecordInsertedByAndInsertedOn = false;
|
||||
bool isEndDateVisible = false;
|
||||
bool isOnlyYearMonthVisible = false;
|
||||
|
||||
AppSettings.ShowAdvisedAttendedFlag = false;
|
||||
String timeRecordingMenuName = "Zeiterfassung";
|
||||
@@ -229,6 +230,11 @@ namespace BeWo
|
||||
isEndDateVisible = true;
|
||||
}
|
||||
|
||||
val = GetSettingValue(_Mandator.Settings, "IsOnlyYearMonthVisible");
|
||||
if (val != null && val.Equals("1"))
|
||||
{
|
||||
isOnlyYearMonthVisible = true;
|
||||
}
|
||||
|
||||
val = GetSettingValue(_Mandator.Settings, "MaxDaysEditServiceRecordsAllowed");
|
||||
int result;
|
||||
@@ -373,7 +379,8 @@ namespace BeWo
|
||||
AppSettings.ShowDatevFields = showDatevFields;
|
||||
AppSettings.IsServiceRecordNoticeMandatory = isServiceRecordNoticeMandatory;
|
||||
AppSettings.IsPasswordSecurityActiv = isPasswordSecurityActiv;
|
||||
AppSettings.IsEndDateVisible = isEndDateVisible;
|
||||
AppSettings.IsEndDateVisible = isEndDateVisible;
|
||||
AppSettings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible;
|
||||
AppSettings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed;
|
||||
AppSettings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl;
|
||||
AppSettings.AnzTageZeiterfassErfolgt = anzTageZeiterfassErfolgt;
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace BeWo.Core.Config
|
||||
|
||||
private bool mIsEndDateVisible = true;
|
||||
|
||||
private bool misOnlyYearMonthVisible = true;
|
||||
|
||||
private bool mShowOnlyMySupportConcepts = true;
|
||||
|
||||
private WindowStateType mWindowStateType = WindowStateType.Default;
|
||||
@@ -45,6 +47,13 @@ namespace BeWo.Core.Config
|
||||
set { mIsEndDateVisible = value; }
|
||||
}
|
||||
|
||||
public bool IsOnlyYearMonthVisible
|
||||
{
|
||||
get { return misOnlyYearMonthVisible; }
|
||||
|
||||
set { misOnlyYearMonthVisible = value; }
|
||||
}
|
||||
|
||||
public int MaxDaysEditServiceRecordsAllowed { get; set; }
|
||||
|
||||
public int HilfeplanAuslaufAuswahl { get; set; }
|
||||
|
||||
@@ -44,6 +44,8 @@ namespace BeWo.Core
|
||||
if (dwi != null)
|
||||
{
|
||||
ueberwachteDateien.Remove(dwi);
|
||||
watcher.EnableRaisingEvents = false;
|
||||
watcher.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,10 +63,10 @@ namespace BeWo.Core
|
||||
watcher = new FileSystemWatcher(fi.DirectoryName);
|
||||
|
||||
watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
|
||||
| NotifyFilters.FileName | NotifyFilters.DirectoryName;
|
||||
|
||||
watcher.EnableRaisingEvents = true;
|
||||
| NotifyFilters.FileName | NotifyFilters.DirectoryName;
|
||||
|
||||
watcher.Changed += new FileSystemEventHandler(OnChanged);
|
||||
watcher.EnableRaisingEvents = true;
|
||||
|
||||
}
|
||||
|
||||
@@ -80,12 +82,12 @@ namespace BeWo.Core
|
||||
{
|
||||
if (WirdDateiUeberwacht(e.FullPath))
|
||||
{
|
||||
BeWoApp.CurrentBeWo.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
|
||||
{
|
||||
if (!offeneDialoge.ContainsKey(e.FullPath))
|
||||
{
|
||||
if (!offeneDialoge.ContainsKey(e.FullPath) )
|
||||
{
|
||||
BeWoApp.CurrentBeWo.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
|
||||
{
|
||||
var dialog = new UploadDialog(e.FullPath, x);
|
||||
|
||||
|
||||
offeneDialoge.Add(e.FullPath, true);
|
||||
|
||||
dialog.ShowDialog();
|
||||
@@ -100,11 +102,11 @@ namespace BeWo.Core
|
||||
dialog.Upload = false;
|
||||
}
|
||||
offeneDialoge.Remove(e.FullPath);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("Datei " + e.FullPath + " hat sich geändert. Veränderungstyp: " + e.ChangeType);
|
||||
// Console.WriteLine("Datei " + e.FullPath + " hat sich geändert. Veränderungstyp: " + e.ChangeType);
|
||||
}
|
||||
|
||||
private bool WirdDateiUeberwacht(string fileName)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
@@ -590,15 +591,16 @@ namespace BeWo.View
|
||||
uFileStream.Write(lFA.BinaryData, 0, lFA.BinaryData.Length);
|
||||
}
|
||||
|
||||
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(tmp));
|
||||
|
||||
BeWoApp.CurrentBeWo.DocumentWatcher.FileCreated -= DocumentWatcher_FileCreated;
|
||||
BeWoApp.CurrentBeWo.DocumentWatcher.FileDeleted -= DocumentWatcher_FileDeleted;
|
||||
BeWoApp.CurrentBeWo.DocumentWatcher.StoppeDateiUeberwachung(tmp);
|
||||
|
||||
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(tmp));
|
||||
|
||||
BeWoApp.CurrentBeWo.DocumentWatcher.StarteDateiUeberwachung(new DocumentWatcherInfo(tmp, cb.Description, cb.BeWoFolderOid, cb.FileAttachmentOid, cb.FileAttachmentVersion, _ObjectOid, _ObjectTid));
|
||||
BeWoApp.CurrentBeWo.DocumentWatcher.FileCreated += DocumentWatcher_FileCreated;
|
||||
BeWoApp.CurrentBeWo.DocumentWatcher.FileDeleted += DocumentWatcher_FileDeleted;
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<!--#### Eingliederung von endDatum und Nur Monat / jahr in verwaltung ###-->
|
||||
<CheckBox Margin="3,5,3,5" Content="Enddatum in Zeiterfassung aktivieren" IsChecked="{Binding Path=IsEndDateVisible}" Grid.ColumnSpan="2" Grid.Row="7"></CheckBox>
|
||||
|
||||
<CheckBox Margin="3,5,3,5" Content="Nur Monat/Jahr in Zeiterfassung aktivieren" Grid.ColumnSpan="2" Grid.Row="8"></CheckBox>
|
||||
<CheckBox Margin="3,5,3,5" Content="Nur Monat/Jahr in Zeiterfassung aktivieren" IsChecked="{Binding Path=IsOnlyYearMonthVisible}" Grid.ColumnSpan="2" Grid.Row="8"></CheckBox>
|
||||
|
||||
<!--#######################################################################-->
|
||||
</Grid>
|
||||
|
||||
@@ -605,127 +605,220 @@
|
||||
x:Name="chkServiceRecordTypeContent" IsChecked="{Binding Path=PrototypeVM.IsServiceRecordTypeContent}"
|
||||
Visibility="Visible" />
|
||||
</Border>
|
||||
<Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" x:Name="GridMitEnddatum">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Label1" />
|
||||
<ColumnDefinition Width="88" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Startdatum" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0"
|
||||
x:Name="datepicker_newDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" x:Name="StartzeitLabel2"/>
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"/>
|
||||
|
||||
<!--####################################### Grid Mit Enddatum #######################################################-->
|
||||
<Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="2" x:Name="GridMitEnddatum">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Label1" />
|
||||
<ColumnDefinition Width="88" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Startdatum" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0"
|
||||
x:Name="datepicker_newDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" x:Name="StartzeitLabel2"/>
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"/>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="1"
|
||||
x:Name="datepicker_newEndDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditableEndDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
<Label Grid.Column="2" Grid.Row="2" Content="Uhrzeit" />
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="1" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="1"
|
||||
x:Name="datepicker_newEndDate2"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditableEndDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="1" Content="Uhrzeit" />
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="1" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="58" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="58" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="6" Content="Startdatum" x:Name="startDatum1" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="6"
|
||||
x:Name="datepicker_newDate1"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Content="Dauer" Grid.Column="0" x:Name="MinStdDauerlbl" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationSTD, Mode=TwoWay, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="1" Grid.Row="2"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" />
|
||||
|
||||
|
||||
</Grid>
|
||||
<!--########################################################################################################-->
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="8" Content="Startzeit" x:Name="StartzeitLabel1"/>
|
||||
<Grid Grid.Column="1" Grid.Row="8" x:Name="GridOhneEnddatum">
|
||||
|
||||
<!--##################################### Grit Ohne Enddatum ###############################################-->
|
||||
<Grid Grid.Column="0" Grid.Row="8" ColumnSpan="2" x:Name="GridOhneEnddatum">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="58" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="58" />
|
||||
<ColumnDefinition Width="62" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition MinWidth="60" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Startdatum" x:Name="startDatum1" />
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
x:Name="datepicker_newDate1"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Startzeit" x:Name="StartzeitLabel1" HorizontalAlignment="Left"/>
|
||||
<dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime1"
|
||||
x:Name="startTime1" Grid.Column="1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"/>
|
||||
<Label Grid.Column="1" Content="Endzeit" />
|
||||
|
||||
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1"/>
|
||||
<dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="2" x:Name="endTime1"
|
||||
Grid.Column="3" x:Name="endTime1" Grid.Row="1"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
|
||||
|
||||
|
||||
<Label Content="Dauer" Grid.Column="0" x:Name="MinStdDauerLabel" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration"
|
||||
EditValue="{Binding Path=PrototypeVM.Duration, Mode=TwoWay, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="1" Grid.Row="2"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
|
||||
|
||||
<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" />
|
||||
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Column="0" Grid.Row="9" ColumnSpan="2">
|
||||
|
||||
<!--##############################################################################################################################################-->
|
||||
|
||||
|
||||
<!--########################## Grid mit nur Jahr / Monat und feste dauer #####################################-->
|
||||
<Grid Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="2" x:Name="GridMitJahrMonat">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="Label1" />
|
||||
<ColumnDefinition Width="88" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Jahr" />
|
||||
<!--<dxe:DateEdit Grid.Column="3" Grid.Row="0"
|
||||
x:Name="datepicker_newDate3"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.Date}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />EditValue="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}"-->
|
||||
|
||||
<!--Eine eigenen vm berecih für only monat und only jahr erstellen -->
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="0" Margin="3,0,3,3" x:Name="OnlyJahrData"
|
||||
DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" />
|
||||
|
||||
<!--<Label Grid.Column="2" Grid.Row="0" Content="Uhrzeit" x:Name="StartzeitLabel3"/>
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="0" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime3"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"/>-->
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Monat" x:Name="EndDateLabel3"/>
|
||||
<!-- <dxe:DateEdit Grid.Column="3" Grid.Row="1"
|
||||
x:Name="datepicker_newEndDate3"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=PrototypeVM.EditableEndDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" /> --> <!--Daraus ein auswahl feld mit allen monaten machen und alle auswahlfelder selber schreiben -->
|
||||
|
||||
<!--ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" -->
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="1" Margin="3,0,3,3" x:Name="OnlyMonatData"
|
||||
EditValue="{Binding Path=PrototypeVM.OnlyMonth, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsTextEditable="False" DisplayMember="Value" ValueMember="Key"
|
||||
/>
|
||||
|
||||
<!--<Label Grid.Column="2" Grid.Row="1" Content="Uhrzeit" />
|
||||
<dxe:TextEdit Grid.Column="3" Grid.Row="1" MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
MaskUseAsDisplayFormat="True" InvalidValueBehavior="AllowLeaveEditor"
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime3"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />-->
|
||||
|
||||
<!--Hier fehlen Die duration und der bereich für die Stundenanzeige-->
|
||||
|
||||
<Label Content="Stunden ges." Grid.Column="0" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration3"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationSTD, Mode=TwoWay, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="3" Grid.Row="2"
|
||||
Height="23" Margin="3,0,3,3"/>
|
||||
|
||||
|
||||
<!--<dxe:ComboBoxEdit ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" />-->
|
||||
|
||||
|
||||
</Grid>
|
||||
<!--###########################################################################################################################################-->
|
||||
|
||||
<!--########################## Gefahrene Kilometer ##########################################################-->
|
||||
<Grid Grid.Column="0" Grid.Row="9" ColumnSpan="2" x:Name="DauerGrid" Visibility="Visible">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="67" />
|
||||
<ColumnDefinition Width="83" />
|
||||
<ColumnDefinition Width="100" />
|
||||
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Fortlaufende Änderungen ####################### Änderung : Duration nach DurationSTD -->
|
||||
<Label Content="Dauer" Grid.Column="0" x:Name="MinStdDauerLabel"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationSTD, Mode=TwoWay, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}"
|
||||
Grid.Column="1"
|
||||
Height="23" Margin="0,0,1,3"/>
|
||||
|
||||
|
||||
<Grid Column="2" Row="0" HorizontalAlignment="Right">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<!--<ColumnDefinition Width="Auto" />-->
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Label Content="Stunden" Grid.Column="0" Margin="3,0,3,3" HorizontalAlignment="Right" />-->
|
||||
<!--<CheckBox Grid.Column="1" EditValue VerticalAlignment="Center" Margin="0,0,3,3" HorizontalAlignment="Right" IsChecked="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}" Click="CheckMinStdSwitch_OnClick" x:Name="CheckMinStdSwitch2"/>-->
|
||||
|
||||
<dxe:ComboBoxEdit x:Name="CheckMinStdSwitch" ItemsSource="{x:Static core:EnumTranslations.ZeiterfassungsDauerTranslations}" Grid.Column="1" Margin="3,0,3,3"
|
||||
EditValue="{Binding Path=PrototypeVM.DurationInStunden, UpdateSourceTrigger=PropertyChanged}" DisplayMember="Value" ValueMember="Key"
|
||||
IsTextEditable="False" Width="94"/>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
<Label Grid.Row="1" Content="Gefahrene Kilometer" Grid.Column="0" Grid.ColumnSpan="2" x:Name="lblDistance" HorizontalAlignment="Right"/>
|
||||
<dxe:SpinEdit Grid.Row="1" Increment="5" MinValue="0" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_distance" EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}" Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
<Label Grid.Row="1" Content="Gefahrene Kilometer" Grid.Column="0" x:Name="lblDistance" HorizontalAlignment="Left"/>
|
||||
<dxe:SpinEdit Grid.Row="1" Increment="5" MinValue="0" IsFloatValue="False"
|
||||
AllowNullInput="False" x:Name="numerictb_distance" EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}"
|
||||
Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
</Grid>
|
||||
<!--################################################################################Grid.ColumnSpan="2"#######################################-->
|
||||
|
||||
|
||||
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.Row="8" Grid.ColumnSpan="3"
|
||||
MaxWidth="320" HorizontalAlignment="Left" Visibility="Collapsed">
|
||||
<Label Content="{Binding Path=PrototypeVM.Date, Converter={StaticResource Date2CalendarWeekStringConverter}}" />
|
||||
|
||||
@@ -252,29 +252,62 @@ namespace BeWo.View.Detail
|
||||
|
||||
var Settings = BeWoApp.AppSettings;
|
||||
|
||||
if (Settings.IsEndDateVisible)
|
||||
|
||||
if (Settings.IsOnlyYearMonthVisible)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
|
||||
startDatum1.Visibility = Visibility.Collapsed;
|
||||
datepicker_newDate1.Visibility = Visibility.Collapsed;
|
||||
StartzeitLabel1.Visibility = Visibility.Collapsed;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
|
||||
EndDatumHeader.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
startDatum1.Visibility = Visibility.Visible;
|
||||
datepicker_newDate1.Visibility = Visibility.Visible;
|
||||
StartzeitLabel1.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Visible;
|
||||
GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
EndDatumHeader.Visible = false;
|
||||
}
|
||||
|
||||
List<string> ahh = new List<string>();
|
||||
|
||||
ahh.Add("2015");
|
||||
ahh.Add("2016");
|
||||
ahh.Add("2017");
|
||||
ahh.Add("2014");
|
||||
ahh.Add("2013");
|
||||
|
||||
OnlyJahrData.ItemsSource = ahh;
|
||||
|
||||
|
||||
List<string> behh = new List<string>();
|
||||
|
||||
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;
|
||||
|
||||
|
||||
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;
|
||||
|
||||
EndDatumHeader.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfigureDocTypes()
|
||||
@@ -3875,18 +3908,5 @@ namespace BeWo.View.Detail
|
||||
ReloadMedRecordViewModel(ViewModel.BedarfsMedViewModel.NewVM.Customer, ViewModel.BedarfsMedViewModel.NewVM.Employee);
|
||||
}
|
||||
|
||||
private void CheckMinStdSwitch_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//if (CheckMinStdSwitch.IsChecked == true)
|
||||
//{
|
||||
// MinStdDauerLabel.Content = "Dauer (std)";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// MinStdDauerLabel.Content = "Dauer (min)";
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,6 +163,21 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsOnlyYearMonthVisible
|
||||
{
|
||||
get { return BeWoApp.AppSettings.IsOnlyYearMonthVisible; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(BeWoApp.AppSettings.IsOnlyYearMonthVisible, value))
|
||||
{
|
||||
BeWoApp.AppSettings.IsOnlyYearMonthVisible = value;
|
||||
|
||||
this.Settings = BeWoApp.CreateNewSettingValue(this._Settings, "IsOnlyYearMonthVisible", value ? "1" : "0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int MaxDaysEditServiceRecordsAllowed
|
||||
{
|
||||
get { return BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed; }
|
||||
|
||||
@@ -90,6 +90,8 @@ namespace BeWo.ViewModel
|
||||
|
||||
public static string PropertyName_DurationInStunden = "DurationInStunden";
|
||||
|
||||
public static string PropertyName_OnlyMonth = "OnlyMonth";
|
||||
|
||||
public static string PropertyName_DurationSTD = "DurationSTD";
|
||||
|
||||
public static string PropertyName_EndDate = "EndDate";
|
||||
@@ -173,6 +175,8 @@ namespace BeWo.ViewModel
|
||||
private int? _DistanceInMeter;
|
||||
|
||||
private ZeiterfassungsDauer? _DurationInStunden;
|
||||
|
||||
private string _OnlyMonth;
|
||||
|
||||
|
||||
#endregion
|
||||
@@ -524,71 +528,53 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
return _Duration / 60;
|
||||
}
|
||||
//if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
//{
|
||||
// return _Duration * 60;
|
||||
//}
|
||||
|
||||
return _Duration;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
var newValue = value;
|
||||
|
||||
//#################### So Ein Scheisss #################################
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden )
|
||||
int newValue;
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
newValue *= 60;
|
||||
|
||||
newValue = (int)value *60;
|
||||
}
|
||||
|
||||
if(_DurationInStunden == ZeiterfassungsDauer.Minuten )
|
||||
else
|
||||
{
|
||||
newValue /= 60;
|
||||
newValue = (int)value;
|
||||
|
||||
}
|
||||
//######################################################################
|
||||
//var newValue = value;
|
||||
|
||||
if (newValue >= 0 && AreDifferent(_Duration, newValue))
|
||||
{
|
||||
Console.WriteLine("Change Duration " + newValue.Value);
|
||||
Console.WriteLine("Change Duration " + newValue);
|
||||
|
||||
_Duration = newValue;
|
||||
// _Duration = newValue;
|
||||
_Duration = value;
|
||||
|
||||
if (StartTime != null )
|
||||
{
|
||||
//if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
//{
|
||||
// if (EditableEndDate == null)
|
||||
// {
|
||||
// EditableEndDate = Date;
|
||||
// }
|
||||
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
//var x = newValue*60; // hier liegt das problem
|
||||
EndTime = _StartTime.Value.AddMinutes(newValue);
|
||||
}else{
|
||||
|
||||
// EndTime = EditableEndDate.Value.AddMinutes(value.Value);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
EndTime = StartTime.Value.AddMinutes(newValue.Value);
|
||||
//}
|
||||
EndTime = _StartTime.Value.AddMinutes(newValue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
{
|
||||
//if (Date != null && EndTime != null && Date.Value.Date != EndTime.Value.Date)
|
||||
//{
|
||||
|
||||
// if (StartTime.Value.Hour != 0 && EndTime.Value.Hour != 0)
|
||||
// {
|
||||
// value = (EndTime.Value.Date - Date.Value.Date).GetTotalMinutes();
|
||||
// _Duration += value;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
TimeCheck();
|
||||
FirePropertyChanged(PropertyName_Duration);
|
||||
// FirePropertyChanged(PropertyName_EndTime);
|
||||
FirePropertyChanged(PropertyName_RoundedDuration);
|
||||
|
||||
}
|
||||
@@ -861,7 +847,7 @@ namespace BeWo.ViewModel
|
||||
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
if (diff.Hours > 0) // hier noch etwas genauer abfragen/ was ist wenn stunden ausgewählt und nur 30 min
|
||||
if (diff.Hours > 0 || diff.Minutes > 0) // hier noch etwas genauer abfragen/ was ist wenn stunden ausgewählt und nur 30 min
|
||||
{
|
||||
DurationSTD = (int)diff.TotalHours;
|
||||
}
|
||||
@@ -891,13 +877,8 @@ namespace BeWo.ViewModel
|
||||
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
var x = (decimal) diff.TotalMinutes/60;
|
||||
|
||||
if (x < 0)
|
||||
{
|
||||
x = x * -1;
|
||||
}
|
||||
DurationSTD = (int)x;
|
||||
|
||||
DurationSTD = (int)diff.TotalHours;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -968,7 +949,7 @@ namespace BeWo.ViewModel
|
||||
|
||||
// var x = olddate.Value.Day - _EditableEndDate.Value.Day;
|
||||
|
||||
//int daydiff = (int) x*1440;
|
||||
//int daydiff = (int) x*1440;
|
||||
|
||||
|
||||
|
||||
@@ -997,13 +978,9 @@ namespace BeWo.ViewModel
|
||||
//}
|
||||
|
||||
|
||||
|
||||
DurationSTD = DurationSTD - s;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// DurationSTD = DurationSTD.Value - daydiff;
|
||||
|
||||
}
|
||||
@@ -1171,20 +1148,16 @@ namespace BeWo.ViewModel
|
||||
|
||||
var diff = _EndTime.Value.Subtract(start);
|
||||
|
||||
Duration = (int)diff.TotalMinutes;
|
||||
|
||||
|
||||
//hier abfragen welche zeiterfassung art es ist um die auer ensprechend anzuzeigen
|
||||
//if (_DurationInStunden == ZeiterfassungsDauer.Minuten)
|
||||
//{
|
||||
// DurationSTD = (int)diff.TotalMinutes;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// DurationSTD = (int)diff.TotalMinutes % 60;
|
||||
//}
|
||||
|
||||
DurationSTD = (int)diff.TotalMinutes;
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
_Duration = (int)diff.TotalHours;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Duration = (int)diff.TotalMinutes;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1192,6 +1165,7 @@ namespace BeWo.ViewModel
|
||||
//TimeCheck();
|
||||
// TimeCheckForDurationSTD(false, null);
|
||||
FirePropertyChanged(PropertyName_EndTime);
|
||||
FirePropertyChanged(PropertyName_Duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1643,13 +1617,25 @@ namespace BeWo.ViewModel
|
||||
//{
|
||||
// DurationSTD = (int)diff.TotalMinutes % 60;
|
||||
//}
|
||||
if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
{
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
//decimal x = DurationSTD.Value / 60; // das ist warscheinlich fail
|
||||
|
||||
//var y = DurationSTD.Value /60 ;
|
||||
|
||||
decimal x = DurationSTD.Value / 1440;
|
||||
DurationSTD = (int)diff.TotalHours ;
|
||||
}
|
||||
else
|
||||
{
|
||||
//decimal x = DurationSTD.Value / 1440;
|
||||
|
||||
var y = (int) 1440 * x;
|
||||
|
||||
DurationSTD = (int)diff.TotalMinutes + (int)y;
|
||||
//var y = (int) 1440 * x;
|
||||
|
||||
DurationSTD = (int) diff.TotalMinutes;//+ (int)y;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if (Duration != null)
|
||||
@@ -1733,14 +1719,25 @@ namespace BeWo.ViewModel
|
||||
set
|
||||
{
|
||||
|
||||
if (value == ZeiterfassungsDauer.Minuten && _DurationInStunden == ZeiterfassungsDauer.Stunden && _DurationSTD != null)
|
||||
if (value == ZeiterfassungsDauer.Minuten && _DurationInStunden == ZeiterfassungsDauer.Stunden )
|
||||
{
|
||||
DurationSTD = _DurationSTD * 60;
|
||||
|
||||
if (Duration != null && Duration > 0)
|
||||
Duration = Duration*60;
|
||||
|
||||
|
||||
|
||||
if (_DurationSTD != null && _DurationSTD > 0)
|
||||
DurationSTD = _DurationSTD * 60;
|
||||
}
|
||||
else if (value == ZeiterfassungsDauer.Stunden && _DurationInStunden == ZeiterfassungsDauer.Minuten && _DurationSTD != null && _DurationSTD >= 60)
|
||||
else if (value == ZeiterfassungsDauer.Stunden && _DurationInStunden == ZeiterfassungsDauer.Minuten )
|
||||
{
|
||||
DurationSTD = _DurationSTD / 60;
|
||||
|
||||
if (_Duration != null && _Duration >= 60)
|
||||
Duration = _Duration/60;
|
||||
|
||||
if (_DurationSTD != null && _DurationSTD >= 60)
|
||||
DurationSTD = _DurationSTD / 60;
|
||||
}
|
||||
|
||||
if (AreDifferent(_DurationInStunden, value))
|
||||
@@ -1750,12 +1747,34 @@ namespace BeWo.ViewModel
|
||||
|
||||
FirePropertyChanged(PropertyName_DurationInStunden);
|
||||
FirePropertyChanged(PropertyName_DurationSTD);
|
||||
//FirePropertyChanged(PropertyName_Duration);
|
||||
|
||||
if (_Duration != null)
|
||||
Duration = _Duration;
|
||||
|
||||
TimeCheckForDurationSTD(_DurationInStunden);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//################### Binden des Wert6es über die VM ###########################
|
||||
public string OnlyMonth
|
||||
{
|
||||
get { return _OnlyMonth; }
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_OnlyMonth, value))
|
||||
{
|
||||
_OnlyMonth = value;
|
||||
|
||||
//StoreDirtyInformation(!AreEqual(DataContract.ServiceRecordType, value),
|
||||
// PropertyName_ServiceRecordType);
|
||||
FirePropertyChanged(PropertyName_OnlyMonth);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//###############################################################################
|
||||
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.GreaterThanOrEqualZero)]
|
||||
|
||||
@@ -247,6 +247,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return SerializeObject(endtime);
|
||||
}
|
||||
|
||||
public string CheckOnlyYearMonth()
|
||||
{
|
||||
|
||||
var m = OperationsService.GetMandator();
|
||||
var yearMonth = GetSettingValue(m.Settings, "IsOnlyYearMonthVisible");
|
||||
|
||||
return SerializeObject(yearMonth);
|
||||
}
|
||||
|
||||
|
||||
public string CheckDokuReiter() {
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ namespace BeWo.Data.Entities
|
||||
|
||||
public static string Setting_IsEndDateVisible = "IsEndDateVisible";
|
||||
|
||||
public static string Setting_IsOnlyYearMonthVisible = "IsOnlyYearMonthVisible";
|
||||
|
||||
public static string Setting_MaxDaysEditServiceRecordsAllowed = "MaxDaysEditServiceRecordsAllowed";
|
||||
|
||||
public static string Setting_HilfeplanAuslaufAuswahl = "HilfeplanAuslaufAuswahl";
|
||||
@@ -151,6 +153,19 @@ namespace BeWo.Data.Entities
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsOnlyYearMonthVisible
|
||||
{
|
||||
get
|
||||
{
|
||||
var val = this.GetSettingValue(Setting_IsOnlyYearMonthVisible);
|
||||
if (val != null && val.Equals("0"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int? MaxDaysEditServiceRecordsAllowed
|
||||
{
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace BeWo.Service.Configuration
|
||||
|
||||
public bool IsEndDateVisible { get; set; }
|
||||
|
||||
public bool IsOnlyYearMonthVisible { get; set; }
|
||||
|
||||
public int MaxDaysEditServiceRecordsAllowed { get; set; }
|
||||
|
||||
public int HilfeplanAuslaufAuswahl { get; set; }
|
||||
@@ -55,6 +57,7 @@ namespace BeWo.Service.Configuration
|
||||
bool isServiceRecordNoticeMandatory = true;
|
||||
bool isPasswordSecurityActiv = false;
|
||||
bool isEndDateVisible = true;
|
||||
bool isOnlyYearMonthVisible = true;
|
||||
bool showServiceRecordsDistanceFields = false;
|
||||
bool showCustomerDistanceFields = false;
|
||||
bool showAdditionalService = false;
|
||||
@@ -92,6 +95,13 @@ namespace BeWo.Service.Configuration
|
||||
isEndDateVisible = false;
|
||||
}
|
||||
|
||||
val = GetSettingValue(mandator.Settings, "IsOnlyYearMonthVisible");
|
||||
if (val != null && val.Equals("0"))
|
||||
{
|
||||
isOnlyYearMonthVisible = false;
|
||||
}
|
||||
|
||||
|
||||
val = GetSettingValue(mandator.Settings, "MaxDaysEditServiceRecordsAllowed");
|
||||
int result;
|
||||
if (Int32.TryParse(val, out result))
|
||||
@@ -162,6 +172,7 @@ namespace BeWo.Service.Configuration
|
||||
settings.IsServiceRecordNoticeMandatory = isServiceRecordNoticeMandatory;
|
||||
settings.IsPasswordSecurityActiv = isPasswordSecurityActiv;
|
||||
settings.IsEndDateVisible = isEndDateVisible;
|
||||
settings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible;
|
||||
settings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed;
|
||||
settings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl;
|
||||
settings.AnzTageZeiterfassErfolgt = anzTageZeiterfassErfolgt;
|
||||
|
||||
Reference in New Issue
Block a user