cb, alle todos für die Version 3.13 und diverse Reports

This commit is contained in:
Christian
2023-03-14 18:12:07 +01:00
parent b05f57c2fa
commit 7fbcc7c2a3
47 changed files with 2184 additions and 1206 deletions

View File

@@ -16,7 +16,7 @@
<EnableSecurityDebugging>true</EnableSecurityDebugging>
<TargetZone>Internet</TargetZone>
<GenerateManifests>true</GenerateManifests>
<SignManifests>false</SignManifests>
<SignManifests>true</SignManifests>
<ManifestKeyFile>
</ManifestKeyFile>
<ManifestCertificateThumbprint>8CA4066C36C87B745E4016FDA715A6DB16FCFFA9</ManifestCertificateThumbprint>
@@ -43,12 +43,12 @@
<TargetCulture>de-DE</TargetCulture>
<ProductName>BeWoPlaner</ProductName>
<PublisherName>beyondSoft GmbH</PublisherName>
<MinimumRequiredVersion>2.0.1.219</MinimumRequiredVersion>
<MinimumRequiredVersion>2.0.1.220</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>220</ApplicationRevision>
<ApplicationRevision>221</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>

View File

@@ -49,8 +49,8 @@ namespace BeWo
public static LoginControl LoginControl;
public static MainControl MainControl;
public static string ShortVersion = "3.12";
public static string Version = "Version 3.12";
public static string ShortVersion = "3.13";
public static string Version = "Version 3.13";
public static int RenderTier = 0;

View File

@@ -873,12 +873,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton1" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton1" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox x:Name="TextboxNotice" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
Text="{val:ValidationBinding Path=Notice, UpdateSourceTrigger=PropertyChanged}"
@@ -908,12 +908,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton2" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton2" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox x:Name="TextboxNotice2" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
Text="{val:ValidationBinding Path=Notice2, UpdateSourceTrigger=PropertyChanged}"
@@ -940,12 +940,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton3" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton3" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox x:Name="TextboxNotice3" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
Text="{val:ValidationBinding Path=Notice3, UpdateSourceTrigger=PropertyChanged}"
@@ -972,12 +972,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton4" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton4" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox x:Name="TextboxNotice4" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
Text="{val:ValidationBinding Path=Notice4, UpdateSourceTrigger=PropertyChanged}"
@@ -1004,12 +1004,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="FullscreenBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton5" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineButton5" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox x:Name="TextboxNotice5" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2"
Text="{val:ValidationBinding Path=Notice5, UpdateSourceTrigger=PropertyChanged}"

File diff suppressed because it is too large Load Diff

View File

@@ -19,6 +19,8 @@ using BS.Shared.Translation;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.RichEdit;
using SupportConceptService = BeWo.Core.Service.SupportConceptService;
using BS.Shared.Extensions;
using BS.Shared.Core;
namespace BeWo.View.Detail.Zeiterfassung
{
@@ -41,12 +43,57 @@ namespace BeWo.View.Detail.Zeiterfassung
private ServiceRecordVM _ServiceRecordVM;
private readonly List<TabItem> _NoticeTabItemList;
private readonly List<TabItem> _RTFNoticeTabItemList;
private readonly List<Button> _TextModuleButtonList;
private readonly List<TextBox> _NoticeTextBoxList;
private TextBox _GrosseDokuTextBox;
public ServiceRecordGroupEditView()
{
InitializeComponent();
Loaded += loaded;
_NoticeTabItemList = new List<TabItem>
{
TabItem1_Notice,
TabItem2_Notice,
TabItem3_Notice,
TabItem4_Notice,
TabItem5_Notice
};
_RTFNoticeTabItemList = new List<TabItem>
{
TabitemRtf1Note,
TabitemRtf2Note,
TabitemRtf3Note,
TabitemRtf4Note,
TabitemRtf5Note
};
_TextModuleButtonList = new List<Button>
{
TextbausteineButton1,
TextbausteineButton2,
TextbausteineButton3,
TextbausteineButton4,
TextbausteineButton5
};
_NoticeTextBoxList = new List<TextBox>
{
TextboxNotice,
TextboxNotice2,
TextboxNotice3,
TextboxNotice4,
TextboxNotice5
};
}
private void loaded(object sender, RoutedEventArgs e)
@@ -163,10 +210,19 @@ namespace BeWo.View.Detail.Zeiterfassung
btnSave.Visibility = Visibility.Hidden;
TabControlNotice.IsEnabled = true;
TextboxNotice.IsEnabled = false;
TextboxNotice2.IsEnabled = false;
TextboxNotice3.IsEnabled = false;
TextboxNotice4.IsEnabled = false;
TextboxNotice5.IsEnabled = false;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneAnsehen))
{
_TextModuleButtonList.DoForEach(button => button.Visibility = Visibility.Collapsed);
}
}
@@ -1144,5 +1200,180 @@ namespace BeWo.View.Detail.Zeiterfassung
});
}
}
private void IncreaseFontSizeBtn_Click(object sender, RoutedEventArgs e)
{
if (!BeWoApp.AppSettings.ShowRtfTextfield)
{
_NoticeTextBoxList.DoForEach(textBox => textBox.FontSize++);
BeWoApp.AppSettings.DocumentationFontSize = TextboxNotice.FontSize;
}
}
private void DecreaseFontSizeBtn_Click(object sender, RoutedEventArgs e)
{
if (!BeWoApp.AppSettings.ShowRtfTextfield)
{
if (TextboxNotice.FontSize <= 1 || TextboxNotice2.FontSize <= 1 ||
TextboxNotice3.FontSize <= 1 ||
TextboxNotice4.FontSize <= 1 || TextboxNotice5.FontSize <= 1)
{
return;
}
_NoticeTextBoxList.DoForEach(textBox => textBox.FontSize--);
BeWoApp.AppSettings.DocumentationFontSize = TextboxNotice.FontSize;
}
}
private void FullscreenBtn_Click(object sender, RoutedEventArgs e)
{
var stackPanel = new StackPanel
{
Orientation = Orientation.Horizontal,
HorizontalAlignment = HorizontalAlignment.Left
};
var schriftVergroessern = new Button
{
Margin = new Thickness(3),
HorizontalAlignment = HorizontalAlignment.Left,
Content = "A+"
};
var schriftVerkleinern = new Button
{
Margin = new Thickness(3),
HorizontalAlignment = HorizontalAlignment.Left,
Content = "A-"
};
var textbausteine = new Button { Margin = new Thickness(3), HorizontalAlignment = HorizontalAlignment.Left, Content = "Textbausteine" };
textbausteine.Click += ButtonBase_OnClick;
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleAnsehen) &&
!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneAnsehen))
{
textbausteine.Visibility = Visibility.Collapsed;
}
stackPanel.Children.Add(schriftVergroessern);
stackPanel.Children.Add(schriftVerkleinern);
stackPanel.Children.Add(textbausteine);
var header = Translator.Translate("Dokumentation");
if (TabItem1_Notice.IsSelected)
{
_GrosseDokuTextBox = ServiceRecordView2.InitMaximizedDocumentationTextBox(TextboxNotice);
header = TabItem1_Notice.Header.ToString();
}
else if (TabItem2_Notice.IsSelected)
{
_GrosseDokuTextBox = ServiceRecordView2.InitMaximizedDocumentationTextBox(TextboxNotice2);
header = TabItem2_Notice.Header.ToString();
}
else if (TabItem3_Notice.IsSelected)
{
_GrosseDokuTextBox = ServiceRecordView2.InitMaximizedDocumentationTextBox(TextboxNotice3);
header = TabItem3_Notice.Header.ToString();
}
else if (TabItem4_Notice.IsSelected)
{
_GrosseDokuTextBox = ServiceRecordView2.InitMaximizedDocumentationTextBox(TextboxNotice4);
header = TabItem4_Notice.Header.ToString();
}
else if (TabItem5_Notice.IsSelected)
{
_GrosseDokuTextBox = ServiceRecordView2.InitMaximizedDocumentationTextBox(TextboxNotice5);
header = TabItem5_Notice.Header.ToString();
}
schriftVergroessern.Click += delegate (object o, RoutedEventArgs args)
{
IncreaseFontSizeBtn_Click(o, args);
_GrosseDokuTextBox.FontSize = TextboxNotice.FontSize;
};
schriftVerkleinern.Click += delegate (object o, RoutedEventArgs args)
{
DecreaseFontSizeBtn_Click(o, args);
_GrosseDokuTextBox.FontSize = TextboxNotice.FontSize;
};
Grid.SetRow(stackPanel, 0);
Grid.SetRow(_GrosseDokuTextBox, 1);
_GrosseDokuTextBox.SpellCheck.IsEnabled = true;
var rootGrid2 = new Grid();
rootGrid2.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
rootGrid2.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
rootGrid2.Children.Add(stackPanel);
rootGrid2.Children.Add(_GrosseDokuTextBox);
var neunzigProzentHoehe = MainControl.ActualHeight * .9;
var neunzigProzentBreite = MainControl.ActualWidth * .9;
var beWoWindow = new BeWoWindow(rootGrid2, "MainContentGroupBoxWithMinimizeBtnStyle")
{
Width = neunzigProzentBreite,
Height = neunzigProzentHoehe,
rootGroupBox = { Header = header },
WindowStartupLocation = WindowStartupLocation.CenterScreen
};
beWoWindow.Closed += delegate
{
_GrosseDokuTextBox = null;
};
beWoWindow.ShowDialog();
}
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
ServiceFacade.DoOperationsServiceAsync(s => s.GetTextModules(false, BeWoApp.LoggedOnEmployeeOid.Value, BeWoApp.HasLoggedOnUserRight(new[] { UserRightType.TextbausteineAlleAnsehen, UserRightType.ViewAll }), false), textModules => this.Dispatch(delegate
{
popup_textbausteine.IsOpen = true;
if (textbausteineSearchView.ServiceCategoryOid > 0)
{
var selectedTextmodules = textModules.Where(w => w.ServiceCategory != null && w.ServiceCategory.ServiceCategoryOid == textbausteineSearchView.ServiceCategoryOid || w.ServiceCategory == null).ToList();
textModules = Utils.GetParentTextModules(selectedTextmodules);
textModules.AddRangeIfElementsNotIn(selectedTextmodules);
}
textbausteineSearchView.InitSearchView(textModules);
}));
}
private void TextModulesSearchView_OnItemSelected(object sender, EventArgs<TextModuleDC> e)
{
if (TabItem1_Notice.IsSelected)
{
ServiceRecordView2.AddTextModuleToTextBox(e.Data.Text, TextboxNotice, _GrosseDokuTextBox);
}
else if (TabItem2_Notice.IsSelected)
{
ServiceRecordView2.AddTextModuleToTextBox(e.Data.Text, TextboxNotice2, _GrosseDokuTextBox);
}
else if (TabItem3_Notice.IsSelected)
{
ServiceRecordView2.AddTextModuleToTextBox(e.Data.Text, TextboxNotice3, _GrosseDokuTextBox);
}
else if (TabItem4_Notice.IsSelected)
{
ServiceRecordView2.AddTextModuleToTextBox(e.Data.Text, TextboxNotice4, _GrosseDokuTextBox);
}
else if (TabItem5_Notice.IsSelected)
{
ServiceRecordView2.AddTextModuleToTextBox(e.Data.Text, TextboxNotice5, _GrosseDokuTextBox);
}
popup_textbausteine.IsOpen = false;
}
}
}

View File

@@ -926,15 +926,15 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" IsTabStop="False" />
<Button Margin="3" Content="A+d" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" TabIndex="999" IsTabStop="False" />
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton1" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton1" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControl1" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton1" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton1" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" x:Name="dokumentationsTextBox"
Text="{val:ValidationBinding Path=PrototypeVM.Notice, UpdateSourceTrigger=PropertyChanged}"
@@ -957,12 +957,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF1" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF1" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControlRTF1" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf1" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf1" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<dxre:RichEditControl x:Name="richEditControl1" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" ActiveViewType="Simple" ContentChanged="RichEditControl1_OnContentChanged">
<dxre:RichEditControl.BehaviorOptions>
@@ -988,14 +988,14 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton2" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton2" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControl2" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton2" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton2" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox Grid.Row="1" Grid.ColumnSpan="3" Grid.Column="0" x:Name="dokumentationsTextBox2"
VerticalAlignment="Stretch"
@@ -1019,12 +1019,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF2" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF2" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControlRTF2" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf2" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf2" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<dxre:RichEditControl x:Name="richEditControl2" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" ActiveViewType="Simple" ContentChanged="RichEditControl2_OnContentChanged">
<dxre:RichEditControl.BehaviorOptions>
@@ -1050,14 +1050,14 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton3" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton3" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControl3" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton3" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton3" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox Grid.Row="1" Grid.ColumnSpan="3" Grid.Column="0" x:Name="dokumentationsTextBox3"
VerticalAlignment="Stretch"
@@ -1081,12 +1081,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF3" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF3" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControlRTF3" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf3" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf3" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<!--<dxre:RichEditControl Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"/>-->
<dxre:RichEditControl x:Name="richEditControl3" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" ActiveViewType="Simple" ContentChanged="RichEditControl3_OnContentChanged">
@@ -1112,14 +1112,14 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton4" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton4" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControl4" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton4" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton4" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox Grid.Row="1" Grid.ColumnSpan="3" Grid.Column="0" x:Name="dokumentationsTextBox4"
VerticalAlignment="Stretch"
@@ -1143,12 +1143,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF4" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF4" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControlRTF4" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf4" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf4" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<dxre:RichEditControl x:Name="richEditControl4" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" ActiveViewType="Simple" ContentChanged="RichEditControl4_OnContentChanged">
<dxre:RichEditControl.BehaviorOptions>
@@ -1173,14 +1173,14 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" />
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" />
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="VollbildDokuButton_OnClick" IsTabStop="False"/>
<Button Margin="3" Content="A+" HorizontalAlignment="Center" Click="IncreaseFontSizeBtn_Click" IsTabStop="False"/>
<Button Margin="3" Content="A-" Click="DecreaseFontSizeBtn_Click" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton5" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButton5" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControl5" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton5" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButton5" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<TextBox Grid.Row="1" Grid.ColumnSpan="3" Grid.Column="0" x:Name="dokumentationsTextBox5"
VerticalAlignment="Stretch"
@@ -1204,12 +1204,12 @@
</Grid.RowDefinitions>
<DockPanel Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left">
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" />
<Button Margin="3" Content="1" FontFamily="Webdings" Click="RTFVollbildDokuButton_OnClick" IsTabStop="False"/>
</DockPanel>
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF5" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" />
<Button Grid.Row="0" Grid.Column="1" Margin="3" x:Name="TextbausteineBearbeitenButtonRTF5" Content="@" FontFamily="Webdings" Click="EditTextbausteineClick" ToolTip="Textbausteine bearbeiten" IsTabStop="False"/>
<!--<localViewControls:TextModuleTreeViewControl x:Name="TextModuleTreeViewControlRTF5" Grid.Row="0" Grid.Column="2" Margin="3" TextModuleSelected="TextModuleTreeViewControl_OnTextModuleSelected" />-->
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf5" Content="Textbausteine" Click="ButtonBase_OnClick" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" x:Name="TextbausteineButtonRtf5" Content="Textbausteine" Click="ButtonBase_OnClick" IsTabStop="False"/>
<dxre:RichEditControl x:Name="richEditControl5" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch" Margin="0" VerticalAlignment="Stretch" ActiveViewType="Simple" ContentChanged="RichEditControl5_OnContentChanged">
<dxre:RichEditControl.BehaviorOptions>

View File

@@ -16,7 +16,9 @@ namespace BeWo.View.Navigation.Sorter
list.Add(new SortItem("Vorname", "FirstName"));
list.Add(new SortItem("Startdatum", "StartDate"));
list.Add(new SortItem("Enddatum", "EndDate"));
list.Add(new SortItem("PLZ", "PostalCode"));
list.Add(new SortItem(Translator.Translate("Kostenträger"), "AllCostBearerNames"));
return list;
}

View File

@@ -454,15 +454,36 @@ namespace BeWo.View.Navigation
CustomerReferenceNumber = kt.CustomerReferenceNumber,
Notice = kt.Notice,
Status = CostBearer2SupportConceptStatus.Created,
SupportConcept = kt.SupportConcept,
ApprovalPeriodList = new List<SupportConceptApprovalPeriodDC> { new SupportConceptApprovalPeriodDC
{
IsApprovedBEShifting = true,
IsApprovedFixedAmountShifting = true,
ApprovedBEInterval = SupportConceptApprovalInterval.Weekly
}}
SupportConcept = kt.SupportConcept
};
if (kt.ApprovalPeriodList != null && kt.ApprovalPeriodList.Count > 0)
{
var ap1 = kt.ApprovalPeriodList[0];
rel.ApprovalPeriodList = new List<SupportConceptApprovalPeriodDC>();
var newap = new SupportConceptApprovalPeriodDC
{
IsApprovedBEShifting = ap1.IsApprovedBEShifting,
IsApprovedFixedAmountShifting = ap1.IsApprovedFixedAmountShifting,
ApprovedBEInterval = ap1.ApprovedBEInterval
};
if (ap1.SupportConceptApprovalPeriodEmployeeRelations != null)
{
newap.SupportConceptApprovalPeriodEmployeeRelations = new List<SupportConceptApprovalPeriodEmployeeRelDC>();
foreach (var item in ap1.SupportConceptApprovalPeriodEmployeeRelations)
{
newap.SupportConceptApprovalPeriodEmployeeRelations.Add(new SupportConceptApprovalPeriodEmployeeRelDC
{
Betreuungsschluessel = item.Betreuungsschluessel,
Employee = item.Employee,
IsAbsolut = item.IsAbsolut
});
}
}
rel.ApprovalPeriodList.Add(newap);
}
copy.CostBearerRelations.Add(rel);
}

View File

@@ -27,12 +27,12 @@ namespace BeWo.View.Report.Finance
{
url += "&onlyNotApproved=1";
}
var tempToken = string.Empty;
ServiceFacade.DoDownloadServiceSync(s => tempToken = s.CreateTemporaryToken(url, true));
var addChar = (url.Contains("?")) ? "&" : "?";
url = url + addChar + "token=" + tempToken;
//var tempToken = string.Empty;
//ServiceFacade.DoDownloadServiceSync(s => tempToken = s.CreateTemporaryToken(url, true));
//var addChar = (url.Contains("?")) ? "&" : "?";
//url = url + addChar + "token=" + tempToken;
url = BeWoWpfUtils.GetHTMLEncodedURL(url);
//url = BeWoWpfUtils.GetHTMLEncodedURL(url);
BeWoUtils.NavigateToReportUriWithDocumentPreviewControl(url, "Finanzauswertung", docPrevControl, null);
}

View File

@@ -11,9 +11,11 @@
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxp="http://schemas.devexpress.com/winfx/2008/xaml/printing"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxpbars="http://schemas.devexpress.com/winfx/2008/xaml/printing/bars"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:localViewControls="clr-namespace:BeWo.View.Controls"
d:DesignHeight="450" d:DesignWidth="800"
Initialized="KilometerauslastungsView_OnInitialized"
@@ -26,6 +28,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@@ -42,20 +45,31 @@
<RadioButton x:Name="EmployeeKmReportRadioButton" Grid.Column="1" Grid.Row="0" Margin="3" VerticalAlignment="Center" VerticalContentAlignment="Center" Content="{markup:Translate Nach Mitarbeiter}" GroupName="ReportTypeRadioGroup" Checked="ToggleButton_OnChecked" />
<CheckBox Grid.Column="0" Grid.Row="1" Margin="3" x:Name="AllCustomersCheckBox" VerticalAlignment="Center" VerticalContentAlignment="Center" Content="{markup:Translate Alle Klienten}" Checked="AllCustomersCheckBox_OnCheckedChanged" Unchecked="AllCustomersCheckBox_OnCheckedChanged" />
<controls:PopUpEdit Grid.Column="1" x:Name="CustomerPopUpEdit" Visibility="{Binding Path=CustomerPopUpEditVisibility, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Path=SelectedCustomer.SimpleDescription, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" Grid.ColumnSpan="3" Grid.Row="1" Margin="3" PopUpClick="CustomersPopUpEdit_OnPopUpClick" Height="22" Cursor="Arrow" DeleteButtonVisibility="Collapsed" HorizontalAlignment="Stretch" />
<controls:PopUpEdit Grid.Column="1" x:Name="CustomerPopUpEdit" Visibility="{Binding Path=CustomerPopUpEditVisibility, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Path=SelectedCustomer.SimpleDescription, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" Grid.ColumnSpan="4" Grid.Row="1" Margin="3" PopUpClick="CustomersPopUpEdit_OnPopUpClick" Height="22" Cursor="Arrow" DeleteButtonVisibility="Collapsed" HorizontalAlignment="Stretch" />
<CheckBox Grid.Column="0" Grid.Row="1" Margin="3" x:Name="AllEmployeesCheckBox" VerticalAlignment="Center" VerticalContentAlignment="Center" Content="{markup:Translate Alle Mitarbeiter}" Checked="AllEmployeesCheckBox_OnChecked" Unchecked="AllEmployeesCheckBox_OnChecked" Visibility="Collapsed" />
<controls:PopUpEdit Grid.Column="1" x:Name="EmployeePopUpEdit" Visibility="{Binding Path=EmployeePopUpEditVisibility, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Path=SelectedEmployee.SimpleDescription, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" Grid.ColumnSpan="3" Grid.Row="1" Margin="3" PopUpClick="EmployeesPopUpEdit_OnPopUpClick" Height="22" Cursor="Arrow" DeleteButtonVisibility="Collapsed" HorizontalAlignment="Stretch" />
<controls:PopUpEdit Grid.Column="1" x:Name="EmployeePopUpEdit" Visibility="{Binding Path=EmployeePopUpEditVisibility, UpdateSourceTrigger=PropertyChanged}" Text="{Binding Path=SelectedEmployee.SimpleDescription, UpdateSourceTrigger=PropertyChanged, Mode=OneWay}" Grid.ColumnSpan="4" Grid.Row="1" Margin="3" PopUpClick="EmployeesPopUpEdit_OnPopUpClick" Height="22" Cursor="Arrow" DeleteButtonVisibility="Collapsed" HorizontalAlignment="Stretch" />
<Label Grid.Column="0" Grid.Row="2" Margin="3" Content="Monat:" />
<Label Content="Startdatum:" Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="2" x:Name="datePickerStartDate" EditValue="{Binding StartDate}" Width="100" HorizontalAlignment="Left" Margin="3,0,0,0" />
<Label Content="Enddatum:" Grid.Column="2" Grid.Row="2" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="3" Grid.Row="2" x:Name="datePickerEndDate" EditValue="{Binding EndDate}" HorizontalAlignment="Left" Width="100" Margin="3,0,0,0" />
<!--<Label Grid.Column="0" Grid.Row="2" Margin="3" Content="Monat:" />
<ComboBox Height="22" x:Name="ComboBoxMonth" ItemsSource="{Binding Path=MonthNames, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="{Binding Path=SelectedMonthIndex, UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="1" Margin="3" HorizontalAlignment="Left" Width="90" />
<Label Grid.Column="2" Grid.Row="2" Margin="3" Content="Jahr:" />
<ComboBox Height="22" x:Name="ComboBoxYear" ItemsSource="{Binding Path=Years, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="{Binding Path=SelectedYearIndex, UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="3" Margin="3" Width="90"></ComboBox>
<ComboBox Height="22" x:Name="ComboBoxYear" ItemsSource="{Binding Path=Years, UpdateSourceTrigger=PropertyChanged}" SelectedIndex="{Binding Path=SelectedYearIndex, UpdateSourceTrigger=PropertyChanged}" Grid.Row="2" Grid.Column="3" Margin="3" Width="90"></ComboBox>-->
<Button x:Name="ButtonGenerate" HorizontalAlignment="Left" Click="ButtonGenerate_OnClick" Grid.Column="0" Grid.Row="3" Margin="2,5,2,2" Content=" Erstellen " Height="23" IsEnabled="{Binding Path=IsCreateButtonEnabled, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="3" Content="Leistungskategorien" Grid.Column="0" VerticalAlignment="Center" />
<!--<ListBox IsSynchronizedWithCurrentItem="True" Grid.Column="3" Grid.Row="1" Grid.RowSpan="3" Margin="10,0,0,0" x:Name="serviceCategoryList" Height="72" VerticalAlignment="Top" />-->
<dxp:DocumentPreviewControl x:Name="DocumentPreviewControl" Grid.Row="5" Grid.ColumnSpan="5" Grid.Column="0" Visibility="Collapsed" CommandBarStyle="Bars" dx:ThemeManager.ThemeName="Office2010Black">
<localViewControls:ComboBoxTreeViewControlV2 x:Name="ComboBoxTreeViewServiceCategory" Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="4" Margin="0,3,0,0" VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
<Button x:Name="ButtonGenerate" HorizontalAlignment="Left" Click="ButtonGenerate_OnClick" Grid.Column="0" Grid.Row="4" Margin="2,5,2,2" Content=" Erstellen " IsEnabled="{Binding Path=IsCreateButtonEnabled, UpdateSourceTrigger=PropertyChanged}" />
<dxp:DocumentPreviewControl x:Name="DocumentPreviewControl" Grid.Row="5" Grid.ColumnSpan="6" Grid.Column="0" Visibility="Collapsed" CommandBarStyle="Bars" dx:ThemeManager.ThemeName="Office2010Black">
<dxp:DocumentPreviewControl.CommandProvider>
<dxp:DocumentCommandProvider>
<dxp:DocumentCommandProvider.Actions>

View File

@@ -8,9 +8,12 @@ using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Controls;
using BeWo.Annotations;
using BeWo.Core;
using BeWo.Core.Service;
using BeWo.ServiceProxy;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using ChatController.Utilities.Extensions;
using DevExpress.Xpf.Core;
@@ -22,6 +25,10 @@ namespace BeWo.View.Report.Kilometerauswertung
{
public bool IsCreateButtonEnabled => ShouldDoListReport || _ReportType == KilometerauslastungsType.Customer && _SelectedCustomer != null || _ReportType == KilometerauslastungsType.Employee && _SelectedEmployee != null;
private DateTime _StartDate;
private DateTime _EndDate;
private List<CompactCustomerDC> AllCustomers { get; set; } = new List<CompactCustomerDC>();
private List<CompactEmployeeDC> AllEmployees { get; set; } = new List<CompactEmployeeDC>();
@@ -134,6 +141,36 @@ namespace BeWo.View.Report.Kilometerauswertung
}
}
public DateTime StartDate
{
get => _StartDate;
set
{
if (_StartDate != value)
{
_StartDate = value;
OnPropertyChanged(nameof(StartDate));
}
}
}
public DateTime EndDate
{
get => _EndDate;
set
{
if (_EndDate != value)
{
_EndDate = value;
OnPropertyChanged(nameof(EndDate));
}
}
}
private KilometerauslastungsType _ReportType = KilometerauslastungsType.Customer;
@@ -143,11 +180,17 @@ namespace BeWo.View.Report.Kilometerauswertung
DataContext = this;
var monthIndex = DateTime.Now.Month - 2;
SelectedMonthIndex = monthIndex < 0 ? 11 : monthIndex;
StartDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(-1);
EndDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddDays(-1);
ComboBoxTreeViewServiceCategory.Imitationheader.Width = 283;
InitServiceCategoryTree();
InitYearComboBox();
if (DateTime.Now.Month == 1)
{
@@ -188,6 +231,40 @@ namespace BeWo.View.Report.Kilometerauswertung
};
}
private void InitServiceCategoryTree()
{
Cache.GetInstance().GetServiceCategoryDescriptionDict(cb =>
this.Dispatch(
delegate
{
//ComboBoxTreeViewServiceCategory.ParentWindowHeight = ActualHeight;
InitServiceCategoryTree(cb);
}));
}
private void InitServiceCategoryTree(Dictionary<ServiceCategoryDC, List<ServiceDescriptionDC>> dict)
{
var categories = dict.Keys;
var tree = new List<ServiceCategoryTreeItem>();
foreach (var dc in categories)
{
var catItem = new ServiceCategoryTreeItem { ServiceCategory = dc, IsChecked = false };
foreach (var item in dict[dc])
{
var descItem = new ServiceCategoryTreeItem
{
ServiceDescription = item,
IsChecked = false
};
catItem.Children.Add(descItem);
}
tree.Add(catItem);
}
ComboBoxTreeViewServiceCategory.TreeViewSourceList = tree;
}
private void InitYearComboBox()
{
var years = new List<int>();
@@ -226,42 +303,109 @@ namespace BeWo.View.Report.Kilometerauswertung
private void ButtonGenerate_OnClick(object sender, RoutedEventArgs e)
{
var selectedYear = Years[SelectedYearIndex];
//var selectedYear = Years[SelectedYearIndex];
var rangeDate = new DateTime(selectedYear, SelectedMonthIndex + 1, 1);
//var rangeDate = new DateTime(selectedYear, SelectedMonthIndex + 1, 1);
var url = string.Format("{0}/ReportView.aspx?type={1}&start={2:ddMMyyyy}&end={3:ddMMyyyy}", BeWoApp.SiteOfOrigin, ReportTypes.KilometerAuswertung, StartDate, EndDate);
if(ShouldDoListReport)
var oidList = new List<long>();
if (_ReportType == KilometerauslastungsType.Customer)
{
if(_ReportType == KilometerauslastungsType.Customer)
url += "&cOids=";
if (ShouldDoListReport)
{
ServiceFacade.DoReportServiceAsync(s => s.CreateKilometerauswertungForAllCustomers(AllCustomers.Select(customer => customer.CustomerOid).ToList(), rangeDate), ShowReport, true);
oidList = AllCustomers.Select(c => c.CustomerOid).ToList();
}
else
else if (SelectedCustomer != null)
{
ServiceFacade.DoReportServiceAsync(s => s.CreateKilometerauswertungForAllEmployees(AllEmployees.Select(employee => employee.EmployeeOid).ToList(), rangeDate), ShowReport, true);
oidList.Add(SelectedCustomer.CustomerOid);
}
}
else
{
if(_ReportType == KilometerauslastungsType.Customer)
url += "&eOids=";
if (ShouldDoListReport)
{
if (SelectedCustomer != null)
{
ServiceFacade.DoReportServiceAsync(
s => s.CreateKilometerauswertung(SelectedCustomer.CustomerOid, rangeDate), ShowReport,
true);
}
oidList = AllEmployees.Select(emp => emp.EmployeeOid).ToList();
}
else
else if (SelectedEmployee != null)
{
if (SelectedEmployee != null)
{
ServiceFacade.DoReportServiceAsync(
s => s.CreateEmployeeKilometerauswertung(SelectedEmployee.EmployeeOid, rangeDate),
ShowReport, true);
}
oidList.Add(SelectedEmployee.EmployeeOid);
}
}
string oidString = "";
foreach (var item in oidList)
{
if (oidString.Length > 0)
{
oidString += ",";
}
oidString += item;
}
url += oidString;
var sdList = new List<ServiceDescriptionDC>();
var sctree = ComboBoxTreeViewServiceCategory.TreeViewSourceList;
foreach (var sc in sctree)
{
sdList.AddRange(from sd in sc.Children where sd.IsChecked select sd.ServiceDescription);
}
if (sdList.Count > 0)
{
oidString = "";
foreach (var item in sdList)
{
if (oidString.Length > 0)
{
oidString += ",";
}
oidString += item.ServiceDescriptionOid ?? 0;
}
url += "&sdOids=" + oidString;
}
//if (ShouldDoListReport)
//{
// AllEmployees.Select(employee => employee.EmployeeOid).ToList()
//}
//else
//{
// if(_ReportType == KilometerauslastungsType.Customer)
// {
// if (SelectedCustomer != null)
// {
// ServiceFacade.DoReportServiceAsync(
// s => s.CreateKilometerauswertung(SelectedCustomer.CustomerOid, rangeDate), ShowReport,
// true);
// }
// }
// else
// {
// if (SelectedEmployee != null)
// {
// ServiceFacade.DoReportServiceAsync(
// s => s.CreateEmployeeKilometerauswertung(SelectedEmployee.EmployeeOid, rangeDate),
// ShowReport, true);
// }
// }
//}
BeWoUtils.NavigateToReportUriWithDocumentPreviewControl(url, "Kilometerauswertung", DocumentPreviewControl, null);
//var tempToken = string.Empty;
//ServiceFacade.DoDownloadServiceSync(s => tempToken = s.CreateTemporaryToken(url, true));
//var addChar = (url.Contains("?")) ? "&" : "?";
//url = url + addChar + "token=" + tempToken;
//url = BeWoWpfUtils.GetHTMLEncodedURL(url);
//BeWoUtils.NavigateToReportUriWithDocumentPreviewControl(url, "Finanzauswertung", docPrevControl, null);
}
private void ShowReport(MemoryStream reportStream)

View File

@@ -84,12 +84,12 @@ namespace BeWo.ViewModel
protected override void InitByDataContract(SupportConceptApprovalPeriodEmployeeRelDC pDataContract)
{
if (!IsNew)
{
//if (!IsNew)
//{
_Employee = pDataContract.Employee;
_Betreuungsschluessel = pDataContract.Betreuungsschluessel;
_IsAbsolut = pDataContract.IsAbsolut;
}
//}
}
protected override SupportConceptApprovalPeriodEmployeeRelDC MapToDataContract(SupportConceptApprovalPeriodEmployeeRelDC pDataContract, bool doCommit)