Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo

This commit is contained in:
Waldi
2017-03-24 10:42:48 +01:00
61 changed files with 2002 additions and 1301 deletions

View File

@@ -268,10 +268,10 @@ namespace BeWo.Core
public static void OpenModalViewWindow<T, U, V>(
T viewModel,
V ownerView,
V ownerView,
Action applyChanges,
EventHandler<EventArgs<OrganisationVM>> organisationSavedOrUpdated = null,
EventHandler<EventArgs<PersonVM>> personSavedOrUpdated = null)
EventHandler<EventArgs<PersonVM>> personSavedOrUpdated = null, bool allowSaveIfParentDirty = false)
where T : AbstractDCMapperVM<U>
where U : IDataContract, new()
where V : BeWoView
@@ -316,7 +316,7 @@ namespace BeWo.Core
View.ModalEditViewUpdateCallback = applyChanges;
var modalViewWindow = new ModalViewWindow(View, ownerView);
var modalViewWindow = new ModalViewWindow(View, ownerView, allowSaveIfParentDirty);
BeWoApp.MainControl.OpenedModalViewWindows.Add(modalViewWindow);

View File

@@ -404,7 +404,7 @@
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, EmployeeView_View"
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, EmployeeView_View, Employee_AllowViewOwnEmployees, Employee_AllowViewOwnTeam"
x:Name="button_Employee" Click="button_Employee_Click"
Style="{StaticResource NavBarButton}"
Content="Mitarbeiter"

File diff suppressed because it is too large Load Diff

View File

@@ -2310,8 +2310,9 @@
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="30">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="organisationDetailColumn1"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="organisationDetailColumn2"/>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
@@ -2320,7 +2321,8 @@
</Grid.RowDefinitions>
<Image Grid.RowSpan="2" Source="{Binding Path=IconPath}" Margin="0,0,5,0" Height="30" VerticalAlignment="Center" HorizontalAlignment="Stretch" Width="Auto" RenderTransformOrigin="0.5,0.5" Grid.Row="0" />
<TextBlock x:Name="txtDetail1" Grid.Row="0" Grid.Column="1" Text="{Binding Path=DetailDescription}" FontSize="14" Foreground="#FFFFFFFF" FontFamily="Microsoft Sans Serif" />
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="2" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
<TextBlock x:Name="txtDetail3" Grid.Row="0" Grid.Column="2" Text="{Binding Path=Function}" FontSize="14" Foreground="#FFFFFFFF" FontFamily="Microsoft Sans Serif" Margin="10,0,10,0"/>
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="3" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
<TextBlock.Visibility>
<Binding Path="IsDeleted" ConverterParameter="Organisation">
<Binding.Converter>
@@ -2332,7 +2334,7 @@
Reaktivieren
</Hyperlink>
</TextBlock>
<TextBlock x:Name="txtDetail2" Grid.Column="1" Grid.Row="1" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
<TextBlock x:Name="txtDetail2" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
</Grid>
</Border>
</Grid>
@@ -2341,10 +2343,12 @@
<DataTrigger Binding="{Binding Path=IsArchived}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FF808080" />
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FF808080" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsDeleted}" Value="True">
<Setter Property="Foreground" TargetName="txtDetail1" Value="#FFF97E7B" />
<Setter Property="Foreground" TargetName="txtDetail2" Value="#FFF97E7B" />
<Setter Property="Foreground" TargetName="txtDetail3" Value="#FFF97E7B" />
</DataTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="OpacityMask" TargetName="ItemBorder">

View File

@@ -184,9 +184,9 @@
<dxg:GridColumn AllowEditing="False" FieldName="Employee" Header="Betreuer(in)" Width="150" />
<dxg:GridColumn x:Name="gridcolumn_employeerole" FieldName="Role" Header="Rolle" Width="200" />
<dxg:GridColumn x:Name="gridcolumn_employeechatpartner" Header="Chatpartner" Width="80" FieldName="Chatpartner">
<!--<dxg:GridColumn x:Name="gridcolumn_employeechatpartner" Header="Chatpartner" Width="80" FieldName="Chatpartner" >
</dxg:GridColumn>
</dxg:GridColumn>-->
<dxg:GridColumn FieldName="Notice" Header="Erläuterung" Width="250" />
</dxg:GridControl.Columns>
@@ -254,8 +254,8 @@
<dxg:GridColumn FieldName="PersonString" Header="Person" Width="150" AllowEditing="False" />
<dxg:GridColumn FieldName="OrganisationString" Header="Organisation" Width="150" AllowEditing="False" />
<dxg:GridColumn x:Name="gridcolumn_evironmentroleperson" FieldName="Role" Header="Rolle" Width="150" />
<dxg:GridColumn FieldName="AddressSummaryInfo" Header="Adresse" Width="150" />
<dxg:GridColumn FieldName="ContactSummaryInfo" Header="Kontaktdaten" Width="150" />
<dxg:GridColumn FieldName="AddressSummaryInfo" Header="Adresse" Width="150" AllowEditing="False"/>
<dxg:GridColumn FieldName="ContactSummaryInfo" Header="Kontaktdaten" Width="150" AllowEditing="False"/>
<dxg:GridColumn FieldName="Notice" Header="Notiz" Width="250" >
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True"/>
@@ -277,15 +277,17 @@
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="PersonString" Header="Person" Width="150" AllowEditing="False" />
<dxg:GridColumn FieldName="AddressSummaryInfo" Header="Adresse" Width="150" />
<dxg:GridColumn FieldName="ContactSummaryInfo" Header="Kontaktdaten" Width="150" />
<dxg:GridColumn FieldName="PersonString" Header="Person" Width="150" AllowEditing="False" />
<dxg:GridColumn x:Name="gridcolumn_evironmentFamilyStatus" FieldName="Role" Header="Familienstatus" Width="150" />
<dxg:GridColumn FieldName="AddressSummaryInfo" Header="Adresse" Width="150" AllowEditing="False" />
<dxg:GridColumn FieldName="ContactSummaryInfo" Header="Kontaktdaten" Width="150" AllowEditing="False"/>
<dxg:GridColumn FieldName="FamilyStatus" Header="Familienstand" Width="150" AllowEditing="False"/>
<dxg:GridColumn FieldName="Notice" Header="Notiz" Width="250">
<dxg:GridColumn.EditSettings>
<dxe:TextEditSettings TextWrapping="Wrap" AcceptsReturn="True"/>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn x:Name="gridcolumn_evironmentFamilyStatus" FieldName="Role" Header="Familienstatus" Width="150" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" RowDoubleClick="TableView_OnRowDoubleClick" />
@@ -480,7 +482,7 @@
<Label Grid.Column="0" HorizontalAlignment="Left" Content="Aufenthaltsstatus"/>
<ComboBox x:Name="comboBox_Aufenthalt" Grid.Column="1" Margin="3" Height="23" SelectedValue="{Binding Path=AufenthaltsStatus, Mode=TwoWay}" MinWidth="120" HorizontalAlignment="Left"/>
<ComboBox x:Name="comboBox_Aufenthalt" Grid.Column="1" Margin="3" Height="23" SelectedValue="{Binding Path=AufenthaltsStatus, Mode=TwoWay}" MinWidth="120" HorizontalAlignment="Stretch"/>
</Grid>
@@ -1319,13 +1321,14 @@
Text="{val:ValidationBinding Path=EnvironmentPersons.NewVM.PersonString, UpdateSourceTrigger=PropertyChanged}" />
<!-- Neu -->
<uc:PopUpEdit NewButtonVisibility="Visible"
<uc:PopUpEdit NewButtonVisibility="Collapsed"
Cursor="Arrow"
NewClick="popupedit_environmentOrganisationSearch_NewClick"
IsReadOnly="True"
x:Name="popupedit_environmentPersonOrganisationSearch"
Grid.Column="1" Margin="3" Height="23" Grid.Row="1" Grid.ColumnSpan="2"
DeleteButtonVisibility="Collapsed"
PopUpClick="popupedit_environmentPersonOrganisationSearch_PopUpClick"
PreviewMouseDoubleClick="Popupedit_environmentOrganisationSearch_OnPreviewMouseDoubleClick"
Text="{Binding Path=EnvironmentPersons.NewVM.OrganisationString, UpdateSourceTrigger=PropertyChanged}" />
@@ -1409,13 +1412,13 @@
<!--Neu -->
<uc:PopUpEdit Cursor="Arrow" NewButtonVisibility="Visible"
<uc:PopUpEdit Cursor="Arrow" NewButtonVisibility="Collapsed"
PreviewMouseDoubleClick="Popupedit_environmentPersonSearch_OnPreviewMouseDoubleClick"
NewClick="popupedit_environmentPersonSearch_NewClick" IsReadOnly="True"
IsReadOnly="True"
x:Name="popupedit_environmentAnsprechpartnerSearch" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" Height="23"
Grid.Row="1" DeleteButtonVisibility="Collapsed"
PopUpClick="popupedit_environmentansprechpartnersearchviewSearch_PopUpClick"
Text="{val:ValidationBinding Path=EnvironmentOrganisations.NewVM.PersonString, UpdateSourceTrigger=PropertyChanged}" />
Text="{Binding Path=EnvironmentOrganisations.NewVM.PersonString, UpdateSourceTrigger=PropertyChanged}" />
<!--Neu -->
<ComboBox Grid.Column="1" Margin="3" Height="23" Grid.Row="2" Grid.ColumnSpan="2"
@@ -1477,12 +1480,12 @@
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Person" />
<Label Grid.Row="2" Grid.Column="0" Content="Familien Status" />
<Label Grid.Row="2" Grid.Column="0" Content="Familienstatus" />
<Label Grid.Row="3" Grid.Column="0" Content="Notiz" />
<uc:PopUpEdit Cursor="Arrow" NewButtonVisibility="Visible"
PreviewMouseDoubleClick="Popupedit_environmentPersonSearch_OnPreviewMouseDoubleClick"
NewClick="popupedit_environmentPersonSearch_NewClick" IsReadOnly="True"
PreviewMouseDoubleClick="Popupedit_familyPersonSearch_OnPreviewMouseDoubleClick"
NewClick="popupedit_familyPersonSearch_NewClick" IsReadOnly="True"
x:Name="popupedit_environmentFamilySearch" Grid.Column="1" Grid.ColumnSpan="2" Margin="3" Height="23"
Grid.Row="0" DeleteButtonVisibility="Collapsed"
PopUpClick="popupedit_environmentPersonFamilySearch_PopUpClick"

View File

@@ -250,9 +250,9 @@ namespace BeWo.View.Detail
}
Img.EditValueChanged += Image_EditValueChanged;
}
void Image_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
@@ -590,6 +590,21 @@ namespace BeWo.View.Detail
}));
}
private void _PersonModalPopUp_FamilyPersonSavedOrUpdated(object sender, EventArgs<PersonVM> e)
{
ServiceFacade.DoCustomerServiceAsync(
s => s.LoadPersonCompact(e.Data.DataContract.PersonOid.Value),
p => this.Dispatch(
delegate
{
MainControl.CloseCurrentPopUp();
BeWoUtils.UpdateAllViews(p);
ViewModel.EnvironmentPersonsWithFamily.NewVM.Person = p;
popup_newEnvironmentFamily.IsOpen = true;
popupedit_environmentFamilySearch.Focus();
}));
}
private void _OrganisationModalPopUp_OrganisationSavedOrUpdated(object sender, EventArgs<OrganisationVM> e)
{
ServiceFacade.DoCustomerServiceAsync(
@@ -901,7 +916,15 @@ namespace BeWo.View.Detail
popup_newEnvironmentPerson.IsOpen = false;
VMFactory.CreatePersonVMAsync(
cb => this.Dispatch(() => BeWoUtils.OpenModalViewWindow<PersonVM, PersonDC, CustomerView>(cb, this,
() => this.Dispatch(delegate { }), personSavedOrUpdated: _PersonModalPopUp_PersonSavedOrUpdated)));
() => this.Dispatch(delegate { }), personSavedOrUpdated: _PersonModalPopUp_PersonSavedOrUpdated, allowSaveIfParentDirty: true)));
}
private void popupedit_familyPersonSearch_NewClick(object sender, RoutedEventArgs e)
{
popup_newEnvironmentFamily.IsOpen = false;
VMFactory.CreatePersonVMAsync(
cb => this.Dispatch(() => BeWoUtils.OpenModalViewWindow<PersonVM, PersonDC, CustomerView>(cb, this,
() => this.Dispatch(delegate { }), personSavedOrUpdated: _PersonModalPopUp_FamilyPersonSavedOrUpdated, allowSaveIfParentDirty: true)));
}
private void popupedit_environmentOrganisationSearch_NewClick(object sender, RoutedEventArgs e)
@@ -909,7 +932,7 @@ namespace BeWo.View.Detail
popup_newEnvironmentOrganisation.IsOpen = false;
VMFactory.CreateOrganisationVMAsync(
cb => this.Dispatch(() => BeWoUtils.OpenModalViewWindow<OrganisationVM, OrganisationDC, CustomerView>(cb, this,
() => this.Dispatch(delegate { }), _OrganisationModalPopUp_OrganisationSavedOrUpdated)));
() => this.Dispatch(delegate { }), _OrganisationModalPopUp_OrganisationSavedOrUpdated, allowSaveIfParentDirty: true)));
}
private void popupedit_environmentPersonSearch_PopUpClick(object sender, RoutedEventArgs e)
@@ -1064,6 +1087,16 @@ namespace BeWo.View.Detail
CreateModalViewWindow(ViewModel.EnvironmentPersons.NewVM.Person);
}
private void Popupedit_familyPersonSearch_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (ViewModel.EnvironmentPersonsWithFamily.NewVM.Person == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.PersonView_View))
{
return;
}
CreateModalViewWindow(ViewModel.EnvironmentPersonsWithFamily.NewVM.Person);
}
private void Popupedit_environmentOrganisationSearch_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (ViewModel.EnvironmentOrganisations.NewVM.Organisation == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.OrganisationView_View))
@@ -1140,7 +1173,7 @@ namespace BeWo.View.Detail
VMFactory.CreateEmployeeVMAsync((pDC as CompactEmployeeDC).EmployeeOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<EmployeeVM, EmployeeDC, CustomerView>(cb, this, () => this.Dispatch(
() => BeWoUtils.UpdateAllViews(ViewModel.EmployeeRelations.NewVM.Employee ?? (pDC as CompactEmployeeDC))))));
() => BeWoUtils.UpdateAllViews(ViewModel.EmployeeRelations.NewVM.Employee ?? (pDC as CompactEmployeeDC))), allowSaveIfParentDirty: true)));
}
if (pDCType == typeof(CompactOrganisationDC))
@@ -1152,7 +1185,7 @@ namespace BeWo.View.Detail
{
CompactOrganisationDC selectedOrganisation = (isCostBearer ? ViewModel.CostBearers.NewVM.CostBearer : ViewModel.EnvironmentOrganisations.NewVM.Organisation) ?? (pDC as CompactOrganisationDC);
BeWoUtils.UpdateAllViews(selectedOrganisation);
}), (s, args) => this.Dispatch(delegate { }))));
}), (s, args) => this.Dispatch(delegate { }), allowSaveIfParentDirty: true)));
}
if (pDCType == typeof(CompactPersonDC))
@@ -1160,7 +1193,7 @@ namespace BeWo.View.Detail
VMFactory.CreatePersonVMAsync((pDC as CompactPersonDC).PersonOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<PersonVM, PersonDC, CustomerView>(cb, this, () => this.Dispatch(
() => BeWoUtils.UpdateAllViews(ViewModel.EnvironmentPersons.NewVM.Person ?? (pDC as CompactPersonDC))), personSavedOrUpdated: (s, args) => this.Dispatch(delegate{}))));
() => BeWoUtils.UpdateAllViews(ViewModel.EnvironmentPersons.NewVM.Person ?? (pDC as CompactPersonDC))), personSavedOrUpdated: (s, args) => this.Dispatch(delegate{}), allowSaveIfParentDirty: true)));
}
if (pDCType == typeof(CompactTeamDC))
@@ -1168,7 +1201,7 @@ namespace BeWo.View.Detail
VMFactory.CreateTeamVMAsync((pDC as CompactTeamDC).TeamOid,
cb => this.Dispatch(
() => BeWoUtils.OpenModalViewWindow<TeamVM, TeamDC, CustomerView>(cb, this, () => this.Dispatch(
() => BeWoUtils.UpdateAllViews(ViewModel.TeamRelations.NewVM.Team ?? (pDC as CompactTeamDC))))));
() => BeWoUtils.UpdateAllViews(ViewModel.TeamRelations.NewVM.Team ?? (pDC as CompactTeamDC))), allowSaveIfParentDirty: true)));
}
}

View File

@@ -188,7 +188,7 @@
</ComboBox>
<TextBox Name="textbox_first" Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Text="{val:ValidationBinding Path=PersonnelNumber, UpdateSourceTrigger=PropertyChanged}" />
<TextBox Name="textbox_first" Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Text="{Binding Path=PersonnelNumber, UpdateSourceTrigger=PropertyChanged}" />
<TextBox Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Text="{val:ValidationBinding Path=FirstName, UpdateSourceTrigger=PropertyChanged}" />
<TextBox Grid.Column="1" Grid.Row="2" Margin="3" Height="23" Text="{val:ValidationBinding Path=LastName, UpdateSourceTrigger=PropertyChanged}" />
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" Grid.Column="1" Grid.Row="3" Margin="3" Height="23" EditValue="{Binding Path=DateOfBirth, UpdateSourceTrigger=PropertyChanged}" />

View File

@@ -14,15 +14,18 @@ namespace BeWo.View.Detail
{
private bool savedOrUpdated;
private bool allowSaveIfParentDirty;
public BeWoView DetailView { get; set; }
public BeWoView ParentView { get; set; }
public Grid RootGrid { get { return rootGrid; } }
public ModalViewWindow(BeWoView detailView, BeWoView parentView)
public ModalViewWindow(BeWoView detailView, BeWoView parentView, bool allowSaveIfParentDirty)
{
InitializeComponent();
DetailView = detailView;
ParentView = parentView;
this.allowSaveIfParentDirty = allowSaveIfParentDirty;
rootGrid.Children.Add(DetailView);
InitCommandBindings();
@@ -78,7 +81,7 @@ namespace BeWo.View.Detail
(s, e) =>
{
if (ParentView != null)
if (ParentView.IsDirty)
if (!allowSaveIfParentDirty && ParentView.IsDirty)
{
MessageBox.Show("Bevor Sie an diesem Objekt eine Änderung durchführen können, müssen Sie das vorherige Objekt erst speichern!", "Speichern", MessageBoxButton.OK, MessageBoxImage.Exclamation);
return;

View File

@@ -401,9 +401,9 @@
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0">Person</Label>
<Label Grid.Column="0" Grid.Row="1">geschäftl. Mailadresse</Label>
<Label Grid.Column="0" Grid.Row="2">geschäftl. Telefonnummer</Label>
<Label Grid.Column="0" Grid.Row="3">geschäftl. Faxnummer</Label>
<Label Grid.Column="0" Grid.Row="1">Mail</Label>
<Label Grid.Column="0" Grid.Row="2">Telefon</Label>
<Label Grid.Column="0" Grid.Row="3">Fax</Label>
<Label Grid.Column="2" Grid.Row="0">Rolle in der Organisation</Label>
<Label Grid.Column="2" Grid.Row="1">Notiz</Label>

View File

@@ -7,6 +7,7 @@
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
<Grid x:Name="rootGrid">
<Grid.Resources>
@@ -21,9 +22,9 @@
</dxg:GridColumn>
<dxg:GridColumn FieldName="OrganisationString" Header="Organisation" ReadOnly="True"/>
<dxg:GridColumn FieldName="RolleInOrganisation" Header="Rolle" ReadOnly="True"/>
<dxg:GridColumn FieldName="Mail" Header="geschäftl. Mail" />
<dxg:GridColumn FieldName="Phone" Header="geschäftl. Tel." />
<dxg:GridColumn FieldName="Fax" Header="geschäftl. Fax." />
<dxg:GridColumn FieldName="Mail" Header="Mail" />
<dxg:GridColumn FieldName="Phone" Header="Tel." />
<dxg:GridColumn FieldName="Fax" Header="Fax" />
<dxg:GridColumn FieldName="Notice" Header="Notiz" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
@@ -88,6 +89,8 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
@@ -96,25 +99,17 @@
<Label Grid.Column="0" Grid.Row="2" Content="Nachname" />
<Label Grid.Column="0" Grid.Row="3" Content="Geburtstag" />
<Label Grid.Column="0" Grid.Row="4" Content="Geschlecht" />
<Label Grid.Column="0" Grid.Row="5" Content="Funktion" />
<Label Grid.Column="0" Grid.Row="6" Content="Staatsangehörigkeit"/>
<Label Grid.Column="0" Grid.Row="7" Content="Migrationshintergrund" />
<Label x:Name="lblArchiviert" Grid.Column="0" Grid.Row="8" Content="Archiviert" />
<Label Grid.Column="0" Grid.Row="9" VerticalAlignment="Top" Content="Notizen" />
<Label Grid.Column="0" Grid.Row="5" Content="Familienstand" />
<Label Grid.Column="0" Grid.Row="6" Content="Funktion" />
<Label Grid.Column="0" Grid.Row="7" Content="Staatsangehörigkeit"/>
<Label Grid.Column="0" Grid.Row="8" Content="Migrationshintergrund" />
<Label Grid.Column="0" Grid.Row="9" Content="Aufenthaltsstatus"/>
<Label x:Name="lblArchiviert" Grid.Column="0" Grid.Row="10" Content="Archiviert" />
<Label Grid.Column="0" Grid.Row="11" VerticalAlignment="Top" Content="Notizen" />
<Grid Grid.Column="1" Grid.Row="4" Height="23" Margin="0,3,0,3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="RB1" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<RadioButton Grid.Column="0" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
IsChecked="{Binding Path=IsMale, UpdateSourceTrigger=PropertyChanged}" Content="männlich" />
<RadioButton Grid.Column="1" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
IsChecked="{Binding Path=IsFemale, UpdateSourceTrigger=PropertyChanged}" Content="weiblich" />
</Grid>
<ComboBox x:Name="comboBox_Title" Grid.Column="1" Grid.Row="0" Margin="3" Height="23" SelectedValue="{Binding Path=Title, Mode=TwoWay}" />
@@ -123,15 +118,34 @@
<!--<uc:MaskedTextBox Grid.Column="1" Grid.Row="3" Mask="00/00/0000" Margin="3" Height="23" Text="{Binding Path=DateOfBirth, Converter={StaticResource DateConverter}, UpdateSourceTrigger=PropertyChanged}" Width="Auto" HorizontalAlignment="Left" />-->
<dxe:DateEdit MaskType="DateTimeAdvancingCaret" AllowNullInput="True" Grid.Column="1" Grid.Row="3" Height="23" Margin="3" EditValue="{Binding Path=DateOfBirth, UpdateSourceTrigger=PropertyChanged}" Width="100" HorizontalAlignment="Left" />
<ComboBox x:Name="comboBox_Function" Grid.Column="1" Grid.Row="5" Margin="3" Height="23" SelectedValue="{Binding Path=Function, Mode=TwoWay}" />
<CheckBox x:Name="chkArchiviert" Grid.Column="1" Grid.Row="8" Margin="3,5,3,1" Height="23" IsChecked="{Binding Path=IsArchived, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Stretch" />
<TextBox Grid.Row="9" Grid.RowSpan="3" Grid.Column="1" Margin="3" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto" AcceptsReturn="True" Text="{Binding Path=Notice, UpdateSourceTrigger=PropertyChanged}" HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap" AutoWordSelection="True" />
<CheckBox Grid.Column="1" VerticalAlignment="Center" Margin="3,5,3,1" x:Name="chkMigration" Grid.Row="7"
<Grid Grid.Column="1" Grid.Row="4" Height="23" Margin="0,3,0,3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="RB1" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<RadioButton Grid.Column="0" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
IsChecked="{Binding Path=IsMale, UpdateSourceTrigger=PropertyChanged}" Content="männlich" />
<RadioButton Grid.Column="1" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
IsChecked="{Binding Path=IsFemale, UpdateSourceTrigger=PropertyChanged}" Content="weiblich" />
</Grid>
<uc:NullItemComboBox Grid.Column="1" Grid.Row="5" Margin="3" Height="23"
ItemsSource="{x:Static core:EnumTranslations.FamilyStatusTranslations}"
SelectedValue="{Binding Path=FamilyStatus}" DisplayMemberPath="Value"
SelectedValuePath="Key" />
<ComboBox x:Name="comboBox_Function" Grid.Column="1" Grid.Row="6" Margin="3" Height="23" SelectedValue="{Binding Path=Function, Mode=TwoWay}" />
<ComboBox x:Name="comboBox_Nationalitaet" Grid.Column="1" Grid.Row="7" Margin="3" Height="23" SelectedValue="{Binding Path=Nationalitaet, Mode=TwoWay}" />
<CheckBox Grid.Column="1" VerticalAlignment="Center" Margin="3,5,3,1" x:Name="chkMigration" Grid.Row="8"
IsChecked="{Binding Path=IsMigrant, UpdateSourceTrigger=PropertyChanged}" Height="23"/>
<ComboBox x:Name="comboBox_Aufenthalt" Grid.Row="9" Grid.Column="1" Margin="3" Height="23" SelectedValue="{Binding Path=AufenthaltsStatus, Mode=TwoWay}" MinWidth="120" HorizontalAlignment="Stretch"/>
<CheckBox x:Name="chkArchiviert" Grid.Column="1" Grid.Row="10" Margin="3,5,3,1" Height="23" IsChecked="{Binding Path=IsArchived, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Stretch" />
<TextBox Grid.Row="11" Grid.RowSpan="3" Grid.Column="1" Margin="3" VerticalAlignment="Stretch" VerticalScrollBarVisibility="Auto" AcceptsReturn="True" Text="{Binding Path=Notice, UpdateSourceTrigger=PropertyChanged}" HorizontalScrollBarVisibility="Hidden" TextWrapping="Wrap" AutoWordSelection="True" />
<ComboBox x:Name="comboBox_Nationalitaet" Grid.Column="1" Grid.Row="6" Margin="3" Height="23" SelectedValue="{Binding Path=Nationalitaet, Mode=TwoWay}" />
</Grid>
@@ -253,12 +267,12 @@
<Label Grid.Column="0" Grid.Row="0">Organisation</Label>
<Label Grid.Column="0" Grid.Row="1">
geschäftl. Mailadresse
Mail
</Label>
<Label Grid.Column="0" Grid.Row="2">
geschäftl. Telefonnummer
Telefon
</Label>
<Label Grid.Column="0" Grid.Row="3">geschäftl. Faxnummer</Label>
<Label Grid.Column="0" Grid.Row="3">Fax</Label>
<Label Grid.Column="2" Grid.Row="1">Notiz</Label>
<Label Grid.Column="2" Grid.Row="0">Rolle in der Organisation</Label>

View File

@@ -40,6 +40,7 @@ namespace BeWo.View.Detail
comboBox_Function.ItemsSource = pPersonVM.Functions;
ComboBox_RoleInOrganisation.ItemsSource = pPersonVM.RoleInOrganisations;
comboBox_Nationalitaet.ItemsSource = pPersonVM.Nationalitaeten;
comboBox_Aufenthalt.ItemsSource = pPersonVM.AufenthaltsStatuse;
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_AllowArchiving))
{

View File

@@ -1,59 +1,76 @@
<localView:BeWoView x:Class="BeWo.View.Detail.Report.QueryView" 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:localView="clr-namespace:BeWo.View" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars" VerticalAlignment="Stretch" Focusable="True">
<Grid>
<Grid>
<GroupBox Header="Berichte" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox Header="Berichte" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Label VerticalAlignment="Center" Content="Abfrage" Width="100" />
<uc:NullItemComboBox DisplayMemberPath="Title" SelectionChanged="combo_query_SelectionChanged" Height="23" Margin="3" x:Name="combo_query" NullText="Bitte wählen..." MinWidth="250" Width="Auto" />
</StackPanel>
<StackPanel x:Name="paramterPanel" Grid.Row="1" Orientation="Vertical"></StackPanel>
<Button HorizontalAlignment="Left" Grid.Row="2" x:Name="btnExecuteQuery" Click="btnExecuteQuery_Click" Width="80" Margin="0,3,0,3" >Ausführen</Button>
<TextBlock Grid.Row="2" x:Name="textblock_link_pdfexport_direct" VerticalAlignment="Center" Margin="3,3,0,3" FontSize="14" Visibility="Hidden">
<Hyperlink x:Name="linkPdfExport_direct" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="linkPdfExport_direct_RequestNavigate">
<Run x:Name="TxtLinkExport" Text="Bericht öffnen" />
</Hyperlink>
</TextBlock>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<Label VerticalAlignment="Center" Content="Abfrage" Width="100" />
<uc:NullItemComboBox DisplayMemberPath="Title" SelectionChanged="combo_query_SelectionChanged" Height="23" Margin="3" x:Name="combo_query" NullText="Bitte wählen..." MinWidth="250" Width="Auto" />
</StackPanel>
<StackPanel x:Name="paramterPanel" Grid.Row="1" Orientation="Vertical"></StackPanel>
<Button HorizontalAlignment="Left" Grid.Row="2" x:Name="btnExecuteQuery" Click="btnExecuteQuery_Click" Width="80" Margin="0,3,0,3" >Ausführen</Button>
<dxg:GridControl AutoPopulateColumns="True" VerticalAlignment="Stretch" Visibility="Collapsed" Grid.Row="3" HorizontalAlignment="Stretch" x:Name="datagrid_result" >
<TextBlock Grid.Row="2" x:Name="textblock_link_pdfexport_direct" VerticalAlignment="Center" Margin="3,3,0,3" FontSize="14" Visibility="Hidden">
<Hyperlink x:Name="linkPdfExport_direct" TargetName="_NewWindow" Foreground="#FF2B508B" RequestNavigate="linkPdfExport_direct_RequestNavigate">
<Run x:Name="TxtLinkExport" Text="Bericht öffnen" />
</Hyperlink>
</TextBlock>
<dxg:GridControl.View>
<dxg:TableView AllowEditing="False" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="True" NavigationStyle="Cell" Margin="3,22,3,3" IsColumnMenuEnabled="False" IsGroupPanelMenuEnabled="False" IsTotalSummaryMenuEnabled="False" IsRowCellMenuEnabled="False" />
</dxg:GridControl.View>
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem SummaryType="Count" x:Name="summaryItem" />
</dxg:GridControl.TotalSummary>
</dxg:GridControl>
<Grid Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" x:Name="textblock_link_pdfexport" VerticalAlignment="Center" Margin="5 0" HorizontalAlignment="Left" FontSize="14">
<Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="{StaticResource GridPrintMenuLightBrush}" RequestNavigate="linkPdfExport_RequestNavigate">
<Run Text="Drucken" />
</Hyperlink>
</TextBlock>
<Grid x:Name="GridImport" Grid.Row="2" Visibility="Collapsed">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="Datei" VerticalAlignment="Center" Width="100"/>
<uc:PopUpEdit IsReadOnly="True" Name="popupedit_file" Grid.Column="1" Margin="3" Height="23" Width="250" Grid.Row="0" HorizontalAlignment="Left" DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_file_PopUpClick" />
<Button IsEnabled="False" Name="button_uploadDocument" Margin="3" Height="25" Grid.Row="0" Grid.Column="2" Click="button_uploadDocument_Click" Content="Datei importieren" />
</Grid>
<dxg:GridControl AutoPopulateColumns="True" VerticalAlignment="Stretch" Visibility="Collapsed" Grid.Row="3" HorizontalAlignment="Stretch" x:Name="datagrid_result" >
<dxg:GridControl.View>
<dxg:TableView AllowEditing="False" ShowGroupPanel="False" ShowGroupedColumns="False" ShowTotalSummary="True" NavigationStyle="Cell" Margin="3,22,3,3" IsColumnMenuEnabled="False" IsGroupPanelMenuEnabled="False" IsTotalSummaryMenuEnabled="False" IsRowCellMenuEnabled="False" />
</dxg:GridControl.View>
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem SummaryType="Count" x:Name="summaryItem" />
</dxg:GridControl.TotalSummary>
</dxg:GridControl>
<Grid Grid.Row="3" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="5,5,5,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="1" x:Name="textblock_link_pdfexport" VerticalAlignment="Center" Margin="5 0" HorizontalAlignment="Left" FontSize="14">
<Hyperlink x:Name="linkPdfExport" TargetName="_NewWindow" Foreground="{StaticResource GridPrintMenuLightBrush}" RequestNavigate="linkPdfExport_RequestNavigate">
<Run Text="Drucken" />
</Hyperlink>
</TextBlock>
<TextBlock Grid.Column="2" x:Name="textblock_link" VerticalAlignment="Center" Margin="5 0" HorizontalAlignment="Left" FontSize="14">
<Hyperlink x:Name="linkExcelExport" TargetName="newWindow" Foreground="{StaticResource GridPrintMenuLightBrush}" RequestNavigate="linkExcelExport_RequestNavigate">
<Run Text="Excel Export" />
</Hyperlink>
</TextBlock>
</Grid>
</Grid>
</Grid>
</GroupBox>
</Grid>
</Grid>
</GroupBox>
</Grid>
</localView:BeWoView>

View File

@@ -12,7 +12,7 @@ using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Navigation;
using System.Windows.Threading;
using BeWo.Controls;
using BeWo.Core;
using BeWo.ServiceProxy;
@@ -28,7 +28,7 @@ using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Grid;
using BeWo.Core.Service;
using BeWo.ViewModel;
using Microsoft.Win32;
namespace BeWo.View.Detail.Report
@@ -45,6 +45,8 @@ namespace BeWo.View.Detail.Report
private CompactSupportConceptDC lastSelectedSupportConcept;
private CompactTeamDC lastSelectedTeam;
private String _UploadFileName;
public QueryView(IEnumerable<QueryDC> pQueries)
{
try
@@ -689,10 +691,12 @@ namespace BeWo.View.Detail.Report
var lQuery = combo_query.SelectedItem as QueryDC;
ResetQueryFields();
GridImport.Visibility = Visibility.Collapsed;
String exportTitle = "Bericht öffnen";
if (lQuery != null)
{
if (!String.IsNullOrWhiteSpace(lQuery.ExportTitle))
{
exportTitle = lQuery.ExportTitle;
@@ -707,8 +711,19 @@ namespace BeWo.View.Detail.Report
btnExecuteQuery.Visibility = Visibility.Hidden;
textblock_link_pdfexport_direct.Visibility = Visibility.Visible;
}
else if (lQuery.IsImport)
{
datagrid_result.Visibility = Visibility.Collapsed;
textblock_link.Visibility = Visibility.Collapsed;
textblock_link_pdfexport.Visibility = Visibility.Collapsed;
btnExecuteQuery.Visibility = Visibility.Collapsed;
textblock_link_pdfexport_direct.Visibility = Visibility.Collapsed;
GridImport.Visibility = Visibility.Visible;
}
else
{
btnExecuteQuery.Visibility = Visibility.Collapsed;
textblock_link_pdfexport_direct.Visibility = Visibility.Collapsed;
ExecuteQuery(lQuery, null);
@@ -729,6 +744,10 @@ namespace BeWo.View.Detail.Report
btnExecuteQuery.Visibility = Visibility.Hidden;
textblock_link_pdfexport_direct.Visibility = Visibility.Visible;
}
else if (lQuery.IsImport)
{
GridImport.Visibility = Visibility.Visible;
}
else
{
btnExecuteQuery.Visibility = Visibility.Visible;
@@ -878,5 +897,92 @@ namespace BeWo.View.Detail.Report
}
}
private void popupedit_file_PopUpClick(object sender, RoutedEventArgs ev)
{
var dlg = new OpenFileDialog();
if (dlg.ShowDialog() == true)
{
try
{
_UploadFileName = dlg.FileName;
popupedit_file.Text = dlg.SafeFileName;
button_uploadDocument.IsEnabled = true;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
}
}
private void button_uploadDocument_Click(object sender, RoutedEventArgs pe)
{
if (!String.IsNullOrEmpty(popupedit_file.Text))
{
long? bewoFolderOid = null;
try
{
var upload = new ProgressStream(File.OpenRead(_UploadFileName));
//upload.ProgressChanged += (s, e) => Dispatcher.BeginInvoke(
// DispatcherPriority.Normal,
// (Action)(() =>
// {
// progressbar_upload.Value = e.Data;
// text_progress.Content = string.Format("Bitte warten... {0:00}%", e.Data * 100);
// }));
var lUlPackage = new UploadPackage(null, 0, _UploadFileName, null, 0, 0, upload);
ServiceFacade.DoStreamingServiceAsync(
s => s.UploadImportFile(lUlPackage),
r => this.Dispatch(
delegate
{
_UploadFileName = null;
button_uploadDocument.IsEnabled = false;
popupedit_file.Text = string.Empty;
upload.Dispose();
if (r != null && !String.IsNullOrEmpty(r.ResultMessage))
{
if (r.Success)
{
MessageBox.Show(r.ResultMessage, "Import", MessageBoxButton.OK,
MessageBoxImage.Information);
}
else
{
MessageBox.Show(r.ResultMessage, "Import", MessageBoxButton.OK,
MessageBoxImage.Exclamation);
}
}
}),
() => this.Dispatch(
delegate
{
upload.Dispose();
}));
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
}
}
}
}

View File

@@ -18,41 +18,44 @@
<Border BorderBrush="#FF86878F" BorderThickness="0,0,0,1" Padding="3">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="110" />
<ColumnDefinition Width="80" />
<ColumnDefinition Width="100" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="120" />
<ColumnDefinition Width="70" />
<ColumnDefinition Width="130" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="24" />
<RowDefinition Height="24" />
<RowDefinition Height="24" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<CheckBox Grid.Column="0" Grid.Row="0" x:Name="checkbox_allEmployees" IsChecked="False" Content="Alle Mitarbeiter" Checked="CheckBoxAllEmployees_Checked" VerticalAlignment="Center" />
<uc:PopUpEdit Grid.Column="1" Grid.Row="0" Grid.ColumnSpan="2" IsReadOnly="True"
Visibility="{Binding Path=IsChecked, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, ElementName=checkbox_allEmployees}"
<RadioButton x:Name="radioEmployeeReport" Grid.Column="0" Grid.ColumnSpan="2" Content="Nach Mitarbeiter auswerten" GroupName="radioReportType" IsChecked="True" Margin="4,3,0,3" Checked="RadioButton_Checked" Height="22" />
<RadioButton x:Name="radioTeamReport" Grid.Column="2" Grid.ColumnSpan="3" GroupName="radioReportType" Content="Nach Team auswerten" Margin="-10,3,0,3" Checked="RadioButton_Checked" />
<CheckBox Grid.Column="0" Grid.Row="1" Margin="3" x:Name="checkbox_allEmployees" IsChecked="False" Content="Alle Mitarbeiter" Checked="CheckBoxAllEmployees_Checked" Unchecked="CheckBoxAllEmployees_Checked" VerticalAlignment="Center" />
<uc:PopUpEdit Grid.Column="1" Grid.Row="1" Margin="3" Grid.ColumnSpan="2" IsReadOnly="True"
x:Name="popupedit_employee" DeleteButtonVisibility="Collapsed"
PopUpClick="popupedit_employee_PopUpClick" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left" Height="22" Cursor="Arrow" />
<CheckBox Grid.Column="0" Grid.Row="1" x:Name="checkbox_all_teams" IsChecked="False" Content="Alle Teams" Checked="CheckBoxAllTeams_Checked" VerticalAlignment="Center" />
<uc:PopUpEdit Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" IsReadOnly="True" Visibility="{Binding Path=IsChecked, Converter={StaticResource BoolVisibilityHiddenConverter}, ConverterParameter=false, ElementName=checkbox_all_teams}"
<CheckBox Grid.Column="0" Grid.Row="1" Margin="3" x:Name="checkbox_all_teams" IsChecked="False" Content="Alle Teams" Checked="CheckBoxAllTeams_Checked" Unchecked="CheckBoxAllTeams_Checked" VerticalAlignment="Center" />
<uc:PopUpEdit Grid.Column="1" Grid.Row="1" Margin="3" Grid.ColumnSpan="2" IsReadOnly="True"
x:Name="popupedit_team" DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_team_PopUpClick" HorizontalAlignment="Stretch"
HorizontalContentAlignment="Left" Height="22"
Cursor="Arrow" />
<Label Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Content="Nur Einträge berücksichtigen bis" Margin="0,0,0,0" />
<dxe:DateEdit Grid.Column="2" Grid.Row="2" MaskType="DateTimeAdvancingCaret" x:Name="datepicker_appointeddate" Height="22" HorizontalAlignment="Stretch"/>
<dxe:DateEdit Grid.Column="2" Grid.Row="2" Margin="3" MaskType="DateTimeAdvancingCaret" x:Name="datepicker_appointeddate" Height="22" HorizontalAlignment="Stretch"/>
<CheckBox Grid.Column="4" Grid.Row="0" Content="Nur Hilfepläne meiner Klienten anzeigen" VerticalAlignment="Center" x:Name="chkShowOnlyMySupportConcepts" />
<CheckBox Grid.Column="4" Grid.Row="1" x:Name="ChkHpDieAuslaufen" Content="Nur Hilfepläne anzeigen, die innerhalb der nächsten drei Monate auslaufen" VerticalAlignment="Center"/>
<CheckBox Grid.Column="4" Grid.Row="2" Content="Auch archivierte Hilfepläne anzeigen" VerticalAlignment="Center" x:Name="chkShowArchived" />
<CheckBox Grid.Column="4" Grid.Row="1" x:Name="ChkHpDieAuslaufen" Content="Nur Hilfepläne anzeigen, die innerhalb der nächsten drei Monate auslaufen" VerticalAlignment="Center" Margin="8,3,3,3"/>
<CheckBox Grid.Column="4" Grid.Row="2" Content="Auch archivierte Hilfepläne anzeigen" VerticalAlignment="Center" x:Name="chkShowArchived" Margin="8,3,3,3" />
<Button Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3" VerticalAlignment="Bottom" HorizontalAlignment="Left" Content="Aktualisieren" Margin="0,3,0,0" x:Name="buttonRefresh" Click="buttonRefresh_Click" />
<Button Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3" VerticalAlignment="Bottom" HorizontalAlignment="Left" Content=" Aktualisieren " Margin="0,3,0,0" x:Name="buttonRefresh" Click="buttonRefresh_Click" />
</Grid>
</Border>
<Grid Margin="0,5,0,0">

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
@@ -27,30 +28,24 @@ namespace BeWo.View.Detail.Report
this.datepicker_appointeddate.AllowNullInput = true;
this.datepicker_appointeddate.EditValue = null;
this.chkShowOnlyMySupportConcepts.IsChecked = true;
_SelectedEmployee = BeWoApp.LoggedOnUser.Employee;
if (_SelectedEmployee != null)
{
popupedit_employee.Text = _SelectedEmployee.ToString();
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_ViewAllSupportConcepts) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
if (!DarfAlleMitarbeiterSehen)
{
this.chkShowOnlyMySupportConcepts.IsEnabled = false;
checkbox_allEmployees.IsEnabled = false;
checkbox_allEmployees.IsChecked = false;
popupedit_employee.Text = String.Format("{0}, {1}", BeWoApp.LoggedOnEmployee.LastName,
BeWoApp.LoggedOnEmployee.FirstName);
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_EmployeeOverviewAll_View))
{
popupedit_employee.IsEnabled = false;
checkbox_allEmployees.IsEnabled = false;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForAllTeams))
{
popupedit_team.IsEnabled = false;
checkbox_all_teams.IsEnabled = false;
}
ChangeReportType();
ChkHpDieAuslaufen.Content =
String.Format("Nur Hilfepläne anzeigen, die innerhalb der nächsten {0} Monate auslaufen",
@@ -72,10 +67,28 @@ namespace BeWo.View.Detail.Report
// }
this.DataContext = this._UnfilteredSupportConcept2Overviews;
this.Loaded += this.SupportConceptsAnalysisView_Loaded;
this.UpdateReportUrl();
UpdateReportUrl();
}
public bool DarfAlleMitarbeiterSehen
{
get
{
return BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_EmployeeOverviewAll_View) && BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) && BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_ViewAllSupportConcepts);
}
}
public bool DarfTeamsSehen
{
get
{
return BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForAllTeams) || BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForTeam);
}
}
private void SupportConceptsAnalysisView_Loaded(object sender, RoutedEventArgs e)
{
this.textbox_search.Focus();
@@ -84,9 +97,8 @@ namespace BeWo.View.Detail.Report
private void UpdateReportUrl()
{
string url;
long showOnlyMySupportConcepts = this.chkShowOnlyMySupportConcepts.IsChecked.Value ? 1 : 0;
long showOnlySCsExpiringNextThreeMonths = this.ChkHpDieAuslaufen.IsChecked.Value ? 1 : 0;
int months = this.ChkHpDieAuslaufen.IsChecked.Value ? BeWoApp.AppSettings.HilfeplanAuslaufAuswahl : 0;
long showArchived = this.chkShowArchived.IsChecked.Value ? 1 : 0;
long eOid = 0;
@@ -100,22 +112,61 @@ namespace BeWo.View.Detail.Report
{
tOid = _SelectedTeam.TeamOid;
}
// if (ViewModel != null && ViewModel.ServiceRecordsForSelectedCustomer != null && ViewModel.ServiceRecordsForSelectedCustomer.Count > 0)
// {
url = BeWoApp.SiteOfOrigin + "/ReportView.aspx"
//+ "?tenant=" + BeWoApp.Tenant
//+ "&username=" + BeWoApp.UserName
//+ "&token=" + BeWoApp.LoggedOnUser.RC2Password
+ "?my=" + showOnlyMySupportConcepts
+ "&exp=" + showOnlySCsExpiringNextThreeMonths
+ "&arc=" + showArchived
+ "&eOid=" + eOid
+ "&tOid=" + tOid
+ "&type=" + Utils.EnumName(ReportTypes.SupportConceptReport);
List<SupportConceptOverviewDC> itemList = new List<SupportConceptOverviewDC>();
if (!String.IsNullOrWhiteSpace(textbox_search.Text))
{
var visibleScItems = listview_list.Items;
foreach (var item in visibleScItems)
{
var dcList = ((KeyValuePair<string, List<SupportConceptOverviewDC>>) item).Value;
foreach (var dc in dcList)
{
itemList.Add(dc);
}
}
}
if (itemList != null && itemList.Count > 0)
{
StringBuilder oidString = new StringBuilder();
foreach (var item in itemList)
{
if (oidString.Length > 0)
{
oidString.Append(",");
}
oidString.Append(item.CostBearer2SupportConceptOid);
}
url = BeWoApp.SiteOfOrigin + "/ReportView.aspx"
//+ "?tenant=" + BeWoApp.Tenant
//+ "&username=" + BeWoApp.UserName
//+ "&token=" + BeWoApp.LoggedOnUser.RC2Password
+ "?c2slist=" + oidString.ToString()
+ "&type=" + Utils.EnumName(ReportTypes.SupportConceptReport);
}
else
{
// if (ViewModel != null && ViewModel.ServiceRecordsForSelectedCustomer != null && ViewModel.ServiceRecordsForSelectedCustomer.Count > 0)
// {
url = BeWoApp.SiteOfOrigin + "/ReportView.aspx"
//+ "?tenant=" + BeWoApp.Tenant
//+ "&username=" + BeWoApp.UserName
//+ "&token=" + BeWoApp.LoggedOnUser.RC2Password
+ "?eOid=" + eOid
+ "&tOid=" + tOid
+ "&exp=" + months
+ "&arc=" + showArchived
+ "&type=" + Utils.EnumName(ReportTypes.SupportConceptReport);
}
if (datepicker_appointeddate.EditValue != null)
url += "&date=" + String.Format("{0:d}", datepicker_appointeddate.DateTime);
url = BeWoWpfUtils.GetHTMLEncodedURL(url);
this.linkPdfExport.NavigateUri = new Uri(url);
@@ -125,17 +176,35 @@ namespace BeWo.View.Detail.Report
private void buttonRefresh_Click(object sender, RoutedEventArgs e)
{
bool showOnlyRelated = this.chkShowOnlyMySupportConcepts.IsChecked.Value;
bool showOnlyArchivedSCs = this.chkShowArchived.IsChecked.Value;
this.UpdateReportUrl();
//this.UpdateReportUrl();
DateTime? dt = null;
if (this.datepicker_appointeddate.EditValue != null)
dt = this.datepicker_appointeddate.DateTime;
int? months = null;
if (this.ChkHpDieAuslaufen.IsChecked.Value)
{
months = BeWoApp.AppSettings.HilfeplanAuslaufAuswahl;
}
bool showArchived = this.chkShowArchived.IsChecked.Value;
long? eOid = null;
long? tOid = null;
if (_SelectedEmployee != null && checkbox_allEmployees.IsChecked == false)
{
eOid = _SelectedEmployee.EmployeeOid;
}
if (_SelectedTeam != null && checkbox_all_teams.IsChecked == false)
{
tOid = _SelectedTeam.TeamOid;
}
ServiceFacade.DoAnalysisServiceAsync(
s => s.GetSupportConceptAnalysis(BeWoApp.LoggedOnUser.Employee.EmployeeOid, showOnlyRelated, showOnlyArchivedSCs, dt),
s => s.GetSupportConceptAnalysis2(eOid, tOid, dt, months, showArchived),
r =>
{
this.Dispatch(
@@ -164,17 +233,20 @@ namespace BeWo.View.Detail.Report
private void LinkPdfExport_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
{
UpdateReportUrl();
BeWoUtils.NavigateToReportUri((sender as System.Windows.Documents.Hyperlink).NavigateUri.ToString(), "Hilfeplanübersicht");
//System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo((sender as System.Windows.Documents.Hyperlink).NavigateUri.ToString()));
}
private void CheckBoxAllEmployees_Checked(object sender, RoutedEventArgs e)
{
if (popupedit_employee != null)
{
popupedit_employee.Text = string.Empty;
_SelectedEmployee = null;
}
if (popupedit_employee == null)
return;
popupedit_employee.Text = string.Empty;
_SelectedEmployee = null;
ChangeReportType();
}
private void popupedit_employee_PopUpClick(object sender, RoutedEventArgs e)
@@ -189,6 +261,8 @@ namespace BeWo.View.Detail.Report
popupedit_team.Text = string.Empty;
_SelectedTeam = null;
}
ChangeReportType();
}
private void popupedit_team_PopUpClick(object sender, RoutedEventArgs e)
@@ -211,6 +285,89 @@ namespace BeWo.View.Detail.Report
}
private void RadioButton_Checked(object sender, RoutedEventArgs e)
{
ChangeReportType();
}
private void ChangeReportType()
{
if (radioTeamReport != null && popupedit_team != null)
{
bool isEmployee = true;
if (radioTeamReport.IsChecked != null && radioTeamReport.IsChecked.Value)
{
isEmployee = false;
}
checkbox_allEmployees.Visibility = isEmployee ? Visibility.Visible : Visibility.Hidden;
popupedit_employee.Visibility = isEmployee ? Visibility.Visible : Visibility.Hidden;
checkbox_all_teams.Visibility = isEmployee ? Visibility.Hidden : Visibility.Visible;
popupedit_team.Visibility = isEmployee ? Visibility.Hidden : Visibility.Visible;
if (checkbox_allEmployees.IsChecked.HasValue && checkbox_allEmployees.Visibility == Visibility.Visible)
{
popupedit_employee.Visibility = checkbox_allEmployees.IsChecked.Value ? Visibility.Hidden : Visibility.Visible;
}
if (checkbox_all_teams.IsChecked.HasValue && checkbox_all_teams.Visibility == Visibility.Visible)
{
popupedit_team.Visibility = checkbox_all_teams.IsChecked.Value ? Visibility.Hidden : Visibility.Visible;
}
if (!DarfAlleMitarbeiterSehen)
{
if (!DarfTeamsSehen)
{
checkbox_allEmployees.IsEnabled = false;
checkbox_allEmployees.IsChecked = false;
checkbox_allEmployees.IsEnabled = false;
popupedit_employee.IsEnabled = false;
checkbox_all_teams.IsEnabled = false;
popupedit_team.IsEnabled = false;
radioTeamReport.IsEnabled = false;
radioEmployeeReport.IsEnabled = false;
//checkbox_showTeamReport.Visibility = Visibility.Collapsed;
}
else
{
checkbox_allEmployees.IsEnabled = false;
checkbox_allEmployees.IsChecked = false;
popupedit_employee.IsEnabled = false;
//checkbox_all.Visibility = Visibility.Collapsed;
//popupedit_employee.Visibility = Visibility.Collapsed;
var ol = teamSearchView.ObjectList;
if (ol != null)
{
List<CompactTeamDC> teams = new List<CompactTeamDC>();
var emp = BeWoApp.LoggedOnUser.Employee;
if (emp.LeadingTeamOids != null && emp.LeadingTeamOids.Count > 0)
{
foreach (var t in ol)
{
if (emp.LeadingTeamOids.Contains(t.TeamOid))
{
teams.Add(t);
}
}
}
teamSearchView.ObjectList = teams;
}
}
}
//if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_ViewAllSupportConcepts) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
//{
// checkbox_allEmployees.IsEnabled = false;
//}
}
}
}
}

View File

@@ -1051,7 +1051,7 @@
<dxe:DateSettings DisplayFormat="MMMM yyyy"></dxe:DateSettings>
</dxg:GridColumn.EditSettings>
</dxg:GridColumn>
<dxg:GridColumn FieldName="StartDate" AllowEditing="False" Header="Datum" Width="70">
<dxg:GridColumn FieldName="StartDate" AllowEditing="False" Header="Datum" Width="90">
<dxg:GridColumn.EditSettings>
<dxe:DateSettings DisplayFormat="ddd, dd.MM.yyyy"></dxe:DateSettings>
</dxg:GridColumn.EditSettings>

View File

@@ -201,8 +201,8 @@ namespace BeWo.View.Master
VMFactory.CreateValueListVMAsync(ValueListEntryType.EnvironmentPersonType,
personList => VMFactory.CreateValueListVMAsync(ValueListEntryType.RoleInOrganisationType,
roleInOrgList => VMFactory.CreateValueListVMAsync(ValueListEntryType.EnvironmentOrganisationType,
roleInFamily => VMFactory.CreateValueListVMAsync(ValueListEntryType.RoleInFamily,
orgList => this.Dispatch(() => AddView(tabitem_environmentRoles,
orgList => VMFactory.CreateValueListVMAsync(ValueListEntryType.RoleInFamily,
roleInFamily => this.Dispatch(() => AddView(tabitem_environmentRoles,
new EnvironmentRoleView(personList, orgList,roleInOrgList,roleInFamily)))))));
}

View File

@@ -155,10 +155,21 @@ namespace BeWo.View.Navigation
{
objectList = r.Cast<IFilterableDC>();
}
else
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnTeam))
{
objectList = r.Where(emp =>
emp.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid ||
(BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids != null && BeWoApp.LoggedOnUser.Employee.AllTeamMemberOids.Contains(emp.EmployeeOid))).Cast<IFilterableDC>();
}
else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowViewOwnEmployees))
{
objectList = r.Where(emp => emp.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid).Cast<IFilterableDC>();
}
else
{
objectList = new List<IFilterableDC>();
}
this.mainNavigationView.ShowSearchResult(objectList);
}));

View File

@@ -37,6 +37,8 @@ namespace BeWo.View.Navigation
private AbstractSorter mSorter;
private IEnumerable<IFilterableDC> allObjectList;
public MainNavigationView()
{
InitializeComponent();
@@ -369,6 +371,7 @@ namespace BeWo.View.Navigation
public void ShowSearchResult(IEnumerable<IFilterableDC> result)
{
allObjectList = result;
SortSearchResult(result);
}
@@ -661,7 +664,15 @@ namespace BeWo.View.Navigation
private void sortDirectionToggleButton_Click(object sender, RoutedEventArgs e)
{
SortSearchResult(objectListBox.ItemsSource as IEnumerable<IFilterableDC>);
if (allObjectList != null)
{
SortSearchResult(allObjectList);
}
else
{
SortSearchResult(objectListBox.ItemsSource as IEnumerable<IFilterableDC>);
}
}
private void ReloadButton_OnClick(object sender, RoutedEventArgs e)

View File

@@ -12,6 +12,7 @@ namespace BeWo.View.Navigation.Sorter
{
List<SortItem> list = new List<SortItem>(1);
list.Add(new SortItem("Name", "Name"));
list.Add(new SortItem("Funktion", "Function"));
list.Add(new SortItem("Straße", "Street"));
list.Add(new SortItem("PLZ", "PostalCode"));
list.Add(new SortItem("Ort", "Town"));

View File

@@ -88,7 +88,7 @@ namespace BeWo.View.Navigation
}
else
{
MessageBox.Show("Sie können Ihren eigenen Benutzer nicht löschen", "Fehler", MessageBoxButton.OK, MessageBoxImage.Information);
MessageBox.Show("Sie können Ihren eigenen Benutzer nicht löschen!", "Fehler", MessageBoxButton.OK, MessageBoxImage.Exclamation);
}
}

View File

@@ -1,5 +1,5 @@
using BeWo.Validation;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
@@ -203,6 +203,19 @@ namespace BeWo.ViewModel
}
}
public string FamilyStatus
{
get
{
if (_Person.FamilyStatus.HasValue)
{
return EnumTranslations.FamilyStatusTranslations[_Person.FamilyStatus];
}
return "";
}
set { }
}
protected override void InitByDataContract(CustomerPersonRelationDC pDataContract)
{
if (!IsNew)

View File

@@ -1637,8 +1637,8 @@ namespace BeWo.ViewModel
}
}
}
EnvironmentPersons = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListUmfeld);
EnvironmentPersonsWithFamily = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListFamily);
EnvironmentPersons = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListUmfeld, ValueListEntryType.EnvironmentPersonType);
EnvironmentPersonsWithFamily = VMFactory.CreateCustomerEnvironmentPersonRelListVM(dcListFamily, ValueListEntryType.RoleInFamily);
EnvironmentOrganisations = VMFactory.CreateCustomerEnvironmentOrganisationRelListVM(pDataContract.EnvironmentOrganisations ?? (pDataContract.EnvironmentOrganisations = new List<CustomerOrganisationRelationDC>()));

View File

@@ -710,7 +710,6 @@ namespace BeWo.ViewModel
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public string PersonnelNumber
{
get { return _PersonnelNumber; }

View File

@@ -70,6 +70,10 @@ namespace BeWo.ViewModel
public static string PropertyName_Nationalitaet = "Nationalitaet";
public static string PropertyName_FamilyStatus = "FamilyStatus";
public static string PropertyName_AufenthaltsStatus = "AufenthaltsStatus";
private DateTime? _DateOfBirth;
private string _FirstName;
@@ -130,7 +134,14 @@ namespace BeWo.ViewModel
private ObservableSortCollection<ValueListEntryDC> _Nationalitaeten;
public PersonVM(PersonDC pDataContract, List<ValueListEntryDC> pPossibleTitles, List<ValueListEntryDC> pPossibleFunctions, List<ValueListEntryDC> pPossibleRoleInOrganisation, List<ValueListEntryDC> pPossibleNationalitaeten)
private FamilyStatus? _FamilyStatus;
private ValueListEntryDC _AufenthaltsStatus;
private ObservableSortCollection<ValueListEntryDC> _AufenthaltsStatuse;
public PersonVM(PersonDC pDataContract, List<ValueListEntryDC> pPossibleTitles, List<ValueListEntryDC> pPossibleFunctions, List<ValueListEntryDC> pPossibleRoleInOrganisation, List<ValueListEntryDC> pPossibleNationalitaeten, List<ValueListEntryDC> pPossibleAufenthaltsStati)
: base(pDataContract, pDataContract.PersonOid == null)
{
this._Titles = new ObservableSortCollection<ValueListEntryDC>(pPossibleTitles, Comparer.ValueListEntryDCComparer);
@@ -140,6 +151,9 @@ namespace BeWo.ViewModel
_RoleInOrganisations = new ObservableSortCollection<ValueListEntryDC>(pPossibleRoleInOrganisation, Comparer.ValueListEntryDCComparer);
_Nationalitaeten = new ObservableSortCollection<ValueListEntryDC>(pPossibleNationalitaeten, Comparer.ValueListEntryDCComparer);
_AufenthaltsStatuse = new ObservableSortCollection<ValueListEntryDC>(pPossibleAufenthaltsStati, Comparer.ValueListEntryDCComparer);
}
public DateTime? DateOfBirth
@@ -339,19 +353,34 @@ namespace BeWo.ViewModel
}
}
//public PersonOrganisationRelationVM NewOrganisationRelation
//{
// get { return this._NewOrganisationRelation; }
//public PersonOrganisationRelationVM NewOrganisationRelation
//{
// get { return this._NewOrganisationRelation; }
// set
// {
// if (this.AreDifferent(this._NewOrganisationRelation, value))
// {
// this._NewOrganisationRelation = value;
// this.FirePropertyChanged(PropertyName_NewOrganisationRelation);
// }
// }
//}
// set
// {
// if (this.AreDifferent(this._NewOrganisationRelation, value))
// {
// this._NewOrganisationRelation = value;
// this.FirePropertyChanged(PropertyName_NewOrganisationRelation);
// }
// }
//}
public FamilyStatus? FamilyStatus
{
get { return _FamilyStatus; }
set
{
if (AreDifferent(_FamilyStatus, value))
{
_FamilyStatus = value;
StoreDirtyInformation(AreDifferent(DataContract.FamilyStatus, value), PropertyName_FamilyStatus);
FirePropertyChanged(PropertyName_FamilyStatus);
}
}
}
public string Notice
{
@@ -647,6 +676,36 @@ namespace BeWo.ViewModel
}
}
public ValueListEntryDC AufenthaltsStatus
{
get { return this._AufenthaltsStatus; }
set
{
if (this.AreDifferent(this._AufenthaltsStatus, value))
{
this._AufenthaltsStatus = value;
this.StoreDirtyInformation(this.AreDifferent(DataContract.AufenthaltsStatus, value), PropertyName_AufenthaltsStatus);
this.FirePropertyChanged(PropertyName_AufenthaltsStatus);
}
}
}
public ObservableSortCollection<ValueListEntryDC> AufenthaltsStatuse
{
get
{
if (_AufenthaltsStatuse == null)
{
this._AufenthaltsStatuse = new ObservableSortCollection<ValueListEntryDC>();
}
return this._AufenthaltsStatuse;
}
}
protected override void InitByDataContract(PersonDC pDataContract)
{
this._VarFields = new VarFieldListVM(pDataContract.VarFields);
@@ -656,6 +715,7 @@ namespace BeWo.ViewModel
this._DateOfBirth = pDataContract.DateOfBirth;
this._FirstName = pDataContract.FirstName;
this._LastName = pDataContract.LastName;
_FamilyStatus = pDataContract.FamilyStatus;
this._PostalCode = pDataContract.PostalCode;
this._Street = pDataContract.Street;
this._AddressLine1 = pDataContract.AddressLine1;
@@ -672,7 +732,7 @@ namespace BeWo.ViewModel
this._Function = pDataContract.Function;
_IsMigrant = pDataContract.IsMigrant;
_Nationalitaet = pDataContract.Nationalitaet;
_AufenthaltsStatus = pDataContract.AufenthaltsStatus;
foreach (ContactDC iContactDC in pDataContract.ContactInformations)
{
@@ -721,6 +781,7 @@ namespace BeWo.ViewModel
pDataContract.DateOfBirth = this._DateOfBirth;
pDataContract.FirstName = this._FirstName;
pDataContract.LastName = this._LastName;
pDataContract.FamilyStatus = _FamilyStatus;
pDataContract.PostalCode = this._PostalCode;
pDataContract.Street = this._Street;
pDataContract.AddressLine1 = this._AddressLine1;
@@ -729,6 +790,7 @@ namespace BeWo.ViewModel
pDataContract.InvoiceAddressTown = this._InvoiceAddressTown;
pDataContract.InvoiceAddressPostalCode = this._InvoiceAddressPostalCode;
pDataContract.ActivationType = this._IsArchived ? ActivationTypeId.Archived : ActivationTypeId.Active;
pDataContract.AufenthaltsStatus = _AufenthaltsStatus;
pDataContract.PersonNotice = this._Notice;
if (this._VarFields != null)

View File

@@ -92,9 +92,9 @@ namespace BeWo.ViewModel
pCallBack(new OrganisationPersonRelationListVM(pDCs));
}
public static CustomerPersonRelationListVM CreateCustomerEnvironmentPersonRelListVM(List<CustomerPersonRelationDC> pList)
public static CustomerPersonRelationListVM CreateCustomerEnvironmentPersonRelListVM(List<CustomerPersonRelationDC> pList, ValueListEntryType vtype)
{
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(ValueListEntryType.EnvironmentPersonType);
var valueList = Cache.GetInstance().GetAllValueListEntrysByTypeSync(vtype);
return new CustomerPersonRelationListVM(pList, valueList);
}
@@ -383,7 +383,9 @@ namespace BeWo.ViewModel
ValueListEntryType.RoleInOrganisationType,
r5 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.Nationality,
r3 => pCallBack(
r3 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.Aufenthaltsstatus,
r6 => pCallBack(
new PersonVM(
new PersonDC
{
@@ -392,7 +394,8 @@ namespace BeWo.ViewModel
r1,
r4,
r5,
r3)))))));
r3,
r6))))))));
}
public static void CreatePersonVMAsync(long pOid, Action<PersonVM> pCallBack)
@@ -403,7 +406,10 @@ namespace BeWo.ViewModel
Cache.GetInstance().GetAllValueListEntrysByTypeAsync(
ValueListEntryType.TitleType,
r1 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.FunctionType,
r3 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType, r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.Nationality, r2 => pCallBack(new PersonVM(cb, r1, r3, r4,r2)))))));
r3 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.RoleInOrganisationType,
r4 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.Nationality,
r2 => Cache.GetInstance().GetAllValueListEntrysByTypeAsync(ValueListEntryType.Aufenthaltsstatus,
r5 => pCallBack(new PersonVM(cb, r1, r3, r4, r2, r5))))))));
}
public static void CreateResourceListVMAsync(Action<ResourceListVM> pCallBack)

View File

@@ -96,12 +96,7 @@ namespace BeWo.Data.Entities
private IList<Behinderungsart> _BehinderungsartenListe;
private string _CustomerAlias;
private Pflegegrad? _Pflegegrad;
private bool _IsMigrant;
private ValueListEntry _Nationalitaet;
private ValueListEntry _AufenthaltsStatus;
public Customer()
{
@@ -653,54 +648,6 @@ namespace BeWo.Data.Entities
}
}
}
public virtual bool IsMigrant
{
get { return _IsMigrant; }
set
{
if (AreDifferent(_IsMigrant, value))
{
_IsMigrant = value;
}
}
}
public virtual ValueListEntry Nationalitaet
{
get
{
return this._Nationalitaet;
}
set
{
if (this.AreDifferent(this._Nationalitaet, value))
{
this._Nationalitaet = value;
}
}
}
public virtual ValueListEntry AufenthaltsStatus
{
get
{
return this._AufenthaltsStatus;
}
set
{
if (this.AreDifferent(this._AufenthaltsStatus, value))
{
this._AufenthaltsStatus = value;
}
}
}
}
}

View File

@@ -45,6 +45,8 @@ namespace BeWo.Data.Entities
public static string PropertyName_Nationalitaet = "Nationalitaet";
public static string PropertyName_AufenthaltsStatus = "AufenthaltsStatus";
private string _Abbreviation;
@@ -82,6 +84,8 @@ namespace BeWo.Data.Entities
private ValueListEntry _Nationalitaet;
private ValueListEntry _AufenthaltsStatus;
public Person()
{
this._Tid = TableID.Person;
@@ -389,6 +393,21 @@ namespace BeWo.Data.Entities
}
}
public virtual ValueListEntry AufenthaltsStatus
{
get
{
return this._AufenthaltsStatus;
}
set
{
if (this.AreDifferent(this._AufenthaltsStatus, value))
{
this._AufenthaltsStatus = value;
}
}
}
public virtual IList<Image> Images { get; set; }
}
}

View File

@@ -25,15 +25,12 @@
<property column="DebitorNumber" type="String" name="DebitorNumber" />
<property column="CostCenter" type="String" name="CostCenter" />
<property column="IsAdvisedOrAttended" type="Boolean" name="IsAdvisedOrAttended" />
<property column="IsMigrant" type="Boolean" name="IsMigrant" />
<property column="DistanceInMeter" type="Int32" name="DistanceInMeter" />
<many-to-one name="TerminationReason" column="TerminationValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" />
<many-to-one name="Person" column="PersonOid" class="BeWo.Data.Entities.Person,BeWo.Data" cascade="all-delete-orphan" fetch="join"/>
<many-to-one name="Nationalitaet" column="NationalitaetValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" fetch="join"/>
<many-to-one name="AufenthaltsStatus" column="AufenthaltsStatusValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" fetch="join"/>
<property column="CustomerAlias" type="String" name="CustomerAlias" length="256" />
<property column="AusstVersAmt" type="String" name="AusstVersAmt" />

View File

@@ -24,6 +24,7 @@
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
<many-to-one name="Title" column="TitleValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" fetch="join"/>
<many-to-one name="Nationalitaet" column="NationalitaetValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" fetch="join"/>
<many-to-one name="AufenthaltsStatus" column="AufenthaltsStatusValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" fetch="join"/>
<many-to-one name="Function" column="FunctionValueListEntryOid" class="BeWo.Data.Entities.ValueListEntry,BeWo.Data" cascade="none" fetch="join"/>
<many-to-one name="Address" column="AddressOid" class="BeWo.Data.Entities.Address, BeWo.Data" cascade="all" fetch="join"/>
<many-to-one name="InvoiceAddress" column="InvoiceAddressOid" class="BeWo.Data.Entities.Address, BeWo.Data" cascade="all" fetch="join"/>

View File

@@ -345,11 +345,47 @@ namespace Host
}
private XtraReport CreateSupportConceptReport()
{
long my = long.Parse(Request.Params["my"]);
long arc = long.Parse(Request.Params["arc"]);
long eOid = long.Parse(Request.Params["eOid"]);
{
IList<long> c2sOids = null;
long? eOid = null;
long? tOid = null;
int? exp = 0;
int arc = 0;
if (Request.Params["c2slist"] != null)
{
String oidStr = Request.Params["c2slist"];
var oidArray = oidStr.Split(',');
c2sOids = new List<long>();
foreach (var os in oidArray)
{
long oid = 0;
if (Int64.TryParse(os, out oid))
{
c2sOids.Add(oid);
}
}
}
else
{
eOid = long.Parse(Request.Params["eOid"]);
tOid = long.Parse(Request.Params["tOid"]);
exp = int.Parse(Request.Params["exp"]);
arc = int.Parse(Request.Params["arc"]);
if (eOid == 0)
{
eOid = null;
}
if (tOid == 0)
{
tOid = null;
}
if (exp == 0)
{
exp = null;
}
}
DateTime? appointedDate = null;
Object obj = Request.Params["date"];
if (obj != null)
@@ -359,7 +395,11 @@ namespace Host
appointedDate = dt;
}
return reportCreator.CreateSupportConceptReport(eOid, my == 1, arc == 1, appointedDate);
return reportCreator.CreateSupportConceptReport(c2sOids, eOid, tOid, exp, arc == 1, appointedDate);
}
private XtraReport CreateMediVerordnungslistenReport()

View File

@@ -0,0 +1,4 @@
ALTER TABLE `person`
ADD COLUMN `AufenthaltsStatusValueListEntryOid`
BIGINT(19) NULL DEFAULT NULL COMMENT '' AFTER `NationalitaetValueListEntryOid`;

View File

@@ -41,12 +41,12 @@ namespace BeWo.Report
DateTimeSpan limitingTimeSpan);
public abstract XtraReport CreateSettlementReport(String dcId, long? invoiceBaseOid);
public abstract XtraReport CreateSupportConceptReport(long employeeOid, bool onlyMySupportConcepts,
bool archivedSupportConcepts, DateTime? appointedDate);
public abstract XtraReport CreateSupportConceptReport(IList<long> c2sOids, long? employeeOid, long? teamOid, int? expiredMonths, bool archivedSupportConcepts,
DateTime? appointedDate);
public abstract XtraReport CreateAdditionalServiceBookingReport(long addServiceRegionOid, Monat month, int year);
public abstract XtraReport CreateAdditionalServiceBookingReport(long addServiceRegionOid, Monat month, int year);
public abstract XtraReport CreateEmployeeHourReport(long? employeeOid, IList<long> teamOids, DateTime startDate, DateTime endDate);
@@ -61,5 +61,7 @@ namespace BeWo.Report
public abstract XtraReport CreateFinanceReport(DateTime? start, DateTime? end);
public abstract XtraReport CreateJahresberichtReport(int year, long? cbOid, long? teamOid, long? betreuungsartOid);
}
}
}

View File

@@ -406,10 +406,11 @@ namespace BeWo.Report
}
}
public override XtraReport CreateSupportConceptReport(long employeeOid, bool onlyMySupportConcepts, bool archivedSupportConcepts, DateTime? appointedDate)
public override XtraReport CreateSupportConceptReport(IList<long> c2sOids, long? employeeOid, long? teamOid, int? expiredMonths, bool archivedSupportConcepts,
DateTime? appointedDate)
{
var lSupportConceptReport = FindReportImp<SupportConceptListRO>();
lSupportConceptReport.SetReportDataSource(SupportConceptListRO.Create(employeeOid, onlyMySupportConcepts, archivedSupportConcepts, appointedDate));
lSupportConceptReport.SetReportDataSource(SupportConceptListRO.Create(c2sOids, employeeOid, teamOid, expiredMonths, archivedSupportConcepts, appointedDate));
return lSupportConceptReport as XtraReport;
}

View File

@@ -179,7 +179,17 @@ namespace BeWo.Report.ReportObjects
// bu = 0;
}
var stundenSollProMonat = BerechneSollProMonat(emp, berichtsAnfang, berichtsEnde);
decimal? stundenSollProMonat = null;
if (c != null && c.MonthlyTotalHours.HasValue)
{
stundenSollProMonat = c.MonthlyTotalHours.Value;
}
else
{
stundenSollProMonat = BerechneSollProMonat(emp, berichtsAnfang, berichtsEnde);
}
var stundenSoll = stundenSollProMonat;
if (!stundenSoll.HasValue)
@@ -1005,7 +1015,18 @@ namespace BeWo.Report.ReportObjects
//{
// arbeitstage *= anzWochentage / 5m;
//}
var stundenSollProMonat = BerechneSollProMonat(emp, start, ende);
decimal? stundenSollProMonat = null;
if (c != null && c.MonthlyTotalHours.HasValue)
{
stundenSollProMonat = c.MonthlyTotalHours.Value;
}
else
{
stundenSollProMonat = BerechneSollProMonat(emp, start, ende);
}
var soll = stundenSollProMonat;
if (!soll.HasValue)
{

View File

@@ -44,7 +44,8 @@ namespace BeWo.Report.ReportObjects
}
}
public static SupportConceptListRO Create(long eOid, bool onlyMySupportConcepts, bool archivedSupportConcepts, DateTime? appointedDate)
public static SupportConceptListRO Create(IList<long> c2sOids, long? employeeOid, long? teamOid, int? expiredMonths, bool archivedSupportConcepts,
DateTime? appointedDate)
{
// var pSpan = new DateTimeSpan();
// pSpan.StartDateTime = new DateTime(pYear, pMonth, 1);
@@ -60,7 +61,15 @@ namespace BeWo.Report.ReportObjects
AnalysisServiceImp service = new AnalysisServiceImp();
soList = service.GetSupportConceptAnalysis(eOid, onlyMySupportConcepts, archivedSupportConcepts, appointedDate);
if (c2sOids != null && c2sOids.Count > 0)
{
soList = service.GetSupportConceptAnalysisWithC2SOids(c2sOids, appointedDate);
}
else
{
soList = service.GetSupportConceptAnalysis2(employeeOid, teamOid, appointedDate, expiredMonths, archivedSupportConcepts);
}
if (soList != null)
{

View File

@@ -34,7 +34,10 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.IsCalculatingWithFactor = pEntity.CostBearer.IsCalculatingWithFactor;
}
if (pEntity.Function != null)
{
pDataContract.Function = pEntity.Function.Value;
}
return pDataContract;
}

View File

@@ -15,6 +15,7 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.PersonVersion = pEntity.Version.Value;
pDataContract.ActivationType = pEntity.IsActive;
pDataContract.PersonType = pEntity.Type;
pDataContract.FamilyStatus = pEntity.FamilyStatus;
if (pEntity.Title != null)
{

View File

@@ -51,17 +51,6 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.Environment = pEntity.Environment;
pDataContract.IsAdvisedOrAttended = pEntity.IsAdvisedOrAttended;
if (pEntity.Nationalitaet != null)
{
pDataContract.Nationalitaet = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.Nationalitaet);
}
if (pEntity.AufenthaltsStatus != null)
{
pDataContract.AufenthaltsStatus = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.AufenthaltsStatus);
}
//if(pEntity.FamilyData != null)
//{
// pDataContract.Kindesmutter = pEntity.FamilyData.Kindesmutter;
@@ -79,7 +68,6 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.BeiblattGueltigBis = pEntity.BeiblattGueltigBis;
pDataContract.GradDerBehinderung = pEntity.GradDerBehinderung;
pDataContract.Pflegegrad = pEntity.Pflegegrad;
pDataContract.IsMigrant = pEntity.IsMigrant;
if (pEntity.BehinderungsartenListe != null)
{
@@ -165,27 +153,7 @@ namespace BeWo.Service.DCEntityMapper
pEntity.CustomerAlias = pDataContract.CustomerAlias;
if (pDataContract.Nationalitaet == null)
{
pEntity.Nationalitaet = null;
}
else if (pEntity.Nationalitaet == null || pEntity.Nationalitaet.Oid != pDataContract.Nationalitaet.ValueListEntryOid)
{
pEntity.Nationalitaet = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(pDataContract.Nationalitaet.ValueListEntryOid.Value);
}
if (pDataContract.AufenthaltsStatus == null)
{
pEntity.AufenthaltsStatus = null;
}
else if (pEntity.AufenthaltsStatus == null || pEntity.AufenthaltsStatus.Oid != pDataContract.AufenthaltsStatus.ValueListEntryOid)
{
pEntity.AufenthaltsStatus = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(pDataContract.AufenthaltsStatus.ValueListEntryOid.Value);
}
//if(ContainsFamilyDataData(pDataContract))
//if(ContainsFamilyDataData(pDataContract))
//{
// ConcurrencyCheck(pDataContract.FamilyDataVersion, pEntity.FamilyData);
@@ -212,7 +180,6 @@ namespace BeWo.Service.DCEntityMapper
pEntity.BehinderungsartenListe = pDataContract.BehinderungsartenListe;
pEntity.MerkzeichenListe = pDataContract.MerkzeichenListe;
pEntity.Pflegegrad = pDataContract.Pflegegrad;
pEntity.IsMigrant = pDataContract.IsMigrant;
if (pDataContract.TerminationReason == null)
{

View File

@@ -60,7 +60,13 @@ namespace BeWo.Service.DCEntityMapper
public override Customer2Person MergeWithEntity(CustomerPersonRelationDC pDataContract, Customer2Person pEntity)
{
MapperFactory.ValueListEntryDC_ValueListEntry.MapUniqueTypeValueListEntryBack2Entity(pDataContract.RelationRole, pEntity.ValueList, ValueListEntryType.EnvironmentPersonType, TableID.Customer2Person);
var type = ValueListEntryType.EnvironmentPersonType;
if (pDataContract != null && pDataContract.RelationRole != null)
{
type = pDataContract.RelationRole.Type;
}
MapperFactory.ValueListEntryDC_ValueListEntry.MapUniqueTypeValueListEntryBack2Entity(pDataContract.RelationRole, pEntity.ValueList, type, TableID.Customer2Person);
pEntity.Oid = pDataContract.Customer2PersonOid;
pEntity.Version = pDataContract.Customer2PersonVersion;

View File

@@ -43,6 +43,12 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.Nationalitaet = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.Nationalitaet);
}
if (pEntity.AufenthaltsStatus != null)
{
pDataContract.AufenthaltsStatus = MapperFactory.ValueListEntryDC_ValueListEntry.MapToNewDC(pEntity.AufenthaltsStatus);
}
if (pEntity.Address != null)
{
pDataContract.AddressOid = pEntity.Address.Oid;
@@ -133,6 +139,15 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Nationalitaet = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(pDataContract.Nationalitaet.ValueListEntryOid.Value);
}
if (pDataContract.AufenthaltsStatus == null)
{
pEntity.AufenthaltsStatus = null;
}
else if (pEntity.AufenthaltsStatus == null || pEntity.AufenthaltsStatus.Oid != pDataContract.AufenthaltsStatus.ValueListEntryOid)
{
pEntity.AufenthaltsStatus = DAOFactory.GenericDAO.LoadByID<ValueListEntry>(pDataContract.AufenthaltsStatus.ValueListEntryOid.Value);
}
if (pDataContract.ContainsAddressData())
{
if (pEntity.Address == null)

View File

@@ -0,0 +1,16 @@
using System.ServiceModel;
using BS.Shared.DataContracts;
namespace BeWo.Service.MessageContracts
{
[MessageContract]
public class UploadImportFileResult
{
[MessageBodyMember]
public bool Success { get; set; }
[MessageBodyMember]
public string ResultMessage { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using BS.Shared.Services;
using Utils = BS.Shared.Core.Utils;
namespace BeWo.Service.Plugins
{
public class DataImporter : AbstractIDSpecificDefaultClass<DataImporter>
{
internal string ImportData(string filename, byte[] daten)
{
//muss überschrieben werden. Es gibt keinen Standardimport
return "Die Daten konnten nicht importiert werden.";
}
}
}

View File

@@ -36,7 +36,7 @@ namespace BeWo.Service.Plugins
//t = "1378137009"; // BeWo Direkt
//t = "3010479871"; // Aachener Verein
//t = "3849764093"; // Club 74
t = "7375324044"; // Diakonie KKKleve
//t = "7375324044"; // Diakonie KKKleve
//t = "5805202339"; // Wegweiser Betreuungsdienst
//t = "2301474784"; // Hauskrankenpflege Leiendecker
//t = "8243565510"; // Der Karren
@@ -147,7 +147,7 @@ namespace BeWo.Service.Plugins
//t = "7912635399"; //Prof Eggers Stiftung
//t = "5562845955";//Praunheimer WerkstaettenGmbh
//t = "1106039294";//HphBersenbrueckAtz
t = "3607551608"; // BetreuungsBuero Scholz
//t = "3607551608"; // BetreuungsBuero Scholz
return t;
#else

View File

@@ -18,8 +18,8 @@ namespace BeWo.Service.Plugins
{
public class SupportConceptAnalysisCreator : AbstractIDSpecificDefaultClass<SupportConceptAnalysisCreator>
{
public List<SupportConceptOverviewDC> GetSupportConceptAnalysis(long? employeeOid, long? teamOid, DateTime? appointedDate, bool showOnlyRelatedScs,
bool showOnlyExpiredScs, bool showArchivedScs)
public List<SupportConceptOverviewDC> GetSupportConceptAnalysis(IList<long> c2sOids, long? employeeOid, long? teamOid, DateTime? appointedDate,
int? expiredMonths, bool showArchivedScs)
{
DateTime maxDate = appointedDate.HasValue
@@ -32,24 +32,9 @@ namespace BeWo.Service.Plugins
{
var calc = PluginLoader.FindClass<Calculations>(iCb2Sc.CostBearer.ID) ??
Calculations.GetInstance(iCb2Sc.CostBearer.ID);
var calc = PluginLoader.FindClass<Calculations>(iCb2Sc.CostBearer.ID) ?? Calculations.GetInstance(iCb2Sc.CostBearer.ID);
var iDC = new SupportConceptOverviewDC();
if (employeeOid != null)
{
foreach (var e2c in iCb2Sc.SupportConcept.Customer.Employee2CustomerList)
{
if (!iDC.IsRelatedToEmployee)
{
if (employeeOid.Value == e2c.EmployeeOid.Value)
{
iDC.IsRelatedToEmployee = true;
}
}
}
}
iDC.ActivationType = iCb2Sc.SupportConcept.IsActive;
if (iDC.ActivationType == ActivationTypeId.Active &&
iCb2Sc.SupportConcept.Customer.IsActive != ActivationTypeId.Active)
@@ -57,16 +42,82 @@ namespace BeWo.Service.Plugins
iDC.ActivationType = iCb2Sc.SupportConcept.Customer.IsActive;
}
bool cont = (showArchivedScs && iDC.ActivationType != ActivationTypeId.Deleted) || iDC.ActivationType == ActivationTypeId.Active;
bool cont = true;
if (c2sOids != null)
{
if (!c2sOids.Contains(iCb2Sc.Oid.Value))
{
cont = false;
}
}
else
{
cont = (showArchivedScs && iDC.ActivationType != ActivationTypeId.Deleted) ||
iDC.ActivationType == ActivationTypeId.Active;
if (cont && employeeOid != null)
{
bool isRelatedToEmployee = false;
foreach (var e2c in iCb2Sc.SupportConcept.Customer.Employee2CustomerList)
{
if (!isRelatedToEmployee)
{
if (employeeOid.Value == e2c.EmployeeOid.Value)
{
isRelatedToEmployee = true;
}
}
}
if (!isRelatedToEmployee)
{
cont = false;
}
}
if (cont && teamOid != null)
{
bool isRelatedToTeam = false;
var team = DAOFactory.GenericDAO.LoadByID<Team>(teamOid.Value);
Dictionary<long, long> teamMemberOidDict = new Dictionary<long, long>();
foreach (var member in team.MemberList)
{
if (!teamMemberOidDict.ContainsKey(member.Oid.Value))
{
teamMemberOidDict.Add(member.Oid.Value, member.Oid.Value);
}
if (team.Leader != null && !teamMemberOidDict.ContainsKey(team.Leader.Oid.Value))
{
teamMemberOidDict.Add(team.Leader.Oid.Value, team.Leader.Oid.Value);
}
}
foreach (var e2c in iCb2Sc.SupportConcept.Customer.Employee2CustomerList)
{
if (!isRelatedToTeam)
{
if (teamMemberOidDict.ContainsKey(e2c.EmployeeOid.Value))
{
isRelatedToTeam = true;
}
}
}
if (!isRelatedToTeam)
{
cont = false;
}
}
}
#if DEBUG
if (iCb2Sc.Oid.HasValue && !iCb2Sc.Oid.Value.Equals(319))
if (iCb2Sc.Oid.HasValue && !iCb2Sc.Oid.Value.Equals(319))
{
//cont = false;
}
#endif
if (cont && (!showOnlyRelatedScs || iDC.IsRelatedToEmployee))
if (cont)
{
iDC.CalculationDate = DateTime.Now.Date;
iDC.RequestedStartDate = iCb2Sc.RequestedStartDate;

View File

@@ -287,11 +287,13 @@
<Compile Include="MessageContracts\UploadChatResult.cs" />
<Compile Include="MessageContracts\UpdatePackage.cs" />
<Compile Include="MessageContracts\UploadPackage.cs" />
<Compile Include="MessageContracts\UploadImportFileResult.cs" />
<Compile Include="MessageContracts\UploadResult.cs" />
<Compile Include="Multitenancy\MultitenancyBehaviorExtension.cs" />
<Compile Include="Multitenancy\MultitenancyContextInitializer.cs" />
<Compile Include="Multitenancy\MultitenancyEndpointBehavior.cs" />
<Compile Include="Plugins\CustomerService.cs" />
<Compile Include="Plugins\DataImporter.cs" />
<Compile Include="Plugins\DataExporter.cs" />
<Compile Include="Plugins\GroupDurationCalculator.cs" />
<Compile Include="Plugins\HomeContentGenerator.cs" />

View File

@@ -69,7 +69,7 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<SupportConceptOverviewDC> GetSupportConceptAnalysis2(long? employeeOid, long? teamOid, DateTime? appointedDate, bool showOnlyRelatedScs, bool showOnlyExpiredScs, bool showArchivedScs);
List<SupportConceptOverviewDC> GetSupportConceptAnalysis2(long? employeeOid, long? teamOid, DateTime? appointedDate, int? expiredMonths, bool showArchivedScs);
[FaultContract(typeof(BeWoFault))]
[OperationContract]

View File

@@ -38,6 +38,10 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
UploadChatResult CreateNewSpeziallStreamChatMessagesDC(UploadChatPackage istream);
[FaultContract(typeof (BeWoFault))]
[OperationContract]
UploadImportFileResult UploadImportFile(UploadPackage upload);
}
}

View File

@@ -708,15 +708,28 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
public List<SupportConceptOverviewDC> GetSupportConceptAnalysis2(long? employeeOid, long? teamOid, DateTime? appointedDate, bool showOnlyRelatedScs,
bool showOnlyExpiredScs, bool showArchivedScs)
public List<SupportConceptOverviewDC> GetSupportConceptAnalysis2(long? employeeOid, long? teamOid, DateTime? appointedDate, int? expiredMonths, bool showArchivedScs)
{
try
{
var ac = PluginLoader.FindClass<SupportConceptAnalysisCreator>();
return ac.GetSupportConceptAnalysis(employeeOid, teamOid, appointedDate, showOnlyRelatedScs, showOnlyExpiredScs, showArchivedScs);
return ac.GetSupportConceptAnalysis(null, employeeOid, teamOid, appointedDate, expiredMonths, showArchivedScs);
}
catch (Exception e)
{
throw Utils.CreateBeWoFaultException(e);
}
}
public List<SupportConceptOverviewDC> GetSupportConceptAnalysisWithC2SOids(IList<long> c2sOids, DateTime? appointedDate)
{
try
{
var ac = PluginLoader.FindClass<SupportConceptAnalysisCreator>();
return ac.GetSupportConceptAnalysis(c2sOids, null, null, appointedDate, null, true);
}
catch (Exception e)
{
@@ -726,11 +739,10 @@ namespace BeWo.Service.ServiceImplementations
public List<SupportConceptOverviewDC> GetSupportConceptAnalysis(long? currentEmployeeOid,
bool showOnlyRelatedSCs,
bool showOnlyArchivedSCs,
bool showArchivedSCs,
DateTime? appointedDate)
{
return GetSupportConceptAnalysis2(currentEmployeeOid, null, appointedDate, showOnlyRelatedSCs, false,
showOnlyArchivedSCs);
return GetSupportConceptAnalysis2(currentEmployeeOid, null, appointedDate, null, showArchivedSCs);
}
public List<CompactSupportConceptDC> GetSupportConceptsWithConferenceDate(long? employeeOid, DateTime conferenceDateUntil)

View File

@@ -63,7 +63,9 @@ namespace BeWo.Service.ServiceImplementations
FileName = q.FileName
};
queryDC.IsDirect = (queryDC.Notice == "direct") || String.IsNullOrEmpty(q.Sql);
queryDC.IsDirect = queryDC.Notice == "direct";
queryDC.IsImport = queryDC.Notice == "import";
List<QueryParamDC> parameter = new List<QueryParamDC>();
foreach (var item in q.Parameter)
{

View File

@@ -10,6 +10,7 @@ using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.MessageContracts;
using BeWo.Service.Plugins;
using BeWo.Service.ServiceContracts;
using BS.Shared;
@@ -171,6 +172,32 @@ namespace BeWo.Service.ServiceImplementations
}
}
public UploadImportFileResult UploadImportFile(UploadPackage upload)
{
try
{
String filename = upload.FileName;
var daten = BS.Shared.Core.Utils.ReadFully(upload.Stream);
upload.Stream.Close();
upload.Stream.Dispose();
var importer = PluginLoader.FindClass<DataImporter>();
if (importer != null)
{
return new UploadImportFileResult(); // importer.ImportData(filename, daten);
}
return null;
}
catch (Exception e)
{
return null; // e.Message;
}
}
public UploadChatResult CreateNewSpeziallStreamChatMessagesDC(UploadChatPackage istream)
{

View File

@@ -501,6 +501,7 @@ namespace BeWo.Service.ServiceImplementations
// emp.RelatedCustomerOIDList = new List<long>();
// emp.RelatedCustomerOIDList.Add(item.CustomerOid.Value);
//}
emp.AllTeamMemberOids = new List<long>();
if (user.Employee.LeadingTeams.Count > 0)
{
@@ -510,10 +511,30 @@ namespace BeWo.Service.ServiceImplementations
foreach (var item in user.Employee.LeadingTeams)
{
oids.Add(item.Oid.Value);
foreach (var member in item.MemberList)
{
emp.AllTeamMemberOids.Add(member.Oid.Value);
}
}
emp.LeadingTeamOids = oids;
}
var teams = DAOFactory.SearchDAO.FindAllActiveTeamsOfEmployee(emp.EmployeeOid);
emp.TeamOids = new List<long>();
foreach (var t in teams)
{
emp.TeamOids.Add(t.Oid.Value);
foreach (var member in t.MemberList)
{
emp.AllTeamMemberOids.Add(member.Oid.Value);
}
}
}
}

View File

@@ -305,11 +305,6 @@ namespace BS.Shared
EmployeeView_Edit = 137438953472,
EmployeeView_Create = 274877906944,
EmployeeView_Delete = 549755813888,
WohnheimView_View = 22201,
WohnheimView_Edit = 22202,
WohnheimView_Create = 22203,
WohnheimView_Delete = 22204,
Wohnheim_AllowArchiving = 22205,
TeamView_ViewAll = 1099511627776,
TeamView_Edit = 2199023255552,
TeamView_Create = 4398046511104,
@@ -376,6 +371,8 @@ namespace BS.Shared
Employee_AllowEditOwnEmployees = 20002,
Employee_AllowArchiving = 20003,
User_AllowOrderLicense = 20004,
Employee_AllowViewOwnEmployees = 20005,
Employee_AllowViewOwnTeam = 20006,
GroupOfPeopleView_Edit = 20100,
GroupOfPeopleView_Create = 20101,
@@ -434,8 +431,13 @@ namespace BS.Shared
CostbearerAllowChange = 22001,
ServiceRecordAllowEditAfterMindays = 22002,
DocumentsAllowViewAll = 22010,
WohnheimView_View = 22201,
WohnheimView_Edit = 22202,
WohnheimView_Create = 22203,
WohnheimView_Delete = 22204,
Wohnheim_AllowArchiving = 22205,
Betreuungsschluessel_View = 23000,
Betreuungsschluessel_Edit = 23001,
Betreuungsschluessel_Delete = 23002,

View File

@@ -118,7 +118,7 @@ namespace BS.Shared.Core
UserRightType.Wohnheim_AllowArchiving, "Wohnheime archivieren"
},
{
UserRightType.EmployeeView_Edit, "Mitarbeiter ändern"
UserRightType.EmployeeView_Edit, "Mitarbeiter ändern (alle)"
},
{
UserRightType.EmployeeView_View, "Mitarbeiter ansehen (alle)"
@@ -133,7 +133,13 @@ namespace BS.Shared.Core
UserRightType.Employee_AllowEditContracts, "Mitarbeiter Verträge bearbeiten"
},
{
UserRightType.Employee_AllowEditOwnEmployees, "Mitarbeiter bearbeiten (Eigenen) "
UserRightType.Employee_AllowEditOwnEmployees, "Mitarbeiter ändern (Eigenen) "
},
{
UserRightType.Employee_AllowViewOwnEmployees, "Mitarbeiter ansehen (Eigenen) "
},
{
UserRightType.Employee_AllowViewOwnTeam, "Mitarbeiter des Teams ansehen"
},
{
UserRightType.OrganisationView_Create, "Organisationen anlegen"

View File

@@ -100,10 +100,7 @@ namespace BS.Shared.DataContracts.Compact
public string FilterRelevants
{
get
{
return this.Name;
}
get { return this.Name + " " + this.Function + " " + AddressSummaryInfo; }
}
public string IconPath

View File

@@ -36,6 +36,12 @@ namespace BS.Shared.DataContracts.Compact
[DataMember]
public List<long> LeadingTeamOids { get; set; }
[DataMember]
public List<long> TeamOids { get; set; }
[DataMember]
public List<long> AllTeamMemberOids { get; set; }
[DataMember]
public string PersonnelNumber { get; set; }

View File

@@ -82,5 +82,8 @@ namespace BS.Shared.DataContracts.Compact
[DataMember]
public string CostCenter { get; set; }
[DataMember]
public string Function { get; set; }
}
}

View File

@@ -64,6 +64,9 @@ namespace BS.Shared.DataContracts.Compact
[DataMember]
public string Communication4 { get; set; } //Bei Person Fax
[DataMember]
public FamilyStatus? FamilyStatus { get; set; }
[DataMember]
public List<Organisation2PersonDC> OrganisationRelations { get; set; }

View File

@@ -161,16 +161,6 @@ namespace BS.Shared.DataContracts
[DataMember]
public Pflegegrad? Pflegegrad { get; set; }
[DataMember]
public bool IsMigrant { get; set; }
[DataMember]
public ValueListEntryDC Nationalitaet { get; set; }
[DataMember]
public ValueListEntryDC AufenthaltsStatus { get; set; }
}
}

View File

@@ -144,6 +144,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public ValueListEntryDC Nationalitaet { get; set; }
[DataMember]
public ValueListEntryDC AufenthaltsStatus { get; set; }
public bool ContainsAddressData()
{
return !Utils.AreAllNullOrEmpty(this.AddressLine1, this.Street, this.PostalCode, this.Town);

View File

@@ -27,6 +27,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public bool IsDirect { get; set; }
[DataMember]
public bool IsImport { get; set; }
[DataMember]
public string FileName { get; set; }