Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -282,11 +282,15 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\Report\FlexibleReportLayoutListControl.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>
|
||||
@@ -816,14 +820,23 @@
|
||||
<Compile Include="View\Detail\BudgetView.xaml.cs">
|
||||
<DependentUpon>BudgetView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\PivotGridReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\PivotGridReport.Designer.cs">
|
||||
<DependentUpon>PivotGridReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\EMailStatusLogControl.xaml.cs">
|
||||
<DependentUpon>EMailStatusLogControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\FlexibleReportLayoutListControl.xaml.cs">
|
||||
<DependentUpon>FlexibleReportLayoutListControl.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>
|
||||
@@ -2050,6 +2063,10 @@
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="View\Detail\Report\PivotGridReport.resx">
|
||||
<DependentUpon>PivotGridReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<None Include="app.config">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
@@ -2101,6 +2118,14 @@
|
||||
<Project>{D5E53B0F-BF5A-41E8-93E2-0F32845FC729}</Project>
|
||||
<Name>Controls</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Data\Data.csproj">
|
||||
<Project>{B0D73E3D-4AE7-4024-93A6-DB1F46D7CCEE}</Project>
|
||||
<Name>Data</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Service\Service.csproj">
|
||||
<Project>{094331C3-ECEE-4C89-BBFD-4C9DED89F0EF}</Project>
|
||||
<Name>Service</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Shared\Shared.csproj">
|
||||
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
|
||||
<Name>Shared</Name>
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace BeWo.Core
|
||||
}));
|
||||
}
|
||||
|
||||
private static void CustomizeReportPreviewToolBar(object s, RoutedEventArgs e)
|
||||
public static void CustomizeReportPreviewToolBar(object s, RoutedEventArgs e)
|
||||
{
|
||||
var cont = LayoutHelper.FindElementByType(s as FrameworkElement, typeof(BarContainerControl)) as BarContainerControl;
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DevExpress.XtraReports.UI.XtraReport, DevExpress.XtraReports.v17.1, Version=17.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||
|
||||
@@ -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,29 @@ 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/UpdateFlexibleReportLayouts", ReplyAction="http://tempuri.org/IOperationsService/UpdateFlexibleReportLayoutsResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateFlexibleReportLayoutsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void UpdateFlexibleReportLayouts(System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportLayoutDC> flexibleReportLayouts);
|
||||
|
||||
[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 +4517,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 +4820,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 +5072,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 +5099,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 +5135,31 @@ 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 UpdateFlexibleReportLayouts(System.Collections.Generic.List<BS.Shared.DataContracts.FlexibleReportLayoutDC> flexibleReportLayouts)
|
||||
{
|
||||
base.Channel.UpdateFlexibleReportLayouts(flexibleReportLayouts);
|
||||
}
|
||||
|
||||
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 +5475,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 +5795,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 +6080,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 +6114,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 +6760,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 +6829,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")]
|
||||
|
||||
@@ -60,11 +60,15 @@ namespace BeWo.View
|
||||
|
||||
private void RootGroupBox_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if(!IsVisible)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!IsMaximizable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var pos = PointToScreen(Mouse.GetPosition(this));
|
||||
|
||||
if (!(e.OriginalSource is Border) && !(e.OriginalSource is TextBlock) || pos.Y > 200d || e.OriginalSource is TextBlock && Mouse.DirectlyOver is Button)
|
||||
|
||||
@@ -1,52 +1,54 @@
|
||||
<localView:BeWoView xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" x:Class="BeWo.View.Detail.BudgetView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
<localView:BeWoView
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
x:Class="BeWo.View.Detail.BudgetView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dxe2="clr-namespace:DevExpress.XtraEditors;assembly=DevExpress.XtraEditors.v17.1"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
xmlns:dxe2="clr-namespace:DevExpress.XtraEditors;assembly=DevExpress.XtraEditors.v17.1"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" Focusable="True">
|
||||
<GroupBox Name="root" Header="Aktuell definierte Budgets" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label>Bezeichnung</Label>
|
||||
<TextBox Grid.Column="1" Margin="3" Height="23" Text="{val:ValidationBinding Path=NewVM.Name, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Label Grid.Column="2">Betragshöhe</Label>
|
||||
<dxe:TextEdit Grid.Column="3" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3" EditValue="{val:ValidationBinding Path=NewVM.Betragshoehe, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Button Name="button_addBudget" Click="Button_addBudget_Click" Grid.Column="4" Height="25" Margin="3,3,3,3" Padding="5 0" IsDefault="True" Content="Hinzufügen" />
|
||||
<GroupBox Name="root" Header="Aktuell definierte Budgets" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label>Bezeichnung</Label>
|
||||
<TextBox Grid.Column="1" Margin="3" Height="23" Text="{val:ValidationBinding Path=NewVM.Name, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Label Grid.Column="2">Betragshöhe</Label>
|
||||
<dxe:TextEdit Grid.Column="3" MaskType="Numeric" Mask="########0.00" MaskUseAsDisplayFormat="True" Height="23" Margin="3" EditValue="{val:ValidationBinding Path=NewVM.Betragshoehe, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<Button Name="button_addBudget" Click="Button_addBudget_Click" Grid.Column="4" Height="25" Margin="3,3,3,3" Padding="5 0" IsDefault="True" Content="Hinzufügen" />
|
||||
|
||||
<dxg:GridControl x:Name="DatagridRegions" Margin="0,10,0,0" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="7" DataSource="{Binding VMList}">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="r" IsEnabled="{Binding Path=EditValue}" FontFamily="Webdings" Click="DeleteButton_Click" Width="18" Height="18" VerticalAlignment="Center" />
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Name" Header="Bezeichnung" Width="200" />
|
||||
<dxg:GridColumn FieldName="Betragshoehe" Header="Stunden" Width="200" SortOrder="Ascending" SortIndex="0">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="##,###,##0.00" Mask="##,###,##0.00" MaskType="Numeric"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
<dxg:GridControl x:Name="DatagridRegions" Margin="0,10,0,0" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="7" DataSource="{Binding VMList}">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="r" IsEnabled="{Binding Path=EditValue}" FontFamily="Webdings" Click="DeleteButton_Click" Width="18" Height="18" VerticalAlignment="Center" />
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn FieldName="Name" Header="Bezeichnung" Width="200" />
|
||||
<dxg:GridColumn FieldName="Betragshoehe" Header="Stunden" Width="200" SortOrder="Ascending" SortIndex="0">
|
||||
<dxg:GridColumn.EditSettings>
|
||||
<dxe:TextEditSettings DisplayFormat="##,###,##0.00" Mask="##,###,##0.00" MaskType="Numeric"></dxe:TextEditSettings>
|
||||
</dxg:GridColumn.EditSettings>
|
||||
</dxg:GridColumn>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</localView:BeWoView>
|
||||
|
||||
44
BeWo/View/Detail/Report/FlexibleReportLayoutListControl.xaml
Normal file
44
BeWo/View/Detail/Report/FlexibleReportLayoutListControl.xaml
Normal file
@@ -0,0 +1,44 @@
|
||||
<UserControl
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" Focusable="True"
|
||||
xmlns:val="clr-namespace:BeWo.Validation"
|
||||
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"
|
||||
x:Class="BeWo.View.Detail.Report.FlexibleReportLayoutListControl"
|
||||
d:DesignHeight="200" d:DesignWidth="300"
|
||||
mc:Ignorable="d">
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<dxg:GridControl x:Name="DatagridRegions" Margin="10" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="7" DataSource="{Binding LayoutList}" MouseDoubleClick="DatagridRegions_MouseDoubleClick">
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn x:Name="LayoutDeleteColumn" FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
|
||||
<dxg:GridColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<Button Content="r" IsEnabled="{Binding Path=EditValue}" FontFamily="Webdings" Width="18" Height="18" VerticalAlignment="Center" Click="DeleteButton_OnClick" />
|
||||
</DataTemplate>
|
||||
</dxg:GridColumn.CellTemplate>
|
||||
</dxg:GridColumn>
|
||||
<dxg:GridColumn x:Name="LayoutNameColumn" FieldName="LayoutName" Header="Bezeichnung" Width="200" />
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" CellValueChanged="TableView_CellValueChanged" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
<Button x:Name="ActionButton" Grid.Row="2" Grid.Column="3" Content="Action" Margin="3" Click="ActionButton_OnClick" Width="80"/>
|
||||
<Button x:Name="CancelButton" Grid.Row="2" Grid.Column="2" Content="Abbrechen" Margin="3" Click="CancelButton_OnClick" Width="80"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
105
BeWo/View/Detail/Report/FlexibleReportLayoutListControl.xaml.cs
Normal file
105
BeWo/View/Detail/Report/FlexibleReportLayoutListControl.xaml.cs
Normal file
@@ -0,0 +1,105 @@
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BS.Shared.Extensions;
|
||||
using DevExpress.Utils;
|
||||
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für TestEMailControl.xaml
|
||||
/// </summary>
|
||||
public partial class FlexibleReportLayoutListControl : UserControl
|
||||
{
|
||||
#region Fields
|
||||
public event Action CancelButtonClicked;
|
||||
public event Action ActionButtonClicked;
|
||||
public event Action MouseDoubleClick;
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
public FlexibleReportLayoutListControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ServiceFacade.DoOperationsServiceAsync(
|
||||
s => s.GetFlexibleReportLayouts(),
|
||||
r =>
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
LayoutList = r.Select(x => FlexibleReportView.FlexibleReportLayout.InitByFlexibleReportLayoutDC(x)).ToList();
|
||||
});
|
||||
});
|
||||
|
||||
IsDirty = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
private void CancelButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CancelButtonClicked?.Invoke();
|
||||
}
|
||||
|
||||
private void ActionButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ActionButtonClicked?.Invoke();
|
||||
}
|
||||
|
||||
private void DeleteButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
LayoutList.Remove(SelectedLayout);
|
||||
DatagridRegions.RefreshData();
|
||||
IsDirty = true;
|
||||
}
|
||||
private void DatagridRegions_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
MouseDoubleClick?.Invoke();
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void TableView_CellValueChanged(object sender, DevExpress.Xpf.Grid.CellValueChangedEventArgs e)
|
||||
{
|
||||
IsDirty = true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
public bool IsDirty { get; set; }
|
||||
|
||||
public FlexibleReportView.FlexibleReportLayout SelectedLayout
|
||||
{
|
||||
get
|
||||
{
|
||||
return DatagridRegions.GetCurrentValue<FlexibleReportView.FlexibleReportLayout>();
|
||||
}
|
||||
}
|
||||
|
||||
public List<FlexibleReportView.FlexibleReportLayout> LayoutList
|
||||
{
|
||||
get { return DatagridRegions.ItemsSource as List<FlexibleReportView.FlexibleReportLayout>; }
|
||||
set
|
||||
{
|
||||
DatagridRegions.ItemsSource = value;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
public void Save()
|
||||
{
|
||||
var list = LayoutList.Select(layout => layout.ConvertToFlexibleReportLayoutDC()).ToList();
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.UpdateFlexibleReportLayouts(list));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,26 @@
|
||||
<UserControl x:Class="BeWo.View.Detail.Report.FlexibleReportLayoutSave"
|
||||
<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"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="200" d:DesignWidth="300">
|
||||
Height="Auto" Width="Auto">
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<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="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"/>
|
||||
|
||||
|
||||
<Label x:Name="Label1" Grid.Row="0" Grid.Column="0" Content="Layout Name:" Margin="3"/>
|
||||
<TextBox x:Name="TextLayoutNameNew" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="4" Margin="3"/>
|
||||
<Button x:Name="SaveButton" Grid.Row="2" Grid.Column="2" Content="Speichern" Margin="3" Click="SaveButton_OnClick" HorizontalAlignment="Right" Width="80"/>
|
||||
<Button x:Name="CancelButton" Grid.Row="2" Grid.Column="3" Content="Abbrechen" Margin="3" Click="CancelButton_OnClick" Width="80"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
</UserControl>
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DevExpress.Xpf.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -17,28 +18,23 @@ 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();
|
||||
}
|
||||
ThemeManager.SetTheme(BeWoApp.CurrentBeWo.MainWindow, Theme.Office2010Black);
|
||||
}
|
||||
|
||||
|
||||
public string LayoutName
|
||||
{
|
||||
get { return txtLayoutName.Text; }
|
||||
set { txtLayoutName.Text = value; }
|
||||
}
|
||||
|
||||
public string LayoutString
|
||||
{
|
||||
get { return txtLayoutString.Text; }
|
||||
}
|
||||
public string LayoutName
|
||||
{
|
||||
get { return TextLayoutNameNew.Text; }
|
||||
set { TextLayoutNameNew.Text = value; }
|
||||
}
|
||||
|
||||
private void SaveButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@@ -7,183 +7,133 @@
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:dxpg="http://schemas.devexpress.com/winfx/2008/xaml/pivotgrid"
|
||||
xmlns:dxpg="http://schemas.devexpress.com/winfx/2008/xaml/pivotgrid"
|
||||
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
|
||||
xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
|
||||
x:Class="BeWo.View.Detail.Report.FlexibleReportView"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" Focusable="True">
|
||||
<Grid>
|
||||
<GroupBox Header="Flexibler Bericht" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- ############################################### Obere Zeile ###############################################-->
|
||||
<Grid Grid.Row="0">
|
||||
<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" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</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" 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 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">
|
||||
<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"
|
||||
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: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>
|
||||
<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>
|
||||
</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>
|
||||
<Grid>
|
||||
<GroupBox Header="Flexibler Bericht" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!-- ############################################### Obere Zeile ###############################################-->
|
||||
<Grid Grid.Row="0">
|
||||
<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" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</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" />
|
||||
<Button Content="Aktualisieren" Grid.Column="5" Margin="5,0,0,0" Click="buttonRefresh_Click" />
|
||||
<Button Content="Ansicht speichern" Grid.Column="9" Margin="5,0,0,0" x:Name="ButtonLayoutSave" Click="ButtonLayoutSave_Click" />
|
||||
<Button Content="Ansicht bearbeiten" Grid.Column="10" Margin="5,0,0,0" x:Name="ButtonLayoutEdit" Click="ButtonLayoutEdit_Click" />
|
||||
<Button Content="Ansicht laden" Grid.Column="11" Margin="5,0,0,0" x:Name="ButtonLayoutLoad" Click="ButtonLayoutLoad_Click" />
|
||||
<Button Content="Ansicht drucken" Grid.Column="12" Margin="5,0,0,0" x:Name="ButtonLayoutPrint" Click="ButtonLayoutPrint_Click" />
|
||||
</Grid>
|
||||
<!-- ############################################### Mittlere Zeile ###############################################-->
|
||||
<Grid Grid.Row="1">
|
||||
<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" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<CheckBox Content="Ausführliche Ansicht" Margin="5,5,0,0" Grid.Column="4" x:Name="checkNullEntries"/>
|
||||
<CheckBox Content="Differenz Balken einblenden" Grid.Column="7" Margin="5,5,0,0" x:Name="checkBoxDataPer" Checked="CheckDataBarPerChanged" Unchecked="CheckDataBarPerChanged"/>
|
||||
<CheckBox Content="Prozentuale Abweichung Balken einblenden" Grid.Column="8" Margin="5,5,0,0" x:Name="checkBoxData" Checked="CheckDataBarChanged" Unchecked="CheckDataBarChanged"/>
|
||||
<CheckBox Content="Graph einblenden" Grid.Column="9" Margin="5,5,0,0" x:Name="checkBoxChart" Checked="CheckChartChanged" Unchecked="CheckChartChanged"/>
|
||||
</Grid>
|
||||
<!-- ############################################### Untere Zeile ###############################################-->
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.Resources>
|
||||
</Grid.Resources>
|
||||
<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="Visible" 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" CustomValueAppearance="MyPivotGridControl_CustomValueAppearance" CustomCellAppearance="MyPivotGridControl_CustomCellAppearance">
|
||||
<dxpg:PivotGridControl.Fields>
|
||||
<dxpg:PivotGridField x:Name="FlexibleJahr" FieldName="Datum" Area="ColumnArea" Width="100" Caption="Jahr" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateYear" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleMonat" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Monat" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateMonth" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleWeek" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Woche" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateWeekOfYear" ValueFormat="KW {0}" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleTag" FieldName="Datum" Area="FilterArea" Width="40" Caption="Tag" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateDay" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleKlient" FieldName="Customer" Area="RowArea" Width="200" Caption="Klient" AllowedAreas="RowArea,FilterArea" AreaIndex="2" Height="21" SortOrder="Ascending" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleSupportConcept" FieldName="SupportConcept" Area="FilterArea" Width="200" Caption="Hilfeplan" AllowedAreas="RowArea,FilterArea" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleMitarbeiter" FieldName="Employee" Area="RowArea" Width="200" Caption="Mitarbeiter" AllowedAreas="RowArea,FilterArea" AreaIndex="1" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleTeam" FieldName="Team" Area="FilterArea" Width="200" Caption="Team" AllowedAreas="RowArea,FilterArea" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleLeistungskategorie" FieldName="Leistungskategorie" Area="FilterArea" Width="200" Caption="Leistungskategorie" AllowedAreas="RowArea,FilterArea" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleLeistung" FieldName="Leistung" Area="FilterArea" Width="200" Caption="Leistung" AllowedAreas="RowArea,FilterArea" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleOrganisation" FieldName="Organisation" Area="FilterArea" Width="200" Caption="Kostenträger" AllowedAreas="RowArea,FilterArea" />
|
||||
<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:PivotGridField x:Name="FlexibleBetrag" FieldName="Betrag" Area="FilterArea" Width="80" Caption="Betrag" AllowedAreas="DataArea,FilterArea" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleStundensatz" FieldName="Stundensatz" Area="FilterArea" Width="80" Caption="Stundensatz" AllowedAreas="DataArea,FilterArea" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleRundungspotenzial" FieldName="Rundungspotenzial" Area="FilterArea" Width="80" Caption="Rundungspotenzial" AllowedAreas="DataArea,FilterArea" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollMin" FieldName="DifferenzIstSollMinuten" Area="FilterArea" Width="80" Caption="Differenz Min." AllowedAreas="DataArea,FilterArea" HideEmptyVariationItems="True" />
|
||||
<dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollStd" FieldName="DifferenzIstSollStunden" Area="DataArea" Width="80" Caption="Differenz Std." AllowedAreas="DataArea,FilterArea" HideEmptyVariationItems="True" />
|
||||
<dxpg:PivotGridField x:Name="UFlexibleProzentualeAbweichung" UnboundFieldName="ProzAbweichung" Area="DataArea" Width="80" Caption="Prozentual Abweichung" 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>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</localView:BeWoView>
|
||||
@@ -24,6 +24,10 @@ using DevExpress.Xpf.Printing;
|
||||
using DevExpress.Xpf.PivotGrid;
|
||||
using DevExpress.Xpf.Charts;
|
||||
using System.IO;
|
||||
using MessageBox = System.Windows.MessageBox;
|
||||
using BeWo.Data.Access;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using DevExpress.Data.PivotGrid;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
@@ -32,19 +36,14 @@ 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 ?? "")));
|
||||
}
|
||||
}
|
||||
#region Fields
|
||||
private readonly List<string> _Columns = new List<string>() { nameof(FlexibleJahr), nameof(FlexibleMonat), nameof(FlexibleWeek), nameof(FlexibleTag) };
|
||||
private readonly List<string> _Rows = new List<string>() { nameof(FlexibleKlient), nameof(FlexibleMitarbeiter) };
|
||||
private readonly List<string> _DataDiff = new List<string>() { nameof(FlexibleDifferenzIstSollMin), nameof(FlexibleDifferenzIstSollStd) };
|
||||
private readonly List<string> _DataPer = new List<string>() { nameof(UFlexibleProzentualeAbweichung) };
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
public FlexibleReportView()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -55,8 +54,19 @@ namespace BeWo.View.Detail.Report
|
||||
FlexibleAnzahlMinSoll.CellFormat = "{0:N0}";
|
||||
FlexibleAnzahlStdSoll.CellFormat = "{0:N2}";
|
||||
|
||||
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
|
||||
FlexibleRundungspotenzial.CellFormat = "{0:N0}";
|
||||
FlexibleDifferenzIstSollMin.CellFormat = "{0:N0}";
|
||||
FlexibleDifferenzIstSollStd.CellFormat = "{0:N2}";
|
||||
|
||||
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
|
||||
FlexibleRundungspotenzial.CellFormat = "{0:N0}";
|
||||
|
||||
UFlexibleProzentualeAbweichung.UnboundExpressionMode = FieldUnboundExpressionMode.UseAggregateFunctions;
|
||||
UFlexibleProzentualeAbweichung.UnboundType = FieldUnboundColumnType.Decimal;
|
||||
UFlexibleProzentualeAbweichung.CellFormat = "{0:P2}";
|
||||
UFlexibleProzentualeAbweichung.UnboundExpression = string.Format("SUM([{0}]) / SUM([{1}])", FlexibleAnzahlStdIst.ExpressionFieldName, FlexibleAnzahlStdSoll.ExpressionFieldName);
|
||||
UFlexibleProzentualeAbweichung.SummaryType = FieldSummaryType.Average;
|
||||
|
||||
FlexibleStundensatz.SummaryType = FieldSummaryType.Average;
|
||||
|
||||
FlexibleGefahreneKilometer.CellFormat = "{0:N0}";
|
||||
FlexibleKlient.TotalValueFormat = "{0}";
|
||||
@@ -64,30 +74,21 @@ namespace BeWo.View.Detail.Report
|
||||
FlexibleLeistung.TotalValueFormat = "{0}";
|
||||
FlexibleLeistungskategorie.TotalValueFormat = "{0}";
|
||||
|
||||
|
||||
|
||||
|
||||
datePickerStartDate.DateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
|
||||
datePickerEndDate.DateTime = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1);
|
||||
|
||||
checkBoxChart.IsEnabled = false;
|
||||
|
||||
ServiceFacade.DoOperationsServiceAsync(
|
||||
s => s.GetFlexibleReportLayouts(),
|
||||
r =>
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
var liste = new List<FlexibleReportLayout>();
|
||||
foreach (var item in r)
|
||||
{
|
||||
liste.Add(FlexibleReportLayout.InitByFlexibleReportLayoutDC(item));
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
});
|
||||
});
|
||||
myPivotGridControl.PrintColumnHeaders = false;
|
||||
myPivotGridControl.PrintRowHeaders = false;
|
||||
myPivotGridControl.PrintFilterHeaders = false;
|
||||
myPivotGridControl.PrintDataHeaders = false;
|
||||
myPivotGridControl.PrintUnusedFilterFields = false;
|
||||
myPivotGridControl.PrintHeadersOnEveryPage = false;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
private void buttonRefresh_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var test = ChartControl.DataSource;
|
||||
@@ -117,44 +118,39 @@ namespace BeWo.View.Detail.Report
|
||||
checkBoxChart.IsEnabled = true;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private void InitChart()
|
||||
{
|
||||
ChartControl.Diagram = ChartFactory.GenerateDiagram(typeof(BarStackedSeries2D), false);
|
||||
ButtonLayoutSave.IsEnabled = true;
|
||||
}
|
||||
|
||||
private void GridControl_CustomCellDisplayText(object sender, PivotCellDisplayTextEventArgs e)
|
||||
{
|
||||
if (e.DataField.Name == "FlexibleAnzahlStdSoll")
|
||||
if (e.DataField.Name == nameof(FlexibleAnzahlStdSoll))
|
||||
{
|
||||
if (e.RowField != null && (e.RowField.Name == "FlexibleLeistungskategorie" || e.RowField.Name == "FlexibleLeistung"))
|
||||
if (e.RowField != null && (e.RowField.Name == nameof(FlexibleLeistungskategorie) || e.RowField.Name == nameof(FlexibleLeistung)))
|
||||
{
|
||||
e.DisplayText = "";
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Value != null && decimal.TryParse(e.Value.ToString(), out decimal d) && d == 0)
|
||||
e.DisplayText = "";
|
||||
if (e.DisplayText == "Fehler")
|
||||
e.DisplayText = "";
|
||||
}
|
||||
|
||||
private void GridControl_CustomFieldValueCells(object sender, PivotCustomFieldValueCellsEventArgs e)
|
||||
{
|
||||
PivotGridControl pivot = (PivotGridControl)sender;
|
||||
private void GridControl_CustomFieldValueCells(object sender, PivotCustomFieldValueCellsEventArgs e)
|
||||
{
|
||||
PivotGridControl pivot = (PivotGridControl)sender;
|
||||
|
||||
if (pivot.DataSource == null)
|
||||
return;
|
||||
if (pivot.DataSource == null)
|
||||
return;
|
||||
|
||||
// Iterates through all row headers.
|
||||
for (int i = e.GetCellCount(false) - 1; i >= 0; i--)
|
||||
{
|
||||
var cell = e.GetCell(false, i);
|
||||
if (cell == null)
|
||||
continue;
|
||||
|
||||
if (cell.ValueType == FieldValueType.Total)
|
||||
{
|
||||
|
||||
}
|
||||
// Iterates through all row headers.
|
||||
for (int i = e.GetCellCount(false) - 1; i >= 0; i--)
|
||||
{
|
||||
var cell = e.GetCell(false, i);
|
||||
if (cell == null)
|
||||
continue;
|
||||
|
||||
// If the current header corresponds to the "Employee B"
|
||||
// field value, and is not the Total Row header,
|
||||
@@ -166,6 +162,11 @@ namespace BeWo.View.Detail.Report
|
||||
}
|
||||
}
|
||||
|
||||
private void MyPivotGridControl_CustomValueAppearance(object sender, PivotCustomValueAppearanceEventArgs e)
|
||||
{
|
||||
// Header
|
||||
}
|
||||
|
||||
private void CheckChartChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (myPivotGridControl.DataSource != null)
|
||||
@@ -178,248 +179,632 @@ namespace BeWo.View.Detail.Report
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckDataBarChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (myPivotGridControl.DataSource != null)
|
||||
{
|
||||
var conditions = CreateDataBarConditions(_Columns, _Rows, _DataDiff, "GreenSolidDataBar");
|
||||
|
||||
if (checkBoxData.IsChecked.Value)
|
||||
{
|
||||
myPivotGridControl.FormatConditions.AddRange(conditions);
|
||||
}
|
||||
else
|
||||
{
|
||||
myPivotGridControl.FormatConditions.RemoveRange(conditions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ButtonLayoutSave_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var control = new FlexibleReportLayoutSaveControl();
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
control.CancelButtonClicked += delegate
|
||||
{
|
||||
beWoWindow.Close();
|
||||
};
|
||||
control.SaveButtonClicked += delegate
|
||||
{
|
||||
var liste = new List<FlexibleReportLayout>();
|
||||
ServiceFacade.DoOperationsServiceAsync(
|
||||
s => s.GetFlexibleReportLayouts(),
|
||||
r =>
|
||||
{
|
||||
this.Dispatch(delegate
|
||||
{
|
||||
foreach (var item in r)
|
||||
{
|
||||
liste.Add(FlexibleReportLayout.InitByFlexibleReportLayoutDC(item));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
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 (liste.Any(x => x.LayoutName == control.LayoutName))
|
||||
{
|
||||
MessageBox.Show("Fehler beim Hinzufügen des Layouts. Der Name existiert bereits.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
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 = 200;
|
||||
beWoWindow.Width = 500;
|
||||
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
beWoWindow.GroupBoxContent = control;
|
||||
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
||||
beWoWindow.rootGroupBox.Header = "Layout speichern";
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void ButtonLayoutLoad_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var control = new FlexibleReportLayoutListControl();
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
beWoWindow.rootGroupBox.Header = "Layout Laden";
|
||||
control.DatagridRegions.Columns.Remove(control.LayoutDeleteColumn);
|
||||
control.LayoutNameColumn.ReadOnly = true;
|
||||
control.ActionButton.Content = "Laden";
|
||||
|
||||
control.ActionButtonClicked += delegate
|
||||
{
|
||||
if (control.SelectedLayout == null)
|
||||
{
|
||||
MessageBox.Show("Sie haben keine Layouts angelegt/ausgewählt.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
return;
|
||||
}
|
||||
LayoutString = control.SelectedLayout.LayoutString;
|
||||
beWoWindow.Close();
|
||||
};
|
||||
|
||||
control.CancelButtonClicked += delegate
|
||||
{
|
||||
beWoWindow.Close();
|
||||
};
|
||||
|
||||
control.MouseDoubleClick += delegate
|
||||
{
|
||||
if (control.SelectedLayout == null)
|
||||
{
|
||||
MessageBox.Show("Sie haben keine Layouts angelegt/ausgewählt.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
return;
|
||||
}
|
||||
LayoutString = control.SelectedLayout.LayoutString;
|
||||
beWoWindow.Close();
|
||||
};
|
||||
|
||||
beWoWindow.Height = 500;
|
||||
beWoWindow.Width = 500;
|
||||
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
beWoWindow.GroupBoxContent = control;
|
||||
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
||||
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void ButtonLayoutEdit_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var control = new FlexibleReportLayoutListControl();
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
beWoWindow.rootGroupBox.Header = "Layout(s) bearbeiten";
|
||||
control.ActionButton.Content = "Speichern";
|
||||
control.ActionButtonClicked += delegate
|
||||
{
|
||||
if (control.IsDirty)
|
||||
{
|
||||
control.Save();
|
||||
MessageBox.Show("Die Liste wurde erfolgreich aktualisiert.", "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Asterisk);
|
||||
}
|
||||
beWoWindow.Close();
|
||||
};
|
||||
|
||||
control.CancelButtonClicked += delegate
|
||||
{
|
||||
if (control.IsDirty)
|
||||
{
|
||||
var result = MessageBox.Show("Möchten Sie die Änderung(en) verwerfen?", "BeWoPlaner", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
|
||||
switch (result)
|
||||
{
|
||||
case MessageBoxResult.None:
|
||||
return;
|
||||
case MessageBoxResult.Cancel:
|
||||
return;
|
||||
case MessageBoxResult.Yes:
|
||||
control.Save();
|
||||
beWoWindow.Close();
|
||||
break;
|
||||
case MessageBoxResult.No:
|
||||
beWoWindow.Close();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
beWoWindow.Height = 500;
|
||||
beWoWindow.Width = 500;
|
||||
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
beWoWindow.GroupBoxContent = control;
|
||||
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
||||
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void MyPivotGridControl_CustomCellAppearance(object sender, PivotCustomCellAppearanceEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class FlexibleReportEntry
|
||||
{
|
||||
public string Customer { get; set; }
|
||||
|
||||
public string Employee { get; set; }
|
||||
|
||||
public string Team { get; set; }
|
||||
|
||||
public string Leistungskategorie { get; set; }
|
||||
|
||||
public string Leistung { get; set; }
|
||||
|
||||
public string SupportConcept { get; set; }
|
||||
|
||||
public decimal AnzahlMinutenIst { get; set; }
|
||||
|
||||
public decimal AnzahlStundenIst
|
||||
private void CheckDataBarPerChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
get
|
||||
if (myPivotGridControl.DataSource != null)
|
||||
{
|
||||
return AnzahlMinutenIst / 60;
|
||||
var conditions = CreateDataBarConditions(_Columns, _Rows, _DataPer, "BlueSolidDataBar", 0, 1);
|
||||
|
||||
if (checkBoxDataPer.IsChecked.Value)
|
||||
{
|
||||
myPivotGridControl.FormatConditions.AddRange(conditions);
|
||||
}
|
||||
else
|
||||
{
|
||||
myPivotGridControl.FormatConditions.RemoveRange(conditions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public decimal? AnzahlMinutenSoll { get; set; }
|
||||
private void ButtonLayoutPrint_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var report = new PivotGridReport();
|
||||
var reportPivotGrid = (XRPivotGrid)report.FindControl("xrPivotGrid1", true);
|
||||
|
||||
public decimal? AnzahlStundenSoll
|
||||
|
||||
myPivotGridControl.SavePivotGridToFile(@"D:\icf\test.dat");
|
||||
reportPivotGrid.DataSource = new PivotFileDataSource(@"D:\icf\test.dat");
|
||||
|
||||
reportPivotGrid.Fields.Clear();
|
||||
foreach (var item in myPivotGridControl.Fields)
|
||||
{
|
||||
if (item.Area != FieldArea.FilterArea)
|
||||
{
|
||||
var field = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField();
|
||||
field.Area = GetArea(item.Area);
|
||||
field.Caption = item.Caption;
|
||||
field.Name = item.Name;
|
||||
field.FieldName = item.FieldName;
|
||||
field.GroupInterval = GetGroupInterval(item.GroupInterval);
|
||||
field.AreaIndex = item.AreaIndex;
|
||||
field.Width = (int)item.Width;
|
||||
field.ValueFormat.FormatString = item.ValueFormat;
|
||||
field.CellFormat.FormatType = DevExpress.Utils.FormatType.Custom;
|
||||
field.CellFormat.FormatString = item.CellFormat;
|
||||
field.SortOrder = (DevExpress.XtraPivotGrid.PivotSortOrder)((int)item.SortOrder);
|
||||
field.SortMode = (DevExpress.XtraPivotGrid.PivotSortMode)((int)item.SortMode);
|
||||
|
||||
if (item.UnboundType != FieldUnboundColumnType.Bound)
|
||||
{
|
||||
field.UnboundType = DevExpress.Data.UnboundColumnType.Decimal;
|
||||
field.UnboundExpression = item.UnboundExpression;
|
||||
field.UnboundExpressionMode = DevExpress.XtraPivotGrid.UnboundExpressionMode.UseAggregateFunctions;
|
||||
field.SummaryType = PivotSummaryType.Average;
|
||||
}
|
||||
|
||||
reportPivotGrid.Fields.Add(field);
|
||||
}
|
||||
}
|
||||
reportPivotGrid.OptionsView.ShowDataHeaders = false;
|
||||
reportPivotGrid.OptionsView.ShowColumnHeaders = false;
|
||||
reportPivotGrid.BestFit();
|
||||
|
||||
report.CreateDocument();
|
||||
|
||||
var documentPreviewControl = new DocumentPreviewControl { CommandBarStyle = DevExpress.Xpf.DocumentViewer.CommandBarStyle.Bars };
|
||||
documentPreviewControl.Loaded += BeWoUtils.CustomizeReportPreviewToolBar;
|
||||
var window = new BeWoWindow { GroupBoxContent = documentPreviewControl, Owner = BeWoApp.CurrentBeWo.MainWindow };
|
||||
|
||||
ThemeManager.SetTheme(window, Theme.Office2010Black);
|
||||
|
||||
ThemeManager.SetTheme(documentPreviewControl, Theme.Office2007Black);
|
||||
|
||||
documentPreviewControl.DocumentSource = report;
|
||||
|
||||
window.rootGroupBox.Header = "Druckvorschau";
|
||||
window.Title = "Druckvorschau";
|
||||
window.Show();
|
||||
documentPreviewControl.Visibility = Visibility.Visible;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Proterties
|
||||
public string LayoutString
|
||||
{
|
||||
get
|
||||
{
|
||||
if (EintraegeProTag == 0)
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
myPivotGridControl.SaveLayoutToStream(stream);
|
||||
return Encoding.Default.GetString(stream.ToArray());
|
||||
}
|
||||
}
|
||||
set
|
||||
{
|
||||
using (var stream = new MemoryStream(Encoding.Default.GetBytes(value ?? "")))
|
||||
{
|
||||
myPivotGridControl.RestoreLayoutFromStream(stream);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Methoden
|
||||
private void InitChart()
|
||||
{
|
||||
ChartControl.Diagram = ChartFactory.GenerateDiagram(typeof(BarStackedSeries2D), false);
|
||||
}
|
||||
|
||||
private IEnumerable<DataBarFormatCondition> CreateDataBarConditions(List<string> columns, List<string> rows, List<string> datas, string formatName)
|
||||
{
|
||||
foreach (var column in columns)
|
||||
{
|
||||
foreach (var row in rows)
|
||||
{
|
||||
foreach (var data in datas)
|
||||
{
|
||||
yield return new DataBarFormatCondition()
|
||||
{
|
||||
ColumnName = column,
|
||||
RowName = row,
|
||||
MeasureName = data,
|
||||
ApplyToSpecificLevel = true,
|
||||
PredefinedFormatName = formatName,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<DataBarFormatCondition> CreateDataBarConditions(List<string> columns, List<string> rows, List<string> datas, string formatName, decimal min, decimal max)
|
||||
{
|
||||
foreach (var column in columns)
|
||||
{
|
||||
foreach (var row in rows)
|
||||
{
|
||||
foreach (var data in datas)
|
||||
{
|
||||
var cond = new DataBarFormatCondition()
|
||||
{
|
||||
ColumnName = column,
|
||||
RowName = row,
|
||||
MeasureName = data,
|
||||
ApplyToSpecificLevel = true,
|
||||
PredefinedFormatName = formatName,
|
||||
};
|
||||
cond.MinValue = min;
|
||||
cond.MaxValue = max;
|
||||
|
||||
yield return cond;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private DevExpress.XtraPivotGrid.PivotGroupInterval GetGroupInterval(FieldGroupInterval groupInterval)
|
||||
{
|
||||
switch (groupInterval)
|
||||
{
|
||||
case FieldGroupInterval.DateDay:
|
||||
return DevExpress.XtraPivotGrid.PivotGroupInterval.DateDay;
|
||||
case FieldGroupInterval.DateWeekOfYear:
|
||||
return DevExpress.XtraPivotGrid.PivotGroupInterval.DateWeekOfYear;
|
||||
case FieldGroupInterval.DateMonth:
|
||||
return DevExpress.XtraPivotGrid.PivotGroupInterval.DateMonth;
|
||||
case FieldGroupInterval.DateYear:
|
||||
return DevExpress.XtraPivotGrid.PivotGroupInterval.DateYear;
|
||||
}
|
||||
|
||||
return DevExpress.XtraPivotGrid.PivotGroupInterval.Default;
|
||||
}
|
||||
|
||||
private DevExpress.XtraPivotGrid.PivotArea GetArea(FieldArea area)
|
||||
{
|
||||
switch (area)
|
||||
{
|
||||
case FieldArea.RowArea:
|
||||
return DevExpress.XtraPivotGrid.PivotArea.RowArea;
|
||||
case FieldArea.ColumnArea:
|
||||
return DevExpress.XtraPivotGrid.PivotArea.ColumnArea;
|
||||
case FieldArea.FilterArea:
|
||||
return DevExpress.XtraPivotGrid.PivotArea.FilterArea;
|
||||
case FieldArea.DataArea:
|
||||
return DevExpress.XtraPivotGrid.PivotArea.DataArea;
|
||||
}
|
||||
return DevExpress.XtraPivotGrid.PivotArea.FilterArea;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Classes
|
||||
public class FlexibleReportEntry
|
||||
{
|
||||
public string Customer { get; set; }
|
||||
|
||||
public string Employee { get; set; }
|
||||
|
||||
public string Team { get; set; }
|
||||
|
||||
public string Leistungskategorie { get; set; }
|
||||
|
||||
public string Leistung { get; set; }
|
||||
|
||||
public string SupportConcept { get; set; }
|
||||
|
||||
public decimal AnzahlMinutenIst { get; set; }
|
||||
|
||||
public decimal AnzahlStundenIst
|
||||
{
|
||||
get
|
||||
{
|
||||
return AnzahlMinutenIst / 60;
|
||||
}
|
||||
}
|
||||
|
||||
public decimal? AnzahlMinutenSoll { get; set; }
|
||||
|
||||
public decimal? AnzahlStundenSoll
|
||||
{
|
||||
get
|
||||
{
|
||||
return AnzahlMinutenSoll / 60;
|
||||
}
|
||||
return AnzahlMinutenSoll / 60 / EintraegeProTag;
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime Datum { get; set; }
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
public int EintraegeProTag { get; set; }
|
||||
public FlexibleReportEntryType Type { get; set; }
|
||||
|
||||
public FlexibleReportEntryType Type { get; set; }
|
||||
public int? Kilometer { get; set; }
|
||||
|
||||
public int? Kilometer { get; set; }
|
||||
public decimal? Betrag { get; set; }
|
||||
|
||||
public decimal? Betrag
|
||||
{
|
||||
get { return AnzahlStundenIst * 57.90m; }
|
||||
}
|
||||
public decimal? Stundensatz { get; set; }
|
||||
|
||||
public decimal Rundungspotenzial { get; set; }
|
||||
public decimal Rundungspotenzial { get; set; }
|
||||
|
||||
public static FlexibleReportEntry InitByFlexibleReportEntryDC(FlexibleReportEntryDC entryDC)
|
||||
{
|
||||
var returnValue = new FlexibleReportEntry()
|
||||
public decimal? DifferenzIstSollMinuten
|
||||
{
|
||||
AnzahlMinutenIst = entryDC.AnzahlMinuten,
|
||||
Datum = entryDC.StartDatum,
|
||||
SupportConcept = entryDC.SupportConcept == null ? "<Nicht angegeben>" : string.Format("{0:dd.MM.yyyy} - {1:dd.MM.yyyy}", entryDC.SupportConcept.StartDate, entryDC.SupportConcept.EndDate),
|
||||
Leistung = entryDC.Leistung,
|
||||
Leistungskategorie = entryDC.Leistungskategorie,
|
||||
Team = entryDC.Team,
|
||||
AnzahlMinutenSoll = entryDC.AnzahlMinutenSoll,
|
||||
EintraegeProTag = entryDC.EintraegeProTag,
|
||||
Type = entryDC.Type,
|
||||
Kilometer = entryDC.Kilometer,
|
||||
Rundungspotenzial = entryDC.AnzahlMinuten - ((decimal)entryDC.EndDatum.Subtract(entryDC.StartDatum).TotalMinutes)
|
||||
};
|
||||
|
||||
if (entryDC.Customer == null)
|
||||
{
|
||||
if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry)
|
||||
get
|
||||
{
|
||||
returnValue.Customer = "<Nicht angegeben>";
|
||||
return AnzahlMinutenIst - AnzahlMinutenSoll;
|
||||
}
|
||||
}
|
||||
|
||||
public decimal? DifferenzIstSollStunden
|
||||
{
|
||||
get
|
||||
{
|
||||
return DifferenzIstSollMinuten / 60;
|
||||
}
|
||||
}
|
||||
|
||||
public string Organisation { get; set; }
|
||||
|
||||
public static FlexibleReportEntry InitByFlexibleReportEntryDC(FlexibleReportEntryDC entryDC)
|
||||
{
|
||||
var returnValue = new FlexibleReportEntry()
|
||||
{
|
||||
AnzahlMinutenIst = entryDC.AnzahlMinuten,
|
||||
Datum = entryDC.StartDatum,
|
||||
SupportConcept = entryDC.SupportConcept == null ? "<Nicht angegeben>" : string.Format("{0:dd.MM.yyyy} - {1:dd.MM.yyyy}", entryDC.SupportConcept.StartDate, entryDC.SupportConcept.EndDate),
|
||||
Leistung = entryDC.Leistung,
|
||||
Leistungskategorie = entryDC.Leistungskategorie,
|
||||
Team = entryDC.Team,
|
||||
AnzahlMinutenSoll = entryDC.AnzahlMinutenSoll,
|
||||
Type = entryDC.Type,
|
||||
Kilometer = entryDC.Kilometer,
|
||||
Organisation = entryDC.Organisation,
|
||||
Rundungspotenzial = entryDC.AnzahlMinuten - ((decimal)entryDC.EndDatum.Subtract(entryDC.StartDatum).TotalMinutes),
|
||||
Betrag = entryDC.Betrag,
|
||||
Stundensatz = entryDC.Stundensatz
|
||||
};
|
||||
|
||||
if (entryDC.Customer == null)
|
||||
{
|
||||
if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry)
|
||||
{
|
||||
returnValue.Customer = "<Nicht angegeben>";
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue.Customer = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue.Customer = null;
|
||||
returnValue.Customer = string.Format("{0}, {1}", entryDC.Customer.LastName, entryDC.Customer.FirstName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue.Customer = string.Format("{0}, {1}", entryDC.Customer.LastName, entryDC.Customer.FirstName);
|
||||
}
|
||||
|
||||
if (entryDC.Employee == null)
|
||||
{
|
||||
if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry)
|
||||
if (entryDC.Employee == null)
|
||||
{
|
||||
returnValue.Employee = "<Nicht angegeben>";
|
||||
if (entryDC.Type == FlexibleReportEntryType.ServiceRecordEntry)
|
||||
{
|
||||
returnValue.Employee = "<Nicht angegeben>";
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue.Employee = null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
returnValue.Employee = null;
|
||||
returnValue.Employee = string.Format("{0}, {1}", entryDC.Employee.LastName, entryDC.Employee.FirstName);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "'" + Employee + " -> " + Customer;
|
||||
}
|
||||
}
|
||||
|
||||
public class FlexibleReportLayout
|
||||
{
|
||||
public long FlexibleReportLayoutOid { get; set; }
|
||||
|
||||
public long CreatorOid { get; set; }
|
||||
|
||||
public string LayoutName { get; set; }
|
||||
|
||||
public string LayoutString { get; set; }
|
||||
|
||||
public static FlexibleReportLayout InitByFlexibleReportLayoutDC(FlexibleReportLayoutDC entryDC)
|
||||
{
|
||||
return new FlexibleReportLayout()
|
||||
{
|
||||
CreatorOid = entryDC.CreatorOid,
|
||||
LayoutName = entryDC.LayoutName,
|
||||
LayoutString = entryDC.LayoutString,
|
||||
FlexibleReportLayoutOid = entryDC.FlexibleReportOid.Value
|
||||
};
|
||||
}
|
||||
|
||||
public FlexibleReportLayoutDC ConvertToFlexibleReportLayoutDC()
|
||||
{
|
||||
return new FlexibleReportLayoutDC()
|
||||
{
|
||||
CreatorOid = CreatorOid,
|
||||
LayoutName = LayoutName,
|
||||
LayoutString = LayoutString,
|
||||
FlexibleReportOid = FlexibleReportLayoutOid
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
internal static class ChartFactory
|
||||
{
|
||||
static readonly Type XYDiagram2DType = typeof(XYDiagram2D);
|
||||
static readonly Type XYDiagram3DType = typeof(XYDiagram3D);
|
||||
static readonly Type SimpleDiagram3DType = typeof(SimpleDiagram3D);
|
||||
static readonly Type SimpleDiagram2DType = typeof(SimpleDiagram2D);
|
||||
static readonly Type DefaultSeriesType = typeof(BarStackedSeries2D);
|
||||
|
||||
static Dictionary<Type, SeriesTypeDescriptor> seriesTypes;
|
||||
public static Dictionary<Type, SeriesTypeDescriptor> SeriesTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
if (seriesTypes == null)
|
||||
seriesTypes = CreateSeriesTypes();
|
||||
return seriesTypes;
|
||||
}
|
||||
}
|
||||
else
|
||||
static Dictionary<Type, SeriesTypeDescriptor> CreateSeriesTypes()
|
||||
{
|
||||
returnValue.Employee = string.Format("{0}, {1}", entryDC.Employee.LastName, entryDC.Employee.FirstName);
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "'" + Employee + " -> " + Customer;
|
||||
}
|
||||
}
|
||||
|
||||
public class FlexibleReportLayout
|
||||
{
|
||||
public long CreatorOid { get; set; }
|
||||
public string LayoutName { get; set; }
|
||||
public string LayoutString { get; set; }
|
||||
|
||||
public static FlexibleReportLayout InitByFlexibleReportLayoutDC(FlexibleReportLayoutDC entryDC)
|
||||
{
|
||||
return new FlexibleReportLayout()
|
||||
{
|
||||
CreatorOid = entryDC.CreatorOid,
|
||||
LayoutName = entryDC.LayoutName,
|
||||
LayoutString = entryDC.LayoutString
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
internal static class ChartFactory
|
||||
{
|
||||
static readonly Type XYDiagram2DType = typeof(XYDiagram2D);
|
||||
static readonly Type XYDiagram3DType = typeof(XYDiagram3D);
|
||||
static readonly Type SimpleDiagram3DType = typeof(SimpleDiagram3D);
|
||||
static readonly Type SimpleDiagram2DType = typeof(SimpleDiagram2D);
|
||||
static readonly Type DefaultSeriesType = typeof(BarStackedSeries2D);
|
||||
|
||||
static Dictionary<Type, SeriesTypeDescriptor> seriesTypes;
|
||||
public static Dictionary<Type, SeriesTypeDescriptor> SeriesTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
if (seriesTypes == null)
|
||||
seriesTypes = CreateSeriesTypes();
|
||||
Dictionary<Type, SeriesTypeDescriptor> seriesTypes = new Dictionary<Type, SeriesTypeDescriptor>();
|
||||
seriesTypes.Add(typeof(AreaFullStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Area Full-Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(AreaSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Area Series 2D" });
|
||||
seriesTypes.Add(typeof(AreaStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Area Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(BarFullStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Bar Full-Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(BarStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Bar Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(LineSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Line Series 2D" });
|
||||
seriesTypes.Add(typeof(PointSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Point Series 2D" });
|
||||
seriesTypes.Add(typeof(AreaSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Series 3D" });
|
||||
seriesTypes.Add(typeof(AreaStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Stacked Series 3D" });
|
||||
seriesTypes.Add(typeof(AreaFullStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Full-Stacked Series 3D" });
|
||||
seriesTypes.Add(typeof(BarSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Bar Series 3D" });
|
||||
seriesTypes.Add(typeof(PointSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Point Series 3D" });
|
||||
seriesTypes.Add(typeof(PieSeries3D), new SeriesTypeDescriptor { DiagramType = SimpleDiagram3DType, DisplayText="Pie Series 3D" });
|
||||
seriesTypes.Add(typeof(PieSeries2D), new SeriesTypeDescriptor { DiagramType = SimpleDiagram2DType, DisplayText = "Pie Series 2D" });
|
||||
return seriesTypes;
|
||||
}
|
||||
}
|
||||
static Dictionary<Type, SeriesTypeDescriptor> CreateSeriesTypes()
|
||||
{
|
||||
Dictionary<Type, SeriesTypeDescriptor> seriesTypes = new Dictionary<Type, SeriesTypeDescriptor>();
|
||||
seriesTypes.Add(typeof(AreaFullStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Area Full-Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(AreaSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Area Series 2D" });
|
||||
seriesTypes.Add(typeof(AreaStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Area Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(BarFullStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Bar Full-Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(BarStackedSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Bar Stacked Series 2D" });
|
||||
seriesTypes.Add(typeof(LineSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText="Line Series 2D" });
|
||||
seriesTypes.Add(typeof(PointSeries2D), new SeriesTypeDescriptor { DiagramType = XYDiagram2DType, DisplayText = "Point Series 2D" });
|
||||
seriesTypes.Add(typeof(AreaSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Series 3D" });
|
||||
seriesTypes.Add(typeof(AreaStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Stacked Series 3D" });
|
||||
seriesTypes.Add(typeof(AreaFullStackedSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Area Full-Stacked Series 3D" });
|
||||
seriesTypes.Add(typeof(BarSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Bar Series 3D" });
|
||||
seriesTypes.Add(typeof(PointSeries3D), new SeriesTypeDescriptor { DiagramType = XYDiagram3DType, DisplayText="Point Series 3D" });
|
||||
seriesTypes.Add(typeof(PieSeries3D), new SeriesTypeDescriptor { DiagramType = SimpleDiagram3DType, DisplayText="Pie Series 3D" });
|
||||
seriesTypes.Add(typeof(PieSeries2D), new SeriesTypeDescriptor { DiagramType = SimpleDiagram2DType, DisplayText = "Pie Series 2D" });
|
||||
return seriesTypes;
|
||||
}
|
||||
|
||||
public class SeriesTypeDescriptor
|
||||
{
|
||||
public Type DiagramType { get; set; }
|
||||
public string DisplayText { get; set; }
|
||||
}
|
||||
public class SeriesTypeDescriptor
|
||||
{
|
||||
public Type DiagramType { get; set; }
|
||||
public string DisplayText { get; set; }
|
||||
}
|
||||
|
||||
public static Diagram GenerateDiagram(Type seriesType, bool? showPointsLabels)
|
||||
{
|
||||
Series seriesTemplate = CreateSeriesInstance(seriesType);
|
||||
Diagram diagram = CreateDiagramBySeriesType(seriesType);
|
||||
if (diagram is XYDiagram2D)
|
||||
PrepareXYDiagram2D(diagram as XYDiagram2D);
|
||||
if (diagram is XYDiagram3D)
|
||||
PrepareXYDiagram3D(diagram as XYDiagram3D);
|
||||
if (diagram is Diagram3D)
|
||||
((Diagram3D)diagram).RuntimeRotation = true;
|
||||
diagram.SeriesDataMember = "Series";
|
||||
seriesTemplate.ArgumentDataMember = "Arguments";
|
||||
seriesTemplate.ValueDataMember = "Values";
|
||||
if (seriesTemplate.Label == null)
|
||||
seriesTemplate.Label = new SeriesLabel();
|
||||
seriesTemplate.LabelsVisibility = showPointsLabels == true;
|
||||
if (seriesTemplate is PieSeries2D || seriesTemplate is PieSeries3D)
|
||||
public static Diagram GenerateDiagram(Type seriesType, bool? showPointsLabels)
|
||||
{
|
||||
seriesTemplate.LegendTextPattern = "{A}";
|
||||
seriesTemplate.Label.TextPattern = "{A}: {VP:P0}";
|
||||
Series seriesTemplate = CreateSeriesInstance(seriesType);
|
||||
Diagram diagram = CreateDiagramBySeriesType(seriesType);
|
||||
if (diagram is XYDiagram2D)
|
||||
PrepareXYDiagram2D(diagram as XYDiagram2D);
|
||||
if (diagram is XYDiagram3D)
|
||||
PrepareXYDiagram3D(diagram as XYDiagram3D);
|
||||
if (diagram is Diagram3D)
|
||||
((Diagram3D)diagram).RuntimeRotation = true;
|
||||
diagram.SeriesDataMember = "Series";
|
||||
seriesTemplate.ArgumentDataMember = "Arguments";
|
||||
seriesTemplate.ValueDataMember = "Values";
|
||||
if (seriesTemplate.Label == null)
|
||||
seriesTemplate.Label = new SeriesLabel();
|
||||
seriesTemplate.LabelsVisibility = showPointsLabels == true;
|
||||
if (seriesTemplate is PieSeries2D || seriesTemplate is PieSeries3D)
|
||||
{
|
||||
seriesTemplate.LegendTextPattern = "{A}";
|
||||
seriesTemplate.Label.TextPattern = "{A}: {VP:P0}";
|
||||
}
|
||||
else
|
||||
{
|
||||
seriesTemplate.LegendTextPattern = "{A}: {V:G}";
|
||||
seriesTemplate.ShowInLegend = true;
|
||||
}
|
||||
diagram.SeriesTemplate = seriesTemplate;
|
||||
return diagram;
|
||||
}
|
||||
else
|
||||
static void PrepareXYDiagram2D(XYDiagram2D diagram)
|
||||
{
|
||||
seriesTemplate.LegendTextPattern = "{A}: {V:G}";
|
||||
seriesTemplate.ShowInLegend = true;
|
||||
if (diagram == null)
|
||||
return;
|
||||
diagram.AxisX = new AxisX2D();
|
||||
diagram.AxisX.Label = new AxisLabel();
|
||||
diagram.AxisX.Label.Staggered = true;
|
||||
}
|
||||
diagram.SeriesTemplate = seriesTemplate;
|
||||
return diagram;
|
||||
}
|
||||
static void PrepareXYDiagram2D(XYDiagram2D diagram)
|
||||
{
|
||||
if (diagram == null)
|
||||
return;
|
||||
diagram.AxisX = new AxisX2D();
|
||||
diagram.AxisX.Label = new AxisLabel();
|
||||
diagram.AxisX.Label.Staggered = true;
|
||||
}
|
||||
static void PrepareXYDiagram3D(XYDiagram3D diagram)
|
||||
{
|
||||
if (diagram == null)
|
||||
return;
|
||||
diagram.AxisX = new AxisX3D();
|
||||
diagram.AxisX.Label = new AxisLabel();
|
||||
diagram.AxisX.Label.Visible = false;
|
||||
}
|
||||
public static Series CreateSeriesInstance(Type seriesType)
|
||||
{
|
||||
Series series = (Series)Activator.CreateInstance(seriesType);
|
||||
ISupportTransparency supportTransparency = series as ISupportTransparency;
|
||||
if (supportTransparency != null)
|
||||
static void PrepareXYDiagram3D(XYDiagram3D diagram)
|
||||
{
|
||||
bool flag = series is AreaSeries2D || series is AreaSeries3D;
|
||||
supportTransparency.Transparency = flag ? 0.4 : 0;
|
||||
if (diagram == null)
|
||||
return;
|
||||
diagram.AxisX = new AxisX3D();
|
||||
diagram.AxisX.Label = new AxisLabel();
|
||||
diagram.AxisX.Label.Visible = false;
|
||||
}
|
||||
public static Series CreateSeriesInstance(Type seriesType)
|
||||
{
|
||||
Series series = (Series)Activator.CreateInstance(seriesType);
|
||||
ISupportTransparency supportTransparency = series as ISupportTransparency;
|
||||
if (supportTransparency != null)
|
||||
{
|
||||
bool flag = series is AreaSeries2D || series is AreaSeries3D;
|
||||
supportTransparency.Transparency = flag ? 0.4 : 0;
|
||||
}
|
||||
return series;
|
||||
}
|
||||
static Diagram CreateDiagramBySeriesType(Type seriesType)
|
||||
{
|
||||
return (Diagram)Activator.CreateInstance(SeriesTypes[seriesType].DiagramType);
|
||||
}
|
||||
return series;
|
||||
}
|
||||
static Diagram CreateDiagramBySeriesType(Type seriesType)
|
||||
{
|
||||
return (Diagram)Activator.CreateInstance(SeriesTypes[seriesType].DiagramType);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
114
BeWo/View/Detail/Report/PivotGridReport.Designer.cs
generated
Normal file
114
BeWo/View/Detail/Report/PivotGridReport.Designer.cs
generated
Normal file
@@ -0,0 +1,114 @@
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
partial class PivotGridReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.Detail = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
|
||||
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
|
||||
this.xrPivotGrid1 = new DevExpress.XtraReports.UI.XRPivotGrid();
|
||||
this.pivotGridField3 = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
// Detail
|
||||
//
|
||||
this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrPivotGrid1});
|
||||
this.Detail.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.Detail.HeightF = 60.00001F;
|
||||
this.Detail.Name = "Detail";
|
||||
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
|
||||
this.Detail.StylePriority.UseFont = false;
|
||||
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
|
||||
//
|
||||
// topMarginBand1
|
||||
//
|
||||
this.topMarginBand1.HeightF = 75F;
|
||||
this.topMarginBand1.Name = "topMarginBand1";
|
||||
//
|
||||
// bottomMarginBand1
|
||||
//
|
||||
this.bottomMarginBand1.HeightF = 75F;
|
||||
this.bottomMarginBand1.Name = "bottomMarginBand1";
|
||||
//
|
||||
// xrPivotGrid1
|
||||
//
|
||||
this.xrPivotGrid1.Appearance.Cell.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.CustomTotalCell.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.FieldHeader.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.FieldValue.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.FieldValueGrandTotal.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.FieldValueTotal.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.GrandTotalCell.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.Lines.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Appearance.TotalCell.Font = new System.Drawing.Font("Tahoma", 8.25F);
|
||||
this.xrPivotGrid1.Fields.AddRange(new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField[] {
|
||||
this.pivotGridField3});
|
||||
this.xrPivotGrid1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.xrPivotGrid1.Name = "xrPivotGrid1";
|
||||
this.xrPivotGrid1.OptionsPrint.FilterSeparatorBarPadding = 3;
|
||||
this.xrPivotGrid1.SizeF = new System.Drawing.SizeF(1019F, 60.00001F);
|
||||
//
|
||||
// pivotGridField3
|
||||
//
|
||||
this.pivotGridField3.Area = DevExpress.XtraPivotGrid.PivotArea.ColumnArea;
|
||||
this.pivotGridField3.AreaIndex = 0;
|
||||
this.pivotGridField3.Name = "pivotGridField3";
|
||||
//
|
||||
// PivotGridReport
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
this.Detail,
|
||||
this.topMarginBand1,
|
||||
this.bottomMarginBand1});
|
||||
this.DataSource = this.bindingSource1;
|
||||
this.Font = new System.Drawing.Font("Arial", 10F);
|
||||
this.Landscape = true;
|
||||
this.Margins = new System.Drawing.Printing.Margins(75, 75, 75, 75);
|
||||
this.PageHeight = 827;
|
||||
this.PageWidth = 1169;
|
||||
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
|
||||
this.Version = "17.1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraReports.UI.DetailBand Detail;
|
||||
private System.Windows.Forms.BindingSource bindingSource1;
|
||||
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
|
||||
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
|
||||
private DevExpress.XtraReports.UI.XRPivotGrid xrPivotGrid1;
|
||||
private DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField pivotGridField3;
|
||||
}
|
||||
}
|
||||
57
BeWo/View/Detail/Report/PivotGridReport.cs
Normal file
57
BeWo/View/Detail/Report/PivotGridReport.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections;
|
||||
using System.ComponentModel;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
public partial class PivotGridReport : DevExpress.XtraReports.UI.XtraReport
|
||||
{
|
||||
public PivotGridReport()
|
||||
{
|
||||
//<dxpg:PivotGridField x:Name="FlexibleJahr" FieldName="Datum" Area="ColumnArea" Width="100" Caption="Jahr" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateYear" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleMonat" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Monat" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateMonth" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleWeek" FieldName="Datum" Area="ColumnArea" Width="80" Caption="Woche" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateWeekOfYear" ValueFormat="KW {0}" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleTag" FieldName="Datum" Area="FilterArea" Width="40" Caption="Tag" AllowedAreas="ColumnArea,FilterArea" GroupInterval="DateDay" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleKlient" FieldName="Customer" Area="RowArea" Width="200" Caption="Klient" AllowedAreas="RowArea,FilterArea" AreaIndex="2" Height="21" SortOrder="Ascending" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleSupportConcept" FieldName="SupportConcept" Area="FilterArea" Width="200" Caption="Hilfeplan" AllowedAreas="RowArea,FilterArea" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleMitarbeiter" FieldName="Employee" Area="RowArea" Width="200" Caption="Mitarbeiter" AllowedAreas="RowArea,FilterArea" AreaIndex="1" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleTeam" FieldName="Team" Area="FilterArea" Width="200" Caption="Team" AllowedAreas="RowArea,FilterArea" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleLeistungskategorie" FieldName="Leistungskategorie" Area="FilterArea" Width="200" Caption="Leistungskategorie" AllowedAreas="RowArea,FilterArea" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleLeistung" FieldName="Leistung" Area="FilterArea" Width="200" Caption="Leistung" AllowedAreas="RowArea,FilterArea" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleOrganisation" FieldName="Organisation" Area="FilterArea" Width="200" Caption="Kostenträger" AllowedAreas="RowArea,FilterArea" />
|
||||
// <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:PivotGridField x:Name="FlexibleBetrag" FieldName="Betrag" Area="FilterArea" Width="80" Caption="Betrag" AllowedAreas="DataArea,FilterArea" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleRundungspotenzial" FieldName="Rundungspotenzial" Area="FilterArea" Width="80" Caption="Rundungspotenzial" AllowedAreas="DataArea,FilterArea" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollMin" FieldName="DifferenzIstSollMinuten" Area="FilterArea" Width="80" Caption="Differenz Min." AllowedAreas="DataArea,FilterArea" HideEmptyVariationItems="True" />
|
||||
// <dxpg:PivotGridField x:Name="FlexibleDifferenzIstSollStd" FieldName="DifferenzIstSollStunden" Area="DataArea" Width="80" Caption="Differenz Std." AllowedAreas="DataArea,FilterArea" HideEmptyVariationItems="True" />
|
||||
// <dxpg:PivotGridField x:Name="UFlexibleProzentualeAbweichung" UnboundFieldName="ProzAbweichung" Area="DataArea" Width="80" Caption="Prozentual Abweichung" AllowedAreas="DataArea,FilterArea" />
|
||||
InitializeComponent();
|
||||
ErstellePivotField("Jahr", "FlexibleMonat", "Datum", DevExpress.XtraPivotGrid.PivotArea.ColumnArea);
|
||||
ErstellePivotField("Klient", "FlexibleKlient", "Customer", DevExpress.XtraPivotGrid.PivotArea.RowArea);
|
||||
ErstellePivotField("Mitarbeiter", "FlexibleMitarbeiter", "Employee", DevExpress.XtraPivotGrid.PivotArea.RowArea);
|
||||
ErstellePivotField("Std.", "FlexibleAnzahlStdIst", "AnzahlStundenIst", DevExpress.XtraPivotGrid.PivotArea.DataArea);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void ErstellePivotField(string caption, string name, string fieldname, DevExpress.XtraPivotGrid.PivotArea area)
|
||||
{
|
||||
var field = new DevExpress.XtraReports.UI.PivotGrid.XRPivotGridField();
|
||||
field.Area = area;
|
||||
//field.AreaIndex = xrPivotGrid1.Fields.Count;
|
||||
field.Caption = caption;
|
||||
field.Name = name;
|
||||
field.FieldName = fieldname;
|
||||
|
||||
xrPivotGrid1.Fields.Add(field);
|
||||
}
|
||||
}
|
||||
}
|
||||
123
BeWo/View/Detail/Report/PivotGridReport.resx
Normal file
123
BeWo/View/Detail/Report/PivotGridReport.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -1709,15 +1709,15 @@ namespace BeWo.View
|
||||
|
||||
if (!_Code.Equals(""))
|
||||
{
|
||||
Login _login = new Login(_kundennummer, _Code, _benutzername, _passwort, _apikey);
|
||||
//Login _login = new Login(_kundennummer, _Code, _benutzername, _passwort, _apikey);
|
||||
|
||||
var x = _login.AnmeldevorgangDurchFuehren();
|
||||
//var x = _login.AnmeldevorgangDurchFuehren();
|
||||
|
||||
if (x != null)
|
||||
{
|
||||
ServiceChatView = new ChatView(x);
|
||||
ServiceChatView.Show();
|
||||
}
|
||||
//if (x != null)
|
||||
//{
|
||||
// ServiceChatView = new ChatView(x);
|
||||
// ServiceChatView.Show();
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1729,23 +1729,23 @@ namespace BeWo.View
|
||||
MessageBox.Show("Sie benötigen einen gültigen Zugang zum Chat. Bitte wenden Sie sich an den Support.", "Info");
|
||||
}
|
||||
}
|
||||
else if (ServiceChatView.Visibility == Visibility.Visible)
|
||||
{
|
||||
ServiceChatView.Visibility = Visibility.Hidden;
|
||||
}
|
||||
else if (ServiceChatView.Visibility == Visibility.Hidden)
|
||||
{
|
||||
ServiceChatView.Visibility = Visibility.Visible;
|
||||
//else if (ServiceChatView.Visibility == Visibility.Visible)
|
||||
//{
|
||||
// ServiceChatView.Visibility = Visibility.Hidden;
|
||||
//}
|
||||
//else if (ServiceChatView.Visibility == Visibility.Hidden)
|
||||
//{
|
||||
// ServiceChatView.Visibility = Visibility.Visible;
|
||||
|
||||
if (ServiceChatView.WindowState == WindowState.Minimized)
|
||||
{
|
||||
ServiceChatView.WindowState = WindowState.Normal;
|
||||
ServiceChatView.Height = 700;
|
||||
ServiceChatView.Width = 900;
|
||||
}
|
||||
// if (ServiceChatView.WindowState == WindowState.Minimized)
|
||||
// {
|
||||
// ServiceChatView.WindowState = WindowState.Normal;
|
||||
// ServiceChatView.Height = 700;
|
||||
// ServiceChatView.Width = 900;
|
||||
// }
|
||||
|
||||
ServiceChatView.Activate();
|
||||
}
|
||||
// ServiceChatView.Activate();
|
||||
//}
|
||||
//#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -177,6 +177,7 @@
|
||||
</Compile>
|
||||
<Compile Include="Util\JSONCustomer.cs" />
|
||||
<Compile Include="Util\MobileUtils.cs" />
|
||||
<Compile Include="Util\ReferenceNumberWithNotice.cs" />
|
||||
<Compile Include="Util\ServiceRecord2Validation.cs" />
|
||||
<Compile Include="Util\TextbausteinDisplayItem.cs" />
|
||||
<Compile Include="Util\Umfeldsperson.cs" />
|
||||
@@ -213,6 +214,7 @@
|
||||
<Content Include="Scripts\calendar.js" />
|
||||
<Content Include="Scripts\dateHelper.js" />
|
||||
<Content Include="Scripts\datepicker.js" />
|
||||
<Content Include="Scripts\goals.js" />
|
||||
<Content Include="Scripts\gruppenbuchung.js" />
|
||||
<Content Include="Scripts\initialization.js" />
|
||||
<Content Include="Scripts\localServiceRecord.js" />
|
||||
@@ -220,6 +222,7 @@
|
||||
<Content Include="Scripts\modernizr-2.8.3.js" />
|
||||
<Content Include="Scripts\serviceRecordValidation.js" />
|
||||
<Content Include="Scripts\statistics.js" />
|
||||
<Content Include="Scripts\supportConceptDropDown.js" />
|
||||
<Content Include="Scripts\textbausteine.js" />
|
||||
<Content Include="Scripts\unterschrift.js" />
|
||||
<Content Include="Scripts\utils.js" />
|
||||
|
||||
@@ -173,7 +173,7 @@ span {
|
||||
margin-top: .2em;
|
||||
margin-bottom: 0;
|
||||
border: 1px solid #E6E6E6;
|
||||
padding: 5px 0px;
|
||||
padding: 5px 0;
|
||||
border-radius: 0;
|
||||
background-image: url("images/toggle-icon-d.svg");
|
||||
background-repeat: no-repeat;
|
||||
@@ -815,11 +815,6 @@ input[type="checkbox"] {
|
||||
margin-top: .25em;
|
||||
}
|
||||
|
||||
/*#groupBookingOpenPopupBtn {
|
||||
margin-bottom: 1em;
|
||||
margin-top: .5em;
|
||||
}*/
|
||||
|
||||
.group-booking-tab {
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -867,6 +862,14 @@ input[type="checkbox"] {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.tab-content-2 table tr:nth-child(4n-1) {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.tab-content-2 table tr:nth-child(4n+0) {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
#employeeCollapsible, #groupBookingCollapsible {
|
||||
overflow-y: auto;
|
||||
}
|
||||
@@ -892,6 +895,7 @@ input[type="checkbox"] {
|
||||
width: 20%;
|
||||
font-size: 13px;
|
||||
color: #555555;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.doku-tab-link.active {
|
||||
@@ -967,4 +971,66 @@ input[type="checkbox"] {
|
||||
|
||||
#aktenzeichenTable tr:last-child hr {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#supportConceptListContainer {
|
||||
display: none;
|
||||
width: 90%;
|
||||
height: auto;
|
||||
max-height: 90%;
|
||||
background-color: white;
|
||||
z-index: 900;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
padding: .5em .5em 0 .5em;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.supportConceptDiv {
|
||||
display: block;
|
||||
background-color: #E6E6E6;
|
||||
color: #555555;
|
||||
margin-bottom: .35em;
|
||||
}
|
||||
|
||||
.supportConceptDiv:active {
|
||||
background-color: #FF5A00;
|
||||
}
|
||||
|
||||
.listP {
|
||||
font-size: 13px;
|
||||
padding: 0 0.5em;
|
||||
margin: 0;
|
||||
min-height: 13px;
|
||||
}
|
||||
|
||||
.expiredSupportConceptSpan {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.isAboutToExpireSpan {
|
||||
color: #FF9400;
|
||||
}
|
||||
|
||||
#supportConceptSelectionButton {
|
||||
margin-bottom: .5em;
|
||||
padding-right: 1em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
#hidingModalWrapper {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 899;
|
||||
background-color: gray;
|
||||
opacity: .9;
|
||||
top: 0;
|
||||
left:0;
|
||||
bottom:0;
|
||||
right:0;
|
||||
}
|
||||
@@ -79,6 +79,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.ShowExpiredSupportConcepts = GetUserSettingValue("ShowExpiredSupportConcepts") == "1";
|
||||
Model.ShowOnlyOwnSupportConcepts = GetUserSettingValue("ShowOnlyMySupportConcepts") == "1";
|
||||
|
||||
var mandator = OperationsService.GetMandator();
|
||||
var supportConceptExpirationLimitInMonths = MobileUtils.GetSettingValue(mandator.Settings, "HilfeplanAuslaufAuswahl");
|
||||
|
||||
BS.Shared.Settings.ApplicationSettings.SupportConceptExpirationLimitInMonths = supportConceptExpirationLimitInMonths == null ? 3 : int.Parse(supportConceptExpirationLimitInMonths);
|
||||
|
||||
var unter = GetSettingValue("ShowSignature");
|
||||
Model.ShowSignature = unter == "1";
|
||||
|
||||
@@ -179,6 +184,11 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
Model.IsServiceRecordNoticeMandatory = true;
|
||||
}
|
||||
|
||||
if(Model.SelectedSupportConceptListObject == null)
|
||||
{
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -1649,7 +1659,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
a.CostBearer2SupportConceptOid.Value.Equals(Model.CostBearer2SupportConceptOid)));
|
||||
|
||||
if(Model.SelectedSupportConcept != null)
|
||||
{
|
||||
{
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => long.Parse(f.CostBearer2SupportConceptOid) == cb2scOid);
|
||||
|
||||
var details = OperationsService.GetSupportConceptTreeNodeDetailInfo(Model.SelectedSupportConcept.Customer.CustomerOid, Model.SelectedSupportConcept.SupportConceptOid, Model.CostBearer2SupportConceptOid);
|
||||
|
||||
Model.ServiceCategories = details.ServiceAccountings.Count > 0
|
||||
@@ -1659,13 +1671,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NurKlientenbezogen).ToList();
|
||||
}
|
||||
else if(cb2scOid == -2)
|
||||
{
|
||||
{
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2scOid.ToString()));
|
||||
Model.ServiceCategories = CreateServiceCategoryModels(OperationsService.GetAllServiceDescriptions());
|
||||
Model.ServiceCategories = Model.ServiceCategories.Where(c => !c.OhneHilfeplan.HasValue || c.OhneHilfeplan.Value == AccountingvisibilityType.Beides || c.OhneHilfeplan.Value == AccountingvisibilityType.NichtKlientenbezogen).ToList();
|
||||
}
|
||||
else if(cb2scOid == -1)
|
||||
{
|
||||
Model.ServiceCategories.Clear();
|
||||
Model.SelectedSupportConceptListObject = Model.SupportConceptListObjects.First(f => f.CostBearer2SupportConceptOid.Equals(cb2scOid.ToString()));
|
||||
Model.ServiceCategories.Clear();
|
||||
}
|
||||
|
||||
Model.Zeitraum = 7;
|
||||
@@ -1716,7 +1730,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
public string UpdateGoals(long pGoalOid)
|
||||
public string UpdateGoals(string pGoalOids)
|
||||
{
|
||||
if (Model == null)
|
||||
{
|
||||
@@ -1730,25 +1744,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
var goal = sc.Goals.FirstOrDefault(first => first.ValueListEntryOid.HasValue && first.ValueListEntryOid.Value.Equals(pGoalOid));
|
||||
if (goal == null) //Parent Goal wurde ausgewählt
|
||||
{
|
||||
//Model.
|
||||
}
|
||||
if (Model.SelectedGoals == null)
|
||||
{
|
||||
Model.SelectedGoals = new List<ValueListEntryDC> { goal };
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
var splitOids = pGoalOids.Split(';');
|
||||
var selectedGoalOids = splitOids.Select(long.Parse).ToList();
|
||||
|
||||
if (Model.SelectedGoals.Contains(goal))
|
||||
{
|
||||
Model.SelectedGoals.Remove(goal);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.SelectedGoals.Add(goal);
|
||||
}
|
||||
var goals = sc.Goals.Where(w => w.ValueListEntryOid.HasValue && selectedGoalOids.Contains(w.ValueListEntryOid.Value)).ToList();
|
||||
|
||||
Model.SelectedGoals = goals;
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
@@ -135,6 +135,29 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<SupportConceptListObject> SupportConceptListObjects
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostBearerRelations = new List<SupportConceptListObject> {new SupportConceptListObject("Hilfeplan auswählen", "", "-1", false, false), new SupportConceptListObject("Ohne Hilfeplan", "", "-2", false, false) };
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostBearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select(
|
||||
cb => new SupportConceptListObject(
|
||||
$"{sc.Customer.LastNameFirstName} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
cb.SupportConcept.IsAboutToExpire,
|
||||
cb.SupportConcept.ExpiresIn3MonthOrLess))
|
||||
);
|
||||
}
|
||||
|
||||
return allCostBearerRelations;
|
||||
}
|
||||
}
|
||||
|
||||
public SupportConceptListObject SelectedSupportConceptListObject { get; set; }
|
||||
|
||||
public List<SupportConceptCostBearerRelDC> SelectedConceptCostBearerRelations { get; set; }
|
||||
|
||||
public IEnumerable<CustomSelectListItem> SelectedRelations
|
||||
@@ -168,23 +191,27 @@ namespace BeWoPlanerMobil.Models
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<SelectListItem> SupporConceptListItemsForGroupBooking
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostBearerRelations = new List<SelectListItem>();
|
||||
public IEnumerable<SupportConceptListObject> SupportConceptListObjectsForGroupBooking
|
||||
{
|
||||
get
|
||||
{
|
||||
var allCostbearerRelations = new List<SupportConceptListObject>();
|
||||
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostBearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select(cb => new SelectListItem
|
||||
{
|
||||
Value = cb.CostBearer2SupportConceptOid.ToString(), Text = $"{sc.Customer.LastNameFirstName} | {cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}"
|
||||
}));
|
||||
}
|
||||
|
||||
return allCostBearerRelations;
|
||||
}
|
||||
}
|
||||
foreach(var sc in SupportConcepts.OrderBy(sc => sc.Customer.LastName))
|
||||
{
|
||||
allCostbearerRelations.AddRange(sc.CostBearerRelations.Where(w => ShowExpiredSupportConcepts || w.EndDate == null || w.EndDate.Value >= DateTime.Now).Select(
|
||||
cb => new SupportConceptListObject(
|
||||
$"{sc.Customer.LastNameFirstName} {(sc.Customer.DateOfBirth.HasValue ? "*" + sc.Customer.DateOfBirth.Value.ToString("dd.MM.yyyy") : string.Empty)}",
|
||||
$"{cb.StartDate?.ToShortDateString().Remove(6, 2) ?? string.Empty}-{cb.EndDate?.ToShortDateString().Remove(6, 2) ?? string.Empty} {cb.CostBearer.Name}",
|
||||
cb.CostBearer2SupportConceptOid.ToString(),
|
||||
cb.SupportConcept.IsAboutToExpire,
|
||||
cb.SupportConcept.ExpiresIn3MonthOrLess))
|
||||
);
|
||||
}
|
||||
|
||||
return allCostbearerRelations;
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<SelectListItem> ServiceCategoryListItems
|
||||
{
|
||||
@@ -348,4 +375,48 @@ namespace BeWoPlanerMobil.Models
|
||||
TextColor = pTextColor;
|
||||
}
|
||||
}
|
||||
|
||||
public class SupportConceptListObject
|
||||
{
|
||||
public string NameAndDateOfBirth { get; set; }
|
||||
|
||||
public string SupportConceptTimeSpan { get; set; }
|
||||
|
||||
public string CostBearer2SupportConceptOid { get; set; }
|
||||
|
||||
public string CostBearer2SupportConceptOidName { get; set; }
|
||||
|
||||
public string SpanColor { get; set; } = string.Empty;
|
||||
|
||||
public string DisplayString
|
||||
{
|
||||
get
|
||||
{
|
||||
if(string.IsNullOrEmpty(SupportConceptTimeSpan))
|
||||
{
|
||||
return NameAndDateOfBirth;
|
||||
}
|
||||
|
||||
return $"{NameAndDateOfBirth ?? string.Empty} | {SupportConceptTimeSpan}";
|
||||
}
|
||||
}
|
||||
|
||||
public SupportConceptListObject(string pNameAndDateOfBirth, string pSupportConceptTimeSpan, string pCostBearer2SupportConceptOid, bool isAboutToExpire, bool isAboutToExpireIn3MonthsOrLess)
|
||||
{
|
||||
NameAndDateOfBirth = pNameAndDateOfBirth;
|
||||
SupportConceptTimeSpan = pSupportConceptTimeSpan;
|
||||
CostBearer2SupportConceptOid = pCostBearer2SupportConceptOid;
|
||||
|
||||
CostBearer2SupportConceptOidName = "OidHolder_" + CostBearer2SupportConceptOid;
|
||||
|
||||
if(isAboutToExpire)
|
||||
{
|
||||
SpanColor = "style=\"color: red;\"";
|
||||
}
|
||||
else if(isAboutToExpireIn3MonthsOrLess)
|
||||
{
|
||||
SpanColor = "style=\"color: #FF9400;\"";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
112
BeWoPlanerMobil/Scripts/goals.js
Normal file
112
BeWoPlanerMobil/Scripts/goals.js
Normal file
@@ -0,0 +1,112 @@
|
||||
function buildCollapsibleSet(jsonString) {
|
||||
try {
|
||||
if(jsonString.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
var kollektion = $.parseJSON(jsonString);
|
||||
|
||||
actuallyBuildCollapsibleSet(kollektion, null);
|
||||
} catch(exception) {
|
||||
console.log("Fehler(BuildCollapsibleSet): " + exception.message);
|
||||
}
|
||||
}
|
||||
|
||||
function actuallyBuildCollapsibleSet(kollektion, selectedGoalOids) {
|
||||
var kollabierbar1 = $("#kollabierbar1");
|
||||
|
||||
kollabierbar1.empty();
|
||||
|
||||
collapsibleHtml = "";
|
||||
|
||||
$.each(kollektion, function (index) {
|
||||
buildGoalTreeItem(kollektion[index], selectedGoalOids);
|
||||
});
|
||||
|
||||
kollabierbar1.append(collapsibleHtml);
|
||||
}
|
||||
|
||||
var collapsibleHtml;
|
||||
|
||||
function buildGoalTreeItem(goalItem, selectedGoalOids) {
|
||||
var goalOid = goalItem.ValueListEntryOid;
|
||||
var goalHeader = goalItem.Header;
|
||||
var isChecked = selectedGoalOids !== null && isElementInArray(selectedGoalOids, goalOid) ? "checked" : "";
|
||||
|
||||
if (!goalItem.IsLeaf) {
|
||||
collapsibleHtml += '<div onclick="toggleOnclick(this);" class="toggle-btn-div" style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateChildGoals(' + goalOid + ', this);event.stopPropagation();" id="goal' + goalOid + '" value="' + goalOid + '" ' + isChecked + ' />' + goalHeader + '</div>';
|
||||
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: none;" class="kollabierbar">';
|
||||
|
||||
try {
|
||||
$.each(goalItem.Children,
|
||||
function(index) {
|
||||
|
||||
buildGoalTreeItem(goalItem.Children[index], selectedGoalOids);
|
||||
});
|
||||
|
||||
} catch(exception) {
|
||||
console.log('Fehler bei der Baumkonstruktion: ' + exception.message);
|
||||
}
|
||||
|
||||
collapsibleHtml += "</div>";
|
||||
} else {
|
||||
|
||||
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateGoals(' + goalOid + ')" id="' + goalOid + '" value="' + goalHeader + '" ' + isChecked + ' />' + goalHeader + '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
function loadGoalsOnSuccess(json) {
|
||||
if (json === "SessionTimeout") {
|
||||
window.location.href = redirectLink;
|
||||
return;
|
||||
}
|
||||
|
||||
buildCollapsibleSet(json);
|
||||
}
|
||||
|
||||
function loadGoals(actionPath) {
|
||||
var selectedServiceRecord = $($("#scDropDown")).find(":selected").val();
|
||||
|
||||
if (selectedServiceRecord === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
makeAjaxCall("GET", actionPath, loadGoalsOnSuccess, { pCostbearer2SupportConceptOid: selectedServiceRecord }, null);
|
||||
}
|
||||
|
||||
function updateGoals() {
|
||||
var selectedGoals = getSelectedGoals();
|
||||
|
||||
makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOids: selectedGoals }, null);
|
||||
}
|
||||
|
||||
function updateChildGoals(goalOid, element) {
|
||||
var clickedElement = $(element);
|
||||
var next = clickedElement.parent().next("div").find("input");
|
||||
|
||||
if(next !== null || next !== undefined) {
|
||||
$.each(next, function(index, item) {
|
||||
$(item).prop("checked", clickedElement.prop("checked") === true);
|
||||
});
|
||||
}
|
||||
|
||||
updateGoals();
|
||||
}
|
||||
|
||||
function getSelectedGoals() {
|
||||
var rootElement = $("#kollabierbar1");
|
||||
var checkboxes = rootElement.find("input");
|
||||
|
||||
var selectedGoals = "";
|
||||
|
||||
$.each(checkboxes, function(index, checkbox) {
|
||||
var box = $(checkbox);
|
||||
var id = box.attr("id");
|
||||
|
||||
if(box.prop("checked") === true && !id.includes("goal")) {
|
||||
selectedGoals += id + ";";
|
||||
}
|
||||
});
|
||||
|
||||
return selectedGoals.substr(0, selectedGoals.length - 1);
|
||||
}
|
||||
@@ -102,17 +102,20 @@ function initBeWoMobile(actionPath) {
|
||||
return;
|
||||
}
|
||||
|
||||
$("#kategorien_select").val(serviceCategoryOid);
|
||||
var kategorienSelect = $("#kategorien_select");
|
||||
|
||||
kategorienSelect.val(serviceCategoryOid);
|
||||
|
||||
var liste = $.parseJSON(result);
|
||||
$("#leistungen_select").empty();
|
||||
$("#leistungen_select").val("");
|
||||
var leistungenSelect = $("#leistungen_select");
|
||||
leistungenSelect.empty();
|
||||
leistungenSelect.val("");
|
||||
|
||||
$.each(liste, function (index, leistung) {
|
||||
$("#leistungen_select").append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + '</option>');
|
||||
leistungenSelect.append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + '</option>');
|
||||
});
|
||||
|
||||
$("#leistungen_select").val(serviceDescriptionOid);
|
||||
leistungenSelect.val(serviceDescriptionOid);
|
||||
|
||||
makeAjaxCall("GET", window.setServiceDescriptionUrl, function () {
|
||||
hideSanduhr();
|
||||
@@ -182,7 +185,7 @@ function initBeWoMobile(actionPath) {
|
||||
var employeesTableHasEntries = $("#employeeCollapsible input:checked").length;
|
||||
|
||||
if (isInGroupBookingMode()) {
|
||||
var value = supportConceptTableHasEntries > 0 && employeesTableHasEntries > 0 ? false : true;
|
||||
var value = !(supportConceptTableHasEntries > 0 && employeesTableHasEntries > 0);
|
||||
|
||||
$("#anlegenEditierenBtn").prop("disabled", value);
|
||||
}
|
||||
@@ -272,7 +275,7 @@ function initializeDocumentationTextareas() {
|
||||
}
|
||||
}
|
||||
|
||||
$(".doku-tab-link").css("height", height + "px");
|
||||
//$(".doku-tab-link").css("height", height + "px");
|
||||
}
|
||||
|
||||
if (numberOfDocumentationTypes > 0) {
|
||||
|
||||
@@ -1,79 +1,7 @@
|
||||
var ZeiterfassungDatakonstrukt = [];
|
||||
var KlientDatakonstrukt = [];
|
||||
|
||||
var klientzwischenspeicher = [];
|
||||
|
||||
var timeOut = 10000;
|
||||
|
||||
function buildCollapsibleSet(jsonString) {
|
||||
try {
|
||||
if(jsonString.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
var kollektion = $.parseJSON(jsonString);
|
||||
|
||||
actuallyBuildCollapsibleSet(kollektion, null);
|
||||
} catch(exception) {
|
||||
console.log("Fehler(BuildCollapsibleSet): " + exception.message);
|
||||
}
|
||||
}
|
||||
|
||||
function actuallyBuildCollapsibleSet(kollektion, selectedGoalOids) {
|
||||
$("#kollabierbar1").empty();
|
||||
|
||||
collapsibleHtml = "";
|
||||
|
||||
$.each(kollektion, function (index) {
|
||||
buildGoalTreeItem(kollektion[index], selectedGoalOids);
|
||||
});
|
||||
|
||||
$("#kollabierbar1").append(collapsibleHtml);
|
||||
}
|
||||
|
||||
var level = 0;
|
||||
|
||||
var collapsibleHtml;
|
||||
|
||||
zeitRegEx = /^(2[0-3]|[01]?[0-9])(:|,|\.|#|;)?([0-5][0-9])$/;
|
||||
|
||||
function buildGoalTreeItem(goalItem, selectedGoalOids) {
|
||||
var goalOid = goalItem.ValueListEntryOid;
|
||||
var goalHeader = goalItem.Header;
|
||||
var isChecked = selectedGoalOids !== null && isElementInArray(selectedGoalOids, goalOid) ? "checked" : "";
|
||||
|
||||
if (!goalItem.IsLeaf) {
|
||||
//collapsibleHtml += '<input type="checkbox" style="width: auto;" onclick="updateGoals(' + goalOid + ')" id="' + goalOid + '" value="' + goalHeader + '" ' + isChecked + '/><label class="toggle-btnLabel" for="' + goalHeader + '">' + goalHeader + '</label>';
|
||||
collapsibleHtml += '<div onclick="toggleOnclick(this);" class="toggle-btn-div" style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateChildGoals(' + goalOid + ');event.stopPropagation();" id="goal' + goalOid + '" value="' + goalOid + '" ' + isChecked + ' />' + goalHeader + '</div>';
|
||||
//collapsibleHtml += '<input onclick="toggleOnclick(this);" type="button" class="toggle-btn" value="' + goalHeader + '" style="margin-right: 0; padding-right: 0;" />';
|
||||
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: none;" class="kollabierbar">';
|
||||
|
||||
try {
|
||||
$.each(goalItem.Children,
|
||||
function(index) {
|
||||
|
||||
buildGoalTreeItem(goalItem.Children[index], selectedGoalOids);
|
||||
});
|
||||
|
||||
} catch(exception) {
|
||||
console.log('Fehler bei der Baumkonstruktion: ' + exception.message);
|
||||
}
|
||||
collapsibleHtml += "</div>";
|
||||
} else {
|
||||
|
||||
collapsibleHtml += '<div style="margin-right: 0; padding-right: 0;display: block;"><input type="checkbox" style="width: auto;" onclick="updateGoals(' + goalOid + ')" id="' + goalOid + '" value="' + goalHeader + '" ' + isChecked + ' />' + goalHeader + '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
function loadGoalsOnSuccess(json) {
|
||||
if (json === "SessionTimeout") {
|
||||
window.location.href = redirectLink;
|
||||
return;
|
||||
}
|
||||
|
||||
buildCollapsibleSet(json);
|
||||
}
|
||||
|
||||
function loadServiceDescriptionsOnSuccess(json) {
|
||||
if (json === "SessionTimeout") {
|
||||
window.location.href = window.redirectLink;
|
||||
@@ -81,16 +9,17 @@ function loadServiceDescriptionsOnSuccess(json) {
|
||||
}
|
||||
|
||||
var liste = $.parseJSON(json);
|
||||
var leistungenSelect = $("#leistungen_select");
|
||||
|
||||
$("#leistungen_select").empty();
|
||||
$("#leistungen_select").val("");
|
||||
leistungenSelect.empty();
|
||||
leistungenSelect.val("");
|
||||
|
||||
$.each(liste, function (index, leistung) {
|
||||
$("#leistungen_select").append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + "</option>");
|
||||
leistungenSelect.append('<option value="' + leistung.ServiceDescriptionOid + '">' + leistung.Name + "</option>");
|
||||
});
|
||||
|
||||
if(liste[0] !== undefined) {
|
||||
$("#leistungen_select").val(liste[0].ServiceDescriptionOid);
|
||||
leistungenSelect.val(liste[0].ServiceDescriptionOid);
|
||||
|
||||
makeAjaxCall("GET", window.setServiceDescriptionUrl, null, { pServiceDescriptionOid: liste[0].ServiceDescriptionOid }, null);
|
||||
}
|
||||
@@ -123,16 +52,6 @@ function resizeLabelColumns() {
|
||||
$("#tabLbl").css("width", $("#zieleLbl").css("width"));
|
||||
}
|
||||
|
||||
function loadGoals(actionPath) {
|
||||
var selectedServiceRecord = $($("#scDropDown")).find(":selected").val();
|
||||
|
||||
if (selectedServiceRecord === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
makeAjaxCall("GET", actionPath, loadGoalsOnSuccess, { pCostbearer2SupportConceptOid: selectedServiceRecord }, null);
|
||||
}
|
||||
|
||||
function toggleMenu() {
|
||||
var menuDiv = $("#menu-div");
|
||||
$(menuDiv).fadeToggle("fast");
|
||||
@@ -150,39 +69,6 @@ function loadServiceDescriptions() {
|
||||
loadTextbausteineForServiceCategory(selectedCategory);
|
||||
}
|
||||
|
||||
function updateGoals(cbId) {
|
||||
makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null);
|
||||
}
|
||||
|
||||
var goalOidArray = new Array();
|
||||
function updateChildGoals(goalOid) {
|
||||
goalOidArray = new Array();
|
||||
|
||||
var parent = document.getElementById("goal" + goalOid);
|
||||
//alert("start");
|
||||
CheckChildGoalNodes(parent);
|
||||
//makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null);
|
||||
}
|
||||
|
||||
function CheckChildGoalNodes(parent) {
|
||||
goalOidArray = new Array();
|
||||
|
||||
var next = parent.parentNode;
|
||||
//alert(next);
|
||||
//alert(next.nextSibling);
|
||||
var nodeList = next.childNodes;
|
||||
|
||||
//alert(nodeList.length);
|
||||
for (var i = 0; i < nodeList.length; i++) {
|
||||
var node = nodeList[i];
|
||||
|
||||
//alert(node.nodeName);
|
||||
CheckChildGoalNodes(node);
|
||||
}
|
||||
|
||||
//makeAjaxCall("GET", updateGoalsUrl, null, { pGoalOid: cbId }, null);
|
||||
}
|
||||
|
||||
function setServiceDescription() {
|
||||
var sdOid = $($("#leistungen_select")).find(":selected").val();
|
||||
|
||||
@@ -479,12 +365,13 @@ function validateTimeField(id) {
|
||||
|
||||
function togglePopup(serviceRecordOid) {
|
||||
$("#oidHolder").val(serviceRecordOid);
|
||||
var popupDiv = $("#popupDiv");
|
||||
|
||||
var isShowing = $(".modalWrapper").css("display") === "none";
|
||||
var displayValue = $(".modalWrapper").css("display") === "block" ? "none" : "block";
|
||||
|
||||
toggleModalWrapper();
|
||||
$("#popupDiv").css("display", displayValue);
|
||||
popupDiv.css("display", displayValue);
|
||||
|
||||
if (isShowing) {
|
||||
var titleOuterHeight = $("#popupTitle").outerHeight();
|
||||
@@ -494,12 +381,12 @@ function togglePopup(serviceRecordOid) {
|
||||
|
||||
var newHeight = titleOuterHeight + textOuterHeight + buttonDivOuterHeight + btnOuterHeight + btnOuterHeight;
|
||||
|
||||
$("#popupDiv").css("height", newHeight + "px");
|
||||
popupDiv.css("height", newHeight + "px");
|
||||
|
||||
$("#popupDiv").css("top", window.pageYOffset + window.innerHeight / 2 - newHeight / 2);
|
||||
$("#popupDiv").css("margin-top", "0");
|
||||
popupDiv.css("top", window.pageYOffset + window.innerHeight / 2 - newHeight / 2);
|
||||
popupDiv.css("margin-top", "0");
|
||||
} else {
|
||||
$("#popupDiv").css("margin-top", "auto");
|
||||
popupDiv.css("margin-top", "auto");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,8 +397,6 @@ function toggleModalWrapper() {
|
||||
$(".modalWrapper").css("height", $(document).height());
|
||||
}
|
||||
|
||||
|
||||
|
||||
function ErfolgteSpx() {
|
||||
if (document.getElementById("SaveSignature").value === "True") {
|
||||
|
||||
@@ -579,7 +464,7 @@ function showZeiterfassungsError(msg) {
|
||||
}
|
||||
|
||||
function clearZED() {
|
||||
$("#zeiterfassungsErrorTableRow").css("display", "none");
|
||||
$("#zeiterfassungsErrorTableRow").hide();//.css("display", "none");
|
||||
$("#zeiterfassungsErrorDisplay").empty();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
var isValidRecord = true;
|
||||
|
||||
function validateServiceRecordBeforeSubmit() {
|
||||
function validateServiceRecordBeforeSubmit() {
|
||||
var hasDokutext = false;
|
||||
|
||||
if (window.isServiceRecordNoticeMandatory) {
|
||||
@@ -31,18 +29,20 @@ function validateServiceRecordBeforeSubmit() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var datumBox = $("#datum_textbox");
|
||||
var startDateBox = $("#start_textbox");
|
||||
var endDateBox = $("#ende_textbox");
|
||||
|
||||
var dateStr = $("#datum_textbox").val();
|
||||
var startStr = $("#start_textbox").val();
|
||||
var endStr = $("#ende_textbox").val();
|
||||
var dateStr = datumBox.val();
|
||||
var startStr = startDateBox.val();
|
||||
var endStr = endDateBox.val();
|
||||
|
||||
console.log("dateStr: " + dateStr + "\nstartStr: " + startStr + "\nendStr: " + endStr);
|
||||
|
||||
if (!validateDate(dateStr) || !validateTime(startStr) || !validateTime(endStr)) {
|
||||
hideSanduhr();
|
||||
|
||||
console.log("\nIst das Startdatum korrekt: " + validateDate($("#datum_textbox").val()) + "\nIst die Startzeit korrekt: " + validateTime($("#start_textbox").val()) + "\nIst die Endzeit korrekt: " + validateTime($("#ende_textbox").val()));
|
||||
console.log("\nIst das Startdatum korrekt: " + validateDate(datumBox.val()) + "\nIst die Startzeit korrekt: " + validateTime(startDateBox.val()) + "\nIst die Endzeit korrekt: " + validateTime(endDateBox.val()));
|
||||
|
||||
var errorMessage = "Bitte geben Sie gültige Datums- und/oder Zeitangaben ein";
|
||||
toggleErrorPopup(errorMessage);
|
||||
|
||||
25
BeWoPlanerMobil/Scripts/supportConceptDropDown.js
Normal file
25
BeWoPlanerMobil/Scripts/supportConceptDropDown.js
Normal file
@@ -0,0 +1,25 @@
|
||||
function showSupportConceptList() {
|
||||
var hidingModalWrapper = $("#hidingModalWrapper");
|
||||
var supportConceptListContainer = $("#supportConceptListContainer");
|
||||
|
||||
try {
|
||||
hidingModalWrapper.show();
|
||||
hidingModalWrapper.css("height", $(document).height());
|
||||
|
||||
supportConceptListContainer.show();
|
||||
} catch(exception) {
|
||||
hidingModalWrapper.hide();
|
||||
supportConceptListContainer.hide();
|
||||
|
||||
console.log("Fehler: " + exception.message);
|
||||
}
|
||||
}
|
||||
|
||||
function selectSupportConcept(cb2scOid) {
|
||||
$("#supportConceptForm_" + cb2scOid).submit();
|
||||
}
|
||||
|
||||
function hideModalWrapper() {
|
||||
$("#hidingModalWrapper").hide();
|
||||
$("#supportConceptListContainer").hide();
|
||||
}
|
||||
@@ -94,6 +94,8 @@ function validateTime(time) {
|
||||
}
|
||||
|
||||
function doTimeValidation(elementToValidate) {
|
||||
console.log("Rufe doTimeValidation auf...");
|
||||
|
||||
var obj = $(elementToValidate);
|
||||
|
||||
var timeString = obj.val();
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
Vorname = init.FirstName;
|
||||
Nachname = init.LastName;
|
||||
Geburtstag = init.DateOfBirth?.ToShortDateString() ?? String.Empty;
|
||||
Geburtstag = init.DateOfBirth?.ToShortDateString() ?? string.Empty;
|
||||
Geschlecht = init.Sex == Sex.Male ? "Männlich" : "Weiblich";
|
||||
|
||||
Adresszusatz = init.AddressLine1;
|
||||
|
||||
@@ -97,14 +97,21 @@
|
||||
|
||||
<input id="groupBookingOpenEmployeeSelectionPopupBtn" type="button" value="Mitarbeiter" onclick="openEmployeePopup()" style="@groupBookingElementDisplayValue;" />
|
||||
@{
|
||||
var shouldShowSingleBookingElements = "display: block";
|
||||
|
||||
if (Model.IsInGroupBookingMode)
|
||||
{
|
||||
shouldShowSingleBookingElements = "display: none";
|
||||
}
|
||||
var shouldShowSingleBookingElements = Model.IsInGroupBookingMode ? "display: none;" : "display: table";
|
||||
}
|
||||
@using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "selectSCForm", style = shouldShowSingleBookingElements }))
|
||||
|
||||
<table style="@shouldShowSingleBookingElements">
|
||||
<tr>
|
||||
<td style="vertical-align: middle!important;">
|
||||
<input style="margin: auto; display: block;" id="supportConceptSelectionButton" type="button" value="@Model.SelectedSupportConceptListObject.DisplayString" class="toggle-btn" onclick="showSupportConceptList()" />
|
||||
</td>
|
||||
<td id="statistik-button-td">
|
||||
<input type="button" id="statistik-button" onclick="showStatistics()" disabled />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@using (Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "selectSCForm", style = "display: none;" }))
|
||||
{
|
||||
<table>
|
||||
<tr>
|
||||
@@ -117,12 +124,25 @@
|
||||
</div>
|
||||
</td>
|
||||
<td id="statistik-button-td">
|
||||
<input type="button" id="statistik-button" onclick="showStatistics()" disabled />
|
||||
<input type="button" id="statistik-button_ALT" onclick="showStatistics()" disabled />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
}
|
||||
|
||||
<div id="supportConceptListContainer">
|
||||
@foreach(var scListItem in Model.SupportConceptListObjects) {
|
||||
using(Html.BeginForm("SelectSupportConcept", "Main", FormMethod.Post, new { id = "supportConceptForm_" + scListItem.CostBearer2SupportConceptOid }))
|
||||
{
|
||||
<div class="supportConceptDiv" onclick="selectSupportConcept('@scListItem.CostBearer2SupportConceptOid')">
|
||||
<p class="listP">@scListItem.NameAndDateOfBirth</p>
|
||||
<p class="listP"><span @Html.Raw(scListItem.SpanColor)>@scListItem.SupportConceptTimeSpan</span></p>
|
||||
<input type="hidden" name="CostBearer2SupportConceptOid" value="@scListItem.CostBearer2SupportConceptOid" />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="combobox-label-parent" style="@{ if(!MainModel.IsEmployeeSelectionVisible || Model.IsInGroupBookingMode) { @Html.Raw("display: none;") }}" id="singleSCEmployeeSelectionContainer">
|
||||
@Html.LabelFor(m => m.SelectedEmployeeOid)
|
||||
<div class="disabled-select-container" id="employee-select-container">
|
||||
@@ -574,8 +594,6 @@
|
||||
|
||||
<input value="@Model.ErrorWert" id="ErrorZeiterfassungAfterCrashSchalter" type="hidden" />
|
||||
|
||||
<div class="modalWrapper"></div>
|
||||
|
||||
<div id="popupDiv">
|
||||
<h4 id="popupTitle" class="center-aligned-text-element">Eintrag löschen</h4>
|
||||
<p id="popupText" class="center-aligned-text-element">Sind Sie sicher, dass Sie den Eintrag löschen möchten?</p>
|
||||
@@ -590,6 +608,7 @@
|
||||
</div>
|
||||
|
||||
<div class="modalWrapper"></div>
|
||||
<div id="hidingModalWrapper" onclick="hideModalWrapper()"></div>
|
||||
|
||||
<div id="errorPopupDiv">
|
||||
<h4 id="errorPopupTitle" class="error-text">Fehler</h4>
|
||||
@@ -629,16 +648,21 @@
|
||||
<button id="leftBtn" class="tab-links" onclick="openGroupBookingTab(true)">Hilfepläne</button>
|
||||
<button id="rightBtn" class="tab-links" onclick="openGroupBookingTab(false)">Gruppen</button>
|
||||
</div>
|
||||
<div id="leftContent" class="tab-content">
|
||||
<div id="leftContent" class="tab-content-2">
|
||||
<table>
|
||||
@foreach (var hp in Model.SupporConceptListItemsForGroupBooking)
|
||||
@foreach (var hp in Model.SupportConceptListObjectsForGroupBooking)
|
||||
{
|
||||
<tr>
|
||||
<td style="width: 1%; white-space: nowrap;">
|
||||
<input type="checkbox" value="@hp.Value" onchange="addSupportConcepts()" name="costbearer2supportconcept_@hp.Value" id="costbearer2supportconcept_@hp.Value" @if (Model.SelectedCostbearerRelOids.Contains(long.Parse(hp.Value))) { @Html.Raw("checked=\"checked\"") } />
|
||||
<td style="width: 1%; white-space: nowrap;" rowspan="2">
|
||||
<input type="checkbox" value="@hp.CostBearer2SupportConceptOid" onchange="addSupportConcepts()" name="costbearer2supportconcept_@hp.CostBearer2SupportConceptOid" id="costbearer2supportconcept_@hp.CostBearer2SupportConceptOid" @if (Model.SelectedCostbearerRelOids.Contains(long.Parse(hp.CostBearer2SupportConceptOid))) { @Html.Raw("checked=\"checked\"") } />
|
||||
</td>
|
||||
<td class="group-booking-text-cell">
|
||||
@hp.Text
|
||||
@hp.NameAndDateOfBirth
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="group-booking-text-cell">
|
||||
<p style="display: inline"><span @Html.Raw(hp.SpanColor)>@hp.SupportConceptTimeSpan</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@@ -1094,8 +1118,8 @@
|
||||
resetGroupBookingModeViaGETUrl = '@Url.Action("ResetGroupBookingModeViaGET")';
|
||||
addSupportConceptCostBearerRelationsToGroupBookingUrl = '@Url.Action("AddSupportConceptCostBearerRelationsToGroupBooking")';
|
||||
removeSupportConceptCostBearerRelationFromGroupBookingUrl = '@Url.Action("RemoveSupportConceptCostBearerRelationFromGroupBooking")';
|
||||
addEmployeesToGroupBookingUrl = '@Url.Action("AddEmployeesToGroupBooking")';
|
||||
resetSignatureImage = '@Url.Action("ResetSignatureImage")';
|
||||
addEmployeesToGroupBookingUrl = '@Url.Action("AddEmployeesToGroupBooking")';
|
||||
resetSignatureImage = '@Url.Action("ResetSignatureImage")';
|
||||
|
||||
|
||||
var isServiceRecordNoticeMandatory = '@(Model.IsServiceRecordNoticeMandatory)'.toLowerCase() === "true";
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<link rel="stylesheet" href="~/Content/datepicker.css?v=1.2" />
|
||||
<link rel="stylesheet" href="~/Content/BeWoMobileStyle.css?v=1.3" />
|
||||
<link rel="stylesheet" href="~/Content/statisticsStyle.css?v=1.2" />
|
||||
<link rel="stylesheet" href="~/Content/appointmentStyle.css"/>
|
||||
|
||||
<script src="~/Scripts/appointment.js?v=1.2"></script>
|
||||
<script src="~/Scripts/utils.js?v=1.3"></script>
|
||||
@@ -27,6 +28,9 @@
|
||||
<script src="~/Scripts/textbausteine.js?v=1.0"></script>
|
||||
<script src="~/Scripts/serviceRecordValidation.js?v=1.0"></script>
|
||||
<script src="~/Scripts/unterschrift.js?v=1.0"></script>
|
||||
<script src="~/Scripts/supportConceptDropDown.js?v=1.0"></script>
|
||||
<script src="~/Scripts/validation.js?v=1.0"></script>
|
||||
<script src="~/Scripts/goals.js?v=1.0"></script>
|
||||
</head>
|
||||
<body>
|
||||
@RenderBody()
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root; Initial Catalog=bewodemo
|
||||
</property>
|
||||
|
||||
<!--<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root; Initial Catalog=dakonielandshut
|
||||
</property>-->
|
||||
|
||||
|
||||
<property name="dialect">
|
||||
|
||||
467
Service/Plugins/FlexibleReportService.cs
Normal file
467
Service/Plugins/FlexibleReportService.cs
Normal file
@@ -0,0 +1,467 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Service.Core;
|
||||
using BeWo.Service.DCEntityMapper;
|
||||
using BeWo.Service.MessageContracts;
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Services;
|
||||
using Utils = BS.Shared.Core.Utils;
|
||||
|
||||
namespace BeWo.Service.Plugins
|
||||
{
|
||||
public class FlexibleReportService : AbstractIDSpecificDefaultClass<FlexibleReportService>
|
||||
{
|
||||
private Dictionary<long, IList<CostRatePeriodDC>> categoryOid2Stundensatz;
|
||||
private Dictionary<long, IList<CostRatePeriodDC>> leistungOid2Stundensatz;
|
||||
private Dictionary<long, IList<CostRatePeriodDC>> costbearerOid2Stundensatz;
|
||||
private Dictionary<long, IList<CostRatePeriodDC>> costbearerOid2RateFactor;
|
||||
|
||||
public virtual IList<FlexibleReportEntryDC> GetAllFlexibleReportEntrys(FlexibleReportFilterDC filter)
|
||||
{
|
||||
BuildStundensatzDictionaries();
|
||||
|
||||
var calc = PluginLoader.FindClass<Calculations>();
|
||||
var dict = new Dictionary<string, FlexibleReportEntryDC>();
|
||||
var result = new List<FlexibleReportEntryDC>();
|
||||
|
||||
var span = new DateTimeSpan() { StartDateTime = filter.StartDatum.Date, EndDateTime = filter.EndDatum.Date.AddDays(1).AddTicks(-1) };
|
||||
var alleRec = DAOFactory.SearchDAO.FindServiceRecordsInSpan(span, null).ToList();
|
||||
|
||||
if (filter.NullDaten)
|
||||
{
|
||||
// Zwischenspeicher für die richtigen Zeiträume
|
||||
var dateTimeSpan = new DateTimeSpan();
|
||||
|
||||
var alleHps = DAOFactory.SearchDAO.FindSupportConceptsInSpan(span);
|
||||
var alleEmps = DAOFactory.GenericDAO.GetAllActive<Employee>();
|
||||
|
||||
foreach (var hilfePlan in alleHps.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
|
||||
{
|
||||
// Holt sich den richtigen Zeitraum zum erstellen der Daten
|
||||
dateTimeSpan.StartDate = span.StartDate > hilfePlan.StartDate ? span.StartDate : hilfePlan.StartDate.Value;
|
||||
dateTimeSpan.EndDate = span.EndDate < hilfePlan.EndDate ? span.EndDate : hilfePlan.EndDate.Value;
|
||||
|
||||
result.AddRange(CreateFlexibleReportsInTimeSpan(dateTimeSpan, null, hilfePlan, FlexibleReportEntryType.CustomerNullEntry, 0));
|
||||
|
||||
foreach (var c2s in hilfePlan.CostBearer2SupportConceptList.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
|
||||
{
|
||||
foreach (var approvalPeriod in c2s.ApprovalPeriodList.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
|
||||
{
|
||||
// Holt sich den richtigen Zeitraum zum erstellen der Daten
|
||||
dateTimeSpan.StartDate = span.StartDate > approvalPeriod.StartDate ? span.StartDate : approvalPeriod.StartDate.Value;
|
||||
dateTimeSpan.EndDate = span.EndDate < approvalPeriod.EndDate ? span.EndDate : approvalPeriod.EndDate.Value;
|
||||
|
||||
// Wenn kein Mitarbeiter dem Bewilligungszeitraum zugewiesen ist
|
||||
if (approvalPeriod.SupportConceptApprovalPeriod2Employee.Count == 0)
|
||||
{
|
||||
var hauptbetreuer = GetHauptbetreuer(hilfePlan.Customer).ToList();
|
||||
|
||||
// Wenn der Klient keine Hauptbetreuer hat
|
||||
if (hauptbetreuer.Count == 0)
|
||||
{
|
||||
decimal? soll = GetSollPerDay(hilfePlan.Customer, dateTimeSpan.StartDate, approvalPeriod, calc);
|
||||
if (soll != null)
|
||||
result.AddRange(CreateFlexibleReportsInTimeSpan(dateTimeSpan, null, hilfePlan, FlexibleReportEntryType.SollEntry, soll.Value));
|
||||
}
|
||||
// Wenn der Klient ein oder mehr Hauptbetreuer hat
|
||||
else
|
||||
{
|
||||
decimal? soll = GetSollPerDay(hilfePlan.Customer, dateTimeSpan.StartDate, approvalPeriod, calc);
|
||||
|
||||
if (soll.HasValue)
|
||||
{
|
||||
decimal sollAnteil = soll.Value / hauptbetreuer.Count;
|
||||
foreach (var betreuer in hauptbetreuer)
|
||||
{
|
||||
result.AddRange(CreateFlexibleReportsInTimeSpan(dateTimeSpan, betreuer, hilfePlan, FlexibleReportEntryType.SollEntry, sollAnteil));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Wenn ein oder mehr Mitarbeiter dem Bewilligungszeitraum zugewiesen ist/sind
|
||||
else
|
||||
{
|
||||
foreach (var scap2employee in approvalPeriod.SupportConceptApprovalPeriod2Employee)
|
||||
{
|
||||
var employee = scap2employee.Employee;
|
||||
|
||||
decimal? soll = GetSollPerDay(hilfePlan.Customer, employee, approvalPeriod.StartDate.Value, approvalPeriod, calc);
|
||||
if (soll != null)
|
||||
{
|
||||
result.AddRange(CreateFlexibleReportsInTimeSpan(dateTimeSpan, employee, hilfePlan, FlexibleReportEntryType.SollEntry, soll.Value));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in alleEmps)
|
||||
{
|
||||
for (DateTime date = span.StartDate; date <= span.EndDate; date = date.AddDays(1))
|
||||
{
|
||||
result.Add(new FlexibleReportEntryDC()
|
||||
{
|
||||
Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(item),
|
||||
Type = FlexibleReportEntryType.EmployeeNullEntry,
|
||||
StartDatum = date,
|
||||
EndDatum = date
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var serviceRecordListEntry in alleRec)
|
||||
{
|
||||
var resultEntry = result.Where(x =>
|
||||
x.Type == FlexibleReportEntryType.SollEntry &&
|
||||
x.CustomerOid == serviceRecordListEntry.CustomerOid &&
|
||||
x.EmployeeOid == serviceRecordListEntry.EmployeeOid &&
|
||||
x.StartDatum.Date == serviceRecordListEntry.Start.Value.Date).FirstOrDefault();
|
||||
|
||||
// Falls kein passendes Entry gefunden wurde
|
||||
if (resultEntry == null)
|
||||
{
|
||||
resultEntry = result.Where(x =>
|
||||
x.CustomerOid == serviceRecordListEntry.CustomerOid &&
|
||||
x.Type == FlexibleReportEntryType.CustomerNullEntry &&
|
||||
x.StartDatum == serviceRecordListEntry.Start.Value.Date)
|
||||
.FirstOrDefault();
|
||||
|
||||
// Falls immernoch kein passendes Entry gefunden wurde
|
||||
if (resultEntry == null)
|
||||
{
|
||||
resultEntry = new FlexibleReportEntryDC();
|
||||
result.Add(resultEntry);
|
||||
}
|
||||
}
|
||||
|
||||
resultEntry.AnzahlMinuten = serviceRecordListEntry.RoundedDuration;
|
||||
resultEntry.EndDatum = serviceRecordListEntry.End.Value;
|
||||
resultEntry.Kilometer = serviceRecordListEntry.DistanceInMeter;
|
||||
resultEntry.Leistung = serviceRecordListEntry.ServiceDescription.Name;
|
||||
resultEntry.Leistungskategorie = serviceRecordListEntry.ServiceDescription.ServiceCategory.Name;
|
||||
resultEntry.StartDatum = serviceRecordListEntry.Start.Value;
|
||||
resultEntry.Type = FlexibleReportEntryType.ServiceRecordEntry;
|
||||
resultEntry.Stundensatz = GetStundensatz(serviceRecordListEntry);
|
||||
if (resultEntry.Stundensatz.HasValue)
|
||||
{
|
||||
resultEntry.Betrag = resultEntry.Stundensatz * (resultEntry.AnzahlMinuten / 60);
|
||||
}
|
||||
if (serviceRecordListEntry.Customer != null)
|
||||
{
|
||||
resultEntry.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(serviceRecordListEntry.Customer);
|
||||
resultEntry.Team = GetTeamNameByTeam2CustomerList(serviceRecordListEntry.Customer.Team2CustomerList);
|
||||
}
|
||||
if (serviceRecordListEntry.Employee != null)
|
||||
resultEntry.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(serviceRecordListEntry.Employee);
|
||||
if (serviceRecordListEntry.SupportConcept != null)
|
||||
resultEntry.SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(serviceRecordListEntry.SupportConcept);
|
||||
if (serviceRecordListEntry.CostBearer2SupportConcept != null)
|
||||
resultEntry.Organisation = serviceRecordListEntry.CostBearer2SupportConcept.CostBearer.Organisation.Name;
|
||||
|
||||
if (!filter.NullDaten)
|
||||
CreateFlexibleReportSoll(resultEntry, serviceRecordListEntry, new DateTime(), PluginLoader.FindClass<Calculations>());
|
||||
}
|
||||
|
||||
var i = result.FindAll(x => x.Employee?.LastName == "Wolf");
|
||||
return result;
|
||||
}
|
||||
|
||||
protected virtual decimal? GetStundensatz(ServiceRecord sr)
|
||||
{
|
||||
decimal? betrag = null;
|
||||
|
||||
if (sr.CostBearer2SupportConcept != null)
|
||||
{
|
||||
if (leistungOid2Stundensatz.ContainsKey(sr.ServiceDescription.Oid.Value))
|
||||
{
|
||||
var crList = leistungOid2Stundensatz[sr.ServiceDescription.Oid.Value];
|
||||
|
||||
var cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, sr.Start.Value);
|
||||
if (cr != null && cr.CostRateValue.HasValue)
|
||||
{
|
||||
betrag = cr.CostRateValue.Value;
|
||||
}
|
||||
}
|
||||
|
||||
if (betrag == null && categoryOid2Stundensatz.ContainsKey(sr.ServiceDescription.ServiceCategory.Oid.Value))
|
||||
{
|
||||
var crList = categoryOid2Stundensatz[sr.ServiceDescription.ServiceCategory.Oid.Value];
|
||||
|
||||
var cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.AmountOfMoney, sr.Start.Value);
|
||||
if (cr != null && cr.CostRateValue.HasValue)
|
||||
{
|
||||
betrag = cr.CostRateValue.Value;
|
||||
}
|
||||
}
|
||||
|
||||
if (betrag == null && costbearerOid2Stundensatz.ContainsKey(sr.CostBearer2SupportConcept.CostBearer.Oid.Value))
|
||||
{
|
||||
var crList = costbearerOid2Stundensatz[sr.CostBearer2SupportConcept.CostBearer.Oid.Value];
|
||||
|
||||
var cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.HourlyRate, sr.Start.Value);
|
||||
if (cr != null && cr.CostRateValue.HasValue)
|
||||
{
|
||||
betrag = cr.CostRateValue.Value;
|
||||
}
|
||||
if (betrag != null && costbearerOid2RateFactor.ContainsKey(sr.CostBearer2SupportConcept.CostBearer.Oid.Value))
|
||||
{
|
||||
crList = costbearerOid2RateFactor[sr.CostBearer2SupportConcept.CostBearer.Oid.Value];
|
||||
|
||||
cr = crList.GetCostRatePeriodForDate(CostRatePeriodType.RateFactor, sr.Start.Value);
|
||||
if (cr != null && cr.CostRateValue.HasValue)
|
||||
{
|
||||
betrag *= (100 + cr.CostRateValue.Value) / 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return betrag;
|
||||
}
|
||||
|
||||
protected virtual void BuildStundensatzDictionaries()
|
||||
{
|
||||
categoryOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
|
||||
leistungOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
|
||||
costbearerOid2Stundensatz = new Dictionary<long, IList<CostRatePeriodDC>>();
|
||||
costbearerOid2RateFactor = new Dictionary<long, IList<CostRatePeriodDC>>();
|
||||
|
||||
|
||||
var categories = DAOFactory.GenericDAO.GetAllActive<ServiceCategory>();
|
||||
foreach (var cat in categories)
|
||||
{
|
||||
if (cat.AccountingInterval.HasValue && cat.AccountingInterval.Value == AccountingIntervalType.Hourly)
|
||||
{
|
||||
var hrCats = cat.CostRatePeriods.ToList();
|
||||
if (hrCats.Count > 0)
|
||||
{
|
||||
categoryOid2Stundensatz.Add(cat.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var descriptions = DAOFactory.GenericDAO.GetAllActive<ServiceDescription>();
|
||||
foreach (var desc in descriptions)
|
||||
{
|
||||
if (desc.AccountingInterval.HasValue && desc.AccountingInterval.Value == AccountingIntervalType.Hourly)
|
||||
{
|
||||
var hrCats = desc.CostRatePeriods.ToList();
|
||||
if (hrCats.Count > 0)
|
||||
{
|
||||
leistungOid2Stundensatz.Add(desc.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var costBearers = DAOFactory.GenericDAO.GetAllActive<CostBearer>();
|
||||
foreach (var cb in costBearers)
|
||||
{
|
||||
var hrCats = cb.CostRatePeriods.Where(c => c.CostRateType == CostRatePeriodType.HourlyRate).ToList();
|
||||
if (hrCats.Count > 0)
|
||||
{
|
||||
costbearerOid2Stundensatz.Add(cb.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(hrCats));
|
||||
}
|
||||
|
||||
var rfCats = cb.CostRatePeriods.Where(c => c.CostRateType == CostRatePeriodType.RateFactor).ToList();
|
||||
if (rfCats.Count > 0)
|
||||
{
|
||||
costbearerOid2RateFactor.Add(cb.Oid.Value, MapperFactory.CostRatePeriodDC_CostRatePeriod.MapToNewDCs(rfCats));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//protected virtual IEnumerable<FlexibleReportEntryDC> CreateFlexibleNullEntries(ServiceRecord sr, DateTime start, DateTime ende, decimal? soll)
|
||||
//{
|
||||
// for (DateTime date = start; date <= ende; date = date.AddDays(1.0))
|
||||
// {
|
||||
// var flex = new FlexibleReportEntryDC()
|
||||
// {
|
||||
// Customer = sr.Customer != null ? MapperFactory.CompactCustomerDC_Customer.MapToNewDC(sr.Customer) : null,
|
||||
// Employee = sr.Employee != null ? MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(sr.Employee) : null,
|
||||
// StartDatum = date,
|
||||
// AnzahlMinuten = 0,
|
||||
// AnzahlMinutenSoll = soll,
|
||||
// Leistung = sr.ServiceDescription.Name,
|
||||
// Leistungskategorie = sr.ServiceDescription.ServiceCategory.Name,
|
||||
// SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(sr.SupportConcept) ?? null,
|
||||
// };
|
||||
|
||||
// if (sr.Customer != null)
|
||||
// {
|
||||
// flex.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(sr.Customer);
|
||||
|
||||
// flex.Team = GetTeamNameByTeam2CustomerList(sr.Customer.Team2CustomerList);
|
||||
// }
|
||||
|
||||
// yield return flex;
|
||||
// }
|
||||
//}
|
||||
|
||||
protected virtual string GetTeamNameByTeam2CustomerList(IList<Team2Customer> team2Customers)
|
||||
{
|
||||
string name = "";
|
||||
|
||||
foreach (var t2c in team2Customers)
|
||||
{
|
||||
if (name.Length > 0)
|
||||
name += ", ";
|
||||
name = t2c.Team.Name;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
protected virtual decimal? GetSollPerDay(Customer customer, Employee employee, DateTime date, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
var scapDC = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(scap);
|
||||
var sollPerDay = calc.GetApprovedHoursPerDay(scapDC, new List<CostRatePeriodDC>()) * 60;
|
||||
|
||||
if (employee == null)
|
||||
return sollPerDay;
|
||||
|
||||
var sc2e = scap.SupportConceptApprovalPeriod2Employee.FirstOrDefault(x => x.Employee.Oid == employee.Oid);
|
||||
|
||||
if (sc2e != null)
|
||||
return sc2e.IsAbsolut ? sc2e.Betreuungsschluessel : sollPerDay * sc2e.Betreuungsschluessel/100;
|
||||
else
|
||||
return sollPerDay;
|
||||
}
|
||||
|
||||
protected virtual decimal? GetSollPerDay(Customer customer, DateTime date, SupportConceptApprovalPeriod scap, Calculations calc)
|
||||
{
|
||||
var scapDC = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(scap);
|
||||
var sollPerDay = calc.GetApprovedHoursPerDay(scapDC, new List<CostRatePeriodDC>()) * 60;
|
||||
|
||||
return sollPerDay;
|
||||
}
|
||||
|
||||
protected virtual void CreateFlexibleReportSoll(FlexibleReportEntryDC entry, ServiceRecord item, DateTime datum, Calculations calc)
|
||||
{
|
||||
if (item.CostBearer2SupportConcept != null)
|
||||
{
|
||||
decimal? soll = null;
|
||||
SupportConceptApprovalPeriod scap = null;
|
||||
SupportConceptApprovalPeriodDC scapdc = null;
|
||||
|
||||
//Schritt 1: Prüfe Costbearer2SupportConcept.ApprovalPeriodList welcher im Zeitraum liegt und ob die ApprovalPeriod.Categoriy der item.ServiceDescription.Category entspricht.
|
||||
foreach (var iscap in item.CostBearer2SupportConcept.ApprovalPeriodList)
|
||||
{
|
||||
if (iscap.ServiceCategory != null && iscap.ServiceCategory.Oid == item.ServiceDescription.ServiceCategory.Oid)
|
||||
{
|
||||
if (item.Start >= iscap.StartDate && item.Start <= iscap.EndDate)
|
||||
{
|
||||
scap = iscap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Schritt 2: Prüfe Costbearer2SupportConcept.ApprovalPeriodList welcher im Zeitraum liegt und ob die ApprovalPeriod.Categoriy = null ist
|
||||
if (scap == null)
|
||||
{
|
||||
foreach (var iscap in item.CostBearer2SupportConcept.ApprovalPeriodList)
|
||||
{
|
||||
if (iscap.ServiceCategory == null)
|
||||
{
|
||||
if (item.Start >= iscap.StartDate && item.Start <= iscap.EndDate)
|
||||
{
|
||||
scap = iscap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (scap != null)
|
||||
{
|
||||
//Schritt 3: Soll liegt vor, prüfe Verteilung auf Mitarbeiter
|
||||
|
||||
scapdc = MapperFactory.SupportConceptApprovalPeriodDC_SupportConceptApprovalPeriod.MapToNewDC(scap);
|
||||
var sollPerDay = calc.GetApprovedHoursPerDay(scapdc, new List<CostRatePeriodDC>()) * 60;
|
||||
// Keine Betreuerverteilung definiert
|
||||
if (scap.SupportConceptApprovalPeriod2Employee.Count == 0 && IstHauptbetreuer(item.Customer, item.Employee))
|
||||
{
|
||||
soll = sollPerDay; // Hauptbetreuer muss 100% leisten
|
||||
}
|
||||
else
|
||||
{
|
||||
//Prüfe ob item.Employee in scap.SupportConceptApprovalPeriod2Employee definiert ist und wenn ja berechne Anteil am sollPerDay
|
||||
//scap.SupportConceptApprovalPeriod2Employee[0]
|
||||
var sc2e = scap.SupportConceptApprovalPeriod2Employee.FirstOrDefault(x => x.Employee.Oid == item.Employee.Oid);
|
||||
if (sc2e != null)
|
||||
{
|
||||
soll = sc2e.IsAbsolut ? sc2e.Betreuungsschluessel : sollPerDay * sc2e.Betreuungsschluessel/100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//if (item.CostBearer2SupportConcept != null && IstHauptbetreuer(item.Customer, item.Employee))
|
||||
//{
|
||||
// var c2sDc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(item.CostBearer2SupportConcept);
|
||||
// var sollPerDay = calc.GetApprovedHoursPerDay(c2sDc, datum);
|
||||
|
||||
// entry.AnzahlMinutenSoll = sollPerDay * 60;
|
||||
//}
|
||||
|
||||
entry.AnzahlMinutenSoll = soll;
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool IstHauptbetreuer(Customer c, Employee e)
|
||||
{
|
||||
foreach (Employee2Customer e2c in c.Employee2CustomerList)
|
||||
{
|
||||
foreach (ValueListEntry2Object vle2o in e2c.ValueList)
|
||||
{
|
||||
var vle = vle2o.Entry;
|
||||
|
||||
if (vle.SystemEntryID == SystemEntryID.EmployeeRoleMainAttendant && e2c.EmployeeOid.ToString() == vle.Value)
|
||||
return true;
|
||||
//if (vle.SystemEntryID != null && vle.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant && e2c.EmployeeOid == e.Oid.Value)
|
||||
//{
|
||||
// return true;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected IEnumerable<Employee> GetHauptbetreuer(Customer c)
|
||||
{
|
||||
foreach (Employee2Customer e2c in c.Employee2CustomerList)
|
||||
{
|
||||
foreach (ValueListEntry2Object vle2o in e2c.ValueList)
|
||||
{
|
||||
var vle = vle2o.Entry;
|
||||
|
||||
if (vle.SystemEntryID == SystemEntryID.EmployeeRoleMainAttendant && e2c.EmployeeOid.ToString() == vle.Value)
|
||||
yield return e2c.Employee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual IEnumerable<FlexibleReportEntryDC> CreateFlexibleReportsInTimeSpan(DateTimeSpan span, Employee employee, SupportConcept supportConcept, FlexibleReportEntryType type, decimal soll)
|
||||
{
|
||||
for (DateTime date = span.StartDate; date <= span.EndDate; date = date.AddDays(1))
|
||||
{
|
||||
yield return new FlexibleReportEntryDC()
|
||||
{
|
||||
Employee = employee != null ? MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(employee) : null,
|
||||
Customer = supportConcept.Customer != null ? MapperFactory.CompactCustomerDC_Customer.MapToNewDC(supportConcept.Customer) : null,
|
||||
Type = type,
|
||||
StartDatum = date,
|
||||
EndDatum = date,
|
||||
SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(supportConcept),
|
||||
AnzahlMinutenSoll = soll
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -326,6 +326,7 @@
|
||||
<Compile Include="Multitenancy\MultitenancyEndpointBehavior.cs" />
|
||||
<Compile Include="Plugins\AccountingService.cs" />
|
||||
<Compile Include="Plugins\CustomerService.cs" />
|
||||
<Compile Include="Plugins\FlexibleReportService.cs" />
|
||||
<Compile Include="Plugins\OperationService.cs" />
|
||||
<Compile Include="Plugins\QueryService.cs" />
|
||||
<Compile Include="Plugins\StundenuebersichtAuswertung.cs" />
|
||||
|
||||
@@ -819,5 +819,14 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
IList<FlexibleReportLayoutDC> GetFlexibleReportLayouts();
|
||||
}
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void InsertNewFlexibleReportLayout(FlexibleReportLayoutDC flexibleReportLayoutDC);
|
||||
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void UpdateFlexibleReportLayouts(IList<FlexibleReportLayoutDC> flexibleReportLayouts);
|
||||
}
|
||||
}
|
||||
@@ -5645,194 +5645,11 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
var calc = PluginLoader.FindClass<Calculations>();
|
||||
var dict = new Dictionary<string, FlexibleReportEntryDC>();
|
||||
var result = new List<FlexibleReportEntryDC>();
|
||||
var span = new DateTimeSpan() { StartDateTime = filter.StartDatum.Date, EndDateTime = filter.EndDatum.Date.AddDays(1).AddTicks(-1) };
|
||||
var s = PluginLoader.FindClass<FlexibleReportService>();
|
||||
|
||||
var alleRec = DAOFactory.SearchDAO.FindServiceRecordsInSpan(span, null).ToList();
|
||||
|
||||
if (filter.NullDaten)
|
||||
{
|
||||
var alleHps = DAOFactory.SearchDAO.FindSupportConceptsInSpan(span);
|
||||
var alleEmps = DAOFactory.GenericDAO.GetAllActive<Employee>();
|
||||
|
||||
foreach (var hilfePlan in alleHps.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
|
||||
{
|
||||
foreach (var c2s in hilfePlan.CostBearer2SupportConceptList.Where(x => span.StartDate <= x.EndDate && span.EndDate >= x.StartDate))
|
||||
{
|
||||
result.AddRange(CreateFlexibleReportsInTimeSpan(span, null, hilfePlan, FlexibleReportEntryType.CustomerNullEntry));
|
||||
|
||||
foreach (var e2c in hilfePlan.Customer.Employee2CustomerList)
|
||||
{
|
||||
if (IstHauptbetreuer(hilfePlan.Customer, e2c.Employee))
|
||||
{
|
||||
result.AddRange(CreateFlexibleReportsInTimeSpan(span, e2c.Employee, hilfePlan, FlexibleReportEntryType.CustomerEmployeeNullEntry));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var item in alleEmps)
|
||||
{
|
||||
for (DateTime date = span.StartDate; date <= span.EndDate; date = date.AddDays(1))
|
||||
{
|
||||
result.Add(new FlexibleReportEntryDC()
|
||||
{
|
||||
Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(item),
|
||||
Type = FlexibleReportEntryType.EmployeeNullEntry,
|
||||
StartDatum = date,
|
||||
EndDatum = date
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var serviceRecordListEntry in alleRec)
|
||||
{
|
||||
var resultEntry = result.Where(
|
||||
x =>
|
||||
x.CustomerOid == serviceRecordListEntry.CustomerOid &&
|
||||
x.Type == FlexibleReportEntryType.CustomerNullEntry &&
|
||||
x.StartDatum == serviceRecordListEntry.Start.Value.Date)
|
||||
.FirstOrDefault();
|
||||
|
||||
if(resultEntry == null)
|
||||
{
|
||||
resultEntry = new FlexibleReportEntryDC();
|
||||
result.Add(resultEntry);
|
||||
}
|
||||
|
||||
resultEntry.AnzahlMinuten = serviceRecordListEntry.RoundedDuration;
|
||||
resultEntry.AnzahlMinutenSoll = 0.0M;
|
||||
resultEntry.Customer = serviceRecordListEntry.Customer == null ? null : MapperFactory.CompactCustomerDC_Customer.MapToNewDC(serviceRecordListEntry.Customer);
|
||||
resultEntry.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(serviceRecordListEntry.Employee);
|
||||
resultEntry.EndDatum = serviceRecordListEntry.End.Value;
|
||||
resultEntry.Kilometer = serviceRecordListEntry.DistanceInMeter;
|
||||
resultEntry.Leistung = serviceRecordListEntry.ServiceDescription.Name;
|
||||
resultEntry.Leistungskategorie = serviceRecordListEntry.ServiceDescription.ServiceCategory.Name;
|
||||
resultEntry.StartDatum = serviceRecordListEntry.Start.Value;
|
||||
resultEntry.SupportConcept = serviceRecordListEntry.SupportConcept == null ? null : MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(serviceRecordListEntry.SupportConcept);
|
||||
resultEntry.Team = GetTeamNameByTeam2CustomerList(serviceRecordListEntry.Customer.Team2CustomerList);
|
||||
resultEntry.Type = FlexibleReportEntryType.ServiceRecordEntry;
|
||||
}
|
||||
#region sollberechnung
|
||||
//foreach (var serviceRecordListEntry in alleRec)
|
||||
//{
|
||||
// FlexibleReportEntryDC resultEntry;
|
||||
|
||||
// if (serviceRecordListEntry.Customer != null)
|
||||
// resultEntry = result.Where(x => x.CustomerOid == serviceRecordListEntry.CustomerOid && x.Type == FlexibleReportEntryType.CustomerNullEntry).FirstOrDefault() ?? new FlexibleReportEntryDC();
|
||||
// else
|
||||
// resultEntry = new FlexibleReportEntryDC();
|
||||
|
||||
// if (serviceRecordListEntry.CustomerOid != null)
|
||||
// {
|
||||
// var key = CreateFlexibleDictionaryKey(
|
||||
// serviceRecordListEntry.CustomerOid.Value,
|
||||
// serviceRecordListEntry.Start.Value,
|
||||
// serviceRecordListEntry.EmployeeOid ?? 0,
|
||||
// GetTeamNameByTeam2CustomerList(serviceRecordListEntry.Customer.Team2CustomerList));
|
||||
|
||||
// Wenn sich noch kein Eintrag in der Liste befindet
|
||||
// if (!dict.ContainsKey(key))
|
||||
// {
|
||||
// DateTime start = span.StartDate.Date;
|
||||
// DateTime ende = span.EndDate.Date;
|
||||
|
||||
// if (serviceRecordListEntry.SupportConcept != null)
|
||||
// {
|
||||
// Holt sich den Hilfeplan und erstellt den Solltermin
|
||||
// resultEntry.SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(serviceRecordListEntry.SupportConcept);
|
||||
|
||||
// CreateFlexibleReportSoll(resultEntry, serviceRecordListEntry, serviceRecordListEntry.Start.Value, calc);
|
||||
|
||||
// Schaut, ob der Hilfeplan nach dem ausgewählten Startdatum anfängt
|
||||
// if (resultEntry.SupportConcept.StartDate.HasValue)
|
||||
// if (span.StartDate.Date < resultEntry.SupportConcept.StartDate.Value)
|
||||
// start = resultEntry.SupportConcept.StartDate.Value;
|
||||
|
||||
// Schaut, ob der Hilfeplan vor dem ausgewählten Endzeitpunkt ausläuft
|
||||
// if (resultEntry.SupportConcept.EndDate.HasValue)
|
||||
// if (span.EndDate.Date > resultEntry.SupportConcept.EndDate.Value)
|
||||
// ende = resultEntry.SupportConcept.EndDate.Value;
|
||||
// }
|
||||
|
||||
// if (serviceRecordListEntry.Customer != null)
|
||||
// {
|
||||
// Erstellt die leeren Objekte zur Berechnung der Sollanzahl
|
||||
|
||||
// foreach (var nullEntry in CreateFlexibleNullEntries(serviceRecordListEntry, start, ende, resultEntry.AnzahlMinutenSoll))
|
||||
// {
|
||||
// CreateFlexibleReportSoll(nullEntry, serviceRecordListEntry, nullEntry.Datum, calc);
|
||||
|
||||
// var newKey = CreateFlexibleDictionaryKey(
|
||||
// serviceRecordListEntry.CustomerOid.Value,
|
||||
// nullEntry.Datum,
|
||||
// serviceRecordListEntry.EmployeeOid ?? 0,
|
||||
// GetTeamNameByTeam2CustomerList(serviceRecordListEntry.Customer.Team2CustomerList));
|
||||
// ,
|
||||
// serviceRecordListEntry.ServiceDescription.Name,
|
||||
// serviceRecordListEntry.ServiceDescription.ServiceCategory.Name);
|
||||
|
||||
// Schaut, ob sich der Schlüssel bereits in dem Dict befindet
|
||||
// if (!dict.ContainsKey(newKey))
|
||||
// {
|
||||
// Schaut, ob das Objekt direkt in die Liste geworfen wird oder vorher noch bearbeitet werden muss
|
||||
// if (nullEntry.Datum != serviceRecordListEntry.Start.Value.Date)
|
||||
// {
|
||||
// dict.Add(newKey, nullEntry);
|
||||
// result.Add(nullEntry);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dict.Add(newKey, resultEntry);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// Wenn sich bereits eine Zeiterfassung oder ein Platzhalter des Klientens an dem Tag in der Liste befindet
|
||||
// else
|
||||
// {
|
||||
// var existingEntry = dict[key];
|
||||
|
||||
// Platzhalter
|
||||
// if (existingEntry.EintraegeProTag == 0)
|
||||
// {
|
||||
// Entfernt den Eintrag temporär aus der Liste (wird am Ende hinzugefügt)
|
||||
// result.Remove(existingEntry);
|
||||
// resultEntry = existingEntry;
|
||||
// }
|
||||
// Existierende Zeiterfassung
|
||||
// else
|
||||
// {
|
||||
// resultEntry.EintraegeProTag = existingEntry.EintraegeProTag;
|
||||
// existingEntry.EintraegeProTag += 1;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// Überträgt Daten
|
||||
// resultEntry.EintraegeProTag++;
|
||||
// resultEntry.AnzahlMinuten = serviceRecordListEntry.RoundedDuration;
|
||||
// resultEntry.Kilometer = serviceRecordListEntry.DistanceInMeter;
|
||||
// resultEntry.Datum = serviceRecordListEntry.Start.Value;
|
||||
// resultEntry.Employee = MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(serviceRecordListEntry.Employee);
|
||||
// resultEntry.Leistung = serviceRecordListEntry.ServiceDescription.Name;
|
||||
// resultEntry.Leistungskategorie = serviceRecordListEntry.ServiceDescription.ServiceCategory.Name;
|
||||
// resultEntry.Type = FlexibleReportEntryType.FullEntry;
|
||||
|
||||
// if (serviceRecordListEntry.Customer != null)
|
||||
// {
|
||||
// resultEntry.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(serviceRecordListEntry.Customer);
|
||||
// }
|
||||
|
||||
// result.Add(resultEntry);
|
||||
//}
|
||||
#endregion
|
||||
|
||||
return result;
|
||||
var test = s.GetAllFlexibleReportEntrys(filter);
|
||||
return test;
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -5840,123 +5657,72 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<FlexibleReportEntryDC> CreateFlexibleNullEntries(ServiceRecord sr, DateTime start, DateTime ende, decimal? soll)
|
||||
{
|
||||
for (DateTime date = start; date <= ende; date = date.AddDays(1.0))
|
||||
{
|
||||
var flex = new FlexibleReportEntryDC()
|
||||
{
|
||||
Customer = sr.Customer != null ? MapperFactory.CompactCustomerDC_Customer.MapToNewDC(sr.Customer) : null,
|
||||
Employee = sr.Employee != null ? MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(sr.Employee) : null,
|
||||
StartDatum = date,
|
||||
AnzahlMinuten = 0,
|
||||
AnzahlMinutenSoll = soll,
|
||||
Leistung = sr.ServiceDescription.Name,
|
||||
Leistungskategorie = sr.ServiceDescription.ServiceCategory.Name,
|
||||
SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(sr.SupportConcept) ?? null,
|
||||
EintraegeProTag = 0,
|
||||
};
|
||||
|
||||
if (sr.Customer != null)
|
||||
{
|
||||
flex.Customer = MapperFactory.CompactCustomerDC_Customer.MapToNewDC(sr.Customer);
|
||||
|
||||
flex.Team = GetTeamNameByTeam2CustomerList(sr.Customer.Team2CustomerList);
|
||||
}
|
||||
|
||||
yield return flex;
|
||||
}
|
||||
}
|
||||
|
||||
private string CreateFlexibleDictionaryKey(long customerOid, DateTime date, long employeeOid, string team) //, string leistung, string leistungskategorie)
|
||||
{
|
||||
return string.Format("{0}_{1:dd.MM.yyyy}_{2}_{3}", customerOid, date, employeeOid, team); //, leistung, leistungskategorie);
|
||||
}
|
||||
|
||||
private string GetTeamNameByTeam2CustomerList(IList<Team2Customer> team2Customers)
|
||||
{
|
||||
string name = "";
|
||||
|
||||
foreach (var t2c in team2Customers)
|
||||
{
|
||||
if (name.Length > 0)
|
||||
name += ", ";
|
||||
name = t2c.Team.Name;
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
private void CreateFlexibleReportSoll(FlexibleReportEntryDC entry, ServiceRecord item, DateTime datum, Calculations calc)
|
||||
{
|
||||
if (item.CostBearer2SupportConcept != null && IstHauptbetreuer(item.Customer, item.Employee))
|
||||
{
|
||||
var c2sDc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(item.CostBearer2SupportConcept);
|
||||
var sollPerDay = calc.GetApprovedHoursPerDay(c2sDc, datum);
|
||||
|
||||
entry.AnzahlMinutenSoll = sollPerDay * 60;
|
||||
}
|
||||
}
|
||||
|
||||
private decimal? CalcSollMin(CostBearer2SupportConcept c, DateTime d, Calculations calculations)
|
||||
{
|
||||
var c2sDc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(c);
|
||||
return calculations.GetApprovedHoursPerDay(c2sDc, d) * 60;
|
||||
}
|
||||
|
||||
private decimal? CalcSollMin(ServiceRecord serviceRecord, DateTime datum, Calculations calc)
|
||||
{
|
||||
if (serviceRecord.CostBearer2SupportConcept != null && IstHauptbetreuer(serviceRecord.Customer, serviceRecord.Employee))
|
||||
{
|
||||
var c2sDc = MapperFactory.SupportConceptCostBearerRelDC_CostBearer2SupportConcept.MapToNewDC(serviceRecord.CostBearer2SupportConcept);
|
||||
return calc.GetApprovedHoursPerDay(c2sDc, datum) * 60;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool IstHauptbetreuer(Customer c, Employee e)
|
||||
{
|
||||
foreach (Employee2Customer e2c in c.Employee2CustomerList)
|
||||
{
|
||||
foreach (ValueListEntry2Object vle2o in e2c.ValueList)
|
||||
{
|
||||
ValueListEntry vle = vle2o.Entry;
|
||||
if (vle.SystemEntryID != null && vle.SystemEntryID.Value == SystemEntryID.EmployeeRoleMainAttendant && e2c.EmployeeOid == e.Oid.Value)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private IEnumerable<FlexibleReportEntryDC> CreateFlexibleReportsInTimeSpan(DateTimeSpan span, Employee employee, SupportConcept supportConcept, FlexibleReportEntryType type)
|
||||
{
|
||||
for (DateTime date = span.StartDate; date <= span.EndDate; date = date.AddDays(1))
|
||||
{
|
||||
yield return new FlexibleReportEntryDC()
|
||||
{
|
||||
Employee = employee != null ? MapperFactory.CompactEmployeeDC_Employee.MapToNewDC(employee) : null,
|
||||
Customer = supportConcept.Customer != null ? MapperFactory.CompactCustomerDC_Customer.MapToNewDC(supportConcept.Customer) : null,
|
||||
Type = type,
|
||||
StartDatum = date,
|
||||
EndDatum = date,
|
||||
SupportConcept = MapperFactory.CompactSupportConceptDC_SupportConcept.MapToNewDC(supportConcept)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IList<FlexibleReportLayoutDC> GetFlexibleReportLayouts()
|
||||
{
|
||||
var result = new List<FlexibleReportLayoutDC>();
|
||||
|
||||
foreach (var item in DAOFactory.GenericDAO.GetAll<FlexibleReportLayout>().Where(x => x.CreatorOid == LoggedInUserOperationContextExt.Current.User.Oid.Value))
|
||||
foreach (var item in DAOFactory.GenericDAO.GetAllActive<FlexibleReportLayout>().Where(x => x.CreatorOid == LoggedInUserOperationContextExt.Current.User.Oid.Value))
|
||||
{
|
||||
result.Add(MapperFactory.FlexibleReportLayoutDC_FlexibleReportLayout.MapToNewDC(item));
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateFlexibleReportLayouts(IList<FlexibleReportLayoutDC> flexibleReportLayouts)
|
||||
{
|
||||
try
|
||||
{
|
||||
//Enity
|
||||
var flexOriList = DAOFactory.GenericDAO.GetAllActive<FlexibleReportLayout>().Where(x => x.CreatorOid == LoggedInUserOperationContextExt.Current.User.Oid.Value);
|
||||
//DC
|
||||
var flexNewList = flexibleReportLayouts;
|
||||
|
||||
var toUpdate = new List<FlexibleReportLayout>();
|
||||
var toDelete = new List<FlexibleReportLayout>();
|
||||
|
||||
foreach (var flexOri in flexOriList)
|
||||
{
|
||||
bool gefunden = false;
|
||||
|
||||
foreach (var flexNew in flexNewList)
|
||||
{
|
||||
if (flexOri.Oid == flexNew.FlexibleReportOid)
|
||||
{
|
||||
gefunden = true;
|
||||
|
||||
if (flexOri.LayoutName != flexNew.LayoutName)
|
||||
{
|
||||
flexOri.LayoutName = flexNew.LayoutName;
|
||||
DAOFactory.GenericDAO.Update(flexOri);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!gefunden)
|
||||
DAOFactory.GenericDAO.Deactivate(flexOri);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1645,7 +1645,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
var saturday = monday.AddDays(5);
|
||||
var sunday = monday.AddDays(6);
|
||||
|
||||
|
||||
//Originator ist angemeldeten Mitarbeiter
|
||||
GenerateAppointments(monday, false, employee, fiveCustomers, fiveOfMyOwnCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
|
||||
|
||||
@@ -1658,7 +1657,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
//Originator ist nicht angemeldeter Mitarbeiter und der ist auch nicht in der Liste
|
||||
GenerateAppointments(thursday, false, secondEmployee, fiveCustomers, fiveOfSecondEmployeesCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
|
||||
|
||||
|
||||
//Private Termine
|
||||
GenerateAppointments(friday, true, employee, fiveCustomers, fiveOfMyOwnCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
|
||||
GenerateAppointments(saturday, true, secondEmployee, fiveCustomers, fiveOfSecondEmployeesCustomers, fiveResources, employeesWithoutEmployee.TakeWhile((t, i) => i != 5).Select(t => new Employee2SchedulerAppointment(t)).ToList(), null);
|
||||
@@ -1695,6 +1693,15 @@ namespace BeWo.Service.ServiceImplementations
|
||||
GenerateAppointments(fri.AddHours(12), true, employee, fiveCustomers, fiveOfMyOwnCustomers, fiveResources, employeeListIncludingLoggedInEmployee8, null, true);
|
||||
// --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
var ttttttt1 = employeeListIncludingLoggedInEmployee1.Select(s => s.Oid).ToList();
|
||||
var ttttttt2 = employeeListIncludingLoggedInEmployee2.Select(s => s.Oid).ToList();
|
||||
var ttttttt3 = employeeListIncludingLoggedInEmployee3.Select(s => s.Oid).ToList();
|
||||
var ttttttt4 = employeeListIncludingLoggedInEmployee4.Select(s => s.Oid).ToList();
|
||||
var ttttttt5 = employeeListIncludingLoggedInEmployee5.Select(s => s.Oid).ToList();
|
||||
var ttttttt6 = employeeListIncludingLoggedInEmployee6.Select(s => s.Oid).ToList();
|
||||
var ttttttt7 = employeeListIncludingLoggedInEmployee7.Select(s => s.Oid).ToList();
|
||||
var ttttttt8 = employeeListIncludingLoggedInEmployee8.Select(s => s.Oid).ToList();
|
||||
|
||||
var mo = mon.AddDays(7);
|
||||
var tu = tue.AddDays(7);
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace BS.Shared
|
||||
NotizenKategorie = 127,
|
||||
NotizenEintrag = 128,
|
||||
BuchungsExport = 129,
|
||||
Timesheet2Mail = 130,
|
||||
Timesheet2Mail = 130,
|
||||
PersonHistory = 131,
|
||||
EmployeeHistory = 132,
|
||||
AddressHistory = 133,
|
||||
|
||||
@@ -9,53 +9,68 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class FlexibleReportEntryDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public CompactCustomerDC Customer { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public CompactSupportConceptDC SupportConcept { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public CompactEmployeeDC Employee { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Team { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Leistungskategorie { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Leistung { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal AnzahlMinuten { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal? AnzahlMinutenSoll { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int? Kilometer { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime StartDatum { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime EndDatum { get; set; }
|
||||
[DataContract]
|
||||
public class FlexibleReportEntryDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public CompactCustomerDC Customer { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int EintraegeProTag { get; set; }
|
||||
public CompactSupportConceptDC SupportConcept { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public FlexibleReportEntryType Type { get; set; }
|
||||
public long? CustomerOid
|
||||
{
|
||||
get
|
||||
{
|
||||
return Customer != null ? Customer.Oid : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
[DataMember]
|
||||
public CompactEmployeeDC Employee { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Team { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Leistungskategorie { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Leistung { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal AnzahlMinuten { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal? AnzahlMinutenSoll { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal? Betrag { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public decimal? Stundensatz { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int? Kilometer { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime StartDatum { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime EndDatum { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public FlexibleReportEntryType Type { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Organisation { get; set; }
|
||||
|
||||
public long? CustomerOid
|
||||
{
|
||||
get
|
||||
{
|
||||
return Customer?.Oid;
|
||||
}
|
||||
}
|
||||
|
||||
public long? EmployeeOid
|
||||
{
|
||||
get
|
||||
{
|
||||
return Employee?.EmployeeOid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user