CB, Sicherheitszeug

This commit is contained in:
Christian
2020-08-20 18:35:33 +02:00
parent 7c3424c00f
commit 816b7c88e4
19 changed files with 410 additions and 96 deletions

View File

@@ -1201,9 +1201,10 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.GoalRatingDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GoalRatingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.RatingTypeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceDescriptionDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceAccountingDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceAccountingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceDescriptionDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.PersonDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.OrganisationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.OrganisationDC))]
@@ -1222,7 +1223,6 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.WohnheimbuchungEmployeeRelationDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimbuchungEmployeeRelationDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceRecordDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceRecordDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.MedRecordDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.MedRecordDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ChatMessageDC>))]
@@ -1265,8 +1265,8 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.SettingsType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.UserRightType>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.UserRightType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceUnit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ZeiterfassungsDauer))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceUnit))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordFormate))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.ServiceRecordTypeId))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.FileAttachmentType))]
@@ -1456,6 +1456,7 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ServiceInvoicePeriodDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceInvoicePeriodDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.InvoiceNumberDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.InvoiceType))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.MemoryStream))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.IO.Stream))]
@@ -7164,6 +7165,14 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/UpdateSettlementInvoice", ReplyAction="http://tempuri.org/IAccountingService/UpdateSettlementInvoiceResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/UpdateSettlementInvoiceBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void UpdateSettlementInvoice(System.Collections.Generic.List<BS.Shared.DataContracts.Settlement2DC> invoices);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/LoadInvoiceNumberList", ReplyAction="http://tempuri.org/IAccountingService/LoadInvoiceNumberListResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/LoadInvoiceNumberListBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC> LoadInvoiceNumberList();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAccountingService/UpdateInvoiceNumberList", ReplyAction="http://tempuri.org/IAccountingService/UpdateInvoiceNumberListResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IAccountingService/UpdateInvoiceNumberListBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC> UpdateInvoiceNumberList(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC> dclist);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -7329,6 +7338,16 @@ namespace BeWo.ServiceProxy
{
base.Channel.UpdateSettlementInvoice(invoices);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC> LoadInvoiceNumberList()
{
return base.Channel.LoadInvoiceNumberList();
}
public System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC> UpdateInvoiceNumberList(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceNumberDC> dclist)
{
return base.Channel.UpdateInvoiceNumberList(dclist);
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]

View File

@@ -22,13 +22,39 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Content="Automatische Rechnungsnummer verwenden" Margin="3" VerticalAlignment="Center" />
<dxe:CheckEdit Grid.Column="1" Width="200" Margin="3" Height="23" IsChecked="{Binding Use}" />
<Label Content="Schema" Grid.Row="1" Margin="3" VerticalAlignment="Center" />
<TextBox Grid.Column="1" Grid.Row="1" Width="200" Margin="3" Height="23" Text="{Binding Pattern}" />
<Label Content="Aktuelle Nummer" Grid.Row="2" Margin="3" VerticalAlignment="Center" />
<dxe:SpinEdit Name="spinedit_number" Grid.Column="1" Grid.Row="2" IsFloatValue="False"
Height="23" Width="200" EditValue="{Binding Path=CurrentNumber, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource Int2DecimalConverter}}" />
<Label Content="Automatische Rechnungsnummer verwenden" Margin="3" VerticalAlignment="Center" />
<dxe:CheckEdit Grid.Column="1" Width="200" Margin="3" Height="23" IsChecked="{Binding Use}" />
<dxg:GridControl x:Name="GridControlInvoiceNumbers" Margin="0,10,0,0" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" >
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Name" Header="Name" Width="100" SortOrder="Ascending" SortIndex="0">
</dxg:GridColumn>
<dxg:GridColumn FieldName="Schema" Header="Schema" Width="100">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings DisplayFormat="0" Mask="0" MaskType="Numeric"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="CurrentNumber" Header="Aktuelle Nummer" Width="100">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings DisplayFormat="0" Mask="0" MaskType="Numeric"></dxe:TextEditSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
</dxg:GridControl.View>
</dxg:GridControl>
</Grid>
</GroupBox>
</Grid>

View File

@@ -1,15 +1,17 @@
using BeWo.ServiceProxy;
using System.Collections.Generic;
using System.Linq;
using BeWo.ServiceProxy;
using BeWo.ViewModel;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace BeWo.View.Detail
{
public partial class InvoiceNumberView : BeWoView
{
private InvoiceNumberVM _Viewmodel;
private IList<InvoiceNumberVM> _Viewmodel;
public InvoiceNumberView(InvoiceNumberVM viewModel)
public InvoiceNumberView(IList<InvoiceNumberVM> viewModel)
{
this.InitializeComponent();
this.ViewModel = viewModel;
@@ -19,11 +21,11 @@ namespace BeWo.View.Detail
{
get
{
return this.ViewModel != null ? this.ViewModel.IsDirty : false;
return this.ViewModel != null ? this.ViewModel.Any(v => v.IsDirty) : false;
}
}
private InvoiceNumberVM ViewModel
private IList<InvoiceNumberVM> ViewModel
{
get
{
@@ -39,13 +41,26 @@ namespace BeWo.View.Detail
protected override void Save()
{
ServiceFacade.DoAccountingServiceAsync(s => s.UpdateInvoiceNumber(this.ViewModel.CommitToDataContract()), this.ReloadViewModel);
var dcList = new List<InvoiceNumberDC>();
foreach (var vm in ViewModel)
{
dcList.Add(vm.CommitToDataContract());
}
ServiceFacade.DoAccountingServiceAsync(s => s.UpdateInvoiceNumberList(dcList), this.ReloadViewModel);
}
private void ReloadViewModel()
{
VMFactory.CreateInvoiceNumberVMAsync(r =>
this.Dispatch(delegate { this.ViewModel = r; }));
ServiceFacade.DoAccountingServiceAsync(s => s.LoadInvoiceNumberList(), r => this.Dispatch(delegate
{
var vmList = new List<InvoiceNumberVM>();
foreach (var dc in r)
{
vmList.Add(new InvoiceNumberVM(dc));
}
this.ViewModel = vmList;
}));
}
}
}

View File

@@ -46,6 +46,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ComboBox Height="23" x:Name="FilterComboBox" Margin="3" VerticalAlignment="Top" />
<CheckBox Margin="3 7" Name="checkbox_all" IsChecked="True" Content="Alle Klienten" Checked="CheckBox_Checked" />
<uc:PopUpEdit IsReadOnly="True" Height="23" Grid.Row="0" Grid.Column="2"

View File

@@ -930,7 +930,8 @@
ItemContainerStyle="{DynamicResource goal_treeitemstyle}"
ItemTemplate="{DynamicResource goal_treeitemtemplate}" Grid.RowSpan="1" MinHeight="100"
ContextMenu="{StaticResource cmGoals}"
PreviewMouseDown="GoalTreeViewItem_PreviewMouseRightButtonDown" ItemsSource="{Binding CombinedGoalTree}">
PreviewMouseDown="GoalTreeViewItem_PreviewMouseRightButtonDown" ItemsSource="{Binding CombinedGoalTree}"
VirtualizingStackPanel.IsVirtualizing="False">
<TreeView.Resources>
<Style x:Key="goal_treeitemstyle" TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="{Binding Path=IsExpanded, Mode=TwoWay}" />

View File

@@ -1621,8 +1621,22 @@ namespace BeWo.View.Detail
if (goal.Type == ValueListEntryType.SupportConceptGoalCategoryType ||
goal.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType)
{
var gr = rating.GoalRatingList.VMList.AddNew();
gr.GoalEntry = goal;
AddIfNotExist(rating, goal);
}
else
{
//Find Parent Goal
if (goal.ParentOid.HasValue)
{
var p = ViewModel.CombinedGoals.VMList.FirstOrDefault(vm => vm.DataContract.ValueListEntryOid == goal.ParentOid);
if (p != null)
{
AddIfNotExist(rating, p.DataContract);
}
}
}
}
@@ -1634,6 +1648,15 @@ namespace BeWo.View.Detail
}
}
private void AddIfNotExist(RatingVM rating, ValueListEntryDC goal)
{
if (!rating.GoalRatingList.VMList.Any(vm => vm.GoalEntry.Equals(goal)))
{
var gr = rating.GoalRatingList.VMList.AddNew();
gr.GoalEntry = goal;
}
}
private RatingVM EditRating(RatingVM vm)
{
var control = new RatingEditView();
@@ -1738,10 +1761,21 @@ namespace BeWo.View.Detail
private void SetTreeItemVisibility(ItemContainerGenerator ig, SupportConceptGoalTreeItem goal, string searchtext, bool onlyChecked)
{
var item = ig.ContainerFromItem(goal) as TreeViewItem;
if (item == null)
{
treeview_Goals.UpdateLayout();
item = ig.ContainerFromItem(goal) as TreeViewItem;
}
if (item == null)
return;
if (item.ToString().ToLower().Contains("fussball"))
{
int test = 0;
}
if (goal.Children == null || goal.Children.Count == 0)
{
if (IsTreeItemVisible(goal, searchtext, onlyChecked))

View File

@@ -343,11 +343,6 @@ namespace BeWo.ViewModel
s2 => s2.GetAllActiveOrganisationsCompact(), r2 => ServiceFacade.DoOperationsServiceAsync(s3 => s3.GetAllActiveInvoices(), r3 => callback(new InvoiceListVM(r2, r1, r3)))));
}
public static void CreateInvoiceNumberVMAsync(Action<InvoiceNumberVM> pCallBack)
{
ServiceFacade.DoAccountingServiceAsync(s => s.LoadInvoiceNumber(), r => pCallBack(new InvoiceNumberVM(r)));
}
public static void CreateInvoiceOverviewListVM(Action<InvoiceBaseListVM> callback)
{
ServiceFacade.DoAccountingServiceAsync(s => s.GetAllActiveInvoiceBases(), cb => callback(new InvoiceBaseListVM(cb)));

View File

@@ -17,7 +17,7 @@
<property name="connection.connection_string">
Server=localhost;Password=root;User ID=root; Initial Catalog=phbochum
Server=localhost;Password=root;User ID=root; Initial Catalog=1234567890
</property>
<property name="dialect">

View File

@@ -59,9 +59,10 @@ namespace DiePerspektive
this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell();
this.xrTableCell49 = new DevExpress.XtraReports.UI.XRTableCell();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel16 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel7 = new DevExpress.XtraReports.UI.XRLabel();
@@ -70,14 +71,12 @@ namespace DiePerspektive
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel2 = new DevExpress.XtraReports.UI.XRLabel();
this.formattingRuleServiceDesc = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleCostBearer = new DevExpress.XtraReports.UI.FormattingRule();
this.formattingRuleEmployeeName = new DevExpress.XtraReports.UI.FormattingRule();
this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
this.GroupFooter1 = new DevExpress.XtraReports.UI.GroupFooterBand();
this.lblUnterschriftKlient = new DevExpress.XtraReports.UI.XRLabel();
this.lblUnterschriftMitarbeiter = new DevExpress.XtraReports.UI.XRLabel();
this.xrTableAbwesenheiten = new DevExpress.XtraReports.UI.XRTable();
this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow();
@@ -112,13 +111,15 @@ namespace DiePerspektive
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel1 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldKontaktArt = new DevExpress.XtraReports.UI.CalculatedField();
this.xrPictureBox1 = new DevExpress.XtraReports.UI.XRPictureBox();
this.xrLabel17 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel18 = new DevExpress.XtraReports.UI.XRLabel();
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
//
// Detail
@@ -491,10 +492,6 @@ namespace DiePerspektive
this.xrTableCell49.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopCenter;
this.xrTableCell49.Weight = 0.62849162011173187D;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// formattingRuleStartDate
//
this.formattingRuleStartDate.Condition = "[StartDate2] < [StartDate]";
@@ -505,6 +502,8 @@ namespace DiePerspektive
// ReportHeader
//
this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel17,
this.xrLabel18,
this.xrLabel2,
this.xrPictureBox1,
this.xrLabel14,
@@ -515,9 +514,30 @@ namespace DiePerspektive
this.xrLabel5,
this.xrLabel4,
this.xrLabel3});
this.ReportHeader.HeightF = 221.6667F;
this.ReportHeader.HeightF = 255F;
this.ReportHeader.Name = "ReportHeader";
//
// xrLabel2
//
this.xrLabel2.Font = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(1.059638E-05F, 77.91667F);
this.xrLabel2.Multiline = true;
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(400F, 25F);
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.Text = "Quittierungsbeleg";
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// xrPictureBox1
//
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(454.5832F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(200.4168F, 102.9167F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
//
// xrLabel14
//
this.xrLabel14.BackColor = System.Drawing.Color.Gainsboro;
@@ -659,19 +679,6 @@ namespace DiePerspektive
this.xrLabel3.Text = "Monat";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel2
//
this.xrLabel2.Font = new System.Drawing.Font("Arial", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.xrLabel2.LocationFloat = new DevExpress.Utils.PointFloat(1.059638E-05F, 77.91667F);
this.xrLabel2.Multiline = true;
this.xrLabel2.Name = "xrLabel2";
this.xrLabel2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.xrLabel2.SizeF = new System.Drawing.SizeF(400F, 25F);
this.xrLabel2.StylePriority.UseFont = false;
this.xrLabel2.StylePriority.UseTextAlignment = false;
this.xrLabel2.Text = "Quittierungsbeleg";
this.xrLabel2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// formattingRuleServiceDesc
//
this.formattingRuleServiceDesc.Condition = "[StartDate2] < [StartDate]";
@@ -706,7 +713,6 @@ namespace DiePerspektive
// GroupFooter1
//
this.GroupFooter1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblUnterschriftKlient,
this.lblUnterschriftMitarbeiter,
this.xrTableAbwesenheiten,
this.lblHatAbwesenheiten,
@@ -724,22 +730,6 @@ namespace DiePerspektive
this.GroupFooter1.KeepTogether = true;
this.GroupFooter1.Name = "GroupFooter1";
//
// lblUnterschriftKlient
//
this.lblUnterschriftKlient.Borders = DevExpress.XtraPrinting.BorderSide.Top;
this.lblUnterschriftKlient.Font = new System.Drawing.Font("Arial", 10F);
this.lblUnterschriftKlient.LocationFloat = new DevExpress.Utils.PointFloat(17.19025F, 250F);
this.lblUnterschriftKlient.Name = "lblUnterschriftKlient";
this.lblUnterschriftKlient.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.lblUnterschriftKlient.SizeF = new System.Drawing.SizeF(271.8472F, 20F);
this.lblUnterschriftKlient.StylePriority.UseBackColor = false;
this.lblUnterschriftKlient.StylePriority.UseBorders = false;
this.lblUnterschriftKlient.StylePriority.UseFont = false;
this.lblUnterschriftKlient.StylePriority.UsePadding = false;
this.lblUnterschriftKlient.StylePriority.UseTextAlignment = false;
this.lblUnterschriftKlient.Text = "Datum, Unterschrift Klient/in";
this.lblUnterschriftKlient.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
//
// lblUnterschriftMitarbeiter
//
this.lblUnterschriftMitarbeiter.Borders = DevExpress.XtraPrinting.BorderSide.Top;
@@ -1137,13 +1127,45 @@ namespace DiePerspektive
this.fieldKontaktArt.FieldType = DevExpress.XtraReports.UI.FieldType.String;
this.fieldKontaktArt.Name = "fieldKontaktArt";
//
// xrPictureBox1
// xrLabel17
//
this.xrPictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("xrPictureBox1.Image")));
this.xrPictureBox1.LocationFloat = new DevExpress.Utils.PointFloat(454.5832F, 0F);
this.xrPictureBox1.Name = "xrPictureBox1";
this.xrPictureBox1.SizeF = new System.Drawing.SizeF(200.4168F, 102.9167F);
this.xrPictureBox1.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
this.xrLabel17.BackColor = System.Drawing.Color.Gainsboro;
this.xrLabel17.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right)
| DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel17.CanGrow = false;
this.xrLabel17.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel17.LocationFloat = new DevExpress.Utils.PointFloat(0.6389194F, 197F);
this.xrLabel17.Multiline = true;
this.xrLabel17.Name = "xrLabel17";
this.xrLabel17.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel17.SizeF = new System.Drawing.SizeF(120F, 35F);
this.xrLabel17.StylePriority.UseBackColor = false;
this.xrLabel17.StylePriority.UseBorders = false;
this.xrLabel17.StylePriority.UseFont = false;
this.xrLabel17.StylePriority.UsePadding = false;
this.xrLabel17.StylePriority.UseTextAlignment = false;
this.xrLabel17.Text = "verantwortliche/r\r\nMitarbeiter/in:";
this.xrLabel17.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// xrLabel18
//
this.xrLabel18.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Right | DevExpress.XtraPrinting.BorderSide.Bottom)));
this.xrLabel18.Font = new System.Drawing.Font("Arial", 10F);
this.xrLabel18.LocationFloat = new DevExpress.Utils.PointFloat(120.639F, 197F);
this.xrLabel18.Name = "xrLabel18";
this.xrLabel18.Padding = new DevExpress.XtraPrinting.PaddingInfo(3, 2, 0, 0, 100F);
this.xrLabel18.SizeF = new System.Drawing.SizeF(209.3611F, 35.00003F);
this.xrLabel18.StylePriority.UseBackColor = false;
this.xrLabel18.StylePriority.UseBorders = false;
this.xrLabel18.StylePriority.UseFont = false;
this.xrLabel18.StylePriority.UsePadding = false;
this.xrLabel18.StylePriority.UseTextAlignment = false;
this.xrLabel18.Text = "[MainAttendant]";
this.xrLabel18.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
//
// bindingSource1
//
this.bindingSource1.DataSource = typeof(BeWo.Report.ReportObjects.ServicesOverviewRO);
//
// Quittierungsbeleg
//
@@ -1170,10 +1192,10 @@ namespace DiePerspektive
this.Version = "17.1";
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrTableAbwesenheiten)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.xrRichText1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
}
@@ -1240,7 +1262,6 @@ namespace DiePerspektive
private DevExpress.XtraReports.UI.XRTableCell xrTableCell16;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell17;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell18;
private DevExpress.XtraReports.UI.XRLabel lblUnterschriftKlient;
private DevExpress.XtraReports.UI.XRLabel lblUnterschriftMitarbeiter;
private DevExpress.XtraReports.UI.XRTableRow xrTableRow4;
private DevExpress.XtraReports.UI.XRTableCell xrTableCell19;
@@ -1262,5 +1283,7 @@ namespace DiePerspektive
private DevExpress.XtraReports.UI.XRLabel xrLabel16;
private DevExpress.XtraReports.UI.XRPictureBox picSignature;
private DevExpress.XtraReports.UI.XRPictureBox xrPictureBox1;
private DevExpress.XtraReports.UI.XRLabel xrLabel17;
private DevExpress.XtraReports.UI.XRLabel xrLabel18;
}
}

View File

@@ -96,7 +96,6 @@ namespace DiePerspektive
if (newRows > 0)
{
lblUnterschriftKlient.Top += newRows * 20;
lblUnterschriftMitarbeiter.Top += newRows * 20;
}
}

View File

@@ -84,6 +84,8 @@ namespace BeWo.KontaktUndKrisenhilfeReports
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.lblMAStunden = new DevExpress.XtraReports.UI.XRLabel();
this.GroupFooter3 = new DevExpress.XtraReports.UI.GroupFooterBand();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -329,7 +331,7 @@ namespace BeWo.KontaktUndKrisenhilfeReports
//
this.GroupFooter2.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.xrLabel6});
this.GroupFooter2.HeightF = 20F;
this.GroupFooter2.HeightF = 35.00002F;
this.GroupFooter2.Name = "GroupFooter2";
//
// xrLabel6
@@ -678,6 +680,27 @@ namespace BeWo.KontaktUndKrisenhilfeReports
this.xrLabel3.Text = "Datum";
this.xrLabel3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// lblMAStunden
//
this.lblMAStunden.Font = new System.Drawing.Font("Arial", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblMAStunden.LocationFloat = new DevExpress.Utils.PointFloat(0F, 10.00002F);
this.lblMAStunden.Multiline = true;
this.lblMAStunden.Name = "lblMAStunden";
this.lblMAStunden.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
this.lblMAStunden.SizeF = new System.Drawing.SizeF(1090F, 25F);
this.lblMAStunden.StylePriority.UseBorders = false;
this.lblMAStunden.StylePriority.UseFont = false;
this.lblMAStunden.StylePriority.UseTextAlignment = false;
this.lblMAStunden.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
//
// GroupFooter3
//
this.GroupFooter3.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] {
this.lblMAStunden});
this.GroupFooter3.HeightF = 35.00002F;
this.GroupFooter3.Level = 1;
this.GroupFooter3.Name = "GroupFooter3";
//
// Stundenzettel
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -686,7 +709,8 @@ namespace BeWo.KontaktUndKrisenhilfeReports
this.ReportHeader,
this.topMarginBand1,
this.bottomMarginBand1,
this.GroupFooter1});
this.GroupFooter1,
this.GroupFooter3});
this.DataSource = this.bindingSource1;
this.FormattingRuleSheet.AddRange(new DevExpress.XtraReports.UI.FormattingRule[] {
this.formattingRuleStartDate,
@@ -761,5 +785,7 @@ namespace BeWo.KontaktUndKrisenhilfeReports
private DevExpress.XtraReports.UI.XRLabel xrLabel18;
private DevExpress.XtraReports.UI.XRLabel xrLabel17;
private DevExpress.XtraReports.UI.XRLabel xrLabel16;
private DevExpress.XtraReports.UI.XRLabel lblMAStunden;
private DevExpress.XtraReports.UI.GroupFooterBand GroupFooter3;
}
}

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using BeWo.Data.Access;
@@ -22,6 +23,8 @@ namespace BeWo.KontaktUndKrisenhilfeReports
public void SetReportDataSource(ServicesOverviewRO pRO)
{
Dictionary<String, double> stundenDict = new Dictionary<string, double>();
if (pRO.Services != null)
{
List<ServicesOverviewRO.ServiceDetail> servicesBillable = new List<ServicesOverviewRO.ServiceDetail>();
@@ -34,7 +37,9 @@ namespace BeWo.KontaktUndKrisenhilfeReports
var sr = DAOFactory.GenericDAO.LoadByID<ServiceRecord>(s.ServiceRecordOid);
var name = s.EmployeeFullname;
s.EmployeeFullname = "";
s.EmployeeAbbr = "";
s.ServiceCategory = "";
@@ -46,6 +51,10 @@ namespace BeWo.KontaktUndKrisenhilfeReports
foreach (var groupSr in sr.Group.ServiceRecordList)
{
var en = groupSr.Employee.Person.FirstNameLastName;
if (groupSr.CustomerOid == pRO.CustomerOid)
{
AddToDict(stundenDict, en, s.Minutes);
}
if (!ma.ToString().Contains(en))
{
@@ -59,6 +68,8 @@ namespace BeWo.KontaktUndKrisenhilfeReports
}
else
{
AddToDict(stundenDict, name, s.Minutes);
bool hatRolle = false;
if (sr.Employee != null && sr.CustomerOid.HasValue)
@@ -104,7 +115,31 @@ namespace BeWo.KontaktUndKrisenhilfeReports
pRO.Services = servicesBillable;
}
StringBuilder sb = new StringBuilder();
foreach (var key in stundenDict.Keys.OrderBy(n => n))
{
if (sb.Length > 0)
{
sb.AppendLine();
}
var minuten = stundenDict[key];
sb.Append(String.Format("{0}: {1:0.##} Minuten * 1,2 = {2:0.##} Minuten", key, minuten, minuten * 1.2));
}
lblMAStunden.Text = sb.ToString();
this.bindingSource1.DataSource = pRO;
}
private void AddToDict(Dictionary<string, double> stundenDict, string name, double minutes)
{
if (!stundenDict.ContainsKey(name))
{
stundenDict.Add(name, 0);
}
stundenDict[name] += minutes;
}
}
}

View File

@@ -223,19 +223,25 @@ namespace BeWo.Service.Core
return erg;
}
public static bool UserHasRight(ApplicationUser user, UserRightType right)
{
return GetGrantedRights(user).Contains(right);
}
public static List<UserRightType> GetGrantedRights(ApplicationUser user)
{
var rights = new List<UserRightType>();
foreach (var ug in user.UserGroups)
{
foreach (var rr in ug.Rights)
{
if (rr.RightType == right)
{
return true;
}
}
rights.Add(rr.RightType);
}
}
return false;
return rights;
}
public static string GetRecurrenceIdFromRecurrenceInfo(string pRecurrenceInfo)

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Windows;
using BeWo.Data;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BS.Shared;
using BS.Shared.DataContracts;
namespace BeWo.Service.Security
{
public class Right2Methods
{
public static Dictionary<UserRightType, IList<String>> GetAuthorizedMethodDictionary()
{
var dict = new Dictionary<UserRightType, IList<String>>();
dict.Add(UserRightType.UserView_AllowChangePassword, new string[] { "Cupcake", "Cake", "Candy" });
dict.Add(UserRightType.KalenderAnsehen, new string[] { "GetAllOpenAppointmentsForEmployee", "LoadTasksAndAppointmentsForEmployee", "GetAllOpenAppointmentsForEmployee" });
dict.Add(UserRightType.ChatSettings, new string[] { "GetAllChatActiveEmployeesCompact" });
return dict;
}
}
}

View File

@@ -1,4 +1,5 @@
using System;
using System.Linq;
using System.Net;
using System.Security;
using System.ServiceModel;
@@ -32,11 +33,11 @@ namespace BeWo.Service.Security
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var lTemp = pMessage.Headers.Action.Split("/");
string lServiceName = lTemp[lTemp.Count - 1];
string lMethodName = lTemp[lTemp.Count - 1];
string lServiceInterface = lTemp[lTemp.Count - 2];
// TODO Hier kann man jetzt etwas bauen wer sich für welchen service autorisieren muss...
if (lServiceName == "IsUserValid" || lServiceName == "ResetTenant" || lServiceName == "ResetAllTenants" || lServiceName == "GetEmailForUserName")
if (lMethodName == "IsUserValid" || lMethodName == "ResetTenant" || lMethodName == "ResetAllTenants" || lMethodName == "GetEmailForUserName")
{
return null;
}
@@ -63,6 +64,12 @@ namespace BeWo.Service.Security
if (lUser != null && DAOFactory.UserDAO.CheckPassword(lUser, lPassword))
{
if (!HasMethodAuthorization(lUser, lMethodName))
{
throw new SecurityException("Methode nicht autorisiert: " + lMethodName);
}
var lExt = new LoggedInUserOperationContextExt { User = lUser, LoginName = lUserName, UnhashedPassword = lPassword };
OperationContext.Current.Extensions.Add(lExt);
return lExt;
@@ -76,5 +83,46 @@ namespace BeWo.Service.Security
throw Utils.CreateBeWoFaultException(e);
}
}
private bool HasMethodAuthorization(ApplicationUser lUser, string methodName)
{
var alwaysAllowed = new string[]
{
"LoadUserByLoginName", "GetMandator", "LoadEmployee",
"GetPersonsHavingBirthday",
"GetLastLogins",
"GetSupportConceptsWithConferenceDate",
"GetExpiringSupportConcepts",
"GetPublishedNewsItemsForEmployee",
"GetAllActiveEmployeesCompact",
"GetHomeViewPanels",
"LoadCompactEmployee",
"GetTranslationDictionary",
"ConvertToNewSubstitutionType"
};
if (alwaysAllowed.Contains(methodName))
{
return true;
}
var rights = Utils.GetGrantedRights(lUser);
var dict = Right2Methods.GetAuthorizedMethodDictionary();
foreach (var right in rights)
{
if (dict.ContainsKey(right))
{
var names = dict[right];
if (names.Contains(methodName))
{
return true;
}
}
}
return true;
}
}
}

View File

@@ -362,6 +362,7 @@
<Compile Include="Security\SecurityEndpointBehavior.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Security\SecurityContextInitializer.cs" />
<Compile Include="Security\Right2Methods.cs" />
<Compile Include="Security\SecurityUtils.cs" />
<Compile Include="ServiceContracts\BeWoFault.cs" />
<Compile Include="ServiceContracts\IAccountingService.cs" />

View File

@@ -116,5 +116,12 @@ namespace BeWo.Service.ServiceContracts
[OperationContract]
void UpdateSettlementInvoice(List<Settlement2DC> invoices);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<InvoiceNumberDC> LoadInvoiceNumberList();
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<InvoiceNumberDC> UpdateInvoiceNumberList(List<InvoiceNumberDC> dclist);
}
}

View File

@@ -502,7 +502,7 @@ namespace BeWo.Service.ServiceImplementations
{
var inr = DAOFactory.GenericDAO.LoadByID<InvoiceNumber>(1);
if (inr != null)
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDC(DAOFactory.GenericDAO.LoadByID<InvoiceNumber>(1));
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDC(inr);
return null;
}
catch (Exception e)
@@ -620,5 +620,39 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
public List<InvoiceNumberDC> LoadInvoiceNumberList()
{
try
{
var numbers = DAOFactory.GenericDAO.GetAllActive<InvoiceNumber>();
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDCs(numbers);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
public List<InvoiceNumberDC> UpdateInvoiceNumberList(List<InvoiceNumberDC> dclist)
{
try
{
var numbers = DAOFactory.GenericDAO.GetAllActive<InvoiceNumber>();
MapperFactory.InvoiceNumberDC_InvoiceNumber.MergeWithEntitys(dclist, numbers);
DAOFactory.GenericDAO.Update(numbers);
return MapperFactory.InvoiceNumberDC_InvoiceNumber.MapToNewDCs(numbers);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
}
}

View File

@@ -219,19 +219,19 @@ namespace BeWo.Service.ServiceImplementations
var lEmployees = DAOFactory.GenericDAO.LoadByIDs<Employee>(pSortedOids);
bool darfVertragSehen = true;
int arrayCount = 36;
int arrayCount = 37;
string[] lHeaderCaption;
if (!Utils.UserHasRight(GetLoggedInUser(), UserRightType.Employee_AllowEditContracts))
{
arrayCount = 25;
arrayCount = 26;
darfVertragSehen = false;
}
if (darfVertragSehen)
{
lHeaderCaption = new string[36]
lHeaderCaption = new string[37]
{
"Nachname", // 0
"Vorname", // 1
@@ -251,23 +251,24 @@ namespace BeWo.Service.ServiceImplementations
"Gesamtstunden/Woche", // 14
"Arbeitstage pro Woche", // 15
"Eintrittsdatum", // 16
"Enddatum", // 17
"Versicherungsnummer",
"Stundensatz",
"Telefon",
"Mobil", // 20
"Mobil", // 21
"Mail",
"private Mail",
"Fax",
"Strasse",
"PLZ", // 25
"Ort", // 26
"PLZ", // 26
"Ort", // 27
"Kontonummer",
"Bankleitzahl",
"Bank",
"BIC", // 30
"BIC", // 31
"IBAN",
"Bemerkung", // 32
"Bemerkung", // 33
"Fachkraft",
"Qualifikation",
"Arbeitsschwerpunkte",
@@ -399,6 +400,14 @@ namespace BeWo.Service.ServiceImplementations
wd = 5;
lContent[iRowCount][15] = String.Format("{0}", wd);
if (!lastContract.ContractEndDate.HasValue)
{
lContent[iRowCount][17] = "unbefristet";
}
else
{
lContent[iRowCount][17] = lastContract.ContractEndDate.DoIfNotNull(d => d.ToShortDateString());
}
}
@@ -408,23 +417,23 @@ namespace BeWo.Service.ServiceImplementations
lContent[iRowCount][16] = firstContract.EntryDate.DoIfNotNull(d => d.ToShortDateString());
}
lContent[iRowCount][17] = lEmployees[iRowCount].InsuranceNumber;
lContent[iRowCount][18] = lEmployees[iRowCount].InsuranceNumber;
if (lastContract != null)
{
if (lastContract.HourlyRate.HasValue)
{
lContent[iRowCount][18] = lastContract.HourlyRate.Value.ToStringNullCheck();
lContent[iRowCount][19] = lastContract.HourlyRate.Value.ToStringNullCheck();
}
lContent[iRowCount][32] = lastContract.Notice;
lContent[iRowCount][33] = lastContract.Notice;
}
}
int index = 9;
if (darfVertragSehen)
{
index = 19;
index = 20;
}
foreach (var iContact in lEmployees[iRowCount].Person.Contacts)
{