update zeiterfassung 26.01.2017
This commit is contained in:
@@ -167,7 +167,7 @@ namespace BeWo.View.Detail
|
||||
Loaded += ServiceRecordEditView_Loaded;
|
||||
|
||||
ConfigureDocTypes();
|
||||
isEndDateVisible();
|
||||
isEndDateVisible(pSCViewModel.ServiceRecordFormat, pSCViewModel.DurationInStunden.Value);
|
||||
}
|
||||
|
||||
public void SetSearchText(string text)
|
||||
@@ -188,19 +188,19 @@ namespace BeWo.View.Detail
|
||||
popupedit_employee.Text = BeWoApp.LoggedOnUser.Employee.ToString();
|
||||
}
|
||||
|
||||
private void isEndDateVisible()
|
||||
private void isEndDateVisible(ServiceRecordFormate? scv, ZeiterfassungsDauer zsd)
|
||||
{
|
||||
|
||||
var Settings = BeWoApp.AppSettings;
|
||||
|
||||
if (Settings.IsEndDateVisible)
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitEndDatum/* Settings.IsEndDateVisible*/)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
// ein Bereich für istSTDMin gestzt abfrage
|
||||
if (Settings.IsZeiterfassungInStdMin)
|
||||
if (Settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0);
|
||||
@@ -208,7 +208,7 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
}
|
||||
else
|
||||
if (Settings.IsOnlyYearMonthVisible)
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitMonatJahr/*Settings.IsOnlyYearMonthVisible*/)
|
||||
{
|
||||
GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
@@ -221,7 +221,7 @@ namespace BeWo.View.Detail
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
// ist STDMin gestzt abfrage
|
||||
if (Settings.IsZeiterfassungInStdMin)
|
||||
if (Settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
MinSTDOhneEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty,0);
|
||||
|
||||
@@ -130,7 +130,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
ConfigureDocTypes();
|
||||
InitSelectionList();
|
||||
ConfigureServiceRecordFormats();
|
||||
ConfigureServiceRecordFormats(pSelectedViewModel.ServiceRecordFormat,pSelectedViewModel.DurationInStunden.Value);
|
||||
}
|
||||
|
||||
|
||||
@@ -652,19 +652,19 @@ namespace BeWo.View.Detail
|
||||
|
||||
}
|
||||
|
||||
private void ConfigureServiceRecordFormats()
|
||||
private void ConfigureServiceRecordFormats(ServiceRecordFormate? scv, ZeiterfassungsDauer zsd)
|
||||
{
|
||||
|
||||
var Settings = BeWoApp.AppSettings;
|
||||
|
||||
if (Settings.IsEndDateVisible)
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitEndDatum/*Settings.IsEndDateVisible*/)
|
||||
{
|
||||
GridMitEnddatum.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
// ein Bereich für istSTDMin gestzt abfrage
|
||||
if (Settings.IsZeiterfassungInStdMin)
|
||||
// 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)
|
||||
{
|
||||
MinSTDMitEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerlbl.SetValue(Grid.ColumnProperty, 0);
|
||||
@@ -672,7 +672,7 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
}
|
||||
else
|
||||
if (Settings.IsOnlyYearMonthVisible)
|
||||
if (scv == ServiceRecordFormate.ZeiterfassungMitMonatJahr /*Settings.IsOnlyYearMonthVisible*/)
|
||||
{
|
||||
GridMitJahrMonat.Visibility = Visibility.Visible;
|
||||
GridOhneEnddatum.Visibility = Visibility.Collapsed;
|
||||
@@ -686,7 +686,7 @@ namespace BeWo.View.Detail
|
||||
GridMitJahrMonat.Visibility = Visibility.Collapsed;
|
||||
|
||||
// ist STDMin gestzt abfrage
|
||||
if (Settings.IsZeiterfassungInStdMin)
|
||||
if (Settings.IsZeiterfassungInStdMin || zsd == ZeiterfassungsDauer.Stunden)
|
||||
{
|
||||
MinSTDOhneEnd.Visibility = Visibility.Visible;
|
||||
MinStdDauerLabel.SetValue(Grid.ColumnProperty, 0);
|
||||
|
||||
@@ -1007,7 +1007,7 @@
|
||||
<dxb:BarManager.Items>
|
||||
<dxb:BarButtonItem Name="dxEditButton" Content="Eintrag bearbeiten" Glyph="..\..\Ressources\Icons\Symbol Edit.png" ItemClick="DxEditButton_OnItemClick"/>
|
||||
<dxb:BarButtonItem Name="dxDeleteButton" Content="Eintrag löschen" Glyph="..\..\Ressources\Icons\Symbol Delete.png" ItemClick="DxDeleteButton_OnItemClick"/>
|
||||
<dxb:BarButtonItem Name="dxHistoryButton" Content="Änderungshistorie anzeigen" Glyph="..\..\Ressources\Icons\History24.png" ItemClick="DxHistoryButton_OnItemClick"/>
|
||||
<dxb:BarButtonItem Name="dxHistoryButton" Content="Änderungshistorie anzeigen" Glyph="..\..\Ressources\Icons\History24.png" ItemClick="DxHistoryButton_OnItemClick"/>
|
||||
</dxb:BarManager.Items>
|
||||
<dxg:GridControl x:Name="srGridControl" TabIndex="1" AutoExpandAllGroups="True" Visibility="Hidden" >
|
||||
<dxb:BarManager.DXContextMenu>
|
||||
@@ -1116,7 +1116,7 @@
|
||||
<RowDefinition Height="14" />
|
||||
<RowDefinition Height="24" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="Minuten (gerundet):" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="1" Text="{Binding Path=DurationInStunden, StringFormat={}{0} (gerundet): }" /> <!-- vorher stand Minuten (gerundet):-->
|
||||
<TextBlock Grid.Column="0" Grid.Row="2" Text="Leistungskategorie:" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="3" Text="Leistung:" />
|
||||
<TextBlock Grid.Column="0" Grid.Row="4" Text="Angelegt für:" />
|
||||
|
||||
@@ -1291,13 +1291,24 @@ namespace BeWo.ViewModel
|
||||
{
|
||||
var date = string.Empty;
|
||||
|
||||
if (_Date != null)
|
||||
{
|
||||
date = DateTimeFormatInfo.CurrentInfo.GetAbbreviatedDayName(_Date.Value.DayOfWeek) + ", " + _Date.Value.ToShortDateString();
|
||||
}
|
||||
//if (_Date != null)
|
||||
//{
|
||||
|
||||
// if (_EditableEndDate.Value.Date != _Date.Value.Date)
|
||||
// {
|
||||
// date = DateTimeFormatInfo.CurrentInfo.GetAbbreviatedDayName(_Date.Value.DayOfWeek) + ", " + _Date.Value.ToShortDateString() + " - " + _EditableEndDate.Value.ToShortDateString();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// date = DateTimeFormatInfo.CurrentInfo.GetAbbreviatedDayName(_Date.Value.DayOfWeek) + ", " + _Date.Value.ToShortDateString();
|
||||
// }
|
||||
|
||||
//}
|
||||
|
||||
string time = string.Empty;
|
||||
|
||||
string endtime = string.Empty;
|
||||
|
||||
if (_StartTime != null)
|
||||
{
|
||||
var timeDt = _StartTime.Value;
|
||||
@@ -1314,11 +1325,29 @@ namespace BeWo.ViewModel
|
||||
timeDt = timeDt.AddMinutes((double) RoundedDuration);
|
||||
}
|
||||
|
||||
time = time + " - " + timeDt.ToShortTimeString();
|
||||
endtime = timeDt.ToShortTimeString();
|
||||
|
||||
//time = time + " - " + timeDt.ToShortTimeString();
|
||||
}
|
||||
}
|
||||
|
||||
date += " " + time;
|
||||
|
||||
if (_Date != null)
|
||||
{
|
||||
|
||||
if (_EditableEndDate.Value.Date != _Date.Value.Date)
|
||||
{
|
||||
date = DateTimeFormatInfo.CurrentInfo.GetAbbreviatedDayName(_Date.Value.DayOfWeek) + ", " + _Date.Value.ToShortDateString() + " " + time + " - " + _EditableEndDate.Value.ToShortDateString() + " " + endtime;
|
||||
}
|
||||
else
|
||||
{
|
||||
time = time + " - " + endtime;
|
||||
date = DateTimeFormatInfo.CurrentInfo.GetAbbreviatedDayName(_Date.Value.DayOfWeek) + ", " + _Date.Value.ToShortDateString() + " " + time;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//date += " " + time;
|
||||
|
||||
if (GroupOid != null && GroupPersonCount != null && GroupRoundedDuration != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user