diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 90773815e..d6939b771 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -282,11 +282,15 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
Designer
MSBuild:Compile
-
+
MSBuild:Compile
Designer
@@ -819,11 +823,14 @@
EMailStatusLogControl.xaml
+
+ FlexibleReportLayoutLoadControl.xaml
+
FlexibleReportView.xaml
-
- FlexibleReportLayoutSave.xaml
+
+ FlexibleReportLayoutSaveControl.xaml
TestEMailControl.xaml
diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs
index ca2f33e72..f6a80667f 100644
--- a/BeWo/ServiceProxy/Generated.cs
+++ b/BeWo/ServiceProxy/Generated.cs
@@ -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 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 GetTimesheetStatusList(System.DateTime monat)
+ {
+ return base.Channel.GetTimesheetStatusList(monat);
+ }
+
public System.Collections.Generic.List GetAllActiveCustomersCompactWithQBCheckList(bool fetchReferenceNumbers, System.Nullable 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 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 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 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 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 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 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 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 GetAllFlexibleReportEntrys(BS.Shared.DataContracts.FlexibleReportFilterDC filter)
+ {
+ return base.Channel.GetAllFlexibleReportEntrys(filter);
+ }
+
public System.Collections.Generic.List 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 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 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 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 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 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")]
diff --git a/BeWo/View/Detail/Report/FlexibleReportLayoutSave.xaml b/BeWo/View/Detail/Report/FlexibleReportLayoutLoadControl.xaml
similarity index 51%
rename from BeWo/View/Detail/Report/FlexibleReportLayoutSave.xaml
rename to BeWo/View/Detail/Report/FlexibleReportLayoutLoadControl.xaml
index 88778821d..4a76f3512 100644
--- a/BeWo/View/Detail/Report/FlexibleReportLayoutSave.xaml
+++ b/BeWo/View/Detail/Report/FlexibleReportLayoutLoadControl.xaml
@@ -1,8 +1,9 @@
-
@@ -19,14 +20,9 @@
-
-
-
-
-
-
+
+
+
+
-
-
-
diff --git a/BeWo/View/Detail/Report/FlexibleReportLayoutLoadControl.xaml.cs b/BeWo/View/Detail/Report/FlexibleReportLayoutLoadControl.xaml.cs
new file mode 100644
index 000000000..8dd480ccc
--- /dev/null
+++ b/BeWo/View/Detail/Report/FlexibleReportLayoutLoadControl.xaml.cs
@@ -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
+{
+ ///
+ /// Interaktionslogik für TestEMailControl.xaml
+ ///
+ 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();
+ }
+ }
+}
diff --git a/BeWo/View/Detail/Report/FlexibleReportLayoutSaveControl.xaml b/BeWo/View/Detail/Report/FlexibleReportLayoutSaveControl.xaml
new file mode 100644
index 000000000..afdb37216
--- /dev/null
+++ b/BeWo/View/Detail/Report/FlexibleReportLayoutSaveControl.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/Report/FlexibleReportLayoutSave.xaml.cs b/BeWo/View/Detail/Report/FlexibleReportLayoutSaveControl.xaml.cs
similarity index 77%
rename from BeWo/View/Detail/Report/FlexibleReportLayoutSave.xaml.cs
rename to BeWo/View/Detail/Report/FlexibleReportLayoutSaveControl.xaml.cs
index 6eb6d0375..49990b901 100644
--- a/BeWo/View/Detail/Report/FlexibleReportLayoutSave.xaml.cs
+++ b/BeWo/View/Detail/Report/FlexibleReportLayoutSaveControl.xaml.cs
@@ -17,13 +17,13 @@ namespace BeWo.View.Detail.Report
///
/// Interaktionslogik für TestEMailControl.xaml
///
- 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();
diff --git a/BeWo/View/Detail/Report/FlexibleReportView.xaml b/BeWo/View/Detail/Report/FlexibleReportView.xaml
index a858992bd..eec33ef85 100644
--- a/BeWo/View/Detail/Report/FlexibleReportView.xaml
+++ b/BeWo/View/Detail/Report/FlexibleReportView.xaml
@@ -20,12 +20,10 @@
-
-
-
+
@@ -49,28 +47,11 @@
-
+
-
-
-
-
-
-
-
+
+
+
-
-
+
+
@@ -117,73 +98,6 @@
-
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs b/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs
index bbf780401..a29348acc 100644
--- a/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs
+++ b/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs
@@ -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
///
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 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();
+ 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();
+ 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();
}
}
diff --git a/Service/ServiceContracts/IOperationsService.cs b/Service/ServiceContracts/IOperationsService.cs
index 9a7ad834f..ce378684c 100644
--- a/Service/ServiceContracts/IOperationsService.cs
+++ b/Service/ServiceContracts/IOperationsService.cs
@@ -819,5 +819,9 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
IList GetFlexibleReportLayouts();
- }
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ void InsertNewFlexibleReportLayout(FlexibleReportLayoutDC flexibleReportLayoutDC);
+ }
}
\ No newline at end of file
diff --git a/Service/ServiceImplementations/OperationsServiceImp.cs b/Service/ServiceImplementations/OperationsServiceImp.cs
index caae58c92..1c5324f8f 100644
--- a/Service/ServiceImplementations/OperationsServiceImp.cs
+++ b/Service/ServiceImplementations/OperationsServiceImp.cs
@@ -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);
+ }
+ }
}
}
diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs
index cccae1077..f7bb08e6a 100644
--- a/Shared/BeWoEntityEnums.cs
+++ b/Shared/BeWoEntityEnums.cs
@@ -134,7 +134,7 @@ namespace BS.Shared
NotizenKategorie = 127,
NotizenEintrag = 128,
BuchungsExport = 129,
- Timesheet2Mail = 130,
+ Timesheet2Mail = 130,
PersonHistory = 131,
EmployeeHistory = 132,
AddressHistory = 133,