Dienstplaner, Abwesenheiten, Drucken
This commit is contained in:
@@ -276,6 +276,26 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Controls\DPCtrlEmployeeContractTooltip.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Controls\DPCtrlEmployeeTooltip.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Controls\DPCtrlDienstTooltip.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Controls\MonthPicker.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Controls\DienstplanerControl.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Controls\GoalRatingControl.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -308,7 +328,7 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\Report\Dienstplaner.xaml">
|
||||
<Page Include="View\Detail\Report\DienstplanerView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
@@ -324,6 +344,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\Report\AbwesenheitsPrintControl.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\Report\IcfImportControl.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -800,7 +824,7 @@
|
||||
<Compile Include="ViewModel\AdditionalServiceGroupOfPeopleVM.cs" />
|
||||
<Compile Include="ViewModel\AdditionalServiceRegionVM.cs" />
|
||||
<Compile Include="ViewModel\AdditionalServiceVM.cs" />
|
||||
<Compile Include="ViewModel\DienstVM.cs" />
|
||||
<Compile Include="ViewModel\DienstInfoVM.cs" />
|
||||
<Compile Include="ViewModel\BudgetVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\DienstListVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\BudgetListVM.cs" />
|
||||
@@ -884,6 +908,25 @@
|
||||
<Compile Include="ViewModel\OrganisationPersonRelationVM.cs" />
|
||||
<Compile Include="ViewModel\TextModuleVM.cs" />
|
||||
<Compile Include="ViewModel\VerordnungslistenVM.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlEmployeeContractTooltip.xaml.cs">
|
||||
<DependentUpon>DPCtrlEmployeeContractTooltip.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\DPCtrlEmployeeTooltip.xaml.cs">
|
||||
<DependentUpon>DPCtrlEmployeeTooltip.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\DPCtrlDienstTooltip.xaml.cs">
|
||||
<DependentUpon>DPCtrlDienstTooltip.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\MonthPicker.xaml.cs">
|
||||
<DependentUpon>MonthPicker.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\DienstplanerControl.xaml.cs">
|
||||
<DependentUpon>DienstplanerControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Controls\DPCtrlDay.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlEmployee.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlIcon.cs" />
|
||||
<Compile Include="View\Controls\DPCtrlWeek.cs" />
|
||||
<Compile Include="View\Controls\GoalRatingControl.xaml.cs">
|
||||
<DependentUpon>GoalRatingControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -905,8 +948,8 @@
|
||||
<Compile Include="View\Detail\AbsenceTimesView.xaml.cs">
|
||||
<DependentUpon>AbsenceTimesView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\Dienstplaner.xaml.cs">
|
||||
<DependentUpon>Dienstplaner.xaml</DependentUpon>
|
||||
<Compile Include="View\Detail\Report\DienstplanerView.xaml.cs">
|
||||
<DependentUpon>DienstplanerView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\AbwesenheitstabelleView.xaml.cs">
|
||||
<DependentUpon>AbwesenheitstabelleView.xaml</DependentUpon>
|
||||
@@ -914,6 +957,9 @@
|
||||
<Compile Include="View\Detail\Report\AbwesenheitsEditView.xaml.cs">
|
||||
<DependentUpon>AbwesenheitsEditView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\AbwesenheitsPrintControl.xaml.cs">
|
||||
<DependentUpon>AbwesenheitsPrintControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\Report\IcfImportControl.xaml.cs">
|
||||
<DependentUpon>IcfImportControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
@@ -709,8 +709,9 @@ namespace BeWo
|
||||
Dispatcher.UnhandledException += (s, ex)
|
||||
=>
|
||||
{
|
||||
if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded"))
|
||||
{
|
||||
if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded") || !ex.Exception.ToString().Contains("DevExpress.Xpf.Grid.Native.SelectionStrategyCellBase.IsCellSelected"))
|
||||
|
||||
{
|
||||
ShowError(null, ex.Exception, true);
|
||||
}
|
||||
ex.Handled = true;
|
||||
|
||||
@@ -54,6 +54,7 @@ using DevExpress.Xpf.Printing.PreviewControl.Bars;
|
||||
using DevExpress.XtraScheduler;
|
||||
using Control = System.Windows.Controls.Control;
|
||||
using Utils = BS.Shared.Core.Utils;
|
||||
using Brush = System.Windows.Media.Brush;
|
||||
|
||||
namespace BeWo.Core
|
||||
{
|
||||
@@ -2151,6 +2152,6 @@ namespace BeWo.Core
|
||||
var storage = pAppointment.GetCustomFieldStorage();
|
||||
|
||||
return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1492,7 +1492,12 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Employee2SchedulerAppointmentDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Employee2SchedulerAppointmentDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ValueListEntryDC, System.Collections.Generic.List<BS.Shared.DataContracts.ResourceDC>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTokenDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportFilterDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceDescriptionDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.FlexibleReportResultDC))]
|
||||
@@ -1507,8 +1512,11 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ReportTemplateDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTemplateDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTypes))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstInfoDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstInfoDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstBlockDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstBlockDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstEintragDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BargeldkassenDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldkassenDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BargeldtransaktionDC>))]
|
||||
@@ -1594,6 +1602,8 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordValidationResult))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UiElementType))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<System.Collections.Generic.Dictionary<int, long>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<int, long>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<System.DateTime, BS.Shared.DataContracts.Compact.CompactCustomerDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, System.Collections.Generic.List<BS.Shared.DataContracts.AccountingTransactionDC>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<string, BS.Shared.DataContracts.Compact.CompactTokenDC>))]
|
||||
@@ -1602,11 +1612,7 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.Compact.CompactCustomerDC, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<long, bool>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.Dictionary<BS.Shared.DataContracts.ServiceRecordDC, System.Collections.Generic.List<BS.Shared.ServiceRecordValidationResult>>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisEmployeeDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AuslastungAnalysisSupportConceptDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactTokenDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AuslastungAnalysisRootDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.Reports.AccountingReportDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.Reports.AccountingReportRowDC>))]
|
||||
@@ -4677,9 +4683,25 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetReportTemplatesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.ReportTemplateDC> GetReportTemplates(string url);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilter", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilterResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCsFilterBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC> GetAbsenceTimeDCsFilter(System.DateTime start, System.DateTime end);
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee11BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee11();
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee21BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee21(System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceReasonDC> absenceReasons, System.Collections.Generic.List<BS.Shared.DataContracts.EmploymentTypeDC> employmentTypes);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee31BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee31(System.DateTime start, System.DateTime end);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee41BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee41(System.DateTime start, System.DateTime end, System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceReasonDC> absenceReasons, System.Collections.Generic.List<BS.Shared.DataContracts.EmploymentTypeDC> employmentTypes);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51Response")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeDCEmployee51BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee51(System.DateTime start, System.DateTime end, System.Collections.Generic.List<long> absenceReasonIDs, System.Collections.Generic.List<long> employmentTypeIDs);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllAbsenceReason", ReplyAction="http://tempuri.org/IOperationsService/GetAllAbsenceReasonResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllAbsenceReasonBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
@@ -4699,11 +4721,11 @@ namespace BeWo.ServiceProxy
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllDienste", ReplyAction="http://tempuri.org/IOperationsService/GetAllDiensteResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllDiensteBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC> GetAllDienste();
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.DienstInfoDC> GetAllDienste();
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienst", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void InsertNewDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC> dienst);
|
||||
void InsertNewDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstInfoDC> dienst);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateDienst", ReplyAction="http://tempuri.org/IOperationsService/DeactivateDienstResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
@@ -4711,7 +4733,28 @@ namespace BeWo.ServiceProxy
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienst", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void UpdateDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC> dienste);
|
||||
void UpdateDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstInfoDC> dienste);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetDienstEintraege", ReplyAction="http://tempuri.org/IOperationsService/GetDienstEintraegeResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetDienstEintraegeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.DienstBlockDC> GetDienstEintraege(long wOid, int year, int month);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstEintragResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void InsertNewDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstEintragResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteDienstEintrag", ReplyAction="http://tempuri.org/IOperationsService/DeleteDienstEintragResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteDienstEintragBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void DeleteDienstEintrag(long empId, long wohnId, int Zeile, System.DateTime date);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheim", ReplyAction="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheimResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAbsenceTimeVacationByWohnheimBeWoFaultFa" +
|
||||
"ult", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC> GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
|
||||
"")]
|
||||
@@ -5658,9 +5701,29 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetReportTemplates(url);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC> GetAbsenceTimeDCsFilter(System.DateTime start, System.DateTime end)
|
||||
public System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee11()
|
||||
{
|
||||
return base.Channel.GetAbsenceTimeDCsFilter(start, end);
|
||||
return base.Channel.GetAbsenceTimeDCEmployee11();
|
||||
}
|
||||
|
||||
public System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee21(System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceReasonDC> absenceReasons, System.Collections.Generic.List<BS.Shared.DataContracts.EmploymentTypeDC> employmentTypes)
|
||||
{
|
||||
return base.Channel.GetAbsenceTimeDCEmployee21(absenceReasons, employmentTypes);
|
||||
}
|
||||
|
||||
public System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee31(System.DateTime start, System.DateTime end)
|
||||
{
|
||||
return base.Channel.GetAbsenceTimeDCEmployee31(start, end);
|
||||
}
|
||||
|
||||
public System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee41(System.DateTime start, System.DateTime end, System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceReasonDC> absenceReasons, System.Collections.Generic.List<BS.Shared.DataContracts.EmploymentTypeDC> employmentTypes)
|
||||
{
|
||||
return base.Channel.GetAbsenceTimeDCEmployee41(start, end, absenceReasons, employmentTypes);
|
||||
}
|
||||
|
||||
public System.Tuple<System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC>, System.Collections.Generic.List<BS.Shared.DataContracts.EmployeeDC>> GetAbsenceTimeDCEmployee51(System.DateTime start, System.DateTime end, System.Collections.Generic.List<long> absenceReasonIDs, System.Collections.Generic.List<long> employmentTypeIDs)
|
||||
{
|
||||
return base.Channel.GetAbsenceTimeDCEmployee51(start, end, absenceReasonIDs, employmentTypeIDs);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceReasonDC> GetAllAbsenceReason()
|
||||
@@ -5683,12 +5746,12 @@ namespace BeWo.ServiceProxy
|
||||
base.Channel.DeleteAbsenceTime(absenceTimeDC);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC> GetAllDienste()
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.DienstInfoDC> GetAllDienste()
|
||||
{
|
||||
return base.Channel.GetAllDienste();
|
||||
}
|
||||
|
||||
public void InsertNewDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC> dienst)
|
||||
public void InsertNewDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstInfoDC> dienst)
|
||||
{
|
||||
base.Channel.InsertNewDienst(dienst);
|
||||
}
|
||||
@@ -5698,11 +5761,36 @@ namespace BeWo.ServiceProxy
|
||||
base.Channel.DeactivateDienst(pOid2Version);
|
||||
}
|
||||
|
||||
public void UpdateDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC> dienste)
|
||||
public void UpdateDienst(System.Collections.Generic.List<BS.Shared.DataContracts.DienstInfoDC> dienste)
|
||||
{
|
||||
base.Channel.UpdateDienst(dienste);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.DienstBlockDC> GetDienstEintraege(long wOid, int year, int month)
|
||||
{
|
||||
return base.Channel.GetDienstEintraege(wOid, year, month);
|
||||
}
|
||||
|
||||
public void InsertNewDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag)
|
||||
{
|
||||
base.Channel.InsertNewDienstEintrag(dienstEintrag);
|
||||
}
|
||||
|
||||
public void UpdateDienstEintrag(BS.Shared.DataContracts.DienstEintragDC dienstEintrag)
|
||||
{
|
||||
base.Channel.UpdateDienstEintrag(dienstEintrag);
|
||||
}
|
||||
|
||||
public void DeleteDienstEintrag(long empId, long wohnId, int Zeile, System.DateTime date)
|
||||
{
|
||||
base.Channel.DeleteDienstEintrag(empId, wohnId, Zeile, date);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<BS.Shared.DataContracts.AbsenceTimeDC> GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month)
|
||||
{
|
||||
return base.Channel.GetAbsenceTimeVacationByWohnheim(wohnId, year, month);
|
||||
}
|
||||
|
||||
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
|
||||
{
|
||||
base.Channel.UpdateIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
|
||||
|
||||
@@ -248,7 +248,21 @@ namespace BeWo.ServiceProxy
|
||||
ShowErrorMessage(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static T DoWohnheimServiceSync<T>(Func<IOperationsService, T> pFunc)
|
||||
{
|
||||
try
|
||||
{
|
||||
return pFunc.Invoke(GetInstance<OperationsServiceClient, IOperationsService>());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
ShowErrorMessage(e);
|
||||
}
|
||||
|
||||
return default(T);
|
||||
}
|
||||
|
||||
public static void DoMailServiceAsync<T>(Func<IMailService, T> pFunc, Action<T> pCallBack)
|
||||
{
|
||||
DoAsync<MailServiceClient, IMailService, T>(pFunc, pCallBack, true);
|
||||
|
||||
127
BeWo/View/Controls/DPCtrlDay.cs
Normal file
127
BeWo/View/Controls/DPCtrlDay.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using BeWo.View.Detail.Report;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
public class DPCtrlDay : DienstplanerControl
|
||||
{
|
||||
public static readonly DependencyProperty DPCtrlDayInformationProperty = DependencyProperty.Register(
|
||||
"DPCtrlDayInformation",
|
||||
typeof(DPCtrlDayInformation),
|
||||
typeof(DPCtrlDay),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var info = (DPCtrlDayInformation)e.NewValue;
|
||||
var c = (DPCtrlDay)s;
|
||||
|
||||
if (c != null && info != null)
|
||||
{
|
||||
var dc = info.DienstInfoDC;
|
||||
|
||||
var right = info.DayOfWeek == DayOfWeek.Sunday || info.IsLastColumn;
|
||||
var bottom = info.IsLastRow;
|
||||
|
||||
c.Border = new Thickness(0, 0, Convert.ToDouble(right), Convert.ToDouble(bottom));
|
||||
|
||||
if (!info.IsInContractRange)
|
||||
{
|
||||
c.Background = Brushes.Gray;
|
||||
c.Foreground = Brushes.Red;
|
||||
c.Text = string.Empty;
|
||||
c.ToolTip = "Kein gültiger Arbeitsvertrag";
|
||||
}
|
||||
else if (info.Reason != null)
|
||||
{
|
||||
c.Background = Brushes.White;
|
||||
c.Foreground = Brushes.Red;
|
||||
c.Text = $"{info.Reason.Description[0]}";
|
||||
c.ToolTip = $"{info.Reason.Description}";
|
||||
}
|
||||
else if (dc != null)
|
||||
{
|
||||
var bg = string.IsNullOrEmpty(dc.Farbe) ? Brushes.White : (SolidColorBrush)new BrushConverter().ConvertFrom(dc.Farbe);
|
||||
var grey = 0.2989 * bg.Color.R + 0.5870 * bg.Color.G + 0.1140 * bg.Color.B;
|
||||
|
||||
c.Background = bg;
|
||||
c.Foreground = grey < 70 ? Brushes.White : Brushes.Black;
|
||||
c.ToolTip = new DPCtrlDienstTooltip(dc);
|
||||
}
|
||||
else
|
||||
{
|
||||
c.Background = ((int)info.DayOfWeek % 6 == 0) ? new SolidColorBrush(ColorExtensions.FromHexString("EFEFEF")) : Brushes.White;
|
||||
c.Text = string.Empty;
|
||||
c.ToolTip = null;
|
||||
}
|
||||
|
||||
if (dc != null)
|
||||
{
|
||||
c.Text = $"{dc.Kurz}";
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
public DPCtrlDay()
|
||||
{
|
||||
InitializeComponent();
|
||||
MouseDown += DienstplanerControl_MouseDown;
|
||||
}
|
||||
|
||||
public new Brush Background
|
||||
{
|
||||
get => BorderLight.Background;
|
||||
set => BorderLight.Background = value;
|
||||
}
|
||||
|
||||
public Thickness Border
|
||||
{
|
||||
get => BorderBlack.BorderThickness;
|
||||
set => BorderBlack.BorderThickness = value;
|
||||
}
|
||||
|
||||
public DPCtrlDayInformation DPCtrlDayInformation
|
||||
{
|
||||
get { return (DPCtrlDayInformation)GetValue(DPCtrlDayInformationProperty); }
|
||||
|
||||
set { SetValue(DPCtrlDayInformationProperty, value); }
|
||||
}
|
||||
|
||||
private void DienstplanerControl_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
DienstplanerView entryView = null;
|
||||
|
||||
DependencyObject parent = VisualTreeHelper.GetParent(this);
|
||||
|
||||
while (parent != null && entryView == null)
|
||||
{
|
||||
entryView = parent as DienstplanerView;
|
||||
var fe = parent as FrameworkElement;
|
||||
parent = fe != null ? VisualTreeHelper.GetParent(fe) : null;
|
||||
}
|
||||
|
||||
if (entryView != null)
|
||||
{
|
||||
entryView.DienstplanerControl_MouseDown(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DPCtrlDayInformation
|
||||
{
|
||||
public DienstInfoDC DienstInfoDC { get; set; }
|
||||
public AbsenceReasonDC Reason { get; set; }
|
||||
public bool IsInContractRange { get; set; }
|
||||
public bool IsLastRow { get; set; }
|
||||
public bool IsLastColumn { get; set; }
|
||||
public DayOfWeek DayOfWeek { get; set; }
|
||||
}
|
||||
}
|
||||
27
BeWo/View/Controls/DPCtrlDienstTooltip.xaml
Normal file
27
BeWo/View/Controls/DPCtrlDienstTooltip.xaml
Normal file
@@ -0,0 +1,27 @@
|
||||
<UserControl x:Class="BeWo.View.Controls.DPCtrlDienstTooltip" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Dienst:"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Start:"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="0" Text="Pausendauer:"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="Ende:"/>
|
||||
|
||||
<Separator Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" x:Name="TxtDienst"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="2" x:Name="TxtStart"/>
|
||||
<TextBlock Grid.Row="4" Grid.Column="2" x:Name="TxtPausendauer"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="2" x:Name="TxtEnde"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
29
BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs
Normal file
29
BeWo/View/Controls/DPCtrlDienstTooltip.xaml.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Detail.Report;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DienstplanerControl.xaml
|
||||
/// </summary>
|
||||
public partial class DPCtrlDienstTooltip : UserControl
|
||||
{
|
||||
public DPCtrlDienstTooltip(DienstInfoDC dienst)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
TxtDienst.Text = $"{dienst.DienstName} ({dienst.Kurz})";
|
||||
TxtEnde.Text = dienst.Ende.ToString("HH:mm");
|
||||
TxtPausendauer.Text = dienst.Pause.ToString();
|
||||
TxtStart.Text = dienst.Start.ToString("HH:mm");
|
||||
}
|
||||
}
|
||||
}
|
||||
127
BeWo/View/Controls/DPCtrlEmployee.cs
Normal file
127
BeWo/View/Controls/DPCtrlEmployee.cs
Normal file
@@ -0,0 +1,127 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
public class DPCtrlEmployee : DienstplanerControl
|
||||
{
|
||||
public static readonly DependencyProperty EmployeeInformationProperty = DependencyProperty.Register(
|
||||
"EmployeeInformation",
|
||||
typeof(DPCtrlEmployeeInformation),
|
||||
typeof(DPCtrlEmployee),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var information = (DPCtrlEmployeeInformation)e.NewValue;
|
||||
var ctrl = (DPCtrlEmployee)s;
|
||||
|
||||
if (ctrl != null)
|
||||
{
|
||||
if (information != null)
|
||||
{
|
||||
switch (information.Row)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
break;
|
||||
case 2:
|
||||
ctrl.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
ctrl.BorderLight.BorderThickness = new Thickness(0, 0, 0, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
ctrl.Text = ctrl.DisplayMember;
|
||||
|
||||
ctrl.ToolTip = new DPCtrlEmployeeTooltip(information.Employee, information.Contracts);
|
||||
}
|
||||
else
|
||||
{
|
||||
ctrl.ToolTip = null;
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
|
||||
|
||||
public DPCtrlEmployee()
|
||||
{
|
||||
InitializeComponent();
|
||||
FontSize = 12;
|
||||
txt.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
}
|
||||
|
||||
public DPCtrlEmployeeInformation EmployeeInformation
|
||||
{
|
||||
get { return (DPCtrlEmployeeInformation)GetValue(EmployeeInformationProperty); }
|
||||
|
||||
set { SetValue(EmployeeInformationProperty, value); }
|
||||
}
|
||||
|
||||
public string DisplayMember
|
||||
{
|
||||
get
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
switch (EmployeeInformation.Row)
|
||||
{
|
||||
case 0: return EmployeeInformation.Employee.LastNameFirstName;
|
||||
|
||||
case 1:
|
||||
|
||||
foreach (var contract in EmployeeInformation.Contracts)
|
||||
{
|
||||
sb.Append(contract.EmploymentType?.Name);
|
||||
sb.Append('/');
|
||||
}
|
||||
|
||||
sb.Remove(sb.Length - 1, 1);
|
||||
|
||||
return sb.ToString();
|
||||
|
||||
case 2:
|
||||
|
||||
foreach (var contract in EmployeeInformation.Contracts)
|
||||
{
|
||||
sb.Append('(');
|
||||
|
||||
if (contract.EntryDate.HasValue)
|
||||
sb.Append(contract.EntryDate.Value.ToString("dd.MM"));
|
||||
else
|
||||
sb.Append("k.A.");
|
||||
|
||||
sb.Append('-');
|
||||
|
||||
if (contract.ContractEndDate.HasValue)
|
||||
sb.Append(contract.ContractEndDate.Value.ToString("dd.MM"));
|
||||
else
|
||||
sb.Append("unbefr.");
|
||||
|
||||
sb.Append(')');
|
||||
|
||||
sb.Append('/');
|
||||
}
|
||||
|
||||
sb.Remove(sb.Length - 1, 1);
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DPCtrlEmployeeInformation
|
||||
{
|
||||
public EmployeeDC Employee { get; set; }
|
||||
public List<ContractDC> Contracts { get; set; }
|
||||
public int Row { get; set; }
|
||||
}
|
||||
}
|
||||
21
BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml
Normal file
21
BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml
Normal file
@@ -0,0 +1,21 @@
|
||||
<UserControl x:Class="BeWo.View.Controls.DPCtrlEmployeeContractTooltip" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Separator Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" Text="Beschäftigungsart:"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="0" Text="Vereinbarte Regelarbeitszeit:"/>
|
||||
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" x:Name="TxtEmploymentType"/>
|
||||
<TextBlock Grid.Row="2" Grid.Column="2" x:Name="TxtArbeitszeit"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
39
BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs
Normal file
39
BeWo/View/Controls/DPCtrlEmployeeContractTooltip.xaml.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Detail.Report;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DienstplanerControl.xaml
|
||||
/// </summary>
|
||||
public partial class DPCtrlEmployeeContractTooltip : UserControl
|
||||
{
|
||||
public DPCtrlEmployeeContractTooltip(ContractDC contract)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
TxtEmploymentType.Text = contract.EmploymentType.Name;
|
||||
|
||||
if(contract.MonthlyTotalHours != null)
|
||||
{
|
||||
TxtArbeitszeit.Text = $"{contract.MonthlyTotalHours.Value} Std/Monat";
|
||||
}
|
||||
else if(contract.WeeklyTotalHours != null)
|
||||
{
|
||||
TxtArbeitszeit.Text = $"{contract.WeeklyTotalHours.Value} Std/Woche";
|
||||
}
|
||||
else
|
||||
{
|
||||
TxtArbeitszeit.Text = $"k.A.";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml
Normal file
14
BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml
Normal file
@@ -0,0 +1,14 @@
|
||||
<UserControl x:Class="BeWo.View.Controls.DPCtrlEmployeeTooltip" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid x:Name="RootGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="10" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" Text="Mitarbeiter:"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" x:Name="TxtMitarbeiter"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
77
BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs
Normal file
77
BeWo/View/Controls/DPCtrlEmployeeTooltip.xaml.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Detail.Report;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DienstplanerControl.xaml
|
||||
/// </summary>
|
||||
public partial class DPCtrlEmployeeTooltip : UserControl
|
||||
{
|
||||
public DPCtrlEmployeeTooltip(EmployeeDC employeeDC, List<ContractDC> contractDCs)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
TxtMitarbeiter.Text = employeeDC.LastNameFirstName;
|
||||
|
||||
var separator = new Separator();
|
||||
|
||||
foreach (var contract in contractDCs)
|
||||
{
|
||||
var sep = new Separator();
|
||||
var txtType1 = new TextBlock();
|
||||
var txtType2 = new TextBlock();
|
||||
var txtArbeit1 = new TextBlock();
|
||||
var txtArbeit2 = new TextBlock();
|
||||
|
||||
txtType1.Text = "Beschäftigungsart:";
|
||||
txtType2.Text = $"{contract.EmploymentType?.Name}";
|
||||
|
||||
txtArbeit1.Text = "Vereinbarte Regelarbeitszeit:";
|
||||
|
||||
if (contract.MonthlyTotalHours != null)
|
||||
{
|
||||
txtArbeit2.Text = $"{contract.MonthlyTotalHours.Value} Std/Monat";
|
||||
}
|
||||
else if (contract.WeeklyTotalHours != null)
|
||||
{
|
||||
txtArbeit2.Text = $"{contract.WeeklyTotalHours.Value} Std/Woche";
|
||||
}
|
||||
else
|
||||
{
|
||||
txtArbeit2.Text = $"k.A.";
|
||||
}
|
||||
|
||||
RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
RootGrid.Children.Add(sep);
|
||||
|
||||
Grid.SetRow(sep, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumnSpan(sep, 3);
|
||||
|
||||
RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
RootGrid.Children.Add(txtType1);
|
||||
RootGrid.Children.Add(txtType2);
|
||||
|
||||
Grid.SetRow(txtType1, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetRow(txtType2, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumn(txtType2, 2);
|
||||
|
||||
RootGrid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
|
||||
RootGrid.Children.Add(txtArbeit1);
|
||||
RootGrid.Children.Add(txtArbeit2);
|
||||
|
||||
Grid.SetRow(txtArbeit1, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetRow(txtArbeit2, RootGrid.RowDefinitions.Count - 1);
|
||||
Grid.SetColumn(txtArbeit2, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
68
BeWo/View/Controls/DPCtrlIcon.cs
Normal file
68
BeWo/View/Controls/DPCtrlIcon.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
public class DPCtrlIcon : DienstplanerControl
|
||||
{
|
||||
public static readonly DependencyProperty DienstValueProperty = DependencyProperty.Register(
|
||||
"DienstValue",
|
||||
typeof(DienstInfoDC),
|
||||
typeof(DienstplanerControl),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var dc = (DienstInfoDC)e.NewValue;
|
||||
var c = (DPCtrlIcon)s;
|
||||
|
||||
if (c != null)
|
||||
{
|
||||
if (dc != null)
|
||||
{
|
||||
// rgb2gray converts RGB values to grayscale values by forming a weighted sum of the R, G, and B components:
|
||||
// 0.2989 * R + 0.5870 * G + 0.1140 * B
|
||||
|
||||
var color = ColorExtensions.FromHexStringDefault(dc.Farbe, Colors.Transparent);
|
||||
var brush = new SolidColorBrush(color);
|
||||
|
||||
c.BorderBlack.Background = brush;
|
||||
c.BorderBlack.ToolTip = dc.DienstName;
|
||||
c.Foreground = color.IsBrighter(70) ? Brushes.Black : Brushes.White;
|
||||
c.Text = dc.Kurz;
|
||||
}
|
||||
else
|
||||
{
|
||||
c.BorderBlack.ToolTip = string.Empty;
|
||||
c.BorderBlack.Background = Brushes.White;
|
||||
c.Foreground = Brushes.Black;
|
||||
c.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
public DPCtrlIcon()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BorderBlack.BorderThickness = new Thickness(1);
|
||||
BorderBlack.CornerRadius = new CornerRadius(4);
|
||||
BorderBlack.Visibility = Visibility.Visible;
|
||||
BorderLight.Visibility = Visibility.Hidden;
|
||||
FontSize = 12;
|
||||
}
|
||||
|
||||
public DienstInfoDC DienstValue
|
||||
{
|
||||
get { return (DienstInfoDC)GetValue(DienstValueProperty); }
|
||||
|
||||
set { SetValue(DienstValueProperty, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
66
BeWo/View/Controls/DPCtrlWeek.cs
Normal file
66
BeWo/View/Controls/DPCtrlWeek.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
public class DPCtrlWeek : DienstplanerControl
|
||||
{
|
||||
public static readonly DependencyProperty DienstInfoDCListProperty = DependencyProperty.Register(
|
||||
"DienstInfoDCList",
|
||||
typeof(List<DienstInfoDC>),
|
||||
typeof(DPCtrlWeek),
|
||||
new UIPropertyMetadata(
|
||||
(s, e) =>
|
||||
{
|
||||
var dc = (List<DienstInfoDC>)e.NewValue;
|
||||
var c = (DPCtrlWeek)s;
|
||||
|
||||
if (c != null)
|
||||
{
|
||||
if (dc != null)
|
||||
{
|
||||
dc.RemoveAll(x => x == null);
|
||||
|
||||
c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 1);
|
||||
|
||||
double res = 0.0;
|
||||
|
||||
if (dc.Count != 0)
|
||||
foreach (var x in dc)
|
||||
{
|
||||
res += x.DurationHours;
|
||||
}
|
||||
|
||||
c.Text = res.ToString("0.##");
|
||||
}
|
||||
else
|
||||
{
|
||||
c.BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
|
||||
c.Text = "";
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
public DPCtrlWeek()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BorderBlack.BorderThickness = new Thickness(0, 0, 1, 0);
|
||||
txt.TextAlignment = TextAlignment.Left;
|
||||
txt.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
}
|
||||
|
||||
public List<DienstInfoDC> DienstInfoDCList
|
||||
{
|
||||
get { return (List<DienstInfoDC>)GetValue(DienstInfoDCListProperty); }
|
||||
|
||||
set { SetValue(DienstInfoDCListProperty, value); }
|
||||
}
|
||||
}
|
||||
}
|
||||
7
BeWo/View/Controls/DienstplanerControl.xaml
Normal file
7
BeWo/View/Controls/DienstplanerControl.xaml
Normal file
@@ -0,0 +1,7 @@
|
||||
<UserControl x:Class="BeWo.View.Controls.DienstplanerControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<Border x:Name="boLight" IsHitTestVisible="True" Background="White" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="0 0 1 1" BorderBrush="#FFBFBFBF" />
|
||||
<Border x:Name="bo" IsHitTestVisible="True" Background="Transparent" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="0 0 0 0" BorderBrush="#FF000000" />
|
||||
<TextBlock Name="txt" FontSize="15" Margin="3" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
50
BeWo/View/Controls/DienstplanerControl.xaml.cs
Normal file
50
BeWo/View/Controls/DienstplanerControl.xaml.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Detail.Report;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for DienstplanerControl.xaml
|
||||
/// </summary>
|
||||
public partial class DienstplanerControl : UserControl
|
||||
{
|
||||
public DienstplanerControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
ToolTipService.SetShowDuration(this, 60000);
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get => txt.Text;
|
||||
set => txt.Text = value;
|
||||
}
|
||||
|
||||
public new double FontSize
|
||||
{
|
||||
get => txt.FontSize;
|
||||
set => txt.FontSize = value;
|
||||
}
|
||||
|
||||
public Border BorderLight
|
||||
{
|
||||
get => boLight;
|
||||
set => boLight = value;
|
||||
}
|
||||
|
||||
public Border BorderBlack
|
||||
{
|
||||
get => bo;
|
||||
set => bo = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
BeWo/View/Controls/MonthPicker.xaml
Normal file
8
BeWo/View/Controls/MonthPicker.xaml
Normal file
@@ -0,0 +1,8 @@
|
||||
<UserControl x:Class="BeWo.View.Controls.MonthPicker"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Grid>
|
||||
<dxe:ComboBoxEdit x:Name="_MonthPicker" IsManipulationEnabled="False" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
39
BeWo/View/Controls/MonthPicker.xaml.cs
Normal file
39
BeWo/View/Controls/MonthPicker.xaml.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using BeWo.View.Detail;
|
||||
using BeWo.View.Detail.Report;
|
||||
using BeWo.ViewModel;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.View.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MonthPicker.xaml
|
||||
/// </summary>
|
||||
public partial class MonthPicker : UserControl
|
||||
{
|
||||
public MonthPicker()
|
||||
{
|
||||
InitializeComponent();
|
||||
_MonthPicker.ItemsSource = DateTimeFormatInfo.CurrentInfo.MonthNames.Where(s => !string.IsNullOrEmpty(s));
|
||||
_MonthPicker.SelectedIndex = 0;
|
||||
}
|
||||
|
||||
public int SelectedMonth
|
||||
{
|
||||
get => _MonthPicker.SelectedIndex + 1;
|
||||
set => _MonthPicker.SelectedIndex = value - 1;
|
||||
}
|
||||
|
||||
public string SelectedMonthName
|
||||
{
|
||||
get => (string)_MonthPicker.SelectedItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,9 +21,9 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
public partial class DienstView : BeWoView
|
||||
{
|
||||
private DienstListVM _ViewModel;
|
||||
private DienstInfoListVM _ViewModel;
|
||||
|
||||
public DienstView(DienstListVM listVM)
|
||||
public DienstView(DienstInfoListVM listVM)
|
||||
{
|
||||
InitializeComponent();
|
||||
_FarbeComboBox.ItemTemplateSelector = new ComboBoxTemplateSelector(_FarbeComboBox);
|
||||
@@ -40,7 +40,7 @@ namespace BeWo.View.Detail
|
||||
get { return "Dienste"; }
|
||||
}
|
||||
|
||||
private DienstListVM ViewModel
|
||||
private DienstInfoListVM ViewModel
|
||||
{
|
||||
get { return _ViewModel; }
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
if (ViewModel.RemovedCount > 0)
|
||||
{
|
||||
lToDos.Add(s => s.DeactivateDienst(ViewModel.GetRemoved().ToDictionary(dc => dc.DienstOid.Value, dc => dc.DienstVersion.Value)));
|
||||
lToDos.Add(s => s.DeactivateDienst(ViewModel.GetRemoved().ToDictionary(dc => dc.Oid.Value, dc => dc.Version.Value)));
|
||||
}
|
||||
|
||||
if (ViewModel.ChangedCount > 0)
|
||||
@@ -88,7 +88,7 @@ namespace BeWo.View.Detail
|
||||
|
||||
private void DeleteButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ViewModel.VMList.Remove(_GridControl.GetCurrentValue<DienstVM>());
|
||||
ViewModel.VMList.Remove(_GridControl.GetCurrentValue<DienstInfoVM>());
|
||||
BeWoWpfUtils.RefreshDXGrid(_GridControl);
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace BeWo.View.Detail
|
||||
{
|
||||
int rowHandle = data.RowHandle.Value;
|
||||
|
||||
var vm = _GridControl.GetRow(rowHandle) as DienstVM;
|
||||
var vm = _GridControl.GetRow(rowHandle) as DienstInfoVM;
|
||||
|
||||
if (vm != null)
|
||||
{
|
||||
|
||||
29
BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml
Normal file
29
BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml
Normal file
@@ -0,0 +1,29 @@
|
||||
<UserControl x:Class="BeWo.View.Detail.Report.AbwesenheitsPrintControl"
|
||||
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"
|
||||
Height="Auto" Width="Auto">
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label x:Name="LabelJahr" Grid.Row="0" Grid.Column="0" Margin="3" Content="Jahr:"/>
|
||||
<ComboBox x:Name="ComboJahr" Grid.Row="0" Grid.Column="1" Margin="3" IsReadOnly="True"/>
|
||||
<Label x:Name="LabelMonat" Grid.Row="1" Grid.Column="0" Margin="3" Content="Monat:"/>
|
||||
<ComboBox x:Name="ComboMonat" Grid.Row="1" Grid.Column="1" Margin="3"/>
|
||||
<StackPanel Grid.Row="3" Grid.ColumnSpan="2" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
||||
<Button x:Name="ButtonAccept" Content="Drucken" Margin="3" Click="ButtonAccept_OnClick" Width="80"/>
|
||||
<Button x:Name="ButtonCancel" Content="Abbrechen" Margin="3" Click="ButtonCancel_OnClick" Width="80"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
57
BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml.cs
Normal file
57
BeWo/View/Detail/Report/AbwesenheitsPrintControl.xaml.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using DevExpress.Xpf.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für TestEMailControl.xaml
|
||||
/// </summary>
|
||||
public partial class AbwesenheitsPrintControl : UserControl
|
||||
{
|
||||
public event Action ButtonAcceptClicked;
|
||||
public event Action ButtonCancelClicked;
|
||||
|
||||
public AbwesenheitsPrintControl(DateTime dt)
|
||||
{
|
||||
InitializeComponent();
|
||||
ThemeManager.SetTheme(BeWoApp.CurrentBeWo.MainWindow, Theme.Office2010Black);
|
||||
|
||||
var years = new List<int>();
|
||||
for (int i = DateTime.Now.Year + 5; i >= 2010; i--)
|
||||
{
|
||||
years.Add(i);
|
||||
}
|
||||
|
||||
ComboJahr.ItemsSource = years;
|
||||
ComboJahr.SelectedItem = dt.Year;
|
||||
|
||||
ComboMonat.ItemsSource = DateTimeFormatInfo.CurrentInfo.MonthNames.Where(s => !string.IsNullOrEmpty(s));
|
||||
ComboMonat.SelectedIndex = dt.Month - 1;
|
||||
}
|
||||
|
||||
public DateTime SelectedDate => new DateTime((int)ComboJahr.SelectedItem, ComboMonat.SelectedIndex + 1, 1);
|
||||
|
||||
private void ButtonAccept_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ButtonAcceptClicked?.Invoke();
|
||||
}
|
||||
|
||||
private void ButtonCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ButtonCancelClicked?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
|
||||
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxschi="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
|
||||
@@ -13,166 +14,166 @@
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" Focusable="True">
|
||||
|
||||
<localView:BeWoView.Resources>
|
||||
<Style x:Key="VerticalResourceHeaderStyle" TargetType="{x:Type dxschi:VisualResourceHeader}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type dxschi:VisualResourceHeader}">
|
||||
<Grid>
|
||||
<dxschi:VerticalHeaderControl SnapsToDevicePixels="True"
|
||||
ResourceColor="{Binding ResourceHeader.Brushes.ResourceHeader}"
|
||||
Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
dxschi:SchedulerItemsControl.ElementPosition="{Binding (dxschi:SchedulerItemsControl.ElementPosition), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
/>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" SnapsToDevicePixels="True" Margin="4"
|
||||
FontSize="12"
|
||||
Foreground="White"
|
||||
Text="{Binding ResourceCaption}"
|
||||
/>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</localView:BeWoView.Resources>
|
||||
<Grid>
|
||||
<GroupBox Header="Abwesenheitstabelle" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<localView:BeWoView.Resources>
|
||||
<Style x:Key="VerticalResourceHeaderStyle" TargetType="{x:Type dxschi:VisualResourceHeader}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type dxschi:VisualResourceHeader}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--Erste Zeile Links-->
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Abwesenheitskategorie" Margin="3,3,0,3" />
|
||||
<dxe:ComboBoxEdit x:Name="FilterAbwesenheit" Grid.Column="1" Grid.Row="0" Margin="0,3,3,3" DisplayMember="Description">
|
||||
<dxe:ComboBoxEdit.StyleSettings>
|
||||
<dxe:CheckedComboBoxStyleSettings />
|
||||
</dxe:ComboBoxEdit.StyleSettings>
|
||||
</dxe:ComboBoxEdit>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Beschäftigungsart" Margin="3,3,0,3"/>
|
||||
<dxe:ComboBoxEdit x:Name="FilterBeschaftigungsart" Grid.Column="3" Grid.Row="0" Margin="0,3,3,3" DisplayMember="Name">
|
||||
<dxe:ComboBoxEdit.StyleSettings>
|
||||
<dxe:CheckedComboBoxStyleSettings />
|
||||
</dxe:ComboBoxEdit.StyleSettings>
|
||||
</dxe:ComboBoxEdit>
|
||||
</Grid>
|
||||
<!--Erste Zeile Rechts-->
|
||||
<Grid Grid.Column="2" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="3" Content="Anzahl der angezeigten Tage"/>
|
||||
<dxe:SpinEdit x:Name="_SpinEdit" Grid.Column="4" Grid.Row="0" AllowNullInput="False" Height="23" Width="50" IsFloatValue="False" EditValueChanged="SpinEdit_EditValueChanged"/>
|
||||
</Grid>
|
||||
<!--Zweite Zeile Links-->
|
||||
<Grid Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left">
|
||||
<Button Grid.Column="0" Grid.Row="0" Content="Erstellen" Margin="3" MinWidth="100" Click="Button_Click"/>
|
||||
</Grid>
|
||||
<!--Zweite Zeile Rechts-->
|
||||
<Grid Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Datum" Margin="3"/>
|
||||
<dxe:DateEdit x:Name="_DateTimePicker" Grid.Column="1" Grid.Row="0" Margin="3,3,0,3" EditValueChanged="DateEdit_EditValueChanged" />
|
||||
</Grid>
|
||||
|
||||
<dxsch:SchedulerControl dx:ThemeManager.ThemeName="Office2010Black" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3" x:Name="_SchedulerControl" ActiveViewType="Timeline" Visibility="Collapsed" GroupType="Resource" IsManipulationEnabled="True" AllowDrop="False" IsTabStop="False"
|
||||
EditAppointmentFormShowing="SchedularControl_EditAppointmentFormShowing" EditRecurrentAppointmentFormShowing="SchedularControl_EditRecurrentAppointmentFormShowing" FormCustomizationUsingMVVMLocal="False" AppointmentViewInfoCustomizing="SchedulerControl_AppointmentViewInfoCustomizing">
|
||||
<!--<dxsch:SchedulerControl.Storage>
|
||||
<dxsch:SchedulerStorage>
|
||||
<dxsch:SchedulerStorage.ResourceStorage>
|
||||
<dxsch:ResourceStorage DataSource="_EmployeesWithAbsence">
|
||||
<dxsch:ResourceStorage.Mappings>
|
||||
<dxsch:ResourceMapping Caption="LastNameFirstName"/>
|
||||
</dxsch:ResourceStorage.Mappings>
|
||||
</dxsch:ResourceStorage>
|
||||
</dxsch:SchedulerStorage.ResourceStorage>
|
||||
<dxsch:SchedulerStorage.AppointmentStorage>
|
||||
<dxsch:AppointmentStorage DataSource="_AbsenceReasons">
|
||||
<dxsch:AppointmentStorage.Mappings >
|
||||
<dxsch:AppointmentMapping/>
|
||||
</dxsch:AppointmentStorage.Mappings>
|
||||
</dxsch:AppointmentStorage>
|
||||
</dxsch:SchedulerStorage.AppointmentStorage>
|
||||
</dxsch:SchedulerStorage>
|
||||
</dxsch:SchedulerControl.Storage>-->
|
||||
<dxsch:SchedulerControl.OptionsCustomization>
|
||||
<dxsch:OptionsCustomization AllowAppointmentCopy="None" AllowAppointmentCreate="All" AllowAppointmentDelete="None" AllowAppointmentDrag="None" AllowAppointmentDragBetweenResources="None" AllowAppointmentEdit="All" AllowAppointmentResize="None" AllowInplaceEditor="None" AllowAppointmentMultiSelect="False"/>
|
||||
</dxsch:SchedulerControl.OptionsCustomization>
|
||||
<dxsch:SchedulerControl.OptionsView>
|
||||
<dxsch:OptionsView/>
|
||||
</dxsch:SchedulerControl.OptionsView>
|
||||
<dxsch:SchedulerControl.OptionsBehavior>
|
||||
<dxsch:OptionsBehavior/>
|
||||
</dxsch:SchedulerControl.OptionsBehavior>
|
||||
<dxsch:SchedulerControl.DayView >
|
||||
<dxsch:DayView />
|
||||
</dxsch:SchedulerControl.DayView>
|
||||
<dxsch:SchedulerControl.FullWeekView >
|
||||
<dxsch:FullWeekView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.FullWeekView>
|
||||
<dxsch:SchedulerControl.MonthView >
|
||||
<dxsch:MonthView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.MonthView>
|
||||
<dxsch:SchedulerControl.WeekView >
|
||||
<dxsch:WeekView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.WeekView>
|
||||
<dxsch:SchedulerControl.WorkWeekView>
|
||||
<dxsch:WorkWeekView />
|
||||
</dxsch:SchedulerControl.WorkWeekView>
|
||||
<dxsch:SchedulerControl.TimelineView>
|
||||
<dxsch:TimelineView ResourcesPerPage="10" IntervalCount="31" TimelineScrollBarVisibility="Auto" AppointmentToolTipVisibility="Never" >
|
||||
<dxsch:TimelineView.Scales>
|
||||
<XtraScheduler:TimeScaleYear/>
|
||||
<XtraScheduler:TimeScaleMonth/>
|
||||
<XtraScheduler:TimeScaleDay/>
|
||||
</dxsch:TimelineView.Scales>
|
||||
<dxsch:TimelineView.AppointmentDisplayOptions>
|
||||
<dxsch:SchedulerTimelineViewAppointmentDisplayOptions SnapToCellsMode="Auto" EndTimeVisibility="Never" StartTimeVisibility="Never"/>
|
||||
</dxsch:TimelineView.AppointmentDisplayOptions>
|
||||
</dxsch:TimelineView>
|
||||
</dxsch:SchedulerControl.TimelineView>
|
||||
</dxsch:SchedulerControl>
|
||||
<dxschi:VerticalHeaderControl SnapsToDevicePixels="True"
|
||||
ResourceColor="{Binding ResourceHeader.Brushes.ResourceHeader}"
|
||||
Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
dxschi:SchedulerItemsControl.ElementPosition="{Binding (dxschi:SchedulerItemsControl.ElementPosition), RelativeSource={RelativeSource TemplatedParent}}"
|
||||
/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="ContentTemplate">
|
||||
<Setter.Value>
|
||||
<DataTemplate>
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" SnapsToDevicePixels="True" Margin="4"
|
||||
FontSize="12"
|
||||
Foreground="White"
|
||||
Text="{Binding ResourceCaption}"
|
||||
/>
|
||||
</DataTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</localView:BeWoView.Resources>
|
||||
<Grid>
|
||||
<GroupBox Header="Abwesenheitstabelle" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--Erste Zeile Links-->
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Abwesenheitskategorie" Margin="3,3,0,3" />
|
||||
<dxe:ComboBoxEdit x:Name="FilterAbwesenheit" Grid.Column="1" Grid.Row="0" Margin="0,3,3,3" DisplayMember="Description">
|
||||
<dxe:ComboBoxEdit.StyleSettings>
|
||||
<dxe:CheckedComboBoxStyleSettings />
|
||||
</dxe:ComboBoxEdit.StyleSettings>
|
||||
</dxe:ComboBoxEdit>
|
||||
|
||||
<Label Grid.Column="2" Grid.Row="0" Content="Beschäftigungsart" Margin="3,3,0,3"/>
|
||||
<dxe:ComboBoxEdit x:Name="FilterBeschaftigungsart" Grid.Column="3" Grid.Row="0" Margin="0,3,3,3" DisplayMember="Name">
|
||||
<dxe:ComboBoxEdit.StyleSettings>
|
||||
<dxe:CheckedComboBoxStyleSettings />
|
||||
</dxe:ComboBoxEdit.StyleSettings>
|
||||
</dxe:ComboBoxEdit>
|
||||
</Grid>
|
||||
<!--Erste Zeile Rechts-->
|
||||
<Grid Grid.Column="2" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="3" Margin="3" Content="Anzahl der angezeigten Tage"/>
|
||||
<dxe:SpinEdit x:Name="_SpinEdit" Grid.Column="4" Grid.Row="0" Margin="3" AllowNullInput="False" Height="23" Width="50" IsFloatValue="False" EditValueChanged="SpinEdit_EditValueChanged"/>
|
||||
</Grid>
|
||||
<!--Zweite Zeile Links-->
|
||||
<Grid Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left">
|
||||
<Button Grid.Column="0" Grid.Row="0" Content="Erstellen" Margin="3" MinWidth="100" Click="Button_Click"/>
|
||||
</Grid>
|
||||
<!--Zweite Zeile Rechts-->
|
||||
<Grid Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Datum" Margin="3"/>
|
||||
<dxe:DateEdit x:Name="_DateTimePicker" Grid.Column="1" Grid.Row="0" Margin="3,3,0,3" EditValueChanged="DateEdit_EditValueChanged" />
|
||||
</Grid>
|
||||
|
||||
<dxsch:SchedulerControl dx:ThemeManager.ThemeName="Office2010Black" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
||||
x:Name="_SchedulerControl" ActiveViewType="Timeline" Visibility="Collapsed" GroupType="Resource"
|
||||
IsManipulationEnabled="True" AllowDrop="False" IsTabStop="False" EditAppointmentFormShowing="SchedularControl_EditAppointmentFormShowing"
|
||||
EditRecurrentAppointmentFormShowing="SchedularControl_EditRecurrentAppointmentFormShowing" FormCustomizationUsingMVVMLocal="False"
|
||||
AppointmentViewInfoCustomizing="SchedulerControl_AppointmentViewInfoCustomizing" PopupMenuShowing="_SchedulerControl_PopupMenuShowing"
|
||||
>
|
||||
<dxsch:SchedulerControl.DefaultMenuCustomizations>
|
||||
<dxb:RemoveBarItemAndLinkAction ItemName="NewAllDayEvent" />
|
||||
<dxb:RemoveBarItemAndLinkAction ItemName="NewRecurringAppointment" />
|
||||
<dxb:RemoveBarItemAndLinkAction ItemName="NewRecurringEvent" />
|
||||
</dxsch:SchedulerControl.DefaultMenuCustomizations>
|
||||
<dxsch:SchedulerControl.OptionsCustomization>
|
||||
<dxsch:OptionsCustomization AllowAppointmentCopy="None" AllowAppointmentCreate="All" AllowAppointmentDelete="None" AllowAppointmentDrag="None" AllowAppointmentDragBetweenResources="None" AllowAppointmentEdit="All" AllowAppointmentResize="None" AllowInplaceEditor="None" AllowAppointmentMultiSelect="False"/>
|
||||
</dxsch:SchedulerControl.OptionsCustomization>
|
||||
<dxsch:SchedulerControl.OptionsView>
|
||||
<dxsch:OptionsView/>
|
||||
</dxsch:SchedulerControl.OptionsView>
|
||||
<dxsch:SchedulerControl.OptionsBehavior>
|
||||
<dxsch:OptionsBehavior/>
|
||||
</dxsch:SchedulerControl.OptionsBehavior>
|
||||
<dxsch:SchedulerControl.DayView >
|
||||
<dxsch:DayView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.DayView>
|
||||
<dxsch:SchedulerControl.FullWeekView >
|
||||
<dxsch:FullWeekView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.FullWeekView>
|
||||
<dxsch:SchedulerControl.MonthView >
|
||||
<dxsch:MonthView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.MonthView>
|
||||
<dxsch:SchedulerControl.WeekView >
|
||||
<dxsch:WeekView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.WeekView>
|
||||
<dxsch:SchedulerControl.WorkWeekView>
|
||||
<dxsch:WorkWeekView Enabled="false"/>
|
||||
</dxsch:SchedulerControl.WorkWeekView>
|
||||
<dxsch:SchedulerControl.TimelineView>
|
||||
<dxsch:TimelineView ResourcesPerPage="10" IntervalCount="31" TimelineScrollBarVisibility="Auto" AppointmentToolTipVisibility="Never" >
|
||||
<dxsch:TimelineView.Scales>
|
||||
<XtraScheduler:TimeScaleYear/>
|
||||
<XtraScheduler:TimeScaleMonth/>
|
||||
<XtraScheduler:TimeScaleDay/>
|
||||
</dxsch:TimelineView.Scales>
|
||||
<dxsch:TimelineView.AppointmentDisplayOptions>
|
||||
<dxsch:SchedulerTimelineViewAppointmentDisplayOptions SnapToCellsMode="Auto" EndTimeVisibility="Never" StartTimeVisibility="Never"/>
|
||||
</dxsch:TimelineView.AppointmentDisplayOptions>
|
||||
</dxsch:TimelineView>
|
||||
</dxsch:SchedulerControl.TimelineView>
|
||||
</dxsch:SchedulerControl>
|
||||
|
||||
<StackPanel Grid.Row="3" Grid.ColumnSpan="3" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
||||
<TextBlock x:Name="textblock_link_pdfexport" Margin="5,0,5,3" FontSize="14">
|
||||
<Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="LinkPdfExport_OnRequestNavigate">
|
||||
<Run Text="Drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</localView:BeWoView>
|
||||
@@ -33,6 +33,7 @@ using AppointmentStorage = DevExpress.Xpf.Scheduler.AppointmentStorage;
|
||||
using IAppointmentLabelStorage = DevExpress.Xpf.Scheduler.AppointmentLabelCollection;
|
||||
using BeWo.Scheduler.View;
|
||||
using AppointmentLabel = DevExpress.Xpf.Scheduler.AppointmentLabel;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
@@ -52,57 +53,21 @@ namespace BeWo.View.Detail.Report
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_SchedulerStorage = _SchedulerControl.Storage;
|
||||
_LabelStorage = _SchedulerControl.Storage.AppointmentStorage.Labels;
|
||||
_ResourceStorage = _SchedulerControl.Storage.ResourceStorage;
|
||||
_AppointmentStorage = _SchedulerControl.Storage.AppointmentStorage;
|
||||
InitFilter();
|
||||
InitDateStuff();
|
||||
InitSchedulerStuff();
|
||||
|
||||
_AppointmentStorage.CustomFieldMappings.Add(new SchedulerCustomFieldMapping("AbsenceTime", "AbsenceTime"));
|
||||
_SchedulerStorage.AppointmentsInserted += _SchedularStorage_AppointmentsInserted;
|
||||
_SchedulerStorage.AppointmentInserting += _SchedularStorage_AppointmentInserting;
|
||||
_SchedulerControl.TimelineView.VerticalResourceHeaderStyle = (Style)this.FindResource("VerticalResourceHeaderStyle");
|
||||
|
||||
IMouseHandlerService oldMouseHandler = (IMouseHandlerService)_SchedulerControl.GetService(typeof(IMouseHandlerService));
|
||||
|
||||
if (oldMouseHandler != null)
|
||||
{
|
||||
MouseHandlerService newMouseHandler =
|
||||
new MouseHandlerService(_SchedulerControl, oldMouseHandler);
|
||||
_SchedulerControl.RemoveService(typeof(IMouseHandlerService));
|
||||
_SchedulerControl.AddService(typeof(IMouseHandlerService), newMouseHandler);
|
||||
}
|
||||
|
||||
var kategorien = ServiceFacade.DoOperationsServiceSync(x => x.GetAllAbsenceReason());
|
||||
foreach (var item in kategorien)
|
||||
{
|
||||
FilterAbwesenheit.Items.Add(item);
|
||||
}
|
||||
|
||||
var arbeitsarten = ServiceFacade.DoEmployeeServiceSync(x => x.GetAllEmploymentTypes());
|
||||
foreach (var item in arbeitsarten)
|
||||
{
|
||||
FilterBeschaftigungsart.Items.Add(item);
|
||||
}
|
||||
|
||||
var td = DateTime.Today;
|
||||
_DateTimePicker.DateTime = td.AddDays(1 - td.Day);
|
||||
_SpinEdit.Text = DateTime.DaysInMonth(td.Year, td.Month).ToString();
|
||||
linkPdfExport.NavigateUri = BeWoApp.SiteOfOrigin;
|
||||
//_SchedulerControl.Start = new DateTime(2020, 02, 01);
|
||||
}
|
||||
|
||||
private void _SchedularStorage_AppointmentInserting(object sender, PersistentObjectCancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void _SchedularStorage_AppointmentsInserted(object sender, PersistentObjectsEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
public List<AbsenceReasonDC> SelectedAbsenceReasons => FilterAbwesenheit.SelectedItems.Cast<AbsenceReasonDC>().ToList();
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Update();
|
||||
}
|
||||
public List<EmploymentTypeDC> SelectedEmploymentTypes => FilterBeschaftigungsart.SelectedItems.Cast<EmploymentTypeDC>().ToList();
|
||||
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e) => UpdateScheduler();
|
||||
|
||||
private void SchedularControl_EditAppointmentFormShowing(object sender, EditAppointmentFormEventArgs e)
|
||||
{
|
||||
@@ -110,7 +75,6 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
e.AllowResize = false;
|
||||
|
||||
|
||||
e.Form = new AbwesenheitsEditView(_SchedulerControl, apt, (AbsenceTimeDC)apt.CustomFields["AbsenceTime"], _AbsenceReasonDCs);
|
||||
}
|
||||
|
||||
@@ -121,7 +85,7 @@ namespace BeWo.View.Detail.Report
|
||||
|
||||
private void SchedulerControl_AppointmentViewInfoCustomizing(object sender, DevExpress.Xpf.Scheduler.AppointmentViewInfoCustomizingEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void SpinEdit_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
@@ -136,37 +100,90 @@ namespace BeWo.View.Detail.Report
|
||||
private void DateEdit_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
|
||||
{
|
||||
var dp = _DateTimePicker.DateTime;
|
||||
|
||||
|
||||
_DateTimePicker.DateTime = dp.AddDays(1 - dp.Day);
|
||||
_SpinEdit.Value = DateTime.DaysInMonth(dp.Year, dp.Month);
|
||||
|
||||
_SchedulerControl.Start = _DateTimePicker.DateTime;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
|
||||
private void LinkPdfExport_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
_AbsenceReasonDCs = ServiceFacade.DoOperationsServiceSync(x => x
|
||||
.GetAllAbsenceReason());
|
||||
var control = new AbwesenheitsPrintControl(_SchedulerControl.Start);
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
var absenceTimes = ServiceFacade.DoOperationsServiceSync(x => x
|
||||
.GetAbsenceTimeDCsFilter(new DateTime(2000, 1, 1), new DateTime(2021, 1, 1)))
|
||||
.Where(f => f.EmployeeOid.HasValue)
|
||||
.ToList();
|
||||
control.ButtonCancelClicked += () => beWoWindow.Close();
|
||||
|
||||
var empIDs = absenceTimes.Select(x => x.EmployeeOid.Value).Distinct().ToList();
|
||||
control.ButtonAcceptClicked += delegate
|
||||
{
|
||||
UpdateReportUrl(control.SelectedDate);
|
||||
BeWoUtils.NavigateToReportUri((sender as System.Windows.Documents.Hyperlink).NavigateUri.ToString(), Translator.Translate("Abwesenheitsübersicht"));
|
||||
|
||||
beWoWindow.Close();
|
||||
};
|
||||
|
||||
beWoWindow.Height = 200;
|
||||
beWoWindow.MinHeight = 200;
|
||||
beWoWindow.Width = 250;
|
||||
beWoWindow.MinWidth = 250;
|
||||
beWoWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
beWoWindow.GroupBoxContent = control;
|
||||
beWoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
|
||||
beWoWindow.rootGroupBox.Header = "Drucken";
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void InitFilter()
|
||||
{
|
||||
var absenceReasons = ServiceFacade.DoOperationsServiceSync(x => x.GetAllAbsenceReason());
|
||||
var employmentTypes = ServiceFacade.DoEmployeeServiceSync(x => x.GetAllEmploymentTypes());
|
||||
|
||||
FilterAbwesenheit.Items.AddRange(absenceReasons.ToArray());
|
||||
FilterBeschaftigungsart.Items.AddRange(employmentTypes.ToArray());
|
||||
_AbsenceReasonDCs = absenceReasons;
|
||||
}
|
||||
|
||||
private void InitDateStuff()
|
||||
{
|
||||
var today = DateTime.Today;
|
||||
_DateTimePicker.DateTime = today.AddDays(1 - today.Day);
|
||||
_SpinEdit.Text = DateTime.DaysInMonth(today.Year, today.Month).ToString();
|
||||
}
|
||||
|
||||
private void InitSchedulerStuff()
|
||||
{
|
||||
_SchedulerStorage = _SchedulerControl.Storage;
|
||||
_LabelStorage = _SchedulerControl.Storage.AppointmentStorage.Labels;
|
||||
_ResourceStorage = _SchedulerControl.Storage.ResourceStorage;
|
||||
_AppointmentStorage = _SchedulerControl.Storage.AppointmentStorage;
|
||||
|
||||
_AppointmentStorage.CustomFieldMappings.Add(new SchedulerCustomFieldMapping("AbsenceTime", "AbsenceTime"));
|
||||
_SchedulerControl.TimelineView.VerticalResourceHeaderStyle = (Style)this.FindResource("VerticalResourceHeaderStyle");
|
||||
|
||||
IMouseHandlerService oldMouseHandler = (IMouseHandlerService)_SchedulerControl.GetService(typeof(IMouseHandlerService));
|
||||
|
||||
if (oldMouseHandler != null)
|
||||
{
|
||||
MouseHandlerService newMouseHandler =
|
||||
new MouseHandlerService(_SchedulerControl, oldMouseHandler);
|
||||
_SchedulerControl.RemoveService(typeof(IMouseHandlerService));
|
||||
_SchedulerControl.AddService(typeof(IMouseHandlerService), newMouseHandler);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateScheduler()
|
||||
{
|
||||
var absenceReasons = ServiceFacade.DoOperationsServiceSync(x => x.GetAllAbsenceReason());
|
||||
var tuple = ServiceFacade.DoOperationsServiceSync(x => x.GetAbsenceTimeDCEmployee21(SelectedAbsenceReasons, SelectedEmploymentTypes));
|
||||
var absenceTimes = tuple.Item1;
|
||||
var employees = tuple.Item2;
|
||||
|
||||
var empWithAbsence = ServiceFacade.DoEmployeeServiceSync(x => x
|
||||
.GetAllEmployees()
|
||||
.Where(emp => empIDs.Contains(emp.EmployeeOid.Value)))
|
||||
.ToList()
|
||||
.OrderBy(x => x.LastNameFirstName);
|
||||
|
||||
try
|
||||
{
|
||||
_SchedulerStorage.BeginUpdate();
|
||||
|
||||
_LabelStorage.Clear();
|
||||
foreach (var reason in _AbsenceReasonDCs)
|
||||
foreach (var reason in absenceReasons)
|
||||
{
|
||||
var label = _LabelStorage.CreateNewLabel(reason.AbsenceReasonOid.ToString(), reason.Description);
|
||||
|
||||
@@ -176,8 +193,7 @@ namespace BeWo.View.Detail.Report
|
||||
}
|
||||
|
||||
_ResourceStorage.Clear();
|
||||
var listEmps = FilterBeschaftigungsart.SelectedItems.Count == 0 ? empWithAbsence : empWithAbsence.Where(x => x.Contracts.Exists(y => FilterBeschaftigungsart.SelectedItems.Contains(y.EmploymentType)));
|
||||
foreach (var employee in listEmps)
|
||||
foreach (var employee in employees)
|
||||
{
|
||||
var resource = _SchedulerStorage.CreateResource(employee.EmployeeOid.Value.ToString());
|
||||
|
||||
@@ -187,10 +203,7 @@ namespace BeWo.View.Detail.Report
|
||||
}
|
||||
|
||||
_AppointmentStorage.Clear();
|
||||
var listAbs = (FilterAbwesenheit.SelectedItems.Count == 0 ? absenceTimes : absenceTimes.Where(x => FilterAbwesenheit.SelectedItems.Contains(x.Reason)))
|
||||
.Where(y => listEmps.Select(x => x.EmployeeOid).Contains(y.EmployeeOid));
|
||||
|
||||
foreach (var absenceTime in listAbs)
|
||||
foreach (var absenceTime in absenceTimes)
|
||||
{
|
||||
var appointment = _SchedulerStorage.CreateAppointment(AppointmentType.Normal);
|
||||
|
||||
@@ -205,6 +218,27 @@ namespace BeWo.View.Detail.Report
|
||||
_SchedulerControl.Visibility = Visibility.Visible;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateReportUrl(DateTime date)
|
||||
{
|
||||
var url = BeWoApp.SiteOfOrigin
|
||||
+ "/ReportView.aspx"
|
||||
+ "?type=" + Utils.EnumName(ReportTypes.AbsenceReport)
|
||||
+ "&dt=" + date.ToString("MM.yyyy");
|
||||
|
||||
if (SelectedAbsenceReasons.Any())
|
||||
url += "&ar=" + string.Join(";", SelectedAbsenceReasons.Select(x => x.AbsenceReasonOid.Value));
|
||||
|
||||
if (SelectedEmploymentTypes.Any())
|
||||
url += "&et=" + string.Join(";", SelectedEmploymentTypes.Select(x => x.EmploymentTypeOid.Value));
|
||||
|
||||
linkPdfExport.NavigateUri = new Uri(url);
|
||||
}
|
||||
|
||||
private void _SchedulerControl_PopupMenuShowing(object sender, SchedulerMenuEventArgs e)
|
||||
{
|
||||
e.Handled = false;
|
||||
}
|
||||
}
|
||||
|
||||
public class MouseHandlerService : MouseHandlerServiceWrapper
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
<localView:BeWoView
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxschi="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
|
||||
xmlns:XtraScheduler="clr-namespace:DevExpress.XtraScheduler;assembly=DevExpress.XtraScheduler.v17.1.Core"
|
||||
x:Class="BeWo.View.Detail.Report.Dienstplaner"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" Focusable="True">
|
||||
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="0" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Wohnheim:" Margin="3"/>
|
||||
<dxe:ComboBoxEdit Grid.Column="1" Grid.Row="0" Margin="3"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</localView:BeWoView>
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media;
|
||||
|
||||
using BeWo.Controls;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Translation;
|
||||
|
||||
using DevExpress.Services;
|
||||
using DevExpress.XtraScheduler;
|
||||
using DevExpress.Xpf.Scheduler;
|
||||
using DevExpress.Xpf.Scheduler.Native;
|
||||
|
||||
using SchedulerStorage = DevExpress.Xpf.Scheduler.SchedulerStorage;
|
||||
using ResourceStorage = DevExpress.Xpf.Scheduler.ResourceStorage;
|
||||
using AppointmentStorage = DevExpress.Xpf.Scheduler.AppointmentStorage;
|
||||
using IAppointmentLabelStorage = DevExpress.Xpf.Scheduler.AppointmentLabelCollection;
|
||||
using BeWo.Scheduler.View;
|
||||
using AppointmentLabel = DevExpress.Xpf.Scheduler.AppointmentLabel;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for Dienstplaner.xaml
|
||||
/// </summary>
|
||||
public partial class Dienstplaner : BeWoView
|
||||
{
|
||||
public Dienstplaner()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
128
BeWo/View/Detail/Report/DienstplanerView.xaml
Normal file
128
BeWo/View/Detail/Report/DienstplanerView.xaml
Normal file
@@ -0,0 +1,128 @@
|
||||
<localView:BeWoView
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
||||
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
|
||||
xmlns:dxsch="http://schemas.devexpress.com/winfx/2008/xaml/scheduler"
|
||||
xmlns:localView="clr-namespace:BeWo.View"
|
||||
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
||||
xmlns:dxschi="http://schemas.devexpress.com/winfx/2008/xaml/scheduler/internal"
|
||||
xmlns:XtraScheduler="clr-namespace:DevExpress.XtraScheduler;assembly=DevExpress.XtraScheduler.v17.1.Core"
|
||||
xmlns:controls="clr-namespace:BeWo.View.Controls"
|
||||
x:Class="BeWo.View.Detail.Report.DienstplanerView"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch" Focusable="True" Loaded="BeWoView_Loaded">
|
||||
<!--DienstplanerValue="{Binding Value}"-->
|
||||
<localView:BeWoView.Resources>
|
||||
<ControlTemplate x:Key="ctrlDay">
|
||||
<controls:DPCtrlDay Margin="0" Cursor="Arrow" Focusable="True" DPCtrlDayInformation="{Binding Value}"/>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="ctrlWeek">
|
||||
<controls:DPCtrlWeek Margin="0" Focusable="True" DienstInfoDCList="{Binding Value}"/>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="ctrlEmp">
|
||||
<controls:DPCtrlEmployee Margin="0" Focusable="True" EmployeeInformation="{Binding Value}"/>
|
||||
</ControlTemplate>
|
||||
<dxg:GridColumn x:Key="gridColumn" AllowAutoFilter="False" AllowBestFit="False" AllowCellMerge="False" AllowColumnFiltering="False" AllowConditionalFormattingMenu="False"
|
||||
AllowEditing="False" AllowGrouping="False" AllowMoving="False" AllowResizing="False" AllowSearchPanel="False" AllowSorting="False" AllowUnboundExpressionEditor="False"/>
|
||||
|
||||
</localView:BeWoView.Resources>
|
||||
<GroupBox Header="Dienstplaner" Style="{StaticResource ObjectEditGroupBox}" MouseDown="GroupBox_MouseDown" Background="#00000000">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<!--Erste 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="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Content="Wohnheim:" Margin="3,3,0,3"/>
|
||||
<dxe:ComboBoxEdit x:Name="_WohnheimPicker" Grid.Column="1" Margin="0,3,3,3" IsTextEditable="False" MinWidth="150" Width="200"/>
|
||||
<Label Grid.Column="2" Margin="3,3,0,3" Content="Datum:" />
|
||||
<controls:MonthPicker Grid.Column="3" x:Name="_MonthPicker" Margin="0,3,3,3" />
|
||||
<dxe:ComboBoxEdit Grid.Column="4" x:Name="_YearPicker" Margin="0,3,3,3" IsManipulationEnabled="False"/>
|
||||
<!--<dxe:DateEdit x:Name="_DatumPicker" Grid.Column="3" Margin="0,3,3,3" Mask="MM.yyyy" Loaded="DatumPicker_Loaded" MaskUseAsDisplayFormat="True" AllowNullInput="False" />-->
|
||||
<Button x:Name="_BtnAnzeigen" Grid.Column="5" Content="Anzeigen" MinWidth="100" Margin="10,3,3,3" Click="BtnAnzeigen_Click"/>
|
||||
</Grid>
|
||||
<!--Zweite Zeile-->
|
||||
<Grid Grid.Row="2" Margin="0,10,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Visibility="Hidden" x:Name="_TxtWohnheimInfo" Content="Dienstplan für: "/>
|
||||
<Label Grid.Column="1" Visibility="Hidden" x:Name="_TxtWohnheim"/>
|
||||
</Grid>
|
||||
<!--Dritte Zeile ______________________________________________________________________________________________________ -->
|
||||
<dxg:GridControl Grid.Row="3" Visibility="Hidden" x:Name="_GridControl" CustomUnboundColumnData="GridControl_CustomUnboundColumnData" SelectionMode="Cell" >
|
||||
<!--<dxg:GridControl.Resources>
|
||||
<ControlTemplate x:Key="display_dpc">
|
||||
<controls:DienstplanerControl Margin="3" Cursor="Hand" Focusable="True" DienstplanerValue="{Binding Value}"/>
|
||||
</ControlTemplate>
|
||||
</dxg:GridControl.Resources>-->
|
||||
<dxg:GridControl.View >
|
||||
<dxg:TableView x:Name="view" ShowVerticalLines="False" ShowHorizontalLines="False" />
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
|
||||
<StackPanel Grid.Row="4" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
||||
<TextBlock x:Name="textblock_link_pdfexport" Margin="5,0,5,3" FontSize="14">
|
||||
<Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="LinkPdfExport_OnRequestNavigate">
|
||||
<Run Text="Drucken" />
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<!--Ende-->
|
||||
<Popup x:Name="_PopupPicker" StaysOpen="True" Placement="MousePoint">
|
||||
<ListBox x:Name="listbox_valuepicker" HorizontalContentAlignment="Stretch" BorderThickness="1" BorderBrush="#ffd0d0d0" Background="#ffe0e0e0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid MouseLeftButtonDown="Popup_MouseDown" Tag="{Binding}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.ColumnSpan="2" BorderThickness="0" BorderBrush="#ffb0b0b0" Background="#ffe0e0e0">
|
||||
<!--<Border.Background>
|
||||
<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
|
||||
<GradientStop Color="#00000000" Offset="0" />
|
||||
<GradientStop Color="#777F7F7F" Offset="1" />
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>-->
|
||||
</Border>
|
||||
<controls:DPCtrlIcon IsHitTestVisible="False" Margin="3" Width="25" Height="25" Cursor="Hand" DienstValue="{Binding}" />
|
||||
<TextBlock Margin="3 3 6 3" Cursor="Hand" Grid.Column="1" VerticalAlignment="Center" Text="{Binding DienstName}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Popup>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</localView:BeWoView>
|
||||
513
BeWo/View/Detail/Report/DienstplanerView.xaml.cs
Normal file
513
BeWo/View/Detail/Report/DienstplanerView.xaml.cs
Normal file
@@ -0,0 +1,513 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Media;
|
||||
|
||||
using BeWo.Controls;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.View.Controls;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Translation;
|
||||
|
||||
using DevExpress.Xpf.Grid;
|
||||
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
|
||||
using MouseEventArgs = System.Windows.Input.MouseEventArgs;
|
||||
using System.ComponentModel;
|
||||
using Button = System.Windows.Controls.Button;
|
||||
using System.Windows.Navigation;
|
||||
|
||||
namespace BeWo.View.Detail.Report
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for Dienstplaner.xaml
|
||||
/// </summary>
|
||||
public partial class DienstplanerView : BeWoView
|
||||
{
|
||||
private List<CompactWohnheimDC> _Wohnheime;
|
||||
private List<DienstBlockDC> _DienstDCListe;
|
||||
private List<DienstZeile> _DienstEintragListe;
|
||||
private List<DienstInfoDC> _AlleDienste;
|
||||
private Dictionary<long, List<AbsenceTimeDC>> _AbsenceTimesDict;
|
||||
|
||||
private GridColumn _ColumnEmp;
|
||||
private List<GridColumn> _ColumnDays;
|
||||
private List<GridColumn> _ColumnWeek;
|
||||
|
||||
private CompactWohnheimDC _AuswahlWohnheim;
|
||||
private DienstZeile _AuswahlDienstZeile;
|
||||
private DateTime _AuswahlMonat;
|
||||
private int _AuswahlTag;
|
||||
|
||||
private bool _IsControlClick;
|
||||
|
||||
public DienstplanerView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Wohnheime = ServiceFacade.DoCustomerServiceSync(x => x.GetAllActiveWohnheimeCompact());
|
||||
|
||||
InitDateComboBox();
|
||||
CreateColumns();
|
||||
|
||||
linkPdfExport.NavigateUri = BeWoApp.SiteOfOrigin;
|
||||
}
|
||||
|
||||
#region Properties
|
||||
public List<CompactWohnheimDC> Wohnheime
|
||||
{
|
||||
get { return _Wohnheime; }
|
||||
set
|
||||
{
|
||||
_Wohnheime = value;
|
||||
_WohnheimPicker.ItemsSource = value;
|
||||
}
|
||||
}
|
||||
|
||||
public CompactWohnheimDC AuswahlWohnheim
|
||||
{
|
||||
get => _AuswahlWohnheim;
|
||||
set
|
||||
{
|
||||
_AuswahlWohnheim = value;
|
||||
_TxtWohnheim.Content = $"{value.WohnheimName} ({AuswahlMonat.ToString("MM.yyyy")})";
|
||||
}
|
||||
}
|
||||
|
||||
public DateTime AuswahlMonat
|
||||
{
|
||||
get => _AuswahlMonat;
|
||||
set => _AuswahlMonat = new DateTime(value.Year, value.Month, 1);
|
||||
}
|
||||
|
||||
public DateTime Pointer => AuswahlMonat.AddDays(_AuswahlTag - 1);
|
||||
#endregion
|
||||
|
||||
#region Loading
|
||||
private void InitGridControl()
|
||||
{
|
||||
RefreshDienste();
|
||||
BuildGridControlColumnDays(AuswahlMonat.Year, AuswahlMonat.Month, 1);
|
||||
RefreshGrid();
|
||||
ShowGrid();
|
||||
}
|
||||
|
||||
private void RefreshGrid()
|
||||
{
|
||||
_GridControl.ItemsSource = null;
|
||||
_GridControl.ItemsSource = _DienstEintragListe;
|
||||
}
|
||||
|
||||
private void ShowGrid()
|
||||
{
|
||||
_GridControl.Visibility = Visibility.Visible;
|
||||
_TxtWohnheim.Visibility = Visibility.Visible;
|
||||
_TxtWohnheimInfo.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
private void BuildGridControlColumnDays(int year, int month, int fixedColumns)
|
||||
{
|
||||
var dayCounter = 0;
|
||||
var weekCounter = 0;
|
||||
|
||||
var dt = new DateTime(year, month, 1);
|
||||
var days = DateTime.DaysInMonth(year, month);
|
||||
|
||||
|
||||
while (dayCounter < days)
|
||||
{
|
||||
var currentDay = dt.AddDays(dayCounter);
|
||||
|
||||
var day = _ColumnDays[dayCounter];
|
||||
|
||||
day.Header = $"{new CultureInfo("de-DE").DateTimeFormat.GetDayName(currentDay.DayOfWeek).Substring(0, 2)}\n{(dayCounter + 1).ToString()}.";
|
||||
day.Visible = true;
|
||||
day.VisibleIndex = dayCounter + weekCounter + fixedColumns;
|
||||
|
||||
dayCounter++;
|
||||
|
||||
if (currentDay.DayOfWeek != DayOfWeek.Sunday)
|
||||
continue;
|
||||
|
||||
var week = _ColumnWeek[weekCounter];
|
||||
|
||||
week.Header = "Wo.\nIst"; //$"{new CultureInfo("de-DE").Calendar.GetWeekOfYear(currentDay, CalendarWeekRule.FirstDay, DayOfWeek.Monday)}. Wo\nIst";
|
||||
week.FieldName = dayCounter + "W";
|
||||
week.Visible = true;
|
||||
week.VisibleIndex = dayCounter + weekCounter + fixedColumns;
|
||||
|
||||
weekCounter++;
|
||||
}
|
||||
|
||||
for (int i = dayCounter; i < _ColumnDays.Count; i++)
|
||||
{
|
||||
var day = _ColumnDays[i];
|
||||
|
||||
day.Visible = false;
|
||||
}
|
||||
|
||||
for (int i = weekCounter; i < _ColumnWeek.Count; i++)
|
||||
{
|
||||
var week = _ColumnWeek[i];
|
||||
|
||||
week.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateColumns()
|
||||
{
|
||||
var dayControlTemplate = (ControlTemplate)FindResource("ctrlDay");
|
||||
var weekControlTemplate = (ControlTemplate)FindResource("ctrlWeek");
|
||||
var empControlTemplate = (ControlTemplate)FindResource("ctrlEmp");
|
||||
|
||||
_ColumnEmp = NewGridColumnUnbound("Mitarbeiter", "emp", "EM:", 200, 200, DevExpress.Data.UnboundColumnType.Object, empControlTemplate, DevExpress.Utils.DefaultBoolean.True); //NewGridColumn("Mitarbeiter", "Header", double.NaN, 100);
|
||||
_ColumnEmp.Fixed = FixedStyle.Left;
|
||||
|
||||
_ColumnDays = new List<GridColumn>();
|
||||
_ColumnWeek = new List<GridColumn>();
|
||||
|
||||
for (int i = 1; i <= 31; i++)
|
||||
{
|
||||
_ColumnDays.Add(NewGridColumnUnbound(string.Empty, i.ToString(), $"DA:", 28, 28, DevExpress.Data.UnboundColumnType.Object, dayControlTemplate, DevExpress.Utils.DefaultBoolean.False));
|
||||
}
|
||||
|
||||
for (int i = 1; i <= 5; i++)
|
||||
{
|
||||
_ColumnWeek.Add(NewGridColumnUnbound("Wo.\nIst", string.Empty, $"WE:", 60, 40, DevExpress.Data.UnboundColumnType.Object, weekControlTemplate, DevExpress.Utils.DefaultBoolean.False));
|
||||
}
|
||||
|
||||
_GridControl.Columns.Add(_ColumnEmp);
|
||||
_GridControl.Columns.AddRange(_ColumnDays);
|
||||
_GridControl.Columns.AddRange(_ColumnWeek);
|
||||
}
|
||||
|
||||
private void InitDateComboBox()
|
||||
{
|
||||
var year = new List<int>();
|
||||
for (int i = 1900; i < 2100; i++)
|
||||
{
|
||||
year.Add(i);
|
||||
}
|
||||
|
||||
_YearPicker.ItemsSource = year;
|
||||
|
||||
_MonthPicker.SelectedMonth = DateTime.Today.Month;
|
||||
_YearPicker.SelectedItem = DateTime.Today.Year;
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void GroupBox_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (!_IsControlClick)
|
||||
{
|
||||
_PopupPicker.IsOpen = false;
|
||||
}
|
||||
|
||||
_IsControlClick = false;
|
||||
}
|
||||
|
||||
private void BeWoView_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Button Click
|
||||
private void BtnAnzeigen_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_PopupPicker.IsOpen = false;
|
||||
|
||||
if (_WohnheimPicker.SelectedItem == null)
|
||||
return;
|
||||
|
||||
AuswahlMonat = new DateTime((int)_YearPicker.SelectedItem, _MonthPicker.SelectedMonth, 1);
|
||||
|
||||
var year = _YearPicker.SelectedItem;
|
||||
|
||||
AuswahlWohnheim = _WohnheimPicker.SelectedItem as CompactWohnheimDC;
|
||||
|
||||
InitGridControl();
|
||||
}
|
||||
|
||||
// Grid Click
|
||||
public void DienstplanerControl_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
_PopupPicker.IsOpen = false;
|
||||
|
||||
_AuswahlDienstZeile = _GridControl.GetRow(_GridControl.View.GetRowHandleByMouseEventArgs(e)) as DienstZeile;
|
||||
_AuswahlTag = int.Parse(_GridControl.View.GetColumnByMouseEventArgs(e).FieldName);
|
||||
|
||||
listbox_valuepicker.ItemsSource = _AlleDienste;
|
||||
|
||||
_IsControlClick = true;
|
||||
_PopupPicker.IsOpen = true;
|
||||
}
|
||||
|
||||
// Popup Click
|
||||
private void Popup_MouseDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
var oldDienst = _AuswahlDienstZeile.TryGetDienst(_AuswahlTag);
|
||||
var newDienst = (DienstInfoDC)((Grid)sender).Tag;
|
||||
|
||||
_PopupPicker.IsOpen = false;
|
||||
|
||||
|
||||
if (oldDienst == null)
|
||||
{
|
||||
if (!newDienst.IsPlatzhalter)
|
||||
{
|
||||
_AuswahlDienstZeile.AddDienst(_AuswahlTag, newDienst);
|
||||
ServiceFacade.DoOperationsServiceAsync(x => x.InsertNewDienstEintrag(
|
||||
new DienstEintragDC
|
||||
{
|
||||
Datum = Pointer,
|
||||
DienstOid = newDienst.Oid.Value,
|
||||
EmployeeOid = _AuswahlDienstZeile.Employee.EmployeeOid.Value,
|
||||
Oid = null,
|
||||
WohnheimOid = AuswahlWohnheim.WohnheimOid,
|
||||
Zeile = _AuswahlDienstZeile.Zeile
|
||||
}));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newDienst.IsPlatzhalter)
|
||||
{
|
||||
_AuswahlDienstZeile.RemoveDienst(_AuswahlTag);
|
||||
ServiceFacade.DoOperationsServiceAsync(x => x.DeleteDienstEintrag(_AuswahlDienstZeile.Employee.EmployeeOid.Value, AuswahlWohnheim.WohnheimOid, _AuswahlDienstZeile.Zeile, Pointer));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (oldDienst.Equals(newDienst))
|
||||
return;
|
||||
|
||||
_AuswahlDienstZeile.RemoveDienst(_AuswahlTag);
|
||||
_AuswahlDienstZeile.AddDienst(_AuswahlTag, newDienst);
|
||||
|
||||
//_AuswahlDienstZeile.UpdateDienst(_AuswahlTag, newDienst);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Daten füllen
|
||||
private void GridControl_CustomUnboundColumnData(object sender, GridColumnDataEventArgs e)
|
||||
{
|
||||
if (e.IsGetData)
|
||||
{
|
||||
var selZeile = _GridControl.GetRowByListIndex(e.ListSourceRowIndex) as DienstZeile;
|
||||
var pos = 0;
|
||||
var tag = e.Column.Tag.ToStringNullCheck();
|
||||
|
||||
switch (e.Column.Tag.ToString().Substring(0, 2))
|
||||
{
|
||||
case "DA":
|
||||
pos = int.Parse(e.Column.FieldName);
|
||||
var date = _AuswahlMonat.AddDays(pos - 1);
|
||||
|
||||
AbsenceReasonDC reason = null;
|
||||
if (_AbsenceTimesDict.ContainsKey(selZeile.Employee.EmployeeOid.Value))
|
||||
reason = _AbsenceTimesDict[selZeile.Employee.EmployeeOid.Value].FirstOrDefault(x =>
|
||||
x.Start <= date && (!x.End.HasValue || x.End >= date))?.Reason;
|
||||
|
||||
e.Value = new DPCtrlDayInformation
|
||||
{
|
||||
DienstInfoDC = selZeile.TryGetDienst(pos),
|
||||
IsLastRow = selZeile.Zeile == 2,
|
||||
DayOfWeek = date.DayOfWeek,
|
||||
IsLastColumn = pos == DateTime.DaysInMonth(AuswahlMonat.Year, AuswahlMonat.Month),
|
||||
IsInContractRange = selZeile.GetContract(pos) != null,
|
||||
Reason = reason
|
||||
};
|
||||
return;
|
||||
|
||||
case "WE":
|
||||
pos = int.Parse(e.Column.FieldName.Remove(e.Column.FieldName.Length - 1));
|
||||
e.Value = selZeile.Zeile == 2 ? _DienstEintragListe.FindAll(x => x.Employee == selZeile.Employee).SelectMany(y => y.GetDienstWoche(pos)).ToList() : null;
|
||||
return;
|
||||
|
||||
case "EM":
|
||||
e.Value = new DPCtrlEmployeeInformation
|
||||
{
|
||||
Employee = selZeile.Employee,
|
||||
Contracts = selZeile.Contracts,
|
||||
Row = selZeile.Zeile
|
||||
};
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void LinkPdfExport_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
|
||||
{
|
||||
UpdateReportUrl(_AuswahlWohnheim.WohnheimOid, _AuswahlMonat);
|
||||
BeWoUtils.NavigateToReportUri((sender as System.Windows.Documents.Hyperlink).NavigateUri.ToString(), Translator.Translate("Dienstplan"));
|
||||
}
|
||||
|
||||
private void RefreshDienste()
|
||||
{
|
||||
_DienstDCListe = ServiceFacade.DoOperationsServiceSync(x => x.GetDienstEintraege(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month));
|
||||
|
||||
_AlleDienste = ServiceFacade.DoOperationsServiceSync(x => x.GetAllDienste());
|
||||
_AlleDienste.Insert(0, DienstInfoDC.Platzhalter);
|
||||
|
||||
_DienstEintragListe = _DienstDCListe
|
||||
.SelectMany(x => DienstZeile.Init(x, _AlleDienste, RefreshGrid, AuswahlMonat))
|
||||
.ToList();
|
||||
|
||||
|
||||
var absence = ServiceFacade.DoOperationsServiceSync(x => x.GetAbsenceTimeVacationByWohnheim(AuswahlWohnheim.WohnheimOid, AuswahlMonat.Year, AuswahlMonat.Month));
|
||||
|
||||
var temp = new Dictionary<long, List<AbsenceTimeDC>>();
|
||||
|
||||
foreach (var abs in absence)
|
||||
{
|
||||
if (!temp.ContainsKey(abs.EmployeeOid.Value))
|
||||
temp.Add(abs.EmployeeOid.Value, new List<AbsenceTimeDC>());
|
||||
|
||||
temp[abs.EmployeeOid.Value].Add(abs);
|
||||
}
|
||||
|
||||
_AbsenceTimesDict = temp;
|
||||
}
|
||||
|
||||
private void UpdateReportUrl(long wOid, DateTime date)
|
||||
{
|
||||
var url = BeWoApp.SiteOfOrigin
|
||||
+ "/ReportView.aspx"
|
||||
+ "?type=" + Utils.EnumName(ReportTypes.RosterReport)
|
||||
+ "&wid=" + wOid
|
||||
+ "&dt=" + date.ToString("MM.yyyy");
|
||||
|
||||
linkPdfExport.NavigateUri = new Uri(url);
|
||||
}
|
||||
|
||||
#region ColumnCreate
|
||||
|
||||
private GridColumn NewGridColumnUnbound(string header, string fieldName, string tag, GridColumnWidth width, double minWidth, DevExpress.Data.UnboundColumnType unboundColumnType, ControlTemplate displayTemplate, DevExpress.Utils.DefaultBoolean allowResize)
|
||||
{
|
||||
var clmn = NewGridColumn(header, fieldName, width, minWidth, allowResize);
|
||||
|
||||
clmn.UnboundType = unboundColumnType;
|
||||
clmn.Tag = tag;
|
||||
|
||||
if (displayTemplate != null)
|
||||
clmn.DisplayTemplate = displayTemplate;
|
||||
|
||||
return clmn;
|
||||
}
|
||||
|
||||
private GridColumn NewGridColumn(string header, string fieldName, GridColumnWidth width, double minWidth, DevExpress.Utils.DefaultBoolean allowResize)
|
||||
{
|
||||
return new GridColumn
|
||||
{
|
||||
AllowAutoFilter = false,
|
||||
AllowBestFit = DevExpress.Utils.DefaultBoolean.False,
|
||||
AllowCellMerge = false,
|
||||
AllowColumnFiltering = DevExpress.Utils.DefaultBoolean.False,
|
||||
AllowConditionalFormattingMenu = false,
|
||||
AllowEditing = DevExpress.Utils.DefaultBoolean.False,
|
||||
AllowFocus = false,
|
||||
AllowGrouping = DevExpress.Utils.DefaultBoolean.False,
|
||||
AllowIncrementalSearch = false,
|
||||
AllowMoving = DevExpress.Utils.DefaultBoolean.False,
|
||||
AllowPrinting = false,
|
||||
AllowResizing = allowResize,
|
||||
AllowSearchPanel = DevExpress.Utils.DefaultBoolean.False,
|
||||
AllowSorting = DevExpress.Utils.DefaultBoolean.False,
|
||||
Width = width,
|
||||
MinWidth = minWidth,
|
||||
FieldName = fieldName,
|
||||
Header = header,
|
||||
HorizontalHeaderContentAlignment = System.Windows.HorizontalAlignment.Center
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// </summary>
|
||||
|
||||
public class DienstZeile
|
||||
{
|
||||
public event Action DienstDictUpdated;
|
||||
|
||||
public EmployeeDC Employee { get; set; }
|
||||
public List<ContractDC> Contracts { get; set; }
|
||||
public int Zeile { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
private Dictionary<int, DienstInfoDC> DienstDict { get; set; }
|
||||
|
||||
public DienstZeile(EmployeeDC emp, List<ContractDC> contracts, int zeile, DateTime date, Dictionary<int, DienstInfoDC> dienste)
|
||||
{
|
||||
Employee = emp;
|
||||
Contracts = contracts;
|
||||
Zeile = zeile;
|
||||
Date = date;
|
||||
DienstDict = dienste ?? new Dictionary<int, DienstInfoDC>();
|
||||
}
|
||||
|
||||
public List<DienstInfoDC> GetDienstWoche(int sonntag) => DienstDict.Where(x => x.Key <= sonntag && sonntag - x.Key < 7).Select(x => x.Value).ToList();
|
||||
|
||||
public DienstInfoDC GetDienst(int tag) => DienstDict[tag];
|
||||
|
||||
public DienstInfoDC TryGetDienst(int tag) => DienstDict.ContainsKey(tag) ? DienstDict[tag] : null;
|
||||
|
||||
public void AddDienst(int tag, DienstInfoDC dienst)
|
||||
{
|
||||
DienstDict.Add(tag, dienst);
|
||||
DienstDictUpdated?.Invoke();
|
||||
}
|
||||
|
||||
public void UpdateDienst(int tag, DienstInfoDC dienst)
|
||||
{
|
||||
DienstDict[tag] = dienst;
|
||||
DienstDictUpdated?.Invoke();
|
||||
}
|
||||
|
||||
public void RemoveDienst(int tag)
|
||||
{
|
||||
DienstDict.Remove(tag);
|
||||
DienstDictUpdated?.Invoke();
|
||||
}
|
||||
|
||||
public ContractDC GetContract(int tag) => Contracts.FirstOrDefault(x => (!x.EntryDate.HasValue || x.EntryDate.Value <= Date.AddDays(tag - 1)) &&
|
||||
(!x.ContractEndDate.HasValue || x.ContractEndDate.Value >= Date.AddDays(tag - 1)));
|
||||
|
||||
public static List<DienstZeile> Init(DienstBlockDC eintragDC, List<DienstInfoDC> dienste, Action dienstDictUpdate, DateTime date)
|
||||
{
|
||||
var res = new List<DienstZeile>();
|
||||
|
||||
for (int i = 0; i < eintragDC.DienstDictArray.Length; i++)
|
||||
{
|
||||
var zeileDC = eintragDC.DienstDictArray[i];
|
||||
|
||||
var newDic = new Dictionary<int, DienstInfoDC>();
|
||||
|
||||
if (zeileDC != null)
|
||||
newDic = zeileDC.ToDictionary(k => k.Key, v => dienste.Find(x => x.Oid == v.Value));
|
||||
|
||||
var toAdd = new DienstZeile(eintragDC.Employee, eintragDC.Contracts, i, date, newDic);
|
||||
|
||||
toAdd.DienstDictUpdated += dienstDictUpdate;
|
||||
|
||||
res.Add(toAdd);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -192,7 +192,7 @@ namespace BeWo.View.Master
|
||||
private void tabitem_dienstPlaner_Selected(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (!_OpenViews.ContainsKey(tabitem_dienstPlaner))
|
||||
_OpenViews[tabitem_dienstPlaner] = new Dienstplaner();
|
||||
_OpenViews[tabitem_dienstPlaner] = new DienstplanerView();
|
||||
Show(tabitem_dienstPlaner);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<uc:PopUpEdit Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="3" IsReadOnly="True" Visibility="Collapsed"
|
||||
x:Name="popupedit_team" DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_team_PopUpClick" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Height="22" Margin="3"
|
||||
Cursor="Arrow" />
|
||||
Cursor="Arrow" />
|
||||
|
||||
<!--<CheckBox Margin="3" Name="checkbox_showTeamReport" Height="22" Grid.Row="2" Grid.ColumnSpan="2" IsChecked="False" Content="Nach Teams sortieren" VerticalContentAlignment="Center"/>-->
|
||||
<!--<CheckBox Margin="3" Grid.Column="0" Grid.Row="3" Height="22" Grid.ColumnSpan="2" Content="Klienten auflisten" VerticalAlignment="Center" x:Name="chkShowCustomer" />-->
|
||||
@@ -69,33 +69,33 @@
|
||||
<TextBlock Margin="0 7,3,0" Text=" Jahr" Grid.Row="3" Grid.Column="2" Foreground="Black"/>
|
||||
<ComboBox Height="23" x:Name="combobox_year" Grid.Row="3" Grid.Column="3" VerticalAlignment="Top" Margin="3" Width="60" />
|
||||
|
||||
<CheckBox Margin="3" Name="checkbox_tagesansicht" Grid.Row="4" Grid.ColumnSpan="5" IsChecked="False" Content="StundenkontoTagesansicht" VerticalAlignment="Center"/>
|
||||
<CheckBox Margin="3" Name="checkbox_tagesansicht" Grid.Row="4" Grid.ColumnSpan="5" IsChecked="False" Content="StundenkontoTagesansicht" VerticalAlignment="Center"/>
|
||||
|
||||
<Button Name="button_generate" Grid.Row="5" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" FontWeight="Bold" Content="Erstellen" Click="button_generate_Click" Height="23" Margin="3" />
|
||||
|
||||
|
||||
<dxp:DocumentPreviewControl x:Name="docPrevControl" Grid.Row="6" Grid.ColumnSpan="5" Grid.Column="0" Visibility="Collapsed" CommandBarStyle="Bars">
|
||||
<dxp:DocumentPreviewControl.CommandProvider>
|
||||
<dxp:DocumentCommandProvider>
|
||||
<dxp:DocumentCommandProvider.Actions>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportCsv}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportMht}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportTxt}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Open}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.DocumentMap}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Watermark}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Scale}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PrintDirect}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PageSetup}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Save}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Send}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Parameters}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Thumbnails}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.EditingFields}"/>
|
||||
</dxp:DocumentCommandProvider.Actions>
|
||||
</dxp:DocumentCommandProvider>
|
||||
</dxp:DocumentPreviewControl.CommandProvider>
|
||||
</dxp:DocumentPreviewControl>
|
||||
<dxp:DocumentPreviewControl x:Name="docPrevControl" Grid.Row="6" Grid.ColumnSpan="5" Grid.Column="0" Visibility="Collapsed" CommandBarStyle="Bars">
|
||||
<dxp:DocumentPreviewControl.CommandProvider>
|
||||
<dxp:DocumentCommandProvider>
|
||||
<dxp:DocumentCommandProvider.Actions>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportCsv}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportMht}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.ExportTxt}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Open}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.DocumentMap}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Watermark}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Scale}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PrintDirect}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.PageSetup}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Save}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Send}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Parameters}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.Thumbnails}"/>
|
||||
<dxb:RemoveAction ElementName="{x:Static dxpbars:DefaultPreviewBarItemNames.EditingFields}"/>
|
||||
</dxp:DocumentCommandProvider.Actions>
|
||||
</dxp:DocumentCommandProvider>
|
||||
</dxp:DocumentPreviewControl.CommandProvider>
|
||||
</dxp:DocumentPreviewControl>
|
||||
|
||||
<Popup Margin="10" Name="popup_employee" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="7" Height="400" Grid.ColumnSpan="5" Closed="popup_Closed" Opened="popup_Opened">
|
||||
<localSearchView:EmployeeSearchView ItemSelected="EmployeeSearchView_EmployeeSelected" x:Name="employeesearchview" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using BeWo.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -10,7 +11,7 @@ using System.Windows.Media;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class DienstVM : AbstractDCMapperVM<DienstDC>
|
||||
public class DienstInfoVM : AbstractDCMapperVM<DienstInfoDC>
|
||||
{
|
||||
private long? _DienstOid;
|
||||
private string _DienstNotice;
|
||||
@@ -23,7 +24,7 @@ namespace BeWo.ViewModel
|
||||
private DateTime _EndeDT;
|
||||
private int _Pause;
|
||||
|
||||
public DienstVM(DienstDC dienstDC) : base(dienstDC, dienstDC.DienstOid == null)
|
||||
public DienstInfoVM(DienstInfoDC dienstDC) : base(dienstDC, dienstDC.Oid == null)
|
||||
{ }
|
||||
|
||||
public long? DienstOid
|
||||
@@ -34,7 +35,7 @@ namespace BeWo.ViewModel
|
||||
if (AreDifferent(_DienstOid, value))
|
||||
{
|
||||
_DienstOid = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.DienstOid, value), nameof(_DienstOid));
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Oid, value), nameof(_DienstOid));
|
||||
FirePropertyChanged(nameof(_DienstOid));
|
||||
}
|
||||
}
|
||||
@@ -48,7 +49,7 @@ namespace BeWo.ViewModel
|
||||
if (AreDifferent(_DienstNotice, value))
|
||||
{
|
||||
_DienstNotice = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.DienstNotice, value), nameof(_DienstNotice));
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Notice, value), nameof(_DienstNotice));
|
||||
FirePropertyChanged(nameof(_DienstNotice));
|
||||
}
|
||||
}
|
||||
@@ -62,7 +63,7 @@ namespace BeWo.ViewModel
|
||||
if (AreDifferent(_DienstVersion, value))
|
||||
{
|
||||
_DienstVersion = value;
|
||||
StoreDirtyInformation(AreDifferent(DataContract.DienstVersion, value), nameof(_DienstVersion));
|
||||
StoreDirtyInformation(AreDifferent(DataContract.Version, value), nameof(_DienstVersion));
|
||||
FirePropertyChanged(nameof(_DienstVersion));
|
||||
}
|
||||
}
|
||||
@@ -187,11 +188,11 @@ namespace BeWo.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(DienstDC bDataContract)
|
||||
protected override void InitByDataContract(DienstInfoDC bDataContract)
|
||||
{
|
||||
_DienstOid = bDataContract.DienstOid;
|
||||
_DienstNotice = bDataContract.DienstNotice;
|
||||
_DienstVersion = bDataContract.DienstVersion;
|
||||
_DienstOid = bDataContract.Oid;
|
||||
_DienstNotice = bDataContract.Notice;
|
||||
_DienstVersion = bDataContract.Version;
|
||||
_DienstName = bDataContract.DienstName;
|
||||
_Kurz = bDataContract.Kurz;
|
||||
_StartDT = bDataContract.Start;
|
||||
@@ -200,15 +201,15 @@ namespace BeWo.ViewModel
|
||||
|
||||
if (!string.IsNullOrEmpty(bDataContract.Farbe))
|
||||
{
|
||||
_Farbe = (SolidColorBrush)new BrushConverter().ConvertFrom(bDataContract.Farbe);
|
||||
_Farbe = new SolidColorBrush(ColorExtensions.FromHexStringDefault(bDataContract.Farbe, Colors.Transparent));
|
||||
}
|
||||
}
|
||||
|
||||
protected override DienstDC MapToDataContract(DienstDC bDataContract, bool doCommit)
|
||||
protected override DienstInfoDC MapToDataContract(DienstInfoDC bDataContract, bool doCommit)
|
||||
{
|
||||
bDataContract.DienstOid = _DienstOid;
|
||||
bDataContract.DienstNotice = _DienstNotice;
|
||||
bDataContract.DienstVersion = _DienstVersion;
|
||||
bDataContract.Oid = _DienstOid;
|
||||
bDataContract.Notice = _DienstNotice;
|
||||
bDataContract.Version = _DienstVersion;
|
||||
bDataContract.DienstName = _DienstName;
|
||||
bDataContract.Kurz = _Kurz;
|
||||
bDataContract.Farbe = _FarbeString;
|
||||
@@ -10,9 +10,9 @@ using Color = System.Drawing.Color;
|
||||
|
||||
namespace BeWo.ViewModel.ListViewModel
|
||||
{
|
||||
public class DienstListVM : AbstractDCListMapperVM<DienstDC, DienstVM>
|
||||
public class DienstInfoListVM : AbstractDCListMapperVM<DienstInfoDC, DienstInfoVM>
|
||||
{
|
||||
public DienstListVM(List<DienstDC> pDCs): base(pDCs)
|
||||
public DienstInfoListVM(List<DienstInfoDC> pDCs): base(pDCs)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -459,10 +459,10 @@ namespace BeWo.ViewModel
|
||||
r => pCallBack(new BudgetListVM(r.ToList())));
|
||||
}
|
||||
|
||||
public static void CreateDienstListVMAsync(Action<DienstListVM> pCallBack)
|
||||
public static void CreateDienstListVMAsync(Action<DienstInfoListVM> pCallBack)
|
||||
{
|
||||
ServiceFacade.DoOperationsServiceAsync(s => s.GetAllDienste(),
|
||||
r => pCallBack(new DienstListVM(r.ToList())));
|
||||
r => pCallBack(new DienstInfoListVM(r.ToList())));
|
||||
}
|
||||
|
||||
public static void CreateTextModuleListVMAsync(Action<TextModuleListVM> pCallBack, bool pIsInAdministrationView = false, bool pIsInTextModuleEditor = false)
|
||||
|
||||
@@ -135,7 +135,8 @@
|
||||
<Compile Include="DefaultHibernateSessionManager.cs" />
|
||||
<Compile Include="Entities\AddressHistory.cs" />
|
||||
<Compile Include="Entities\BuchungsExport.cs" />
|
||||
<Compile Include="Entities\Dienst.cs" />
|
||||
<Compile Include="Entities\DienstEintrag.cs" />
|
||||
<Compile Include="Entities\DienstInfo.cs" />
|
||||
<Compile Include="Entities\Budget.cs" />
|
||||
<Compile Include="Entities\ContactHistory.cs" />
|
||||
<Compile Include="Entities\DeletionHistory.cs" />
|
||||
@@ -606,7 +607,7 @@
|
||||
<Content Include="ICF\icf.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<EmbeddedResource Include="Mappings\Dienst.hbm.xml">
|
||||
<EmbeddedResource Include="Mappings\DienstInfo.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Content Include="Mappings\DeletionHistory.hbm.xml" />
|
||||
@@ -616,6 +617,9 @@
|
||||
<EmbeddedResource Include="Mappings\Employee.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Mappings\DienstEintrag.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Content Include="Mappings\Timesheet2Mail.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\ContactHistory.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
99
Data/Entities/DienstEintrag.cs
Normal file
99
Data/Entities/DienstEintrag.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using BS.Shared;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class DienstEintrag : BeWoEntityBase
|
||||
{
|
||||
private long _EmployeeOid;
|
||||
private long _WohnheimOid;
|
||||
private long _DienstOid;
|
||||
private int _Zeile;
|
||||
private DateTime _Datum;
|
||||
|
||||
public DienstEintrag()
|
||||
{
|
||||
_Tid = TableID.DienstEintrag;
|
||||
}
|
||||
|
||||
public virtual long EmployeeOid
|
||||
{
|
||||
get
|
||||
{
|
||||
return _EmployeeOid;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_EmployeeOid, value))
|
||||
{
|
||||
_EmployeeOid = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual long WohnheimOid
|
||||
{
|
||||
get
|
||||
{
|
||||
return _WohnheimOid;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_WohnheimOid, value))
|
||||
{
|
||||
_WohnheimOid = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual long DienstOid
|
||||
{
|
||||
get
|
||||
{
|
||||
return _DienstOid;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_DienstOid, value))
|
||||
{
|
||||
_DienstOid = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int Zeile
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Zeile;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_Zeile, value))
|
||||
{
|
||||
_Zeile = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual DateTime Datum
|
||||
{
|
||||
get
|
||||
{
|
||||
return _Datum;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_Datum, value))
|
||||
{
|
||||
_Datum = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ using BS.Shared;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class Dienst : BeWoEntityBase
|
||||
public class DienstInfo : BeWoEntityBase
|
||||
{
|
||||
private string _Dienstname;
|
||||
private string _Kurz;
|
||||
@@ -17,9 +17,9 @@ namespace BeWo.Data.Entities
|
||||
private DateTime _Ende;
|
||||
private int _Pause;
|
||||
|
||||
public Dienst()
|
||||
public DienstInfo()
|
||||
{
|
||||
_Tid = TableID.Dienst;
|
||||
_Tid = TableID.DienstInfo;
|
||||
}
|
||||
|
||||
public virtual string DienstName
|
||||
@@ -495,6 +495,10 @@ namespace BeWo.Data.Entities
|
||||
{
|
||||
return Person.LastName + ", " + Person.FirstName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return GetType().Name.GetHashCode() ^ Oid.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
24
Data/Mappings/DienstEintrag.hbm.xml
Normal file
24
Data/Mappings/DienstEintrag.hbm.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="BeWo.Data.Entities.DienstEintrag,BeWo.Data" table="DienstEintrag">
|
||||
<id name="Oid" column="Oid" type="Int64" unsaved-value="null">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
|
||||
<version column="Version" type="Int64" name="Version" />
|
||||
|
||||
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
|
||||
<property column="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" name="IsActive" />
|
||||
<property column="Notice" type="String" name="Notice" length="1024" />
|
||||
<property column="InsTs" type="DateTime" name="InsTs" />
|
||||
<property column="InsUser" type="String" name="InsUser" length="256" />
|
||||
<property column="UdpUser" type="String" name="UdpUser" length="256" />
|
||||
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
|
||||
|
||||
<property column="EmployeeOid" type="Int64" name="EmployeeOid" />
|
||||
<property column="WohnheimOid" type="Int64" name="WohnheimOid" />
|
||||
<property column="DienstOid" type="Int64" name="DienstOid" />
|
||||
<property column="Datum" type="DateTime" name="Datum" />
|
||||
<property column="Zeile" type="Int32" name="Zeile" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="BeWo.Data.Entities.Dienst,BeWo.Data" table="Dienst">
|
||||
<class name="BeWo.Data.Entities.DienstInfo,BeWo.Data" table="DienstInfo">
|
||||
<id name="Oid" column="Oid" type="Int64" unsaved-value="null">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
@@ -18,6 +18,7 @@ using DevExpress.XtraPrinting;
|
||||
using DevExpress.XtraReports.UI;
|
||||
|
||||
using Page = System.Web.UI.Page;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Host
|
||||
{
|
||||
@@ -135,6 +136,12 @@ namespace Host
|
||||
case ReportTypes.SBDCharacteristics:
|
||||
report = CreateSBDCharacteristicsReport();
|
||||
break;
|
||||
case ReportTypes.AbsenceReport:
|
||||
report = CreateAbsenceReport();
|
||||
break;
|
||||
case ReportTypes.RosterReport:
|
||||
report = CreateRosterReport();
|
||||
break;
|
||||
default:
|
||||
report = CreateQueryReport();
|
||||
break;
|
||||
@@ -153,8 +160,8 @@ namespace Host
|
||||
Response.Write("Session ist abgelaufen! Bitte erstellen Sie den Bericht erneut. Nach Erstellen des Berichts haben Sie 10 Min. Zeit diesen auszudrucken.");
|
||||
return new XtraReport();
|
||||
}
|
||||
|
||||
private XtraReport CreateTestReportKalender()
|
||||
|
||||
private XtraReport CreateTestReportKalender()
|
||||
{
|
||||
var abc = Request.Params["r"].Split('-');
|
||||
var rightsList = abc.Select(r => (UserRightType)Int32.Parse(r)).ToList();
|
||||
@@ -536,6 +543,29 @@ namespace Host
|
||||
return reportCreator.CreateSBDCharacteristicsReport(customerOid);
|
||||
}
|
||||
|
||||
private XtraReport CreateAbsenceReport()
|
||||
{
|
||||
DateTime dt = DateTime.ParseExact(Request.Params["dt"], "MM.yyyy", CultureInfo.InvariantCulture);
|
||||
List<long> absenceIDs = null;
|
||||
List<long> empIDs = null;
|
||||
|
||||
if (Request.Params["ar"] != null)
|
||||
absenceIDs = Request.Params["ar"].Split(';').Select(long.Parse).ToList();
|
||||
|
||||
if (Request.Params["et"] != null)
|
||||
absenceIDs = Request.Params["et"].Split(';').Select(long.Parse).ToList();
|
||||
|
||||
return reportCreator.CreateAbsenceReport(dt, absenceIDs, empIDs);
|
||||
}
|
||||
|
||||
private XtraReport CreateRosterReport()
|
||||
{
|
||||
DateTime dt = DateTime.ParseExact(Request.Params["dt"], "MM.yyyy", CultureInfo.InvariantCulture);
|
||||
long wOid = int.Parse(Request.Params["wid"]);
|
||||
|
||||
return reportCreator.CreateRosterReport(wOid, dt);
|
||||
}
|
||||
|
||||
private AbstractReportCreator GetReportCreator()
|
||||
{
|
||||
String t = slicedToken["tenant"].ToString();
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `bewodemo`.`dienst`
|
||||
RENAME TO `bewodemo`.`dienstinfo` ;
|
||||
18
Model/Changes_2020_02_26 Diensteinträge hinzugefügt.txt
Normal file
18
Model/Changes_2020_02_26 Diensteinträge hinzugefügt.txt
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE `diensteintrag` (
|
||||
`Oid` bigint(19) NOT NULL AUTO_INCREMENT,
|
||||
`Tid` int(10) DEFAULT NULL,
|
||||
`IsActive` tinyint(4) DEFAULT NULL,
|
||||
`Notice` varchar(1024) DEFAULT NULL,
|
||||
`InsTs` datetime DEFAULT NULL,
|
||||
`InsUser` varchar(256) DEFAULT NULL,
|
||||
`Version` bigint(19) DEFAULT NULL,
|
||||
`UdpUser` varchar(256) DEFAULT NULL,
|
||||
`SystemEntryID` int(10) DEFAULT NULL,
|
||||
|
||||
`EmployeeOid` bigint(19) DEFAULT NULL,
|
||||
`WohnheimOid` bigint(19) DEFAULT NULL,
|
||||
`DienstOid` bigint(19) DEFAULT NULL,
|
||||
`Zeile` int(10) DEFAULT NULL,
|
||||
`Datum` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`Oid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
@@ -74,5 +74,7 @@ namespace BeWo.Report
|
||||
|
||||
public abstract XtraReport CreateCustomReport(long employeeOid, String reportName);
|
||||
|
||||
public abstract XtraReport CreateAbsenceReport(DateTime dt, List<long> abs, List<long> empTypes);
|
||||
public abstract XtraReport CreateRosterReport(long wOid, DateTime dt);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
974
Report/DefaultReports/AbsenceReport.Designer.cs
generated
Normal file
974
Report/DefaultReports/AbsenceReport.Designer.cs
generated
Normal file
@@ -0,0 +1,974 @@
|
||||
using BeWo.Report.ReportObjects;
|
||||
namespace BeWo.Report.DefaultReports
|
||||
{
|
||||
partial class AbsenceReport
|
||||
{
|
||||
/// <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.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.lblCustomerName = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
|
||||
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.xrTable2 = new DevExpress.XtraReports.UI.XRTable();
|
||||
this.xrTableRow2 = new DevExpress.XtraReports.UI.XRTableRow();
|
||||
this.xrTableCell18 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell19 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell36 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell20 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell21 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell22 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell23 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell24 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell25 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell26 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell27 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell28 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell29 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell30 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell31 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell32 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell33 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell34 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell54 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell53 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell52 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell51 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell55 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell57 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell56 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell60 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell59 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell61 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell58 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.cellDetail29 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.cellDetail30 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.cellDetail31 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.ruleNotApprovedAndExpiringNext4Months = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.ruleNotApprovedAndExpiringNext8Months = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand();
|
||||
this.xrTable1 = new DevExpress.XtraReports.UI.XRTable();
|
||||
this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow();
|
||||
this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell35 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell12 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell13 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell14 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell15 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell16 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell17 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell37 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell38 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell39 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell40 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell41 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell42 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell43 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell44 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell45 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell46 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.xrTableCell47 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.cellHeader29 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.cellHeader30 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.cellHeader31 = new DevExpress.XtraReports.UI.XRTableCell();
|
||||
this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand();
|
||||
this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo();
|
||||
this.approvedText = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
|
||||
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
// Detail
|
||||
//
|
||||
this.Detail.HeightF = 0F;
|
||||
this.Detail.Name = "Detail";
|
||||
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
|
||||
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
|
||||
//
|
||||
// ReportHeader
|
||||
//
|
||||
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.lblCustomerName,
|
||||
this.xrLabel1});
|
||||
this.ReportHeader.HeightF = 75F;
|
||||
this.ReportHeader.Name = "ReportHeader";
|
||||
//
|
||||
// lblCustomerName
|
||||
//
|
||||
this.lblCustomerName.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ReportDateTime", "{0:MMMM yyyy}")});
|
||||
this.lblCustomerName.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblCustomerName.LocationFloat = new DevExpress.Utils.PointFloat(0F, 32.99999F);
|
||||
this.lblCustomerName.Multiline = true;
|
||||
this.lblCustomerName.Name = "lblCustomerName";
|
||||
this.lblCustomerName.SizeF = new System.Drawing.SizeF(1007F, 25F);
|
||||
this.lblCustomerName.StylePriority.UseFont = false;
|
||||
this.lblCustomerName.Text = "lblCustomerName";
|
||||
//
|
||||
// xrLabel1
|
||||
//
|
||||
this.xrLabel1.Font = new System.Drawing.Font("Arial", 14F);
|
||||
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 8F);
|
||||
this.xrLabel1.Multiline = true;
|
||||
this.xrLabel1.Name = "xrLabel1";
|
||||
this.xrLabel1.SizeF = new System.Drawing.SizeF(1007F, 25F);
|
||||
this.xrLabel1.StylePriority.UseFont = false;
|
||||
this.xrLabel1.Text = "Abwesenheiten";
|
||||
//
|
||||
// DetailReport
|
||||
//
|
||||
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
this.Detail1});
|
||||
this.DetailReport.DataMember = "AbsenceReportRows";
|
||||
this.DetailReport.DataSource = this.bindingSource1;
|
||||
this.DetailReport.Level = 0;
|
||||
this.DetailReport.Name = "DetailReport";
|
||||
//
|
||||
// Detail1
|
||||
//
|
||||
this.Detail1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrTable2});
|
||||
this.Detail1.HeightF = 20F;
|
||||
this.Detail1.Name = "Detail1";
|
||||
//
|
||||
// xrTable2
|
||||
//
|
||||
this.xrTable2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.xrTable2.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTable2.Font = new System.Drawing.Font("Arial", 7F);
|
||||
this.xrTable2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.xrTable2.Name = "xrTable2";
|
||||
this.xrTable2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 2, 0, 100F);
|
||||
this.xrTable2.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
|
||||
this.xrTableRow2});
|
||||
this.xrTable2.SizeF = new System.Drawing.SizeF(1109F, 20F);
|
||||
this.xrTable2.StylePriority.UseBackColor = false;
|
||||
this.xrTable2.StylePriority.UseBorders = false;
|
||||
this.xrTable2.StylePriority.UseFont = false;
|
||||
this.xrTable2.StylePriority.UsePadding = false;
|
||||
this.xrTable2.StylePriority.UseTextAlignment = false;
|
||||
this.xrTable2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
//
|
||||
// xrTableRow2
|
||||
//
|
||||
this.xrTableRow2.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
|
||||
this.xrTableCell18,
|
||||
this.xrTableCell19,
|
||||
this.xrTableCell36,
|
||||
this.xrTableCell20,
|
||||
this.xrTableCell21,
|
||||
this.xrTableCell22,
|
||||
this.xrTableCell23,
|
||||
this.xrTableCell24,
|
||||
this.xrTableCell25,
|
||||
this.xrTableCell26,
|
||||
this.xrTableCell27,
|
||||
this.xrTableCell28,
|
||||
this.xrTableCell29,
|
||||
this.xrTableCell30,
|
||||
this.xrTableCell31,
|
||||
this.xrTableCell32,
|
||||
this.xrTableCell33,
|
||||
this.xrTableCell34,
|
||||
this.xrTableCell54,
|
||||
this.xrTableCell53,
|
||||
this.xrTableCell52,
|
||||
this.xrTableCell51,
|
||||
this.xrTableCell55,
|
||||
this.xrTableCell57,
|
||||
this.xrTableCell56,
|
||||
this.xrTableCell60,
|
||||
this.xrTableCell59,
|
||||
this.xrTableCell61,
|
||||
this.xrTableCell58,
|
||||
this.cellDetail29,
|
||||
this.cellDetail30,
|
||||
this.cellDetail31});
|
||||
this.xrTableRow2.FormattingRules.Add(this.ruleNotApprovedAndExpiringNext4Months);
|
||||
this.xrTableRow2.FormattingRules.Add(this.ruleNotApprovedAndExpiringNext8Months);
|
||||
this.xrTableRow2.Name = "xrTableRow2";
|
||||
this.xrTableRow2.Weight = 1D;
|
||||
//
|
||||
// xrTableCell18
|
||||
//
|
||||
this.xrTableCell18.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Employee")});
|
||||
this.xrTableCell18.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Bold);
|
||||
this.xrTableCell18.Name = "xrTableCell18";
|
||||
this.xrTableCell18.StylePriority.UseBorders = false;
|
||||
this.xrTableCell18.StylePriority.UseFont = false;
|
||||
this.xrTableCell18.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell18.Text = "Name";
|
||||
this.xrTableCell18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
|
||||
this.xrTableCell18.Weight = 0.48422002649988632D;
|
||||
this.xrTableCell18.WordWrap = false;
|
||||
//
|
||||
// xrTableCell19
|
||||
//
|
||||
this.xrTableCell19.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day1")});
|
||||
this.xrTableCell19.Name = "xrTableCell19";
|
||||
this.xrTableCell19.Text = "Vorname";
|
||||
this.xrTableCell19.Weight = 0.081154197199447164D;
|
||||
this.xrTableCell19.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell36
|
||||
//
|
||||
this.xrTableCell36.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day2")});
|
||||
this.xrTableCell36.Name = "xrTableCell36";
|
||||
this.xrTableCell36.Text = "xrTableCell36";
|
||||
this.xrTableCell36.Weight = 0.0811541507626455D;
|
||||
this.xrTableCell36.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell20
|
||||
//
|
||||
this.xrTableCell20.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day3", "{0:dd/MM/yyyy}")});
|
||||
this.xrTableCell20.Name = "xrTableCell20";
|
||||
this.xrTableCell20.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell20.Text = "xrTableCell20";
|
||||
this.xrTableCell20.Weight = 0.08115424538675646D;
|
||||
this.xrTableCell20.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell21
|
||||
//
|
||||
this.xrTableCell21.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day4", "{0:dd/MM/yyyy}")});
|
||||
this.xrTableCell21.Name = "xrTableCell21";
|
||||
this.xrTableCell21.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell21.Text = "xrTableCell21";
|
||||
this.xrTableCell21.Weight = 0.081154025839928062D;
|
||||
this.xrTableCell21.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell22
|
||||
//
|
||||
this.xrTableCell22.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day5", "{0:0.00}")});
|
||||
this.xrTableCell22.Name = "xrTableCell22";
|
||||
this.xrTableCell22.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell22.Text = "xrTableCell22";
|
||||
this.xrTableCell22.Weight = 0.081154273564122192D;
|
||||
this.xrTableCell22.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell23
|
||||
//
|
||||
this.xrTableCell23.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day6", "{0:0.00}")});
|
||||
this.xrTableCell23.Name = "xrTableCell23";
|
||||
this.xrTableCell23.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell23.Text = "xrTableCell23";
|
||||
this.xrTableCell23.Weight = 0.081154193859620971D;
|
||||
this.xrTableCell23.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell24
|
||||
//
|
||||
this.xrTableCell24.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day7", "{0:0.00}")});
|
||||
this.xrTableCell24.Name = "xrTableCell24";
|
||||
this.xrTableCell24.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell24.Text = "xrTableCell24";
|
||||
this.xrTableCell24.Weight = 0.081154190922765934D;
|
||||
this.xrTableCell24.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell25
|
||||
//
|
||||
this.xrTableCell25.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day8", "{0:0.00}")});
|
||||
this.xrTableCell25.Name = "xrTableCell25";
|
||||
this.xrTableCell25.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell25.Text = "xrTableCell25";
|
||||
this.xrTableCell25.Weight = 0.081154187824722945D;
|
||||
this.xrTableCell25.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell26
|
||||
//
|
||||
this.xrTableCell26.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day9", "{0:0.00}")});
|
||||
this.xrTableCell26.Name = "xrTableCell26";
|
||||
this.xrTableCell26.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell26.Text = "xrTableCell26";
|
||||
this.xrTableCell26.Weight = 0.081154197276817663D;
|
||||
this.xrTableCell26.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell27
|
||||
//
|
||||
this.xrTableCell27.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day10")});
|
||||
this.xrTableCell27.Name = "xrTableCell27";
|
||||
this.xrTableCell27.StylePriority.UseFont = false;
|
||||
this.xrTableCell27.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell27.Text = "xrTableCell27";
|
||||
this.xrTableCell27.Weight = 0.08115419286831127D;
|
||||
this.xrTableCell27.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell28
|
||||
//
|
||||
this.xrTableCell28.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day11", "{0:0.00}")});
|
||||
this.xrTableCell28.Name = "xrTableCell28";
|
||||
this.xrTableCell28.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell28.Text = "xrTableCell28";
|
||||
this.xrTableCell28.Weight = 0.0811541902506101D;
|
||||
this.xrTableCell28.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell29
|
||||
//
|
||||
this.xrTableCell29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day12", "{0:0.00}")});
|
||||
this.xrTableCell29.Name = "xrTableCell29";
|
||||
this.xrTableCell29.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell29.Text = "xrTableCell29";
|
||||
this.xrTableCell29.Weight = 0.081154190068467136D;
|
||||
this.xrTableCell29.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell30
|
||||
//
|
||||
this.xrTableCell30.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day13", "{0:0.00}")});
|
||||
this.xrTableCell30.Name = "xrTableCell30";
|
||||
this.xrTableCell30.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell30.Text = "xrTableCell30";
|
||||
this.xrTableCell30.Weight = 0.081154197479915147D;
|
||||
this.xrTableCell30.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell31
|
||||
//
|
||||
this.xrTableCell31.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day14", "{0:0.00}")});
|
||||
this.xrTableCell31.Name = "xrTableCell31";
|
||||
this.xrTableCell31.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell31.Text = "xrTableCell31";
|
||||
this.xrTableCell31.Weight = 0.081154188405001215D;
|
||||
this.xrTableCell31.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell32
|
||||
//
|
||||
this.xrTableCell32.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day15", "{0:c}")});
|
||||
this.xrTableCell32.Name = "xrTableCell32";
|
||||
this.xrTableCell32.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell32.Text = "xrTableCell32";
|
||||
this.xrTableCell32.Weight = 0.081154187218654084D;
|
||||
this.xrTableCell32.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell33
|
||||
//
|
||||
this.xrTableCell33.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day16")});
|
||||
this.xrTableCell33.Name = "xrTableCell33";
|
||||
this.xrTableCell33.Weight = 0.081154184816944808D;
|
||||
this.xrTableCell33.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell34
|
||||
//
|
||||
this.xrTableCell34.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day17", "{0:0.00}")});
|
||||
this.xrTableCell34.Name = "xrTableCell34";
|
||||
this.xrTableCell34.StylePriority.UseBorders = false;
|
||||
this.xrTableCell34.StylePriority.UseTextAlignment = false;
|
||||
this.xrTableCell34.Text = "xrTableCell34";
|
||||
this.xrTableCell34.Weight = 0.081154193135481556D;
|
||||
this.xrTableCell34.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell54
|
||||
//
|
||||
this.xrTableCell54.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day18")});
|
||||
this.xrTableCell54.Name = "xrTableCell54";
|
||||
this.xrTableCell54.Text = "xrTableCell54";
|
||||
this.xrTableCell54.Weight = 0.08115419313548157D;
|
||||
this.xrTableCell54.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell53
|
||||
//
|
||||
this.xrTableCell53.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day19")});
|
||||
this.xrTableCell53.Name = "xrTableCell53";
|
||||
this.xrTableCell53.Text = "xrTableCell53";
|
||||
this.xrTableCell53.Weight = 0.08115419330432655D;
|
||||
this.xrTableCell53.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell52
|
||||
//
|
||||
this.xrTableCell52.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day20")});
|
||||
this.xrTableCell52.Name = "xrTableCell52";
|
||||
this.xrTableCell52.Text = "xrTableCell52";
|
||||
this.xrTableCell52.Weight = 0.081154193642016481D;
|
||||
this.xrTableCell52.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell51
|
||||
//
|
||||
this.xrTableCell51.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day21")});
|
||||
this.xrTableCell51.Name = "xrTableCell51";
|
||||
this.xrTableCell51.Text = "xrTableCell51";
|
||||
this.xrTableCell51.Weight = 0.081154193642016426D;
|
||||
this.xrTableCell51.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell55
|
||||
//
|
||||
this.xrTableCell55.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day22")});
|
||||
this.xrTableCell55.Name = "xrTableCell55";
|
||||
this.xrTableCell55.Text = "[Day22]";
|
||||
this.xrTableCell55.Weight = 0.081154193135481556D;
|
||||
this.xrTableCell55.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell57
|
||||
//
|
||||
this.xrTableCell57.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day23")});
|
||||
this.xrTableCell57.Name = "xrTableCell57";
|
||||
this.xrTableCell57.Text = "xrTableCell57";
|
||||
this.xrTableCell57.Weight = 0.081154193135481556D;
|
||||
this.xrTableCell57.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell56
|
||||
//
|
||||
this.xrTableCell56.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day24")});
|
||||
this.xrTableCell56.Name = "xrTableCell56";
|
||||
this.xrTableCell56.Text = "[Day24]";
|
||||
this.xrTableCell56.Weight = 0.081154203328137109D;
|
||||
this.xrTableCell56.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell60
|
||||
//
|
||||
this.xrTableCell60.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day25")});
|
||||
this.xrTableCell60.Name = "xrTableCell60";
|
||||
this.xrTableCell60.Text = "xrTableCell60";
|
||||
this.xrTableCell60.Weight = 0.081154203328137109D;
|
||||
this.xrTableCell60.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell59
|
||||
//
|
||||
this.xrTableCell59.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day26")});
|
||||
this.xrTableCell59.Name = "xrTableCell59";
|
||||
this.xrTableCell59.Text = "xrTableCell59";
|
||||
this.xrTableCell59.Weight = 0.081154203328137109D;
|
||||
this.xrTableCell59.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell61
|
||||
//
|
||||
this.xrTableCell61.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day27")});
|
||||
this.xrTableCell61.Name = "xrTableCell61";
|
||||
this.xrTableCell61.Text = "xrTableCell61";
|
||||
this.xrTableCell61.Weight = 0.081154203328137109D;
|
||||
this.xrTableCell61.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// xrTableCell58
|
||||
//
|
||||
this.xrTableCell58.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day28")});
|
||||
this.xrTableCell58.Name = "xrTableCell58";
|
||||
this.xrTableCell58.Text = "xrTableCell58";
|
||||
this.xrTableCell58.Weight = 0.081154203328137109D;
|
||||
this.xrTableCell58.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// cellDetail29
|
||||
//
|
||||
this.cellDetail29.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day29")});
|
||||
this.cellDetail29.Name = "cellDetail29";
|
||||
this.cellDetail29.Text = "cellDetail29";
|
||||
this.cellDetail29.Weight = 0.081154203328137109D;
|
||||
this.cellDetail29.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// cellDetail30
|
||||
//
|
||||
this.cellDetail30.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day30")});
|
||||
this.cellDetail30.Name = "cellDetail30";
|
||||
this.cellDetail30.Text = "cellDetail30";
|
||||
this.cellDetail30.Weight = 0.081154203328137109D;
|
||||
this.cellDetail30.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// cellDetail31
|
||||
//
|
||||
this.cellDetail31.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.cellDetail31.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "AbsenceReportRows.Day31")});
|
||||
this.cellDetail31.Name = "cellDetail31";
|
||||
this.cellDetail31.StylePriority.UseBorders = false;
|
||||
this.cellDetail31.Text = "cellDetail31";
|
||||
this.cellDetail31.Weight = 0.081154203328137109D;
|
||||
this.cellDetail31.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
//
|
||||
// ruleNotApprovedAndExpiringNext4Months
|
||||
//
|
||||
this.ruleNotApprovedAndExpiringNext4Months.Condition = "[IsApproved] == False And [OpenMonths] < 4";
|
||||
this.ruleNotApprovedAndExpiringNext4Months.DataMember = "SupportConceptDetailList";
|
||||
this.ruleNotApprovedAndExpiringNext4Months.Formatting.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
|
||||
this.ruleNotApprovedAndExpiringNext4Months.Name = "ruleNotApprovedAndExpiringNext4Months";
|
||||
//
|
||||
// ruleNotApprovedAndExpiringNext8Months
|
||||
//
|
||||
this.ruleNotApprovedAndExpiringNext8Months.Condition = "[IsApproved] == False And [OpenMonths] < 8 And [OpenMonths] >= 4";
|
||||
this.ruleNotApprovedAndExpiringNext8Months.DataMember = "SupportConceptDetailList";
|
||||
this.ruleNotApprovedAndExpiringNext8Months.Formatting.BackColor = System.Drawing.Color.LightBlue;
|
||||
this.ruleNotApprovedAndExpiringNext8Months.Name = "ruleNotApprovedAndExpiringNext8Months";
|
||||
//
|
||||
// PageHeader
|
||||
//
|
||||
this.PageHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrTable1});
|
||||
this.PageHeader.HeightF = 20F;
|
||||
this.PageHeader.Name = "PageHeader";
|
||||
this.PageHeader.StylePriority.UseBorderColor = false;
|
||||
this.PageHeader.StylePriority.UseTextAlignment = false;
|
||||
this.PageHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
//
|
||||
// xrTable1
|
||||
//
|
||||
this.xrTable1.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
this.xrTable1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTable1.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Bold);
|
||||
this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
this.xrTable1.Name = "xrTable1";
|
||||
this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] {
|
||||
this.xrTableRow1});
|
||||
this.xrTable1.SizeF = new System.Drawing.SizeF(1109F, 20F);
|
||||
this.xrTable1.StylePriority.UseBackColor = false;
|
||||
this.xrTable1.StylePriority.UseBorders = false;
|
||||
this.xrTable1.StylePriority.UseFont = false;
|
||||
this.xrTable1.StylePriority.UseTextAlignment = false;
|
||||
this.xrTable1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
//
|
||||
// xrTableRow1
|
||||
//
|
||||
this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] {
|
||||
this.xrTableCell1,
|
||||
this.xrTableCell2,
|
||||
this.xrTableCell35,
|
||||
this.xrTableCell3,
|
||||
this.xrTableCell4,
|
||||
this.xrTableCell5,
|
||||
this.xrTableCell6,
|
||||
this.xrTableCell7,
|
||||
this.xrTableCell8,
|
||||
this.xrTableCell9,
|
||||
this.xrTableCell10,
|
||||
this.xrTableCell11,
|
||||
this.xrTableCell12,
|
||||
this.xrTableCell13,
|
||||
this.xrTableCell14,
|
||||
this.xrTableCell15,
|
||||
this.xrTableCell16,
|
||||
this.xrTableCell17,
|
||||
this.xrTableCell37,
|
||||
this.xrTableCell38,
|
||||
this.xrTableCell39,
|
||||
this.xrTableCell40,
|
||||
this.xrTableCell41,
|
||||
this.xrTableCell42,
|
||||
this.xrTableCell43,
|
||||
this.xrTableCell44,
|
||||
this.xrTableCell45,
|
||||
this.xrTableCell46,
|
||||
this.xrTableCell47,
|
||||
this.cellHeader29,
|
||||
this.cellHeader30,
|
||||
this.cellHeader31});
|
||||
this.xrTableRow1.Name = "xrTableRow1";
|
||||
this.xrTableRow1.Weight = 0.47619047619047616D;
|
||||
//
|
||||
// xrTableCell1
|
||||
//
|
||||
this.xrTableCell1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.xrTableCell1.Name = "xrTableCell1";
|
||||
this.xrTableCell1.StylePriority.UseBorders = false;
|
||||
this.xrTableCell1.Text = "Mitarbeiter";
|
||||
this.xrTableCell1.Weight = 0.48422002649988627D;
|
||||
//
|
||||
// xrTableCell2
|
||||
//
|
||||
this.xrTableCell2.Name = "xrTableCell2";
|
||||
this.xrTableCell2.Text = "1.";
|
||||
this.xrTableCell2.Weight = 0.081154192039802536D;
|
||||
//
|
||||
// xrTableCell35
|
||||
//
|
||||
this.xrTableCell35.Name = "xrTableCell35";
|
||||
this.xrTableCell35.Text = "2.";
|
||||
this.xrTableCell35.Weight = 0.0811541971994471D;
|
||||
//
|
||||
// xrTableCell3
|
||||
//
|
||||
this.xrTableCell3.Name = "xrTableCell3";
|
||||
this.xrTableCell3.Text = "3.";
|
||||
this.xrTableCell3.Weight = 0.081154111235996029D;
|
||||
//
|
||||
// xrTableCell4
|
||||
//
|
||||
this.xrTableCell4.Name = "xrTableCell4";
|
||||
this.xrTableCell4.Text = "4.";
|
||||
this.xrTableCell4.Weight = 0.081154190948556346D;
|
||||
//
|
||||
// xrTableCell5
|
||||
//
|
||||
this.xrTableCell5.Name = "xrTableCell5";
|
||||
this.xrTableCell5.Text = "5.";
|
||||
this.xrTableCell5.Weight = 0.081154193589630455D;
|
||||
//
|
||||
// xrTableCell6
|
||||
//
|
||||
this.xrTableCell6.Name = "xrTableCell6";
|
||||
this.xrTableCell6.Text = "6.";
|
||||
this.xrTableCell6.Weight = 0.081154191279798588D;
|
||||
//
|
||||
// xrTableCell7
|
||||
//
|
||||
this.xrTableCell7.Name = "xrTableCell7";
|
||||
this.xrTableCell7.Text = "7.";
|
||||
this.xrTableCell7.Weight = 0.081154190922765962D;
|
||||
//
|
||||
// xrTableCell8
|
||||
//
|
||||
this.xrTableCell8.Name = "xrTableCell8";
|
||||
this.xrTableCell8.Text = "8.";
|
||||
this.xrTableCell8.Weight = 0.0811541878247228D;
|
||||
//
|
||||
// xrTableCell9
|
||||
//
|
||||
this.xrTableCell9.Name = "xrTableCell9";
|
||||
this.xrTableCell9.Text = "9.";
|
||||
this.xrTableCell9.Weight = 0.081154197276817663D;
|
||||
//
|
||||
// xrTableCell10
|
||||
//
|
||||
this.xrTableCell10.Name = "xrTableCell10";
|
||||
this.xrTableCell10.Text = "10.";
|
||||
this.xrTableCell10.Weight = 0.081154192868311492D;
|
||||
//
|
||||
// xrTableCell11
|
||||
//
|
||||
this.xrTableCell11.Name = "xrTableCell11";
|
||||
this.xrTableCell11.Text = "11.";
|
||||
this.xrTableCell11.Weight = 0.081154190250609992D;
|
||||
//
|
||||
// xrTableCell12
|
||||
//
|
||||
this.xrTableCell12.Name = "xrTableCell12";
|
||||
this.xrTableCell12.Text = "12.";
|
||||
this.xrTableCell12.Weight = 0.081154190068467136D;
|
||||
//
|
||||
// xrTableCell13
|
||||
//
|
||||
this.xrTableCell13.Name = "xrTableCell13";
|
||||
this.xrTableCell13.Text = "13.";
|
||||
this.xrTableCell13.Weight = 0.081154197479915258D;
|
||||
//
|
||||
// xrTableCell14
|
||||
//
|
||||
this.xrTableCell14.Name = "xrTableCell14";
|
||||
this.xrTableCell14.Text = "14.";
|
||||
this.xrTableCell14.Weight = 0.081154188405001215D;
|
||||
//
|
||||
// xrTableCell15
|
||||
//
|
||||
this.xrTableCell15.Name = "xrTableCell15";
|
||||
this.xrTableCell15.Text = "15.";
|
||||
this.xrTableCell15.Weight = 0.081154197537943062D;
|
||||
//
|
||||
// xrTableCell16
|
||||
//
|
||||
this.xrTableCell16.Name = "xrTableCell16";
|
||||
this.xrTableCell16.Text = "16.";
|
||||
this.xrTableCell16.Weight = 0.081154184816944808D;
|
||||
//
|
||||
// xrTableCell17
|
||||
//
|
||||
this.xrTableCell17.Name = "xrTableCell17";
|
||||
this.xrTableCell17.StylePriority.UseBorders = false;
|
||||
this.xrTableCell17.Text = "17.";
|
||||
this.xrTableCell17.Weight = 0.081154194317396344D;
|
||||
//
|
||||
// xrTableCell37
|
||||
//
|
||||
this.xrTableCell37.Name = "xrTableCell37";
|
||||
this.xrTableCell37.Text = "18.";
|
||||
this.xrTableCell37.Weight = 0.081154193642016537D;
|
||||
//
|
||||
// xrTableCell38
|
||||
//
|
||||
this.xrTableCell38.Name = "xrTableCell38";
|
||||
this.xrTableCell38.Text = "19.";
|
||||
this.xrTableCell38.Weight = 0.0811541933043266D;
|
||||
//
|
||||
// xrTableCell39
|
||||
//
|
||||
this.xrTableCell39.Name = "xrTableCell39";
|
||||
this.xrTableCell39.Text = "20.";
|
||||
this.xrTableCell39.Weight = 0.081154193135481612D;
|
||||
//
|
||||
// xrTableCell40
|
||||
//
|
||||
this.xrTableCell40.Name = "xrTableCell40";
|
||||
this.xrTableCell40.Text = "21.";
|
||||
this.xrTableCell40.Weight = 0.081154193051059031D;
|
||||
//
|
||||
// xrTableCell41
|
||||
//
|
||||
this.xrTableCell41.Name = "xrTableCell41";
|
||||
this.xrTableCell41.Text = "22.";
|
||||
this.xrTableCell41.Weight = 0.081154193008847852D;
|
||||
//
|
||||
// xrTableCell42
|
||||
//
|
||||
this.xrTableCell42.Name = "xrTableCell42";
|
||||
this.xrTableCell42.Text = "23.";
|
||||
this.xrTableCell42.Weight = 0.081154192987742235D;
|
||||
//
|
||||
// xrTableCell43
|
||||
//
|
||||
this.xrTableCell43.Name = "xrTableCell43";
|
||||
this.xrTableCell43.Text = "24.";
|
||||
this.xrTableCell43.Weight = 0.081154192977189316D;
|
||||
//
|
||||
// xrTableCell44
|
||||
//
|
||||
this.xrTableCell44.Name = "xrTableCell44";
|
||||
this.xrTableCell44.Text = "25,";
|
||||
this.xrTableCell44.Weight = 0.081154192971912981D;
|
||||
//
|
||||
// xrTableCell45
|
||||
//
|
||||
this.xrTableCell45.Name = "xrTableCell45";
|
||||
this.xrTableCell45.Text = "26.";
|
||||
this.xrTableCell45.Weight = 0.081154192969274785D;
|
||||
//
|
||||
// xrTableCell46
|
||||
//
|
||||
this.xrTableCell46.Name = "xrTableCell46";
|
||||
this.xrTableCell46.Text = "27.";
|
||||
this.xrTableCell46.Weight = 0.0811541929679557D;
|
||||
//
|
||||
// xrTableCell47
|
||||
//
|
||||
this.xrTableCell47.Name = "xrTableCell47";
|
||||
this.xrTableCell47.Text = "28.";
|
||||
this.xrTableCell47.Weight = 0.081154192967296118D;
|
||||
//
|
||||
// cellHeader29
|
||||
//
|
||||
this.cellHeader29.Name = "cellHeader29";
|
||||
this.cellHeader29.Text = "29.";
|
||||
this.cellHeader29.Weight = 0.081154192966966354D;
|
||||
//
|
||||
// cellHeader30
|
||||
//
|
||||
this.cellHeader30.Name = "cellHeader30";
|
||||
this.cellHeader30.Text = "30.";
|
||||
this.cellHeader30.Weight = 0.081154234243958553D;
|
||||
//
|
||||
// cellHeader31
|
||||
//
|
||||
this.cellHeader31.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top)
|
||||
| DevExpress.XtraPrinting.BorderSide.Right)
|
||||
| DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
this.cellHeader31.Name = "cellHeader31";
|
||||
this.cellHeader31.StylePriority.UseBorders = false;
|
||||
this.cellHeader31.Text = "31.";
|
||||
this.cellHeader31.Weight = 0.081154234243958553D;
|
||||
//
|
||||
// PageFooter
|
||||
//
|
||||
this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrPageInfo2});
|
||||
this.PageFooter.HeightF = 35.00001F;
|
||||
this.PageFooter.Name = "PageFooter";
|
||||
//
|
||||
// xrPageInfo2
|
||||
//
|
||||
this.xrPageInfo2.Font = new System.Drawing.Font("Arial", 8F);
|
||||
this.xrPageInfo2.Format = "Seite {0} von {1}";
|
||||
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(602.0002F, 17.00001F);
|
||||
this.xrPageInfo2.Name = "xrPageInfo2";
|
||||
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(497F, 18F);
|
||||
this.xrPageInfo2.StylePriority.UseFont = false;
|
||||
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
//
|
||||
// approvedText
|
||||
//
|
||||
this.approvedText.DataMember = "SupportConceptDetailList";
|
||||
this.approvedText.Expression = "Iif([IsApproved], \'bewilligt\' , \'nicht bewilligt\')";
|
||||
this.approvedText.Name = "approvedText";
|
||||
//
|
||||
// topMarginBand1
|
||||
//
|
||||
this.topMarginBand1.HeightF = 50F;
|
||||
this.topMarginBand1.Name = "topMarginBand1";
|
||||
//
|
||||
// bottomMarginBand1
|
||||
//
|
||||
this.bottomMarginBand1.HeightF = 20F;
|
||||
this.bottomMarginBand1.Name = "bottomMarginBand1";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.AbsenceRO);
|
||||
//
|
||||
// AbsenceReport
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
this.Detail,
|
||||
this.ReportHeader,
|
||||
this.DetailReport,
|
||||
this.PageHeader,
|
||||
this.PageFooter,
|
||||
this.topMarginBand1,
|
||||
this.bottomMarginBand1});
|
||||
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
|
||||
this.approvedText});
|
||||
this.DataSource = this.bindingSource1;
|
||||
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
|
||||
this.ruleNotApprovedAndExpiringNext8Months,
|
||||
this.ruleNotApprovedAndExpiringNext4Months});
|
||||
this.Landscape = true;
|
||||
this.Margins = new System.Drawing.Printing.Margins(30, 30, 50, 20);
|
||||
this.PageHeight = 827;
|
||||
this.PageWidth = 1169;
|
||||
this.PaperKind = System.Drawing.Printing.PaperKind.A4;
|
||||
this.Version = "17.1";
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable2)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit();
|
||||
((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.ReportHeaderBand ReportHeader;
|
||||
private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
|
||||
private DevExpress.XtraReports.UI.DetailBand Detail1;
|
||||
private DevExpress.XtraReports.UI.PageHeaderBand PageHeader;
|
||||
private DevExpress.XtraReports.UI.PageFooterBand PageFooter;
|
||||
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
|
||||
private DevExpress.XtraReports.UI.XRTable xrTable1;
|
||||
private DevExpress.XtraReports.UI.XRTableRow xrTableRow1;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell1;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell2;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell3;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell4;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell5;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell6;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell7;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell8;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell9;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell10;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell11;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell12;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell13;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell14;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell15;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell16;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell17;
|
||||
private DevExpress.XtraReports.UI.XRTable xrTable2;
|
||||
private DevExpress.XtraReports.UI.XRTableRow xrTableRow2;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell18;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell19;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell20;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell21;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell22;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell23;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell24;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell25;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell26;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell27;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell28;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell29;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell30;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell31;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell32;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell33;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell34;
|
||||
private DevExpress.XtraReports.UI.CalculatedField approvedText;
|
||||
private DevExpress.XtraReports.UI.FormattingRule ruleNotApprovedAndExpiringNext8Months;
|
||||
private DevExpress.XtraReports.UI.FormattingRule ruleNotApprovedAndExpiringNext4Months;
|
||||
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
|
||||
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell36;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell35;
|
||||
private DevExpress.XtraReports.UI.XRLabel lblCustomerName;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell37;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell38;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell39;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell40;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell41;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell42;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell43;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell44;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell45;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell46;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell47;
|
||||
private DevExpress.XtraReports.UI.XRTableCell cellHeader29;
|
||||
private DevExpress.XtraReports.UI.XRTableCell cellHeader30;
|
||||
private DevExpress.XtraReports.UI.XRTableCell cellHeader31;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell54;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell53;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell52;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell51;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell55;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell57;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell56;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell60;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell59;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell61;
|
||||
private DevExpress.XtraReports.UI.XRTableCell xrTableCell58;
|
||||
private DevExpress.XtraReports.UI.XRTableCell cellDetail29;
|
||||
private DevExpress.XtraReports.UI.XRTableCell cellDetail30;
|
||||
private DevExpress.XtraReports.UI.XRTableCell cellDetail31;
|
||||
}
|
||||
}
|
||||
45
Report/DefaultReports/AbsenceReport.cs
Normal file
45
Report/DefaultReports/AbsenceReport.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using BeWo.Report.ReportObjects;
|
||||
|
||||
namespace BeWo.Report.DefaultReports
|
||||
{
|
||||
public partial class AbsenceReport : XtraReport, IBeWoReport<AbsenceRO>
|
||||
{
|
||||
public AbsenceReport()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(AbsenceRO pRO)
|
||||
{
|
||||
int i = DateTime.DaysInMonth(pRO.ReportDateTime.Year, pRO.ReportDateTime.Month);
|
||||
|
||||
cellHeader29.Visible = cellDetail29.Visible = i >= 29;
|
||||
cellHeader30.Visible = cellDetail30.Visible = i >= 30;
|
||||
cellHeader31.Visible = cellDetail31.Visible = i >= 31;
|
||||
|
||||
bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private void Cell_EvaluateBinding(object sender, BindingEventArgs e)
|
||||
{
|
||||
var cell = sender as XRTableCell;
|
||||
|
||||
var sv = e.Value as CellValue;
|
||||
if (sv != null && !string.IsNullOrEmpty(sv.Color))
|
||||
{
|
||||
int argb = Int32.Parse(sv.Color.Replace("#", ""), NumberStyles.HexNumber);
|
||||
Color clr = Color.FromArgb(argb);
|
||||
|
||||
cell.BackColor = clr;
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.BackColor = Color.Transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
123
Report/DefaultReports/AbsenceReport.resx
Normal file
123
Report/DefaultReports/AbsenceReport.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>
|
||||
207
Report/DefaultReports/RosterReport.Designer.cs
generated
Normal file
207
Report/DefaultReports/RosterReport.Designer.cs
generated
Normal file
@@ -0,0 +1,207 @@
|
||||
using BeWo.Report.ReportObjects;
|
||||
namespace BeWo.Report.DefaultReports
|
||||
{
|
||||
partial class RosterReport
|
||||
{
|
||||
/// <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.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
|
||||
this.lblCustomerName = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
|
||||
this.DetailReport = new DevExpress.XtraReports.UI.DetailReportBand();
|
||||
this.Detail1 = new DevExpress.XtraReports.UI.DetailBand();
|
||||
this.ruleNotApprovedAndExpiringNext4Months = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.ruleNotApprovedAndExpiringNext8Months = new DevExpress.XtraReports.UI.FormattingRule();
|
||||
this.PageHeader = new DevExpress.XtraReports.UI.PageHeaderBand();
|
||||
this.PageFooter = new DevExpress.XtraReports.UI.PageFooterBand();
|
||||
this.xrPageInfo2 = new DevExpress.XtraReports.UI.XRPageInfo();
|
||||
this.approvedText = new DevExpress.XtraReports.UI.CalculatedField();
|
||||
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
|
||||
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
|
||||
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
|
||||
//
|
||||
// Detail
|
||||
//
|
||||
this.Detail.HeightF = 0F;
|
||||
this.Detail.Name = "Detail";
|
||||
this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
|
||||
this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
|
||||
//
|
||||
// ReportHeader
|
||||
//
|
||||
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.lblCustomerName,
|
||||
this.xrLabel1});
|
||||
this.ReportHeader.HeightF = 75F;
|
||||
this.ReportHeader.Name = "ReportHeader";
|
||||
//
|
||||
// lblCustomerName
|
||||
//
|
||||
this.lblCustomerName.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] {
|
||||
new DevExpress.XtraReports.UI.XRBinding("Text", null, "ReportDateTime", "{0:MMMM yyyy}")});
|
||||
this.lblCustomerName.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.lblCustomerName.LocationFloat = new DevExpress.Utils.PointFloat(0F, 32.99999F);
|
||||
this.lblCustomerName.Multiline = true;
|
||||
this.lblCustomerName.Name = "lblCustomerName";
|
||||
this.lblCustomerName.SizeF = new System.Drawing.SizeF(1007F, 25F);
|
||||
this.lblCustomerName.StylePriority.UseFont = false;
|
||||
this.lblCustomerName.Text = "lblCustomerName";
|
||||
//
|
||||
// xrLabel1
|
||||
//
|
||||
this.xrLabel1.Font = new System.Drawing.Font("Arial", 14F);
|
||||
this.xrLabel1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 8F);
|
||||
this.xrLabel1.Multiline = true;
|
||||
this.xrLabel1.Name = "xrLabel1";
|
||||
this.xrLabel1.SizeF = new System.Drawing.SizeF(1007F, 25F);
|
||||
this.xrLabel1.StylePriority.UseFont = false;
|
||||
this.xrLabel1.Text = "Dienstplan";
|
||||
//
|
||||
// DetailReport
|
||||
//
|
||||
this.DetailReport.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
this.Detail1});
|
||||
this.DetailReport.DataMember = "RosterReportRows";
|
||||
this.DetailReport.DataSource = this.bindingSource1;
|
||||
this.DetailReport.Level = 0;
|
||||
this.DetailReport.Name = "DetailReport";
|
||||
//
|
||||
// Detail1
|
||||
//
|
||||
this.Detail1.HeightF = 20.00001F;
|
||||
this.Detail1.Name = "Detail1";
|
||||
this.Detail1.StylePriority.UseBackColor = false;
|
||||
//
|
||||
// ruleNotApprovedAndExpiringNext4Months
|
||||
//
|
||||
this.ruleNotApprovedAndExpiringNext4Months.Condition = "[IsApproved] == False And [OpenMonths] < 4";
|
||||
this.ruleNotApprovedAndExpiringNext4Months.DataMember = "SupportConceptDetailList";
|
||||
this.ruleNotApprovedAndExpiringNext4Months.Formatting.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128)))));
|
||||
this.ruleNotApprovedAndExpiringNext4Months.Name = "ruleNotApprovedAndExpiringNext4Months";
|
||||
//
|
||||
// ruleNotApprovedAndExpiringNext8Months
|
||||
//
|
||||
this.ruleNotApprovedAndExpiringNext8Months.Condition = "[IsApproved] == False And [OpenMonths] < 8 And [OpenMonths] >= 4";
|
||||
this.ruleNotApprovedAndExpiringNext8Months.DataMember = "SupportConceptDetailList";
|
||||
this.ruleNotApprovedAndExpiringNext8Months.Formatting.BackColor = System.Drawing.Color.LightBlue;
|
||||
this.ruleNotApprovedAndExpiringNext8Months.Name = "ruleNotApprovedAndExpiringNext8Months";
|
||||
//
|
||||
// PageHeader
|
||||
//
|
||||
this.PageHeader.HeightF = 20F;
|
||||
this.PageHeader.Name = "PageHeader";
|
||||
this.PageHeader.StylePriority.UseBorderColor = false;
|
||||
this.PageHeader.StylePriority.UseTextAlignment = false;
|
||||
this.PageHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
|
||||
//
|
||||
// PageFooter
|
||||
//
|
||||
this.PageFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
|
||||
this.xrPageInfo2});
|
||||
this.PageFooter.HeightF = 35.00001F;
|
||||
this.PageFooter.Name = "PageFooter";
|
||||
//
|
||||
// xrPageInfo2
|
||||
//
|
||||
this.xrPageInfo2.Font = new System.Drawing.Font("Arial", 8F);
|
||||
this.xrPageInfo2.Format = "Seite {0} von {1}";
|
||||
this.xrPageInfo2.LocationFloat = new DevExpress.Utils.PointFloat(602.0002F, 17.00001F);
|
||||
this.xrPageInfo2.Name = "xrPageInfo2";
|
||||
this.xrPageInfo2.SizeF = new System.Drawing.SizeF(497F, 18F);
|
||||
this.xrPageInfo2.StylePriority.UseFont = false;
|
||||
this.xrPageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight;
|
||||
//
|
||||
// approvedText
|
||||
//
|
||||
this.approvedText.DataMember = "SupportConceptDetailList";
|
||||
this.approvedText.Expression = "Iif([IsApproved], \'bewilligt\' , \'nicht bewilligt\')";
|
||||
this.approvedText.Name = "approvedText";
|
||||
//
|
||||
// topMarginBand1
|
||||
//
|
||||
this.topMarginBand1.HeightF = 50F;
|
||||
this.topMarginBand1.Name = "topMarginBand1";
|
||||
//
|
||||
// bottomMarginBand1
|
||||
//
|
||||
this.bottomMarginBand1.HeightF = 20F;
|
||||
this.bottomMarginBand1.Name = "bottomMarginBand1";
|
||||
//
|
||||
// bindingSource1
|
||||
//
|
||||
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.RosterRO);
|
||||
//
|
||||
// RosterReport
|
||||
//
|
||||
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
|
||||
this.Detail,
|
||||
this.ReportHeader,
|
||||
this.DetailReport,
|
||||
this.PageHeader,
|
||||
this.PageFooter,
|
||||
this.topMarginBand1,
|
||||
this.bottomMarginBand1});
|
||||
this.CalculatedFields.AddRange(new DevExpress.XtraReports.UI.CalculatedField[] {
|
||||
this.approvedText});
|
||||
this.DataSource = this.bindingSource1;
|
||||
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
|
||||
this.ruleNotApprovedAndExpiringNext8Months,
|
||||
this.ruleNotApprovedAndExpiringNext4Months});
|
||||
this.Landscape = true;
|
||||
this.Margins = new System.Drawing.Printing.Margins(30, 30, 50, 20);
|
||||
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.ReportHeaderBand ReportHeader;
|
||||
private DevExpress.XtraReports.UI.DetailReportBand DetailReport;
|
||||
private DevExpress.XtraReports.UI.DetailBand Detail1;
|
||||
private DevExpress.XtraReports.UI.PageHeaderBand PageHeader;
|
||||
private DevExpress.XtraReports.UI.PageFooterBand PageFooter;
|
||||
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo2;
|
||||
private DevExpress.XtraReports.UI.XRLabel xrLabel1;
|
||||
private DevExpress.XtraReports.UI.CalculatedField approvedText;
|
||||
private DevExpress.XtraReports.UI.FormattingRule ruleNotApprovedAndExpiringNext8Months;
|
||||
private DevExpress.XtraReports.UI.FormattingRule ruleNotApprovedAndExpiringNext4Months;
|
||||
private DevExpress.XtraReports.UI.TopMarginBand topMarginBand1;
|
||||
private DevExpress.XtraReports.UI.BottomMarginBand bottomMarginBand1;
|
||||
private DevExpress.XtraReports.UI.XRLabel lblCustomerName;
|
||||
}
|
||||
}
|
||||
193
Report/DefaultReports/RosterReport.cs
Normal file
193
Report/DefaultReports/RosterReport.cs
Normal file
@@ -0,0 +1,193 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Globalization;
|
||||
using DevExpress.XtraReports.UI;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.Extensions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BeWo.Report.DefaultReports
|
||||
{
|
||||
public partial class RosterReport : XtraReport, IBeWoReport<RosterRO>
|
||||
{
|
||||
public XRTable Table1 { get; set; }
|
||||
public XRTable Table2 { get; set; }
|
||||
|
||||
public XRTableRow Row1 { get; set; }
|
||||
public XRTableRow Row2 { get; set; }
|
||||
|
||||
public Tuple<XRTableCell, XRTableCell> Title { get; set; }
|
||||
public Tuple<XRTableCell, XRTableCell>[] Days { get; set; }
|
||||
public Tuple<XRTableCell, XRTableCell>[] Weeks { get; set; }
|
||||
|
||||
|
||||
public RosterReport()
|
||||
{
|
||||
InitializeComponent();
|
||||
InitializeComponent2();
|
||||
}
|
||||
|
||||
public void SetReportDataSource(RosterRO pRO)
|
||||
{
|
||||
int days = DateTime.DaysInMonth(pRO.ReportDateTime.Year, pRO.ReportDateTime.Month);
|
||||
|
||||
Table1.BeginInit();
|
||||
Table2.BeginInit();
|
||||
|
||||
Row1.Cells.Clear();
|
||||
Row2.Cells.Clear();
|
||||
|
||||
Row1.Cells.Add(Title.Item1);
|
||||
Row2.Cells.Add(Title.Item2);
|
||||
|
||||
int w = 0;
|
||||
for (int i = 0; i < days; i++)
|
||||
{
|
||||
var tmp = Days[i];
|
||||
|
||||
Row1.Cells.Add(tmp.Item1);
|
||||
Row2.Cells.Add(tmp.Item2);
|
||||
|
||||
if (pRO.ReportDateTime.AddDays(i).DayOfWeek == DayOfWeek.Sunday)
|
||||
{
|
||||
var week = Weeks[w++];
|
||||
|
||||
Row1.Cells.Add(week.Item1);
|
||||
Row2.Cells.Add(week.Item2);
|
||||
}
|
||||
}
|
||||
|
||||
Table1.EndInit();
|
||||
Table2.EndInit();
|
||||
|
||||
bindingSource1.DataSource = pRO;
|
||||
}
|
||||
|
||||
private void InitializeComponent2()
|
||||
{
|
||||
Table1 = new XRTable();
|
||||
Table2 = new XRTable();
|
||||
Row1 = new XRTableRow();
|
||||
Row2 = new XRTableRow();
|
||||
|
||||
Table1.BeginInit();
|
||||
Table2.BeginInit();
|
||||
|
||||
|
||||
Table1.BackColor = System.Drawing.Color.LightSteelBlue;
|
||||
Table1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
Table1.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Bold);
|
||||
Table1.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
Table1.Name = "xrTable1";
|
||||
Table1.Rows.Add(Row1);
|
||||
Table1.SizeF = new System.Drawing.SizeF(1109F, 20F);
|
||||
Table1.StylePriority.UseBackColor = false;
|
||||
Table1.StylePriority.UseBorders = false;
|
||||
Table1.StylePriority.UseFont = false;
|
||||
Table1.StylePriority.UseTextAlignment = false;
|
||||
Table1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
|
||||
Table2.BackColor = System.Drawing.Color.Transparent;
|
||||
Table2.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom)));
|
||||
Table2.Font = new System.Drawing.Font("Arial", 7F);
|
||||
Table2.LocationFloat = new DevExpress.Utils.PointFloat(0F, 0F);
|
||||
Table2.Name = "xrTable2";
|
||||
Table2.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F);
|
||||
Table2.Rows.Add(Row2);
|
||||
Table2.SizeF = new System.Drawing.SizeF(1109F, 20F);
|
||||
Table2.StylePriority.UseBackColor = false;
|
||||
Table2.StylePriority.UseBorders = false;
|
||||
Table2.StylePriority.UseFont = false;
|
||||
Table2.StylePriority.UsePadding = false;
|
||||
Table2.StylePriority.UseTextAlignment = false;
|
||||
Table2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
|
||||
Table2.CanGrow = false;
|
||||
|
||||
Row1.Name = "xrTableRow1";
|
||||
Row1.Weight = 0.47;
|
||||
|
||||
Row2.Name = "xrTableRow2";
|
||||
Row2.Weight = 0.47;
|
||||
Row2.FormattingRules.Add(ruleNotApprovedAndExpiringNext4Months);
|
||||
Row2.FormattingRules.Add(ruleNotApprovedAndExpiringNext8Months);
|
||||
|
||||
|
||||
|
||||
var empColumn = CreateColumn(0x0D, "Mitarbeiter", 0.5, false);
|
||||
|
||||
empColumn.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, "RosterReportRows.Title")});
|
||||
|
||||
Title = empColumn;
|
||||
|
||||
Days = new Tuple<XRTableCell, XRTableCell>[31];
|
||||
for (int i = 0; i < Days.Length; i++)
|
||||
{
|
||||
var dayColumn = CreateColumn(0x0C, $"{i + 1}.", 0.08, false);
|
||||
|
||||
dayColumn.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, $"RosterReportRows.Day{ i + 1 }") });
|
||||
dayColumn.Item2.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
|
||||
Days[i] = dayColumn;
|
||||
}
|
||||
|
||||
Weeks = new Tuple<XRTableCell, XRTableCell>[6];
|
||||
for (int i = 0; i < Weeks.Length; i++)
|
||||
{
|
||||
var weekColumns = CreateColumn(0x0C, "Wo.", 0.16, false);
|
||||
|
||||
weekColumns.Item2.DataBindings.AddRange(new DevExpress.XtraReports.UI.XRBinding[] { new DevExpress.XtraReports.UI.XRBinding("Text", null, $"RosterReportRows.Week{ i + 1 }", "{0:F2}")});
|
||||
weekColumns.Item2.EvaluateBinding += new DevExpress.XtraReports.UI.BindingEventHandler(this.Cell_EvaluateBinding);
|
||||
|
||||
Weeks[i] = weekColumns;
|
||||
}
|
||||
|
||||
PageHeader.Controls.Add(Table1);
|
||||
|
||||
Detail1.Controls.Add(Table2);
|
||||
Detail1.HeightF = 20;
|
||||
|
||||
|
||||
|
||||
Table1.EndInit();
|
||||
Table2.EndInit();
|
||||
}
|
||||
|
||||
private Tuple<XRTableCell, XRTableCell> CreateColumn(byte border, string text, double weight, bool canGrow)
|
||||
{
|
||||
var res = new Tuple<XRTableCell, XRTableCell>(new XRTableCell(), new XRTableCell());
|
||||
|
||||
res.Item1.Borders = DevExpress.XtraPrinting.BorderSide.All;
|
||||
res.Item1.CanGrow = canGrow;
|
||||
res.Item1.Text = text;
|
||||
res.Item1.Weight = weight;
|
||||
|
||||
res.Item2.Borders = (DevExpress.XtraPrinting.BorderSide)border;
|
||||
res.Item2.CanGrow = canGrow;
|
||||
res.Item2.Weight = weight;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
private void Cell_EvaluateBinding(object sender, BindingEventArgs e)
|
||||
{
|
||||
var cell = sender as XRTableCell;
|
||||
|
||||
var sv = e.Value as DienstInfoDC;
|
||||
if (sv != null && !string.IsNullOrEmpty(sv.Farbe))
|
||||
{
|
||||
int argb = Int32.Parse(sv.Farbe.Replace("#", ""), NumberStyles.HexNumber);
|
||||
var clr = Color.FromArgb(argb);
|
||||
var clr2 = System.Windows.Media.Color.FromRgb(clr.R, clr.G, clr.B);
|
||||
|
||||
cell.BackColor = clr;
|
||||
cell.ForeColor = clr2.IsBrighter(70) ? Color.Black : Color.White;
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.BackColor = Color.Transparent;
|
||||
cell.ForeColor = Color.Black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
123
Report/DefaultReports/RosterReport.resx
Normal file
123
Report/DefaultReports/RosterReport.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>
|
||||
@@ -146,6 +146,12 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DefaultReports\RosterReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\RosterReport.Designer.cs">
|
||||
<DependentUpon>RosterReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\Abwesenheiten.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -158,6 +164,12 @@
|
||||
<Compile Include="DefaultReports\AdditionalServiceBookingReport.Designer.cs">
|
||||
<DependentUpon>AdditionalServiceBookingReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\AbsenceReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\AbsenceReport.Designer.cs">
|
||||
<DependentUpon>AbsenceReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReports\SBDCharacteristicsReport.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -361,7 +373,9 @@
|
||||
<DependentUpon>ServicesOverviewReport.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DefaultReportCreator.cs" />
|
||||
<Compile Include="ReportObjects\RosterRO.cs" />
|
||||
<Compile Include="ReportObjects\AdditionalServiceBookingRO.cs" />
|
||||
<Compile Include="ReportObjects\AbsenceRO.cs" />
|
||||
<Compile Include="ReportObjects\AssessmentSheetRO.cs" />
|
||||
<Compile Include="ReportObjects\AuslastungBerechnung.cs" />
|
||||
<Compile Include="ReportObjects\EmployeeDataRO.cs" />
|
||||
@@ -394,12 +408,20 @@
|
||||
<Compile Include="ReportObjects\SettlementRO.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="DefaultReports\RosterReport.resx">
|
||||
<DependentUpon>RosterReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DefaultReports\Abwesenheiten.resx">
|
||||
<DependentUpon>Abwesenheiten.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DefaultReports\AdditionalServiceBookingReport.resx">
|
||||
<DependentUpon>AdditionalServiceBookingReport.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DefaultReports\AbsenceReport.resx">
|
||||
<DependentUpon>AbsenceReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="DefaultReports\SBDCharacteristicsReport.resx">
|
||||
<DependentUpon>SBDCharacteristicsReport.cs</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
162
Report/ReportObjects/AbsenceRO.cs
Normal file
162
Report/ReportObjects/AbsenceRO.cs
Normal file
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Data.Access;
|
||||
using System.Linq;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
public class AbsenceRO : AbstractBeWoReportObject<AbsenceRO>
|
||||
{
|
||||
public DateTime ReportDateTime { get; set; }
|
||||
public List<AbsenceReportRow> AbsenceReportRows { get; set; }
|
||||
|
||||
public static AbsenceRO Create(DateTime dt, Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> tuple)
|
||||
{
|
||||
var res = new AbsenceRO() { ReportDateTime = dt, AbsenceReportRows = new List<AbsenceReportRow>() };
|
||||
|
||||
var employees = tuple.Item2.OrderBy(x => x.LastNameFirstName);
|
||||
|
||||
foreach (var emp in employees)
|
||||
{
|
||||
var row = new AbsenceReportRow
|
||||
{
|
||||
Employee = emp.LastNameFirstName
|
||||
};
|
||||
|
||||
var absenceTimes = tuple.Item1.Where(x => x.EmployeeOid == emp.EmployeeOid)
|
||||
.OrderByDescending(x => x.End ?? DateTime.MaxValue)
|
||||
.OrderBy(x => x.Start)
|
||||
.ToArray();
|
||||
|
||||
int dayInMonth = 0;
|
||||
int absNum = 0;
|
||||
|
||||
if (absenceTimes != null && absenceTimes.Length > 0)
|
||||
{
|
||||
var abs = absenceTimes[0];
|
||||
|
||||
while (dayInMonth < DateTime.DaysInMonth(dt.Year, dt.Month))
|
||||
{
|
||||
if (abs.Start.Value > dt.AddDays(dayInMonth))
|
||||
{
|
||||
dayInMonth++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((abs.End ?? DateTime.MaxValue) < dt.AddDays(dayInMonth))
|
||||
{
|
||||
absNum++;
|
||||
|
||||
if (absNum >= absenceTimes.Length)
|
||||
break;
|
||||
|
||||
abs = absenceTimes[absNum];
|
||||
continue;
|
||||
}
|
||||
|
||||
row.Days[dayInMonth++] = new CellValue()
|
||||
{
|
||||
Value = abs.Reason.Description[0].ToString(),
|
||||
Color = abs.Reason.Color
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
res.AbsenceReportRows.Add(row);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
public class AbsenceReportRow
|
||||
{
|
||||
public AbsenceReportRow()
|
||||
{
|
||||
Days = new CellValue[31];
|
||||
}
|
||||
|
||||
public string Employee { get; set; }
|
||||
|
||||
public int Position { get; set; }
|
||||
|
||||
public CellValue[] Days { get; private set; }
|
||||
|
||||
public CellValue Day1 => Days[0];
|
||||
|
||||
public CellValue Day2 => Days[1];
|
||||
|
||||
public CellValue Day3 => Days[2];
|
||||
|
||||
public CellValue Day4 => Days[3];
|
||||
|
||||
public CellValue Day5 => Days[4];
|
||||
|
||||
public CellValue Day6 => Days[5];
|
||||
|
||||
public CellValue Day7 => Days[6];
|
||||
|
||||
public CellValue Day8 => Days[7];
|
||||
|
||||
public CellValue Day9 => Days[8];
|
||||
|
||||
public CellValue Day10 => Days[9];
|
||||
|
||||
public CellValue Day11 => Days[10];
|
||||
|
||||
public CellValue Day12 => Days[11];
|
||||
|
||||
public CellValue Day13 => Days[12];
|
||||
|
||||
public CellValue Day14 => Days[13];
|
||||
|
||||
public CellValue Day15 => Days[14];
|
||||
|
||||
public CellValue Day16 => Days[15];
|
||||
|
||||
public CellValue Day17 => Days[16];
|
||||
|
||||
public CellValue Day18 => Days[17];
|
||||
|
||||
public CellValue Day19 => Days[18];
|
||||
|
||||
public CellValue Day20 => Days[19];
|
||||
|
||||
public CellValue Day21 => Days[20];
|
||||
|
||||
public CellValue Day22 => Days[21];
|
||||
|
||||
public CellValue Day23 => Days[22];
|
||||
|
||||
public CellValue Day24 => Days[23];
|
||||
|
||||
public CellValue Day25 => Days[24];
|
||||
|
||||
public CellValue Day26 => Days[25];
|
||||
|
||||
public CellValue Day27 => Days[26];
|
||||
|
||||
public CellValue Day28 => Days[27];
|
||||
|
||||
public CellValue Day29 => Days[28];
|
||||
|
||||
public CellValue Day30 => Days[29];
|
||||
|
||||
public CellValue Day31 => Days[30];
|
||||
}
|
||||
|
||||
public class CellValue
|
||||
{
|
||||
public string Value { get; set; }
|
||||
|
||||
public string Color { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
173
Report/ReportObjects/RosterRO.cs
Normal file
173
Report/ReportObjects/RosterRO.cs
Normal file
@@ -0,0 +1,173 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using BeWo.Data.Entities;
|
||||
using BeWo.Data.Access;
|
||||
using System.Linq;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.Report.ReportObjects
|
||||
{
|
||||
public class RosterRO : AbstractBeWoReportObject<RosterRO>
|
||||
{
|
||||
public DateTime ReportDateTime { get; set; }
|
||||
public string WohnheimName { get; set; }
|
||||
public List<RosterReportRow> RosterReportRows { get; set; }
|
||||
public int FirstWeekDay { get; set; }
|
||||
|
||||
public RosterRO()
|
||||
{
|
||||
RosterReportRows = new List<RosterReportRow>();
|
||||
}
|
||||
|
||||
public static RosterRO Create(List<DienstBlockDC> dienstBlockDCs, List<DienstInfoDC> dienstInfoDCs, BS.Shared.DataContracts.Compact.CompactWohnheimDC compactWohnheimDC, int year, int month)
|
||||
{
|
||||
var dt = new DateTime(year, month, 1);
|
||||
|
||||
// Result
|
||||
var res = new RosterRO()
|
||||
{
|
||||
WohnheimName = compactWohnheimDC.WohnheimName,
|
||||
ReportDateTime = dt,
|
||||
FirstWeekDay = ((int)dt.DayOfWeek - 1) % 7
|
||||
};
|
||||
|
||||
// WD V F Formel
|
||||
// Mo 1 0 (tag - 1) / 7
|
||||
// Di 2 1 (tag + 0) / 7
|
||||
// Mi 3 2 (tag + 1) / 7
|
||||
// Do 4 3 (tag + 2) / 7
|
||||
// Fr 5 4 (tag + 3) / 7
|
||||
// Sa 6 5 (tag + 4) / 7
|
||||
// So 0 6 (tag + 5) / 7
|
||||
//
|
||||
// int week = (day + res.FirstWeekDay - 1) / 7;
|
||||
|
||||
var infoDict = dienstInfoDCs.ToDictionary(x => x.Oid.Value, x => x);
|
||||
|
||||
|
||||
foreach (var block in dienstBlockDCs)
|
||||
{
|
||||
RosterReportRow row = null;
|
||||
double[] sum = new double[6];
|
||||
|
||||
for (int i = 0; i < block.DienstDictArray.Length; i++)
|
||||
{
|
||||
var dict = block.DienstDictArray[i];
|
||||
|
||||
row = new RosterReportRow()
|
||||
{
|
||||
Pos = i,
|
||||
Title = i == 0 ? block.Employee.LastNameFirstName : null,
|
||||
DienstDict = new Dictionary<int, DienstInfoDC>()
|
||||
};
|
||||
|
||||
foreach (var kv in dict)
|
||||
{
|
||||
var dienst = infoDict[kv.Value];
|
||||
var day = kv.Key;
|
||||
|
||||
row.DienstDict.Add(day, dienst);
|
||||
|
||||
int week = (day + res.FirstWeekDay - 1) / 7;
|
||||
|
||||
sum[week] += dienst.DurationHours;
|
||||
}
|
||||
|
||||
res.RosterReportRows.Add(row);
|
||||
}
|
||||
|
||||
row.WeekSum = sum;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
public class RosterReportRow
|
||||
{
|
||||
public string Title { get; set; }
|
||||
|
||||
public int Pos { get; set; }
|
||||
|
||||
public double[] WeekSum { get; set; }
|
||||
|
||||
public Dictionary<int, DienstInfoDC> DienstDict { get; set; }
|
||||
|
||||
public double? Week1 => WeekSum?[0];
|
||||
|
||||
public double? Week2 => WeekSum?[1];
|
||||
|
||||
public double? Week3 => WeekSum?[2];
|
||||
|
||||
public double? Week4 => WeekSum?[3];
|
||||
|
||||
public double? Week5 => WeekSum?[4];
|
||||
|
||||
public double? Week6 => WeekSum?[5];
|
||||
|
||||
public DienstInfoDC Day1 => GetDienst(1);
|
||||
|
||||
public DienstInfoDC Day2 => GetDienst(2);
|
||||
|
||||
public DienstInfoDC Day3 => GetDienst(3);
|
||||
|
||||
public DienstInfoDC Day4 => GetDienst(4);
|
||||
|
||||
public DienstInfoDC Day5 => GetDienst(5);
|
||||
|
||||
public DienstInfoDC Day6 => GetDienst(6);
|
||||
|
||||
public DienstInfoDC Day7 => GetDienst(7);
|
||||
|
||||
public DienstInfoDC Day8 => GetDienst(8);
|
||||
|
||||
public DienstInfoDC Day9 => GetDienst(9);
|
||||
|
||||
public DienstInfoDC Day10 => GetDienst(10);
|
||||
|
||||
public DienstInfoDC Day11 => GetDienst(11);
|
||||
|
||||
public DienstInfoDC Day12 => GetDienst(12);
|
||||
|
||||
public DienstInfoDC Day13 => GetDienst(13);
|
||||
|
||||
public DienstInfoDC Day14 => GetDienst(14);
|
||||
|
||||
public DienstInfoDC Day15 => GetDienst(15);
|
||||
|
||||
public DienstInfoDC Day16 => GetDienst(16);
|
||||
|
||||
public DienstInfoDC Day17 => GetDienst(17);
|
||||
|
||||
public DienstInfoDC Day18 => GetDienst(18);
|
||||
|
||||
public DienstInfoDC Day19 => GetDienst(19);
|
||||
|
||||
public DienstInfoDC Day20 => GetDienst(20);
|
||||
|
||||
public DienstInfoDC Day21 => GetDienst(21);
|
||||
|
||||
public DienstInfoDC Day22 => GetDienst(22);
|
||||
|
||||
public DienstInfoDC Day23 => GetDienst(23);
|
||||
|
||||
public DienstInfoDC Day24 => GetDienst(24);
|
||||
|
||||
public DienstInfoDC Day25 => GetDienst(25);
|
||||
|
||||
public DienstInfoDC Day26 => GetDienst(26);
|
||||
|
||||
public DienstInfoDC Day27 => GetDienst(27);
|
||||
|
||||
public DienstInfoDC Day28 => GetDienst(28);
|
||||
|
||||
public DienstInfoDC Day29 => GetDienst(29);
|
||||
|
||||
public DienstInfoDC Day30 => GetDienst(30);
|
||||
|
||||
public DienstInfoDC Day31 => GetDienst(31);
|
||||
|
||||
public DienstInfoDC GetDienst(int i) => DienstDict.ContainsKey(i) ? DienstDict[i] : null;
|
||||
}
|
||||
}
|
||||
50
Service/DCEntityMapper/DienstEintragDC_DienstEintrag.cs
Normal file
50
Service/DCEntityMapper/DienstEintragDC_DienstEintrag.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Linq;
|
||||
using BeWo.Data.Access;
|
||||
using BeWo.Data.Entities;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using System.Collections.Generic;
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class DienstEintragDC_DienstEintrag : AbstractIDCEntityMapper<DienstEintrag, DienstEintragDC>
|
||||
{
|
||||
public override DienstEintragDC MergeWithDC(DienstEintrag bEntity, DienstEintragDC bDataContract)
|
||||
{
|
||||
bDataContract.Oid = bEntity.Oid;
|
||||
bDataContract.Notice = bEntity.Notice;
|
||||
bDataContract.Version = bEntity.Version;
|
||||
|
||||
bDataContract.Datum = bEntity.Datum;
|
||||
bDataContract.DienstOid = bEntity.DienstOid;
|
||||
bDataContract.EmployeeOid = bEntity.EmployeeOid;
|
||||
bDataContract.WohnheimOid = bEntity.WohnheimOid;
|
||||
bDataContract.Zeile = bEntity.Zeile;
|
||||
|
||||
return bDataContract;
|
||||
}
|
||||
|
||||
public override DienstEintrag MergeWithEntity(DienstEintragDC bDataContract, DienstEintrag bEntity)
|
||||
{
|
||||
this.ConcurrencyCheck(bDataContract.Version, bEntity);
|
||||
|
||||
bEntity.Oid = bDataContract.Oid;
|
||||
bEntity.Notice = bDataContract.Notice;
|
||||
|
||||
bEntity.Datum = bDataContract.Datum;
|
||||
bEntity.DienstOid = bDataContract.DienstOid;
|
||||
bEntity.EmployeeOid = bDataContract.EmployeeOid;
|
||||
bEntity.WohnheimOid = bDataContract.WohnheimOid;
|
||||
bEntity.Zeile = bDataContract.Zeile;
|
||||
|
||||
return bEntity;
|
||||
}
|
||||
|
||||
protected override bool AreDCAndEntityEqual(DienstEintragDC bDC, DienstEintrag bEntity)
|
||||
{
|
||||
return bDC.Oid != null && bDC.Oid == bEntity.Oid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,13 @@ using BS.Shared.Core;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class DienstDC_Dienst : AbstractIDCEntityMapper<Dienst, DienstDC>
|
||||
public class DienstInfoDC_DienstInfo : AbstractIDCEntityMapper<DienstInfo, DienstInfoDC>
|
||||
{
|
||||
public override DienstDC MergeWithDC(Dienst bEntity, DienstDC bDataContract)
|
||||
public override DienstInfoDC MergeWithDC(DienstInfo bEntity, DienstInfoDC bDataContract)
|
||||
{
|
||||
bDataContract.DienstOid = bEntity.Oid;
|
||||
bDataContract.DienstNotice = bEntity.Notice;
|
||||
bDataContract.DienstVersion = bEntity.Version;
|
||||
bDataContract.Oid = bEntity.Oid;
|
||||
bDataContract.Notice = bEntity.Notice;
|
||||
bDataContract.Version = bEntity.Version;
|
||||
bDataContract.DienstName = bEntity.DienstName;
|
||||
bDataContract.Kurz = bEntity.Kurz;
|
||||
bDataContract.Farbe = bEntity.Farbe;
|
||||
@@ -26,12 +26,12 @@ namespace BeWo.Service.DCEntityMapper
|
||||
return bDataContract;
|
||||
}
|
||||
|
||||
public override Dienst MergeWithEntity(DienstDC bDataContract, Dienst bEntity)
|
||||
public override DienstInfo MergeWithEntity(DienstInfoDC bDataContract, DienstInfo bEntity)
|
||||
{
|
||||
this.ConcurrencyCheck(bDataContract.DienstVersion, bEntity);
|
||||
this.ConcurrencyCheck(bDataContract.Version, bEntity);
|
||||
|
||||
bEntity.Oid = bDataContract.DienstOid;
|
||||
bEntity.Notice = bDataContract.DienstNotice;
|
||||
bEntity.Oid = bDataContract.Oid;
|
||||
bEntity.Notice = bDataContract.Notice;
|
||||
bEntity.DienstName = bDataContract.DienstName;
|
||||
bEntity.Kurz = bDataContract.Kurz;
|
||||
bEntity.Farbe = bDataContract.Farbe;
|
||||
@@ -42,9 +42,9 @@ namespace BeWo.Service.DCEntityMapper
|
||||
return bEntity;
|
||||
}
|
||||
|
||||
protected override bool AreDCAndEntityEqual(DienstDC bDC, Dienst bEntity)
|
||||
protected override bool AreDCAndEntityEqual(DienstInfoDC bDC, DienstInfo bEntity)
|
||||
{
|
||||
return bDC.DienstOid != null && bDC.DienstOid == bEntity.Oid;
|
||||
return bDC.Oid != null && bDC.Oid == bEntity.Oid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
private static BudgetDC_Budget _BudgetDC_Budget;
|
||||
|
||||
private static DienstDC_Dienst _DienstDC_Dienst;
|
||||
private static DienstInfoDC_DienstInfo _DienstInfoDC_DienstInfo;
|
||||
|
||||
private static FlexibleReportLayoutDC_FlexibleReportLayout _FlexibleReportLayoutDC_FlexibleReportLayout;
|
||||
|
||||
@@ -262,6 +262,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
private static ReportTemplateDC_ReportTemplate _ReportTemplateDC_ReportTemplate;
|
||||
|
||||
private static DienstEintragDC_DienstEintrag _DienstEintragDC_DienstEintrag;
|
||||
|
||||
|
||||
public static MedRecordDC_MedRecord MedRecordDC_MedRecord =>
|
||||
_MedRecordDC_MedRecord ?? (_MedRecordDC_MedRecord = new MedRecordDC_MedRecord());
|
||||
@@ -647,8 +649,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
public static BudgetDC_Budget BudgetDC_Budget =>
|
||||
_BudgetDC_Budget ?? (_BudgetDC_Budget = new BudgetDC_Budget());
|
||||
|
||||
public static DienstDC_Dienst DienstDC_Dienst =>
|
||||
_DienstDC_Dienst ?? (_DienstDC_Dienst = new DienstDC_Dienst());
|
||||
public static DienstInfoDC_DienstInfo DienstInfoDC_DienstInfo =>
|
||||
_DienstInfoDC_DienstInfo ?? (_DienstInfoDC_DienstInfo = new DienstInfoDC_DienstInfo());
|
||||
|
||||
public static FlexibleReportLayoutDC_FlexibleReportLayout FlexibleReportLayoutDC_FlexibleReportLayout =>
|
||||
_FlexibleReportLayoutDC_FlexibleReportLayout ?? (_FlexibleReportLayoutDC_FlexibleReportLayout = new FlexibleReportLayoutDC_FlexibleReportLayout());
|
||||
@@ -658,5 +660,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
public static ReportTemplateDC_ReportTemplate ReportTemplateDC_ReportTemplate =>
|
||||
_ReportTemplateDC_ReportTemplate ?? (_ReportTemplateDC_ReportTemplate = new ReportTemplateDC_ReportTemplate());
|
||||
|
||||
public static DienstEintragDC_DienstEintrag DienstEintragDC_DienstEintrag =>
|
||||
_DienstEintragDC_DienstEintrag ?? (_DienstEintragDC_DienstEintrag = new DienstEintragDC_DienstEintrag());
|
||||
}
|
||||
}
|
||||
@@ -39,7 +39,7 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
var vs = PluginLoader.FindClass<VacationService>();
|
||||
|
||||
var list = vs.GetFeiertage(year, "NEW");
|
||||
var list = vs.GetFeiertage(year, "NRW");
|
||||
foreach (var f in list)
|
||||
{
|
||||
f.FeiertagOid = 0;
|
||||
|
||||
@@ -151,6 +151,13 @@ namespace BeWo.Service.Plugins
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
//public virtual UrlaubskontoDC BerechneUrlaubskonto(Employee emp, DateTime datum)
|
||||
//{
|
||||
|
||||
// //Verträge prüfen...
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -163,7 +163,8 @@
|
||||
<Compile Include="Core\ServiceLogic.cs" />
|
||||
<Compile Include="Core\SettingsLogic.cs" />
|
||||
<Compile Include="Core\Utils.cs" />
|
||||
<Compile Include="DCEntityMapper\DienstDC_Dienst.cs" />
|
||||
<Compile Include="DCEntityMapper\DienstEintragDC_DienstEintrag.cs" />
|
||||
<Compile Include="DCEntityMapper\DienstInfoDC_DienstInfo.cs" />
|
||||
<Compile Include="DCEntityMapper\ReportTemplateDC_ReportTemplate.cs" />
|
||||
<Compile Include="DCEntityMapper\HomeViewPanelDC_HomeViewPanel.cs" />
|
||||
<Compile Include="DCEntityMapper\FlexibleReportLayoutDC_FlexibleReportLayout.cs" />
|
||||
|
||||
@@ -847,10 +847,26 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
IList<ReportTemplateDC> GetReportTemplates(string url);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee11();
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
IList<AbsenceTimeDC> GetAbsenceTimeDCsFilter(DateTime start, DateTime end);
|
||||
Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee21(List<AbsenceReasonDC> absenceReasons, List<EmploymentTypeDC> employmentTypes);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee31(DateTime start, DateTime end);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee41(DateTime start, DateTime end, List<AbsenceReasonDC> absenceReasons, List<EmploymentTypeDC> employmentTypes);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee51(DateTime start, DateTime end, List<long> absenceReasonIDs, List<long> employmentTypeIDs);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
@@ -870,11 +886,11 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<DienstDC> GetAllDienste();
|
||||
List<DienstInfoDC> GetAllDienste();
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void InsertNewDienst(List<DienstDC> dienst);
|
||||
void InsertNewDienst(List<DienstInfoDC> dienst);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
@@ -882,6 +898,26 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void UpdateDienst(List<DienstDC> dienste);
|
||||
void UpdateDienst(List<DienstInfoDC> dienste);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<DienstBlockDC> GetDienstEintraege(long wOid, int year, int month);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void InsertNewDienstEintrag(DienstEintragDC dienstEintrag);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void UpdateDienstEintrag(DienstEintragDC dienstEintrag);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void DeleteDienstEintrag(long empId, long wohnId, int Zeile, DateTime date);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
List<AbsenceTimeDC> GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month);
|
||||
}
|
||||
}
|
||||
@@ -5881,16 +5881,119 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public IList<AbsenceTimeDC> GetAbsenceTimeDCsFilter(DateTime start, DateTime end)
|
||||
public Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee11()
|
||||
{
|
||||
var list = DAOFactory.GenericDAO.GetAllActive<AbsenceTime>().Where(x => x.Start.HasValue).Where(y => y.Start >= start && (!y.End.HasValue || y.End.Value <= end)).Where(z => z.EmployeeOid.HasValue);
|
||||
return MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(list);
|
||||
try
|
||||
{
|
||||
return GetAbsenceTimeDCEmployee41(DateTime.MinValue, DateTime.MaxValue, null, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee21(List<AbsenceReasonDC> absenceReasons, List<EmploymentTypeDC> employmentTypes)
|
||||
{
|
||||
try
|
||||
{
|
||||
return GetAbsenceTimeDCEmployee41(DateTime.MinValue, DateTime.MaxValue, absenceReasons, employmentTypes);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee31(DateTime start, DateTime end)
|
||||
{
|
||||
try
|
||||
{
|
||||
return GetAbsenceTimeDCEmployee41(start, end, null, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee41(DateTime start, DateTime end, List<AbsenceReasonDC> absenceReasons, List<EmploymentTypeDC> employmentTypes)
|
||||
{
|
||||
try
|
||||
{
|
||||
var absenceReasonIDs = (absenceReasons == null || !absenceReasons.Any()) ? null : absenceReasons.Select(x => x.AbsenceReasonOid.Value).ToList();
|
||||
var employmentTypeIDs = (employmentTypes == null || !employmentTypes.Any()) ? null : employmentTypes.Select(x => x.EmploymentTypeOid.Value).ToList();
|
||||
|
||||
return GetAbsenceTimeDCEmployee51(start, end, absenceReasonIDs, employmentTypeIDs);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>> GetAbsenceTimeDCEmployee51(DateTime start, DateTime end, List<long> absenceReasonIDs, List<long> employmentTypeIDs)
|
||||
{
|
||||
try
|
||||
{
|
||||
Func<AbsenceTime, bool> endHasValueMatch = (x) => x.End.HasValue;
|
||||
|
||||
Func<AbsenceTime, bool> leftMatch;
|
||||
Func<AbsenceTime, bool> rightMatch;
|
||||
Func<AbsenceTime, bool> absenceReasonMatch;
|
||||
Func<Employee, bool> employmentTypeMatch;
|
||||
|
||||
if (start != DateTime.MinValue) leftMatch = (x) => start <= x.End;
|
||||
else leftMatch = (x) => true;
|
||||
|
||||
if (end != DateTime.MaxValue) rightMatch = (x) => end >= x.Start;
|
||||
else rightMatch = (x) => true;
|
||||
|
||||
if (absenceReasonIDs != null) absenceReasonMatch = (x) => absenceReasonIDs.Contains(x.AbsenceReason.Oid.Value);
|
||||
else absenceReasonMatch = (x) => true;
|
||||
|
||||
if (employmentTypeIDs != null) employmentTypeMatch = (x) => employmentTypeIDs.Contains(x.Oid.Value);
|
||||
else employmentTypeMatch = (x) => true;
|
||||
|
||||
Func<AbsenceTime, bool> absenceMatch = (x) => rightMatch(x) && (!endHasValueMatch(x) || leftMatch(x)) && absenceReasonMatch(x);
|
||||
//startMatch(x) && (!endHasValueMatch(x) || endMatch(x)) && absenceReasonMatch(x);
|
||||
|
||||
var res1 = new List<AbsenceTime>();
|
||||
var res2 = new HashSet<Employee>();
|
||||
|
||||
var allAbsences = DAOFactory.GenericDAO.GetAllActive<AbsenceTime>().Where(x => x.EmployeeOid.HasValue);
|
||||
var allEmployees = DAOFactory.GenericDAO.GetAllActive<Employee>().ToList();
|
||||
|
||||
foreach (var absence in allAbsences.Where(absenceMatch)) //allAbsences.Where(absenceMatch))
|
||||
{
|
||||
var employee = allEmployees.Find(x => x.Oid == absence.EmployeeOid.Value);
|
||||
|
||||
if (!employmentTypeMatch(employee))
|
||||
continue;
|
||||
|
||||
res1.Add(absence);
|
||||
res2.Add(employee);
|
||||
}
|
||||
|
||||
return new Tuple<IList<AbsenceTimeDC>, IList<EmployeeDC>>(MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(res1), MapperFactory.EmployeeDC_Employee.MapToNewDCs(res2.ToList()));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public IList<AbsenceReasonDC> GetAllAbsenceReason()
|
||||
{
|
||||
var list = DAOFactory.GenericDAO.GetAllActive<AbsenceReason>();
|
||||
return MapperFactory.AbsenceReasonDC_AbsenceReason.MapToNewDCs(list);
|
||||
try
|
||||
{
|
||||
var list = DAOFactory.GenericDAO.GetAllActive<AbsenceReason>();
|
||||
return MapperFactory.AbsenceReasonDC_AbsenceReason.MapToNewDCs(list);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public AbsenceTimeDC UpdateAbsenceTimeWithReturn(AbsenceTimeDC abs)
|
||||
@@ -5952,17 +6055,24 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public List<DienstDC> GetAllDienste()
|
||||
{
|
||||
var temp = DAOFactory.GenericDAO.GetAllActive<Dienst>();
|
||||
return MapperFactory.DienstDC_Dienst.MapToNewDCs(temp);
|
||||
}
|
||||
|
||||
public void InsertNewDienst(List<DienstDC> dienst)
|
||||
public List<DienstInfoDC> GetAllDienste()
|
||||
{
|
||||
try
|
||||
{
|
||||
var temp = MapperFactory.DienstDC_Dienst.MapToNewEntities(dienst);
|
||||
var temp = DAOFactory.GenericDAO.GetAllActive<DienstInfo>();
|
||||
return MapperFactory.DienstInfoDC_DienstInfo.MapToNewDCs(temp);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertNewDienst(List<DienstInfoDC> dienst)
|
||||
{
|
||||
try
|
||||
{
|
||||
var temp = MapperFactory.DienstInfoDC_DienstInfo.MapToNewEntities(dienst);
|
||||
DAOFactory.GenericDAO.Insert(temp);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -5975,7 +6085,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
try
|
||||
{
|
||||
ServiceLogic.SetActivationType<Dienst>(pOid2Version, ActivationTypeId.Deleted);
|
||||
ServiceLogic.SetActivationType<DienstInfo>(pOid2Version, ActivationTypeId.Deleted);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -5983,13 +6093,13 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateDienst(List<DienstDC> dienste)
|
||||
public void UpdateDienst(List<DienstInfoDC> dienste)
|
||||
{
|
||||
try
|
||||
{
|
||||
var temp = DAOFactory.GenericDAO.LoadByIDs<Dienst>(dienste.Select(sc => sc.DienstOid.Value));
|
||||
var temp = DAOFactory.GenericDAO.LoadByIDs<DienstInfo>(dienste.Select(sc => sc.Oid.Value));
|
||||
|
||||
MapperFactory.DienstDC_Dienst.MergeWithEntitys(dienste, temp);
|
||||
MapperFactory.DienstInfoDC_DienstInfo.MergeWithEntitys(dienste, temp);
|
||||
|
||||
DAOFactory.GenericDAO.Update(temp);
|
||||
}
|
||||
@@ -5998,5 +6108,150 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<DienstBlockDC> GetDienstEintraege(long wOid, int year, int month)
|
||||
{
|
||||
try
|
||||
{
|
||||
var res = new List<DienstBlockDC>();
|
||||
var date = new DateTime(year, month, 1);
|
||||
var date2 = date.AddMonths(1).AddTicks(-1);
|
||||
|
||||
var dienstEintraege = DAOFactory.GenericDAO.GetAllActive<DienstEintrag>().Where(x =>
|
||||
x.WohnheimOid == wOid &&
|
||||
x.Datum.Month == month &&
|
||||
x.Datum.Year == year);
|
||||
|
||||
var dienstEintraegeDC = MapperFactory.DienstEintragDC_DienstEintrag.MapToNewDCs(dienstEintraege);
|
||||
|
||||
var wh = DAOFactory.GenericDAO.GetByID<Wohnheim>(wOid);
|
||||
var whDC = MapperFactory.CompactWohnheimDC_Wohnheim.MapToNewDC(wh);
|
||||
|
||||
//var empOids = new HashSet<long>(dienstEintraege.Select(x => x.EmployeeOid)).ToList();
|
||||
//var emps = DAOFactory.GenericDAO.GetActiveByIDs<Employee>(wh);
|
||||
//var empsDC = MapperFactory.EmployeeDC_Employee.MapToNewDCs(emps);
|
||||
|
||||
var emps = wh.Employee2WohnheimList.Select(x => x.Employee);
|
||||
var empsDC = MapperFactory.EmployeeDC_Employee.MapToNewDCs(emps).Distinct();
|
||||
|
||||
foreach (var emp in empsDC)
|
||||
{
|
||||
var contracts = emp.Contracts.Where(x => (!x.EntryDate.HasValue || x.EntryDate.Value <= date2) &&
|
||||
(!x.ContractEndDate.HasValue || x.ContractEndDate.Value >= date))
|
||||
.OrderBy(x => x.EntryDate)
|
||||
.ToList();
|
||||
|
||||
if (!contracts.Any())
|
||||
continue;
|
||||
|
||||
var zeile = new DienstBlockDC
|
||||
{
|
||||
Employee = emp,
|
||||
Contracts = contracts,
|
||||
Wohnheim = whDC,
|
||||
DienstDictArray = new Dictionary<int, long>[3]
|
||||
};
|
||||
|
||||
for (int i = 0; i < zeile.DienstDictArray.Length; i++)
|
||||
{
|
||||
var empDienste = dienstEintraegeDC
|
||||
.Where(x => x.EmployeeOid == emp.EmployeeOid && x.Zeile == i);
|
||||
|
||||
zeile.DienstDictArray[i] = empDienste
|
||||
.ToDictionary(x => x.Datum.Day, x => x.DienstOid);
|
||||
}
|
||||
|
||||
res.Add(zeile);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void InsertNewDienstEintrag(DienstEintragDC dienstEintrag)
|
||||
{
|
||||
try
|
||||
{
|
||||
DAOFactory.GenericDAO.Insert(MapperFactory.DienstEintragDC_DienstEintrag.MapToNewEntity(dienstEintrag));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateDienstEintrag(DienstEintragDC dienstEintrag)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void DeleteDienstEintrag(long empId, long wohnId, int zeile, DateTime date)
|
||||
{
|
||||
try
|
||||
{
|
||||
var toDel = DAOFactory.GenericDAO.GetAll<DienstEintrag>()
|
||||
.FirstOrDefault(x =>
|
||||
x.EmployeeOid == empId &&
|
||||
x.WohnheimOid == wohnId &&
|
||||
x.Zeile == zeile &&
|
||||
x.Datum == date);
|
||||
|
||||
if (toDel != null)
|
||||
DAOFactory.GenericDAO.Delete(toDel);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual List<FeiertagDC> ErstelleDefaultFeiertage(int year)
|
||||
{
|
||||
try
|
||||
{
|
||||
var vs = PluginLoader.FindClass<VacationService>();
|
||||
|
||||
var list = vs.GetFeiertage(year, "NRW");
|
||||
|
||||
return list;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public List<AbsenceTimeDC> GetAbsenceTimeVacationByWohnheim(long wohnId, int year, int month)
|
||||
{
|
||||
try
|
||||
{
|
||||
var date = new DateTime(year, month, 1);
|
||||
var date2 = date.AddMonths(1).AddTicks(-1);
|
||||
var wh = DAOFactory.GenericDAO.GetByID<Wohnheim>(wohnId);
|
||||
var emps = wh.Employee2WohnheimList.Select(x => x.Employee.Oid);
|
||||
|
||||
var allAbsences = DAOFactory.GenericDAO.GetAllActive<AbsenceTime>().Where(x =>
|
||||
x.EmployeeOid.HasValue);
|
||||
|
||||
var res = allAbsences.Where(x => emps.Contains(x.EmployeeOid.Value) && x.Start <= date2 && (!x.End.HasValue || x.End.Value >= date));
|
||||
|
||||
return MapperFactory.AbsenceTimeDC_AbsenceTime.MapToNewDCs(res);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,7 +147,8 @@ namespace BS.Shared
|
||||
ReportTemplate = 140,
|
||||
Arbeitszeit = 141,
|
||||
ArbeitszeitEintrag = 142,
|
||||
Dienst = 143
|
||||
DienstInfo = 143,
|
||||
DienstEintrag = 144
|
||||
}
|
||||
|
||||
public enum SystemEntryID
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract, Serializable]
|
||||
[DebuggerDisplay("{Start} - {End}")]
|
||||
[DataContract, Serializable]
|
||||
public partial class AbsenceTimeDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
|
||||
25
Shared/DataContracts/DienstBlockDC.cs
Normal file
25
Shared/DataContracts/DienstBlockDC.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
public class DienstBlockDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public CompactWohnheimDC Wohnheim { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public EmployeeDC Employee { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public List<ContractDC> Contracts { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public Dictionary<int, long>[] DienstDictArray { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -7,48 +7,42 @@ using BS.Shared.Core;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
public class DienstDC : IDataContract
|
||||
public class DienstEintragDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public long? DienstOid { get; set; }
|
||||
public long? Oid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string DienstNotice { get; set; }
|
||||
public string Notice { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? DienstVersion { get; set; }
|
||||
public long? Version { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string DienstName { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Kurz { get; set; }
|
||||
public long EmployeeOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long WohnheimOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Farbe { get; set; }
|
||||
public long DienstOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime Start { get; set; }
|
||||
public int Zeile { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime Ende { get; set; }
|
||||
public DateTime Datum { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int Pause { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "[" + DienstOid + "]:" + DienstName;
|
||||
return $"ID:{Oid}|E:{EmployeeOid}|W:{WohnheimOid}|D:{DienstOid}";
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is DienstDC d)
|
||||
{
|
||||
return DienstOid == d.DienstOid;
|
||||
}
|
||||
|
||||
return false;
|
||||
return obj is DienstEintragDC d && DienstOid == d.Oid;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
66
Shared/DataContracts/DienstInfoDC.cs
Normal file
66
Shared/DataContracts/DienstInfoDC.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
using BS.Shared.Core;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
public class DienstInfoDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public long? Oid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Notice { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? Version { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string DienstName { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Kurz { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Farbe { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime Start { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public DateTime Ende { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public int Pause { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.IsNullOrEmpty(Kurz) ? "-" : Kurz;
|
||||
//return $"ID:{Oid}|N:{DienstName}|K:{Kurz}";
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is DienstInfoDC d && Oid == d.Oid;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return GetType().Name.GetHashCode() ^ Oid.GetHashCode();
|
||||
}
|
||||
|
||||
public static DienstInfoDC Platzhalter => new DienstInfoDC
|
||||
{
|
||||
Farbe = "#FFFFFFFF",
|
||||
Oid = -1,
|
||||
Notice = "!?"
|
||||
};
|
||||
|
||||
public bool IsPlatzhalter => Oid == -1;
|
||||
|
||||
public double DurationHours => Start < Ende ? (Ende - Start).TotalHours : (Ende.AddDays(1) - Start).TotalHours;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
[DebuggerDisplay("Oid = {EmployeeOid}, Name = {LastNameFirstName}")]
|
||||
[DataContract]
|
||||
public class EmployeeDC : PersonDC, IDataContract
|
||||
{
|
||||
private List<ValueListEntryDC> _Focuses;
|
||||
@@ -127,6 +129,9 @@ namespace BS.Shared.DataContracts
|
||||
[DataMember]
|
||||
public virtual String Schutzstufe { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public UrlaubskontoDC Urlaubskonto { get; set; }
|
||||
|
||||
public SolidColorBrush GetBrush()
|
||||
{
|
||||
return new SolidColorBrush((Color) ColorConverter.ConvertFromString(EmployeeColor));
|
||||
@@ -136,5 +141,5 @@ namespace BS.Shared.DataContracts
|
||||
{
|
||||
get => LastName + ", " + FirstName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,8 @@
|
||||
Employee,
|
||||
Contract,
|
||||
NotizenKategorie,
|
||||
SBDCharacteristics
|
||||
SBDCharacteristics,
|
||||
AbsenceReport,
|
||||
RosterReport
|
||||
}
|
||||
}
|
||||
@@ -11,32 +11,72 @@ namespace BS.Shared.Extensions
|
||||
return (int)Math.Sqrt(c.R * c.R * .241 + c.G * c.G * .691 + c.B * c.B * .068);
|
||||
}
|
||||
|
||||
public static Color FromHexString(this Color c, string wert)
|
||||
{
|
||||
byte a = 255;
|
||||
byte r = 0;
|
||||
byte g = 0;
|
||||
byte b = 0;
|
||||
|
||||
if (wert.Contains("#"))
|
||||
wert = wert.Remove(0,1);
|
||||
public static double GetBrightness(this Color c) => .2989 * c.R + .5870 * c.G + .1140 * c.B;
|
||||
|
||||
var regex = new Regex(@"^#?[A-Fa-f0-9]{6,8}");
|
||||
var gueltig = regex.IsMatch(wert);
|
||||
public static Color FromHexString(this Color c, string wert)
|
||||
{
|
||||
byte a = 255;
|
||||
byte r = 0;
|
||||
byte g = 0;
|
||||
byte b = 0;
|
||||
|
||||
if (!gueltig) return Color.FromArgb(a, r, g, b);
|
||||
if (wert.Contains("#"))
|
||||
wert = wert.Remove(0, 1);
|
||||
|
||||
if(wert.Length == 8)
|
||||
{
|
||||
var AA = wert.Substring(0, 2);
|
||||
a = Convert.ToByte(AA, 16);
|
||||
}
|
||||
var regex = new Regex(@"^#?[A-Fa-f0-9]{6,8}");
|
||||
var gueltig = regex.IsMatch(wert);
|
||||
|
||||
r = Convert.ToByte(wert.Length == 8 ? wert.Substring(2, 2) : wert.Substring(0, 2), 16);
|
||||
g = Convert.ToByte(wert.Length == 8 ? wert.Substring(4, 2) : wert.Substring(2, 2), 16);
|
||||
b = Convert.ToByte(wert.Length == 8 ? wert.Substring(6, 2) : wert.Substring(4, 2), 16);
|
||||
if (!gueltig) return Color.FromArgb(a, r, g, b);
|
||||
|
||||
return Color.FromArgb(a, r, g, b);
|
||||
}
|
||||
if (wert.Length == 8)
|
||||
{
|
||||
var AA = wert.Substring(0, 2);
|
||||
a = Convert.ToByte(AA, 16);
|
||||
}
|
||||
|
||||
r = Convert.ToByte(wert.Length == 8 ? wert.Substring(2, 2) : wert.Substring(0, 2), 16);
|
||||
g = Convert.ToByte(wert.Length == 8 ? wert.Substring(4, 2) : wert.Substring(2, 2), 16);
|
||||
b = Convert.ToByte(wert.Length == 8 ? wert.Substring(6, 2) : wert.Substring(4, 2), 16);
|
||||
|
||||
return Color.FromArgb(a, r, g, b);
|
||||
}
|
||||
|
||||
public static Color FromHexStringDefault(string wert, Color defaultColor)
|
||||
{
|
||||
if (wert.IsNullOrEmpty())
|
||||
return defaultColor;
|
||||
|
||||
byte a = 255;
|
||||
byte r = 0;
|
||||
byte g = 0;
|
||||
byte b = 0;
|
||||
|
||||
if (wert.Contains("#"))
|
||||
wert = wert.Remove(0, 1);
|
||||
|
||||
var regex = new Regex(@"^#?[A-Fa-f0-9]{6,8}");
|
||||
var gueltig = regex.IsMatch(wert);
|
||||
|
||||
if (!gueltig) return defaultColor;
|
||||
|
||||
if (wert.Length == 8)
|
||||
{
|
||||
var AA = wert.Substring(0, 2);
|
||||
a = Convert.ToByte(AA, 16);
|
||||
}
|
||||
|
||||
r = Convert.ToByte(wert.Length == 8 ? wert.Substring(2, 2) : wert.Substring(0, 2), 16);
|
||||
g = Convert.ToByte(wert.Length == 8 ? wert.Substring(4, 2) : wert.Substring(2, 2), 16);
|
||||
b = Convert.ToByte(wert.Length == 8 ? wert.Substring(6, 2) : wert.Substring(4, 2), 16);
|
||||
|
||||
return Color.FromArgb(a, r, g, b);
|
||||
}
|
||||
|
||||
public static Color FromHexString(string wert)
|
||||
{
|
||||
return FromHexStringDefault(wert, Colors.White);
|
||||
}
|
||||
|
||||
public static bool IsBrighter(this Color c, double threshold) => c.GetBrightness() > threshold;
|
||||
}
|
||||
}
|
||||
@@ -149,7 +149,9 @@
|
||||
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleDC.cs" />
|
||||
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleRelationDC.cs" />
|
||||
<Compile Include="DataContracts\AdditionalServiceRegionDC.cs" />
|
||||
<Compile Include="DataContracts\DienstDC.cs" />
|
||||
<Compile Include="DataContracts\DienstBlockDC.cs" />
|
||||
<Compile Include="DataContracts\DienstEintragDC.cs" />
|
||||
<Compile Include="DataContracts\DienstInfoDC.cs" />
|
||||
<Compile Include="DataContracts\ClientPartials\VertretungsItemDC.cs" />
|
||||
<Compile Include="DataContracts\ReportTemplateDC.cs" />
|
||||
<Compile Include="DataContracts\BudgetDC.cs" />
|
||||
|
||||
Reference in New Issue
Block a user