Kommentare entfernt und minimale anpassungen
This commit is contained in:
@@ -77,10 +77,8 @@
|
||||
<RowDefinition Height="Auto" MinHeight="24" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" MinHeight="24" />
|
||||
<RowDefinition Height="Auto" MinHeight="24" />
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label x:Name="lblEmployee" Grid.Column="0" Grid.Row="0" Content="Mitarbeiter" />
|
||||
<uc:PopUpEdit IsReadOnly="True" x:Name="popupedit_employee"
|
||||
DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_employee_PopUpClick"
|
||||
@@ -105,7 +103,7 @@
|
||||
|
||||
<!--################################################################ Start Der Grid Für Die Zeiterfassungsarten ################################################################-->
|
||||
|
||||
<!--########################################## Grid Bereich für Original / rüberkopiert von ServiceRecordView auf funktionalität und auf design prüfen #####################-->
|
||||
<!--########################################## Grid Bereich für Original #####################-->
|
||||
<Grid Grid.Column="0" Grid.Row="5" ColumnSpan="2" x:Name="GridOhneEnddatum">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
@@ -241,148 +239,54 @@
|
||||
</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 DisplayMember="Value" ValueMember="Key"-->
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="0" Margin="3,0,3,3" x:Name="OnlyJahrData"
|
||||
EditValue="{Binding Path=OnlyYear, UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=JahreBinden}"
|
||||
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 -->
|
||||
|
||||
<!-- DisplayMember="Value" ValueMember="Key"-->
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="1" Margin="3,0,3,3" x:Name="OnlyMonatData"
|
||||
EditValue="{Binding Path=OnlyMonth, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsTextEditable="False"
|
||||
ItemsSource="{Binding Path=MonateBinden}"
|
||||
/>
|
||||
|
||||
|
||||
<!--<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=DurationMonthYearGes, 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 ##########################################################-->
|
||||
<!--########################## Gefahrene Kilometer 52 ##########################################################-->
|
||||
<Grid Grid.Column="0" Grid.Row="6" ColumnSpan="2" x:Name="DauerGrid" Visibility="Visible">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="65" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<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"
|
||||
<Label Grid.Row="1" Content="Gefahrene Kilometer" Grid.Column="1" x:Name="lblDistance" HorizontalAlignment="Right" />
|
||||
<dxe:SpinEdit Grid.Row="1" Increment="5" MinValue="0" IsFloatValue="False" HorizontalAlignment="Right"
|
||||
AllowNullInput="False" x:Name="numerictb_distance" EditValue="{Binding Mode=TwoWay, Path=DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}"
|
||||
Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
|
||||
<!--<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=DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}" Grid.Column="2" Height="23" Margin="3,0,3,3" />-->
|
||||
Grid.Column="2" Height="23" Margin="3,0,3,3" Width="61" />
|
||||
|
||||
</Grid>
|
||||
<!--################################################################################Grid.ColumnSpan="2"#######################################-->
|
||||
|
||||
<!-- <Label Grid.Column="0" Grid.Row="5" Content="Startdatum" />
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="5" EditValue="{val:ValidationBinding Mode=TwoWay, Path=Date}" Height="23" Margin="3,0,3,3" />-->
|
||||
<!-- ####### Neu ####### -->
|
||||
<!--<Label Grid.Column="0" Grid.Row="6" Content="Enddatum" x:Name="EndDateLabel"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="6"
|
||||
x:Name="datepicker_newEndDate"
|
||||
EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditableEndDate}"
|
||||
Height="23" Margin="3,0,3,3" MaskType="DateTimeAdvancingCaret" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="7" Content="Startzeit" />-->
|
||||
<Grid Grid.Column="1" Grid.Row="7" Visibility="Collapsed">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="60" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<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=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}" x:Name="startTime" Height="23" Margin="3,0,3,3" />
|
||||
<Label Grid.Column="1" Content="Endzeit" />
|
||||
<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=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}" Grid.Column="2" x:Name="endTime" Height="23" Margin="3,0,3,3" />
|
||||
</Grid>
|
||||
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="8" ColumnSpan="2" Visibility="Collapsed">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="67" />
|
||||
<ColumnDefinition Width="83" />
|
||||
<ColumnDefinition Width="120" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Content="Dauer" Grid.Column="0" x:Name="DauerAnzeige"/>
|
||||
<dxe:SpinEdit Increment="5" MinValue="0" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration1" EditValue="{Binding Mode=TwoWay, Path=Duration, 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" /> PrototypeVM. das nicht -->
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Label Content="Stunden" Grid.Column="0" Margin="3,0,3,3" HorizontalAlignment="Right" />-->
|
||||
<!--<CheckBox Grid.Column="1" 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=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=DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}" Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
-->
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -193,17 +193,17 @@ namespace BeWo.View.Detail
|
||||
|
||||
var Settings = BeWoApp.AppSettings;
|
||||
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitEndDatum/* Settings.IsEndDateVisible*/)
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitEndDatum)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
//numerictb_duration.EditValue = null; damit wird das problem nicht gelöst
|
||||
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
//numeric_duration3.EditValue = null;
|
||||
|
||||
// ein Bereich für istSTDMin gestzt abfrage
|
||||
|
||||
numerictb_distance.SetValue(WidthProperty,(double)59);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
lblDistance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
|
||||
if (Settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Visible;
|
||||
@@ -212,25 +212,23 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
}
|
||||
else
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitMonatJahr/*Settings.IsOnlyYearMonthVisible*/)
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitMonatJahr)
|
||||
{
|
||||
GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
|
||||
GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
//numerictb_duration.EditValue = null;
|
||||
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
//numeric_duration.EditValue = null;
|
||||
|
||||
}else
|
||||
numerictb_distance.SetValue(WidthProperty,(double)93);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
lblDistance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Left);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
GridOhneEnddatum.Visibility = Visibility.Visible;
|
||||
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
//numeric_duration.EditValue = null;
|
||||
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
//numeric_duration3.EditValue = null;
|
||||
GridOhneEnddatum.Visibility = Visibility.Visible;
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
// ist STDMin gestzt abfrage
|
||||
if (Settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
@@ -276,7 +274,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
bool lValid = !(!_HideCustomers && selectedNode == null);
|
||||
|
||||
lValid = ValidationTrigger.Validate(rootGrid) && lValid; // das problem löst alle probleme aus.
|
||||
lValid = ValidationTrigger.Validate(rootGrid) && lValid;
|
||||
|
||||
if (lValid)
|
||||
{
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Jahr" />
|
||||
<!--Eine eigenen vm berecih für only monat und only jahr erstellen DisplayMember="Value" ValueMember="Key"-->
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="0" Margin="3,0,3,3" x:Name="OnlyJahrData"
|
||||
EditValue="{Binding Path=OnlyYear, UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=JahreBinden}"
|
||||
@@ -245,7 +245,7 @@
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Monat" x:Name="EndDateLabel3"/>
|
||||
<!-- DisplayMember="Value" ValueMember="Key"-->
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="1" Margin="3,0,3,3" x:Name="OnlyMonatData"
|
||||
EditValue="{Binding Path=OnlyMonth, UpdateSourceTrigger=PropertyChanged}"
|
||||
IsTextEditable="False"
|
||||
@@ -258,12 +258,6 @@
|
||||
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>
|
||||
<!--#########################################################################################-->
|
||||
|
||||
@@ -272,7 +266,7 @@
|
||||
<Grid Grid.Column="0" Grid.Row="6" ColumnSpan="2" x:Name="DauerGrid" Visibility="Visible">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="52" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -281,53 +275,13 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<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"
|
||||
<dxe:SpinEdit Grid.Row="1" Increment="5" MinValue="0" IsFloatValue="False" HorizontalAlignment="Right"
|
||||
AllowNullInput="False" x:Name="numerictb_distance" EditValue="{Binding Mode=TwoWay, Path=DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}"
|
||||
Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
Grid.Column="2" Height="23" Margin="3,0,3,3" Width="54"/>
|
||||
|
||||
</Grid>
|
||||
<!--#######################################################################################################-->
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<Label Grid.Column="0" Grid.Row="4" Content="Startdatum" />
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="4" EditValue="{val:ValidationBinding Mode=TwoWay, Path=Date}" Height="23" Margin="3,0,3,3" />
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="5" Content="Enddatum" x:Name="EndDateLabel"/>
|
||||
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" x:Name="datepicker_newEndDate" Grid.Column="1" Grid.Row="5" EditValue="{val:ValidationBinding Mode=TwoWay, Path=EditableEndDate}" Height="23" Margin="3,0,3,3" />
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="6" Content="Startzeit" />
|
||||
<Grid Grid.Column="1" Grid.Row="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="60" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<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=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}" x:Name="startTime" Height="23" Margin="3,0,3,3" />
|
||||
<Label Grid.Column="1" Content="Endzeit" />
|
||||
<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=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}" Grid.Column="2" x:Name="endTime" Height="23" Margin="3,0,3,3" />
|
||||
</Grid>-->
|
||||
|
||||
<!-- <Grid Grid.Column="1" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="60" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Content="Dauer (min)" Grid.Column="1" />
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" AllowNullInput="False" x:Name="numerictb_duration" EditValue="{Binding Mode=TwoWay, Path=Duration, Converter={StaticResource Int2DecimalConverter}, UpdateSourceTrigger=PropertyChanged}" Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
<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=DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}" Grid.Column="2" Height="23" Margin="3,0,3,3" />
|
||||
</Grid>-->
|
||||
|
||||
<!--###################################### Bis Hier hin alles umschreiben ############################################################################################-->
|
||||
|
||||
|
||||
|
||||
<CheckBox x:Name="EditOnlyThisRecord" Grid.Row="7" Visibility="Collapsed">Nur diesen Eintrag bearbeiten</CheckBox>
|
||||
</Grid>
|
||||
|
||||
@@ -663,6 +663,10 @@ namespace BeWo.View.Detail
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
|
||||
numerictb_distance.SetValue(WidthProperty, (double)49);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
|
||||
// ein Bereich für istSTDMin gestzt abfrage | auch wenn setting nicht gesetzt sobald anzeigen falls Duration in Stunden gesetzt.
|
||||
if (Settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
@@ -678,6 +682,9 @@ namespace BeWo.View.Detail
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
numerictb_distance.SetValue(WidthProperty, (double)93);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
lblDistance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Left);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -744,8 +744,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Jahr" />
|
||||
|
||||
<!--Eine eigenen vm berecih für only monat und only jahr erstellen DisplayMember="Value" ValueMember="Key"-->
|
||||
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="0" Margin="3,0,3,3" x:Name="OnlyJahrData"
|
||||
EditValue="{Binding Path=PrototypeVM.OnlyYear, UpdateSourceTrigger=PropertyChanged}"
|
||||
ItemsSource="{Binding Path=PrototypeVM.JahreBinden}"
|
||||
@@ -753,44 +752,36 @@
|
||||
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Monat" x:Name="EndDateLabel3"/>
|
||||
<dxe:ComboBoxEdit Grid.Column="3" Grid.Row="1" Margin="3,0,3,3" x:Name="OnlyMonatData"
|
||||
<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"
|
||||
ItemsSource="{Binding Path=PrototypeVM.MonateBinden}" />
|
||||
|
||||
<!--Hier fehlen Die duration und der bereich für die Stundenanzeige-->
|
||||
|
||||
<Label Content="Stunden ges." Grid.Column="0" Grid.Row="2"/>
|
||||
|
||||
<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.DurationMonthYearGes, 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 ##########################################################-->
|
||||
<!--###########################################################################################################################################-->
|
||||
|
||||
<!--########################## Gefahrene Kilometer ############### -->
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="9" ColumnSpan="2" x:Name="DauerGrid" Visibility="Visible">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="50" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="53" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<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" />
|
||||
<Label Grid.Row="1" Content="Gefahrene Kilometer" Grid.Column="0" x:Name="lblDistance" HorizontalAlignment="Right" />
|
||||
<dxe:SpinEdit Grid.Row="1" Increment="5" MinValue="0" IsFloatValue="False" Width="57" HorizontalAlignment="Right"
|
||||
AllowNullInput="False" x:Name="numerictb_distance" EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.DistanceInMeter, Converter={StaticResource Int2DecimalConverter}}"
|
||||
Grid.Column="3" Height="23" Margin="3,0,3,3" />
|
||||
</Grid>
|
||||
<!--################################################################################Grid.ColumnSpan="2"#######################################-->
|
||||
|
||||
|
||||
@@ -260,8 +260,12 @@ namespace BeWo.View.Detail
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
EndDatumHeader.Visible = false;
|
||||
|
||||
}else
|
||||
|
||||
numerictb_distance.SetValue(WidthProperty, (double)81);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
lblDistance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Left);
|
||||
}
|
||||
else
|
||||
if (Settings.IsEndDateVisible)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
@@ -276,7 +280,11 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
|
||||
EndDatumHeader.Visible = true;
|
||||
}
|
||||
|
||||
numerictb_distance.SetValue(WidthProperty, (double)47);
|
||||
numerictb_distance.SetValue(HorizontalAlignmentProperty, HorizontalAlignment.Right);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Collapsed;
|
||||
|
||||
@@ -548,17 +548,7 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
rd = (rd*Category.Percentage)/100;
|
||||
}
|
||||
|
||||
//?? Keine ahnung weis nicht ??
|
||||
//if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
//{
|
||||
// rd = rd/60;
|
||||
// Duration = Duration/60;
|
||||
// DurationSTD = DurationSTD/60;
|
||||
// DurationMonthYearGes = DurationMonthYearGes/60;
|
||||
//}
|
||||
|
||||
// hier abfrage + statt durationstd , duration
|
||||
|
||||
if(_ServiceRecordFormat == ServiceRecordFormate.ZeiterfassungMitEndDatum) {
|
||||
|
||||
var strResult = _GroupOid != null ? String.Format("{0} ({0})", rd) : String.Format("{0} ({1})", DurationSTD, rd);
|
||||
@@ -802,60 +792,6 @@ namespace BeWo.ViewModel
|
||||
else
|
||||
EndTime = null;
|
||||
}
|
||||
|
||||
//was wird hiernochmal gemacht ??
|
||||
//var start = StartTime.Value;
|
||||
|
||||
////var diff = EndTime.Value.Subtract(start);
|
||||
//var diff = neuerwert.Subtract(start);
|
||||
|
||||
////Soll das doch lieber der Timecheck durchführen ??
|
||||
//if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
//{
|
||||
// if (_Date.Value.Date == _EditableEndDate.Value.Date)
|
||||
// {
|
||||
|
||||
// if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
// {
|
||||
// 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;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// StartTime = neuerwert;
|
||||
// DurationSTD = 0;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (diff.Minutes > 0 || diff.Hours > 0)
|
||||
// {
|
||||
// DurationSTD = (int) diff.TotalMinutes;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// StartTime = neuerwert;
|
||||
// DurationSTD = 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
|
||||
//}else{
|
||||
|
||||
// if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
// {
|
||||
|
||||
// DurationSTD = (int)diff.TotalHours;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// DurationSTD = (int)diff.TotalMinutes;
|
||||
// }
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -864,7 +800,6 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
get {
|
||||
|
||||
//unnötige abfrage,
|
||||
if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
{
|
||||
return _EditableEndDate;
|
||||
@@ -875,17 +810,14 @@ namespace BeWo.ViewModel
|
||||
|
||||
set
|
||||
{
|
||||
//eigentlich unnötig aber erstma drinne lassen zur zusätzlichen überprüfung
|
||||
|
||||
if (BeWoApp.AppSettings.IsEndDateVisible)
|
||||
{
|
||||
|
||||
{
|
||||
if (AreDifferent(_EditableEndDate, value))
|
||||
{
|
||||
//das enddatum wird gleich gesetzt wenn das startdatum größer ist.
|
||||
{
|
||||
if (value < Date)
|
||||
{
|
||||
_EditableEndDate = Date;
|
||||
//Date = value;
|
||||
_EditableEndDate = Date;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -903,9 +835,7 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
_DurationSTD = (int)x.TotalHours;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
FirePropertyChanged(PropertyName_EditableEndDate);
|
||||
FirePropertyChanged(PropertyName_DurationSTD);
|
||||
TimeCheckForDurationSTD();
|
||||
@@ -1627,7 +1557,6 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ServiceRecordFormate? ServiceRecordFormat
|
||||
{
|
||||
get{ return _ServiceRecordFormat; }
|
||||
@@ -1643,7 +1572,6 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
//################### Binden des Wertes über die VM ###########################
|
||||
public string OnlyMonth
|
||||
{
|
||||
get
|
||||
@@ -1718,8 +1646,7 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//###############################################################################
|
||||
|
||||
|
||||
[Validation(ValidationRule = ValidationRules.GreaterThanOrEqualZero)]
|
||||
public int? DurationSTD
|
||||
@@ -1926,21 +1853,18 @@ namespace BeWo.ViewModel
|
||||
#region Methods
|
||||
|
||||
protected override void InitByDataContract(ServiceRecordDC pDataContract)
|
||||
{
|
||||
//Testen
|
||||
{
|
||||
if (pDataContract.ServiceDescription != null)
|
||||
{
|
||||
// Hier läd er die sachen in die View
|
||||
{
|
||||
if (pDataContract.ServiceRecordFormat == ServiceRecordFormate.OriginaleZeiterfassung || pDataContract.ServiceRecordFormat == null)
|
||||
{
|
||||
|
||||
_Date = pDataContract.Start.Value;
|
||||
_StartTime = pDataContract.Start.Value;
|
||||
|
||||
//einfach nur sicherheitshalber dass der wert nicht null ist und es nicht zu unerwarteten fehlermeldungen kommt.
|
||||
_EditableEndDate = pDataContract.End.Value;
|
||||
|
||||
if (pDataContract.DurationInStunden == ZeiterfassungsDauer.Stunden /*&& BeWoApp.AppSettings.IsZeiterfassungInStdMin*/) // die bewoapp abfrage ist glaub ich nicht nötig
|
||||
if (pDataContract.DurationInStunden == ZeiterfassungsDauer.Stunden )
|
||||
{
|
||||
_Duration = (int)(pDataContract.End.Value - pDataContract.Start.Value).TotalHours;
|
||||
|
||||
@@ -1963,8 +1887,8 @@ namespace BeWo.ViewModel
|
||||
_StartTime = pDataContract.Start.Value;
|
||||
_EndTime = pDataContract.End.Value;
|
||||
_EditableEndDate = pDataContract.End.Value;
|
||||
//?? villeicht bei enddate das datum von end übergeben
|
||||
if (pDataContract.DurationInStunden == ZeiterfassungsDauer.Stunden /*&& BeWoApp.AppSettings.IsZeiterfassungInStdMin*/)
|
||||
|
||||
if (pDataContract.DurationInStunden == ZeiterfassungsDauer.Stunden )
|
||||
{
|
||||
_DurationSTD = (int) (pDataContract.End.Value - pDataContract.Start.Value).TotalHours;
|
||||
}
|
||||
@@ -2202,8 +2126,7 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
|
||||
private void TimeCheckForDurationSTD()
|
||||
{
|
||||
//setzte duration
|
||||
{
|
||||
var duration = 0;
|
||||
if (_DurationSTD.HasValue)
|
||||
{
|
||||
@@ -2211,11 +2134,7 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
|
||||
//####################### ich glaub das wars ##########################
|
||||
//Wenn man zuerst die Startdaten auswählt und dann im nachhinein die Uhrzeit setzt dann setzt sich das datum zurück.
|
||||
//Einmal Fixen und je nachdem behalten.
|
||||
|
||||
// Umbaumaßnahmen zeigen erste positive ergebnisse
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Minuten) // Minuten übergeben // wird das nicht wieder ein wenig komplex
|
||||
if (_DurationInStunden == ZeiterfassungsDauer.Minuten)
|
||||
{
|
||||
if (_StartTime != null && _EndTime != null)
|
||||
{
|
||||
@@ -2265,8 +2184,6 @@ namespace BeWo.ViewModel
|
||||
_EndTime = _EndTime.Value.AddMinutes(duration);
|
||||
}
|
||||
|
||||
|
||||
|
||||
_Date = new DateTime(_Date.Value.Year, _Date.Value.Month, _Date.Value.Day, _StartTime.Value.Hour, _StartTime.Value.Minute, _StartTime.Value.Second);
|
||||
_EditableEndDate = new DateTime(_EndTime.Value.Year, _EndTime.Value.Month, _EndTime.Value.Day, _EndTime.Value.Hour, _EndTime.Value.Minute, _EndTime.Value.Second);
|
||||
|
||||
@@ -2277,11 +2194,10 @@ namespace BeWo.ViewModel
|
||||
|
||||
_DurationSTD = duration;
|
||||
}
|
||||
else if (_DurationInStunden == ZeiterfassungsDauer.Stunden) // Stunden übergeben
|
||||
else if (_DurationInStunden == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
if (_StartTime != null && _EndTime != null)
|
||||
{
|
||||
//Villeicht hier von der Startzeit die duration einfügen um den enddatum anzupassen
|
||||
{
|
||||
_StartTime = new DateTime(_Date.Value.Year, _Date.Value.Month, _Date.Value.Day,
|
||||
_StartTime.Value.Hour, _StartTime.Value.Minute, _StartTime.Value.Second);
|
||||
|
||||
@@ -2329,20 +2245,15 @@ namespace BeWo.ViewModel
|
||||
_EndTime = _EndTime.Value.AddHours(duration);
|
||||
}
|
||||
|
||||
|
||||
|
||||
_Date = new DateTime(_Date.Value.Year, _Date.Value.Month, _Date.Value.Day, _StartTime.Value.Hour, _StartTime.Value.Minute, _StartTime.Value.Second);
|
||||
_EditableEndDate = new DateTime(_EndTime.Value.Year, _EndTime.Value.Month, _EndTime.Value.Day, _EndTime.Value.Hour, _EndTime.Value.Minute, _EndTime.Value.Second);
|
||||
|
||||
|
||||
var diff = EditableEndDate.Value.Subtract(_Date.Value);
|
||||
duration = (int)diff.TotalHours;
|
||||
|
||||
|
||||
_DurationSTD = duration;
|
||||
}
|
||||
|
||||
|
||||
FirePropertyChanged(PropertyName_DurationSTD);
|
||||
FirePropertyChanged(PropertyName_StartTime);
|
||||
FirePropertyChanged(PropertyName_EndTime);
|
||||
|
||||
Reference in New Issue
Block a user