Speichern und Laden der Layouts hinzugefügt

This commit is contained in:
rene
2019-07-15 17:18:09 +02:00
parent 75ccd72f49
commit 7759770dec
11 changed files with 308 additions and 167 deletions

View File

@@ -282,11 +282,15 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Detail\Report\FlexibleReportLayoutLoadControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="View\Detail\Report\FlexibleReportView.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="View\Detail\Report\FlexibleReportLayoutSave.xaml">
<Page Include="View\Detail\Report\FlexibleReportLayoutSaveControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
@@ -819,11 +823,14 @@
<Compile Include="View\Detail\Report\EMailStatusLogControl.xaml.cs">
<DependentUpon>EMailStatusLogControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Report\FlexibleReportLayoutLoadControl.xaml.cs">
<DependentUpon>FlexibleReportLayoutLoadControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Report\FlexibleReportView.xaml.cs">
<DependentUpon>FlexibleReportView.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Report\FlexibleReportLayoutSave.xaml.cs">
<DependentUpon>FlexibleReportLayoutSave.xaml</DependentUpon>
<Compile Include="View\Detail\Report\FlexibleReportLayoutSaveControl.xaml.cs">
<DependentUpon>FlexibleReportLayoutSaveControl.xaml</DependentUpon>
</Compile>
<Compile Include="View\Detail\Report\TestEMailControl.xaml.cs">
<DependentUpon>TestEMailControl.xaml</DependentUpon>

View File

@@ -1183,6 +1183,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeDC))]
BS.Shared.DataContracts.PersonDC GetPersonWithCustomerOid(long oid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/GetTimesheetStatusList", ReplyAction="http://tempuri.org/ICustomerService/GetTimesheetStatusListResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/GetTimesheetStatusListBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.TimeSheetStatusItemDC> GetTimesheetStatusList(System.DateTime monat);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/GetAllActiveCustomersCompactWithQBCheckList", ReplyAction="http://tempuri.org/ICustomerService/GetAllActiveCustomersCompactWithQBCheckListRe" +
"sponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/GetAllActiveCustomersCompactWithQBCheckListBe" +
@@ -1989,6 +1993,11 @@ namespace BeWo.ServiceProxy
return base.Channel.GetPersonWithCustomerOid(oid);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.TimeSheetStatusItemDC> GetTimesheetStatusList(System.DateTime monat)
{
return base.Channel.GetTimesheetStatusList(monat);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.QuittierungsCheckViewListItemsDC> GetAllActiveCustomersCompactWithQBCheckList(bool fetchReferenceNumbers, System.Nullable<long> currentEmployeeOid, System.DateTime monat)
{
return base.Channel.GetAllActiveCustomersCompactWithQBCheckList(fetchReferenceNumbers, currentEmployeeOid, monat);
@@ -4209,10 +4218,25 @@ namespace BeWo.ServiceProxy
public interface IOperationsService
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllFlexibleReportEntrys", ReplyAction="http://tempuri.org/IOperationsService/GetAllFlexibleReportEntrysResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllFlexibleReportEntrysBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportEntryDC> GetAllFlexibleReportEntrys(BS.Shared.DataContracts.FlexibleReportFilterDC filter);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetFlexibleReportLayouts", ReplyAction="http://tempuri.org/IOperationsService/GetFlexibleReportLayoutsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetFlexibleReportLayoutsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportLayoutDC> GetFlexibleReportLayouts();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewFlexibleReportLayout", ReplyAction="http://tempuri.org/IOperationsService/InsertNewFlexibleReportLayoutResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewFlexibleReportLayoutBeWoFaultFault" +
"", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void InsertNewFlexibleReportLayout(BS.Shared.DataContracts.FlexibleReportLayoutDC flexibleReportLayoutDC);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
"")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCBeWoFaul" +
"tFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/GetIsChatActiveCustomerAPPCodeDCResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetIsChatActiveCustomerAPPCodeDCBeWoFaultFa" +
"ult", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
@@ -4489,9 +4513,9 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateBudgetBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void UpdateBudget(System.Collections.Generic.List<BS.Shared.DataContracts.BudgetDC> budgets);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllFlexibleReportEntrys", ReplyAction="http://tempuri.org/IOperationsService/GetAllFlexibleReportEntrysResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllFlexibleReportEntrysBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportEntryDC> GetAllFlexibleReportEntrys(BS.Shared.DataContracts.FlexibleReportFilterDC filter);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateMandator", ReplyAction="http://tempuri.org/IOperationsService/UpdateMandatorResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateMandatorBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.MandatorDC UpdateMandator(BS.Shared.DataContracts.MandatorDC mandator);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateServiceCategories", ReplyAction="http://tempuri.org/IOperationsService/UpdateServiceCategoriesResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateServiceCategoriesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
@@ -4792,12 +4816,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateNewChatMessagesDCBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.ChatMessageDC CreateNewChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid, string messageid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
"")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCBeWoFaul" +
"tFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateInvoices", ReplyAction="http://tempuri.org/IOperationsService/DeactivateInvoicesResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateInvoicesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void DeactivateInvoices(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceDC> invoices);
@@ -5050,6 +5068,10 @@ namespace BeWo.ServiceProxy
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
long InsertNewServiceRecordAndSignature(BS.Shared.DataContracts.ServiceRecordDC sr, BS.Shared.DataContracts.SignatureDC sig);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateDefaultServiceRecords", ReplyAction="http://tempuri.org/IOperationsService/CreateDefaultServiceRecordsResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateDefaultServiceRecordsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
string CreateDefaultServiceRecords(System.DateTime monat, System.Collections.Generic.List<long> oids);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/IsAlive", ReplyAction="http://tempuri.org/IOperationsService/IsAliveResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/IsAliveBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
bool IsAlive();
@@ -5073,10 +5095,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateInvoices", ReplyAction="http://tempuri.org/IOperationsService/UpdateInvoicesResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateInvoicesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void UpdateInvoices(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceDC> invoices);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateMandator", ReplyAction="http://tempuri.org/IOperationsService/UpdateMandatorResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateMandatorBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.MandatorDC UpdateMandator(BS.Shared.DataContracts.MandatorDC mandator);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -5113,11 +5131,26 @@ namespace BeWo.ServiceProxy
{
}
public System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportEntryDC> GetAllFlexibleReportEntrys(BS.Shared.DataContracts.FlexibleReportFilterDC filter)
{
return base.Channel.GetAllFlexibleReportEntrys(filter);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportLayoutDC> GetFlexibleReportLayouts()
{
return base.Channel.GetFlexibleReportLayouts();
}
public void InsertNewFlexibleReportLayout(BS.Shared.DataContracts.FlexibleReportLayoutDC flexibleReportLayoutDC)
{
base.Channel.InsertNewFlexibleReportLayout(flexibleReportLayoutDC);
}
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
{
base.Channel.UpdateIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.CustomerAPPCodeDC> GetIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
{
return base.Channel.GetIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
@@ -5433,9 +5466,9 @@ namespace BeWo.ServiceProxy
base.Channel.UpdateBudget(budgets);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportEntryDC> GetAllFlexibleReportEntrys(BS.Shared.DataContracts.FlexibleReportFilterDC filter)
public BS.Shared.DataContracts.MandatorDC UpdateMandator(BS.Shared.DataContracts.MandatorDC mandator)
{
return base.Channel.GetAllFlexibleReportEntrys(filter);
return base.Channel.UpdateMandator(mandator);
}
public void UpdateServiceCategories(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceCategoryDC> pServiceCategories)
@@ -5753,11 +5786,6 @@ namespace BeWo.ServiceProxy
return base.Channel.CreateNewChatMessagesDC(senderOid, empfängerOid, message, isDeliverd, teamid, messageid);
}
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
{
base.Channel.UpdateIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
}
public void DeactivateInvoices(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceDC> invoices)
{
base.Channel.DeactivateInvoices(invoices);
@@ -6043,6 +6071,11 @@ namespace BeWo.ServiceProxy
return base.Channel.InsertNewServiceRecordAndSignature(sr, sig);
}
public string CreateDefaultServiceRecords(System.DateTime monat, System.Collections.Generic.List<long> oids)
{
return base.Channel.CreateDefaultServiceRecords(monat, oids);
}
public bool IsAlive()
{
return base.Channel.IsAlive();
@@ -6072,11 +6105,6 @@ namespace BeWo.ServiceProxy
{
base.Channel.UpdateInvoices(invoices);
}
public BS.Shared.DataContracts.MandatorDC UpdateMandator(BS.Shared.DataContracts.MandatorDC mandator)
{
return base.Channel.UpdateMandator(mandator);
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -6723,6 +6751,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IReportService/CreateServiceRecordListReport", ReplyAction="http://tempuri.org/IReportService/CreateServiceRecordListReportResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IReportService/CreateServiceRecordListReportBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.IO.MemoryStream CreateServiceRecordListReport(long employeeOid, long customerOid, long supportConceptOid, long costbearer2SupportConceptOid, bool isLimited, BS.Shared.Core.DateTimeSpan limitingDateTimeSpan);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IReportService/SendTimeSheetMail", ReplyAction="http://tempuri.org/IReportService/SendTimeSheetMailResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IReportService/SendTimeSheetMailBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
string SendTimeSheetMail(BS.Shared.DataContracts.TimeSheetStatusItemDC item, bool saveMailToDatabase);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -6788,6 +6820,11 @@ namespace BeWo.ServiceProxy
{
return base.Channel.CreateServiceRecordListReport(employeeOid, customerOid, supportConceptOid, costbearer2SupportConceptOid, isLimited, limitingDateTimeSpan);
}
public string SendTimeSheetMail(BS.Shared.DataContracts.TimeSheetStatusItemDC item, bool saveMailToDatabase)
{
return base.Channel.SendTimeSheetMail(item, saveMailToDatabase);
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]

View File

@@ -1,8 +1,9 @@
<UserControl x:Class="BeWo.View.Detail.Report.FlexibleReportLayoutSave"
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:Controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls" x:Class="BeWo.View.Detail.Report.FlexibleReportLayoutLoadControl"
mc:Ignorable="d"
d:DesignHeight="200" d:DesignWidth="300">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
@@ -19,14 +20,9 @@
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Layout Name:" Margin="3"/>
<TextBox x:Name="txtLayoutName" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="3"/>
<TextBox x:Name="txtLayoutString" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Margin="5" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"/>
<Button x:Name="abbrechenButton" Grid.Row="2" Grid.Column="3" Content="Abbrechen" Margin="3" Click="CancelButton_OnClick" Width="80"/>
<Button x:Name="weiterButton" Grid.Row="2" Grid.Column="2" Content="Speichern" Margin="3" Click="SaveButton_OnClick" HorizontalAlignment="Right" Width="80"/>
<!--<TextBox x:Name="TextLayoutString" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Margin="5" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"/>-->
<Button x:Name="CancelButton" Grid.Row="2" Grid.Column="3" Content="Abbrechen" Margin="3" Click="CancelButton_OnClick" Width="80"/>
<Button x:Name="LoadButton" Grid.Row="2" Grid.Column="2" Content="Laden" Margin="3" Click="LoadButton_OnClick" HorizontalAlignment="Right" Width="80"/>
<ListBox x:Name="ListLayout" Grid.ColumnSpan="4" Grid.Row="1" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" Height="111" Margin="3" VerticalAlignment="Top" VerticalContentAlignment="Stretch" Width="100"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace BeWo.View.Detail.Report
{
/// <summary>
/// Interaktionslogik für TestEMailControl.xaml
/// </summary>
public partial class FlexibleReportLayoutLoadControl : UserControl
{
public event Action CancelButtonClicked;
public event Action LoadButtonClicked;
public FlexibleReportLayoutLoadControl()
{
InitializeComponent();
}
public FlexibleReportLayout SelectedLayout
{
get
{
if(ListLayout.SelectedItem is FlexibleReportLayout flexibleReportLayout)
return flexibleReportLayout;
return null;
}
}
private void LoadButton_OnClick(object sender, RoutedEventArgs e)
{
LoadButtonClicked?.Invoke();
}
private void CancelButton_OnClick(object sender, RoutedEventArgs e)
{
CancelButtonClicked?.Invoke();
}
}
}

View File

@@ -0,0 +1,27 @@
<UserControl x:Class="BeWo.View.Detail.Report.FlexibleReportLayoutSaveControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="200" d:DesignWidth="300">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Layout Name:" Margin="3"/>
<TextBox x:Name="TextLayoutName" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="3"/>
<!--<TextBox x:Name="TextLayoutString" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" Margin="5" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"/>-->
<Button x:Name="CancelButton" Grid.Row="2" Grid.Column="3" Content="Abbrechen" Margin="3" Click="CancelButton_OnClick" Width="80"/>
<Button x:Name="SaveButton" Grid.Row="2" Grid.Column="2" Content="Speichern" Margin="3" Click="SaveButton_OnClick" HorizontalAlignment="Right" Width="80"/>
</Grid>
</UserControl>

View File

@@ -17,13 +17,13 @@ namespace BeWo.View.Detail.Report
/// <summary>
/// Interaktionslogik für TestEMailControl.xaml
/// </summary>
public partial class FlexibleReportLayoutSave : UserControl
public partial class FlexibleReportLayoutSaveControl : UserControl
{
public event Action CancelButtonClicked;
public event Action SaveButtonClicked;
public FlexibleReportLayoutSave()
public FlexibleReportLayoutSaveControl()
{
InitializeComponent();
}
@@ -31,15 +31,10 @@ namespace BeWo.View.Detail.Report
public string LayoutName
{
get { return txtLayoutName.Text; }
set { txtLayoutName.Text = value; }
get { return TextLayoutName.Text; }
set { TextLayoutName.Text = value; }
}
public string LayoutString
{
get { return txtLayoutString.Text; }
}
private void SaveButton_OnClick(object sender, RoutedEventArgs e)
{
SaveButtonClicked?.Invoke();

View File

@@ -20,12 +20,10 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!-- ############################################### Obere Zeile ###############################################-->
<!-- ############################################### Obere Zeile ###############################################-->
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -49,28 +47,11 @@
<CheckBox Content="Ausführliche Ansicht" Margin="5,5,0,0" Grid.Column="4" x:Name="checkNullEntries"/>
<Button Content="Aktualisieren" Grid.Column="5" Margin="5,0,0,0" Click="buttonRefresh_Click" />
<CheckBox Content="Graph einblenden" Grid.Column="7" Margin="5,5,0,0" x:Name="checkBoxChart" Checked="CheckChartChanged" Unchecked="CheckChartChanged"/>
<Button Content="Ansicht speichern" Grid.Column="8" Margin="5,0,0,0" x:Name="ButtonLayoutSave" Click="ButtonLayoutSave_Click" />
<Button Content="Ansicht speichern" Grid.Column="8" IsEnabled="False" Margin="5,0,0,0" x:Name="ButtonLayoutSave" Click="ButtonLayoutSave_Click" />
<Button Content="Ansicht laden" Grid.Column="9" Margin="5,0,0,0" x:Name="ButtonLayoutLoad" Click="ButtonLayoutLoad_Click" />
</Grid>
<!-- #############################################ButtonLayoutLoad###############################################-->
<!--<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<uc:NullItemComboBox Grid.Column="0" DisplayMemberPath="LayoutName" SelectionChanged="combo_query_SelectionChanged" Height="23" Margin="3" x:Name="comboLayouts" NullText="Bitte wählen..." MinWidth="200" Width="Auto" />
<dxe:TextEdit Grid.Column="1" MinWidth="200" Margin="5,0,0,0"/>
<Button Content="Aktuelles Layout speichern" Grid.Column="2" Margin="5,5,0,0" x:Name="buttonAdd" Click="ButtonAdd_Click" />
</Grid>-->
<!-- ############################################### Das Grid + Chart ###############################################-->
<Grid Grid.Row="2">
</Grid>
<!-- ############################################### Untere Zeile ###############################################-->
<Grid Grid.Row="1">
<dxlc:LayoutControl x:Name="mainLayout" AllowItemSizing="True" Padding="12" Orientation="Vertical">
<dxlc:LayoutGroup dxlc:LayoutControl.AllowVerticalSizing="True" Margin="0,0,0,4">
<dxpg:PivotGridControl x:Name="myPivotGridControl" RowTreeWidth="225" Visibility="Hidden" DataProcessingEngine="LegacyOptimized" Margin="0,10,0,0" dx:ThemeManager.ThemeName="Office2010Black" CustomCellDisplayText="GridControl_CustomCellDisplayText" CustomFieldValueCells="GridControl_CustomFieldValueCells"
@@ -91,8 +72,8 @@
<dxpg:PivotGridField x:Name="FlexibleAnzahlMinSoll" FieldName="AnzahlMinutenSoll" Area="FilterArea" Width="60" Caption="Soll Min." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlStdSoll" FieldName="AnzahlStundenSoll" Area="DataArea" Width="80" Caption="Soll Std." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleGefahreneKilometer" FieldName="Kilometer" Area="FilterArea" Width="200" Caption="Gefahrene Kilometer" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleBetrag" FieldName="Betrag" Area="DataArea" Width="80" Caption="Betrag" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleRundungspotenzial" FieldName="Rundungspotenzial" Area="DataArea" Width="80" Caption="Rundungspotenzial" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleBetrag" FieldName="Betrag" Area="DataArea" Width="80" Caption="Betrag" AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleRundungspotenzial" FieldName="Rundungspotenzial" Area="DataArea" Width="80" Caption="Rundungspotenzial" AllowedAreas="DataArea,FilterArea" />
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
</dxlc:LayoutGroup>
@@ -117,73 +98,6 @@
</dxlc:LayoutControl>
</Grid>
</Grid>
<!--<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="Startdatum:" Grid.Column="0" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" x:Name="datePickerStartDate" Width="120" HorizontalAlignment="Left" Margin="3,0,0,0" />
<Label Content="Enddatum:" Grid.Column="2" VerticalAlignment="Center" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="3" x:Name="datePickerEndDate" HorizontalAlignment="Left" Width="120" Margin="3,0,0,0" />
<CheckBox Content="Ausführliche Ansicht" Margin="5,5,0,0" Grid.Column="4" x:Name="checkNullEntries"/>
<Button Content="Aktualisieren" Grid.Column="5" Margin="5,0,0,0" x:Name="buttonRefresh" Click="buttonRefresh_Click" />
<CheckBox Content="Graph einblenden" Grid.Column="7" Margin="0,5,5,0" x:Name="checkBoxChart" Checked="CheckChartChanged" Unchecked="CheckChartChanged"/>
<dxlc:LayoutControl x:Name="mainLayout" AllowItemSizing="True" Padding="12" Orientation="Vertical" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="9">
<dxlc:LayoutGroup dxlc:LayoutControl.AllowVerticalSizing="True" Margin="0,0,0,4">
<dxpg:PivotGridControl x:Name="myPivotGridControl" RowTreeWidth="225" Visibility="Hidden" DataProcessingEngine="LegacyOptimized" Margin="0,10,0,0" dx:ThemeManager.ThemeName="Office2010Black" CustomCellDisplayText="GridControl_CustomCellDisplayText" CustomFieldValueCells="GridControl_CustomFieldValueCells"
ChartProvideDataByColumns="False" ChartSelectionOnly="True" ChartProvideColumnGrandTotals="True" ChartProvideRowGrandTotals="True" ChartDataProvideMode="UseCustomSettings">
<dxpg:PivotGridControl.Fields>
<dxpg:PivotGridField x:Name="FlexibleJahr" FieldName="Datum" Area="ColumnArea" Width="100" Caption="Jahr" AllowedAreas="RowArea,FilterArea,ColumnArea" GroupInterval="DateYear" />
<dxpg:PivotGridField x:Name="FlexibleMonat" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Monat" AllowedAreas="RowArea,FilterArea,ColumnArea" GroupInterval="DateMonth" />
<dxpg:PivotGridField x:Name="FlexibleWeek" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Woche" AllowedAreas="RowArea,FilterArea,ColumnArea" GroupInterval="DateWeekOfYear" ValueFormat="KW {0}" />
<dxpg:PivotGridField x:Name="FlexibleTag" FieldName="Datum" Area="FilterArea" Width="40" Caption="Tag" AllowedAreas="RowArea,FilterArea,ColumnArea" GroupInterval="DateDay" />
<dxpg:PivotGridField x:Name="FlexibleKlient" FieldName="Customer" Area="RowArea" Width="200" Caption="Klient" AllowedAreas="RowArea,FilterArea,ColumnArea" AreaIndex="2" />
<dxpg:PivotGridField x:Name="FlexibleSupportConcept" FieldName="SupportConcept" Area="FilterArea" Width="200" Caption="Hilfeplan" AllowedAreas="RowArea,FilterArea,ColumnArea" />
<dxpg:PivotGridField x:Name="FlexibleMitarbeiter" FieldName="Employee" Area="RowArea" Width="200" Caption="Mitarbeiter" AllowedAreas="RowArea,FilterArea,ColumnArea" AreaIndex="1" />
<dxpg:PivotGridField x:Name="FlexibleTeam" FieldName="Team" Area="FilterArea" Width="200" Caption="Team" AllowedAreas="RowArea,FilterArea,ColumnArea" />
<dxpg:PivotGridField x:Name="FlexibleLeistungskategorie" FieldName="Leistungskategorie" Area="FilterArea" Width="200" Caption="Leistungskategorie" AllowedAreas="RowArea,FilterArea,ColumnArea" />
<dxpg:PivotGridField x:Name="FlexibleLeistung" FieldName="Leistung" Area="FilterArea" Width="200" Caption="Leistung" AllowedAreas="RowArea,FilterArea,ColumnArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlMinIst" FieldName="AnzahlMinutenIst" Area="FilterArea" Width="60" Caption="Ist Min." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlStdIst" FieldName="AnzahlStundenIst" Area="DataArea" Width="80" Caption="Ist Std." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlMinSoll" FieldName="AnzahlMinutenSoll" Area="FilterArea" Width="60" Caption="Soll Min." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleAnzahlStdSoll" FieldName="AnzahlStundenSoll" Area="DataArea" Width="80" Caption="Soll Std." AllowedAreas="DataArea,FilterArea" />
<dxpg:PivotGridField x:Name="FlexibleGefahreneKilometer" FieldName="Kilometer" Area="FilterArea" Width="200" Caption="Gefahrene Kilometer" AllowedAreas="DataArea,FilterArea" />
</dxpg:PivotGridControl.Fields>
</dxpg:PivotGridControl>
</dxlc:LayoutGroup>
<dxlc:LayoutGroup>
<dxc:ChartControl Name="ChartControl" DataSource="{Binding ElementName=myPivotGridControl, Path=ChartDataSource}" Visibility="Collapsed" dx:ThemeManager.ThemeName="Office2010Black" >
<dxc:ChartControl.CrosshairOptions>
<dxc:CrosshairOptions ShowArgumentLine="False"/>
</dxc:ChartControl.CrosshairOptions>
<dxc:ChartControl.Legend>
<dxc:Legend ReverseItems="True"/>
</dxc:ChartControl.Legend>
<dxc:XYDiagram2D>
<dxc:XYDiagram2D.AxisY>
<dxc:AxisY2D Visible="True"/>
</dxc:XYDiagram2D.AxisY>
<dxc:XYDiagram2D.AxisX>
<dxc:AxisX2D Visible="True"/>
</dxc:XYDiagram2D.AxisX>
</dxc:XYDiagram2D>
</dxc:ChartControl>
</dxlc:LayoutGroup>
</dxlc:LayoutControl>
</Grid>-->
</GroupBox>
</Grid>
</localView:BeWoView>

View File

@@ -24,6 +24,7 @@ using DevExpress.Xpf.Printing;
using DevExpress.Xpf.PivotGrid;
using DevExpress.Xpf.Charts;
using System.IO;
using MessageBox = System.Windows.MessageBox;
namespace BeWo.View.Detail.Report
{
@@ -32,39 +33,26 @@ namespace BeWo.View.Detail.Report
/// </summary>
public partial class FlexibleReportView : BeWoView
{
public string LayoutString
{
get
{
var stream = new MemoryStream();
myPivotGridControl.SaveLayoutToStream(stream);
return Encoding.UTF8.GetString(stream.ToArray());
}
set
{
myPivotGridControl.RestoreLayoutFromStream(new MemoryStream(Encoding.UTF8.GetBytes(value ?? "")));
}
}
public List<FlexibleReportLayout> Layouts { get; set; }
public FlexibleReportView()
{
InitializeComponent();
FlexibleAnzahlMinIst.CellFormat = "{0:N0}";
FlexibleAnzahlStdIst.CellFormat = "{0:N2}";
FlexibleAnzahlMinIst.CellFormat = "{0:N0}";
FlexibleAnzahlStdIst.CellFormat = "{0:N2}";
FlexibleAnzahlMinSoll.CellFormat = "{0:N0}";
FlexibleAnzahlStdSoll.CellFormat = "{0:N2}";
FlexibleAnzahlMinSoll.CellFormat = "{0:N0}";
FlexibleAnzahlStdSoll.CellFormat = "{0:N2}";
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
FlexibleRundungspotenzial.CellFormat = "{0:N0}";
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
FlexibleRundungspotenzial.CellFormat = "{0:N0}";
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
FlexibleKlient.TotalValueFormat = "{0}";
FlexibleMitarbeiter.TotalValueFormat = "{0}";
FlexibleLeistung.TotalValueFormat = "{0}";
FlexibleLeistungskategorie.TotalValueFormat = "{0}";
FlexibleMitarbeiter.TotalValueFormat = "{0}";
FlexibleLeistung.TotalValueFormat = "{0}";
FlexibleLeistungskategorie.TotalValueFormat = "{0}";
datePickerStartDate.DateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
@@ -83,11 +71,25 @@ namespace BeWo.View.Detail.Report
{
liste.Add(FlexibleReportLayout.InitByFlexibleReportLayoutDC(item));
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Layouts = liste;
});
});
}
public string LayoutString
{
get
{
var stream = new MemoryStream();
myPivotGridControl.SaveLayoutToStream(stream);
return Encoding.Default.GetString(stream.ToArray());
}
set
{
myPivotGridControl.RestoreLayoutFromStream(new MemoryStream(Encoding.Default.GetBytes(value ?? "")));
}
}
private void buttonRefresh_Click(object sender, RoutedEventArgs e)
{
var test = ChartControl.DataSource;
@@ -117,6 +119,8 @@ namespace BeWo.View.Detail.Report
checkBoxChart.IsEnabled = true;
});
});
ButtonLayoutSave.IsEnabled = true;
}
private void InitChart()
@@ -180,12 +184,105 @@ namespace BeWo.View.Detail.Report
private void ButtonLayoutSave_Click(object sender, RoutedEventArgs e)
{
var control = new FlexibleReportLayoutSaveControl();
var beWoWindow = new BeWoWindow();
control.CancelButtonClicked += delegate
{
beWoWindow.Close();
};
control.SaveButtonClicked += delegate
{
if (string.IsNullOrWhiteSpace(control.LayoutName))
{
MessageBox.Show("Fehler beim Hinzufügen des Layouts. Der Name darf nicht leer sein.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
return;
}
if (Layouts.Any(x => x.LayoutName == control.LayoutName))
{
MessageBox.Show("Fehler beim Hinzufügen des Layouts. Der Name existiert bereits.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
return;
}
ServiceFacade.DoOperationsServiceAsync(
s => s.GetFlexibleReportLayouts(),
r =>
{
this.Dispatch(delegate
{
var liste = new List<FlexibleReportLayout>();
foreach (var item in r)
{
liste.Add(FlexibleReportLayout.InitByFlexibleReportLayoutDC(item));
}
});
});
var layout = new FlexibleReportLayoutDC()
{
LayoutName = control.LayoutName,
LayoutString = LayoutString
};
ServiceFacade.DoOperationsServiceAsync(s => s.InsertNewFlexibleReportLayout(layout));
MessageBox.Show("Layout erfolgreich hinzugefügt!", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Information);
beWoWindow.Close();
};
beWoWindow.Height = 500;
beWoWindow.Width = 500;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.Content = control;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
beWoWindow.ShowDialog();
}
private void ButtonLayoutLoad_Click(object sender, RoutedEventArgs e)
{
var control = new FlexibleReportLayoutLoadControl();
var beWoWindow = new BeWoWindow();
ServiceFacade.DoOperationsServiceAsync(
s => s.GetFlexibleReportLayouts(),
r =>
{
this.Dispatch(delegate
{
var liste = new List<FlexibleReportLayout>();
foreach (var item in r)
{
liste.Add(FlexibleReportLayout.InitByFlexibleReportLayoutDC(item));
}
control.ListLayout.ItemsSource = liste;
});
});
control.ListLayout.DisplayMemberPath = "LayoutName";
control.CancelButtonClicked += delegate
{
beWoWindow.Close();
};
control.LoadButtonClicked += delegate
{
if(control.ListLayout.SelectedItem is FlexibleReportLayout layout)
{
LayoutString = layout.LayoutString;
beWoWindow.Close();
}
else
{
MessageBox.Show("Beim Laden des Layouts ist ein Fehler aufgetreten!", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
};
beWoWindow.Height = 500;
beWoWindow.Width = 500;
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
beWoWindow.Content = control;
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
beWoWindow.ShowDialog();
}
}

View File

@@ -819,5 +819,9 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
IList<FlexibleReportLayoutDC> GetFlexibleReportLayouts();
}
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void InsertNewFlexibleReportLayout(FlexibleReportLayoutDC flexibleReportLayoutDC);
}
}

View File

@@ -5958,5 +5958,19 @@ namespace BeWo.Service.ServiceImplementations
return result;
}
public void InsertNewFlexibleReportLayout(FlexibleReportLayoutDC flexibleReportLayoutDC)
{
try
{
var flexibleReportLayout = MapperFactory.FlexibleReportLayoutDC_FlexibleReportLayout.MapToNewEntity(flexibleReportLayoutDC);
flexibleReportLayout.CreatorOid = LoggedInUserOperationContextExt.Current.User.Oid.Value;
DAOFactory.GenericDAO.Insert(flexibleReportLayout);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
}
}

View File

@@ -134,7 +134,7 @@ namespace BS.Shared
NotizenKategorie = 127,
NotizenEintrag = 128,
BuchungsExport = 129,
Timesheet2Mail = 130,
Timesheet2Mail = 130,
PersonHistory = 131,
EmployeeHistory = 132,
AddressHistory = 133,