MH: InformationView eingefügt
This commit is contained in:
@@ -311,7 +311,7 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="View\Detail\SchedulerEmployeeInformationView.xaml">
|
||||
<Page Include="View\Detail\InformationView.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
@@ -1008,8 +1008,8 @@
|
||||
<Compile Include="View\Detail\OwnChatSettingsView.xaml.cs">
|
||||
<DependentUpon>OwnChatSettingsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\SchedulerEmployeeInformationView.xaml.cs">
|
||||
<DependentUpon>SchedulerEmployeeInformationView.xaml</DependentUpon>
|
||||
<Compile Include="View\Detail\InformationView.xaml.cs">
|
||||
<DependentUpon>InformationView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Detail\SuchergebnisMasterMenuItem.cs" />
|
||||
<Compile Include="View\Detail\Suchergebnis.xaml.cs">
|
||||
|
||||
@@ -690,7 +690,7 @@
|
||||
</CheckBox.IsChecked>
|
||||
|
||||
</CheckBox>
|
||||
<controls:PopupNonTopmost Grid.Row="0" Topmost="False" x:Name="popup_infos_employee" Width="350" StaysOpen="True" Placement="MousePoint">
|
||||
<!-- <controls:PopupNonTopmost Grid.Row="0" Topmost="False" x:Name="popup_infos_employee" Width="350" StaysOpen="True" Placement="MousePoint">
|
||||
<Border Background="White" Padding="3" BorderThickness="1" BorderBrush="Gray">
|
||||
<GroupBox x:Name="groupbox_employee_infos" Header="Infos" Style="{StaticResource ObjectEditGroupBox}">
|
||||
<Grid>
|
||||
@@ -707,7 +707,7 @@
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Border>
|
||||
</controls:PopupNonTopmost>
|
||||
</controls:PopupNonTopmost> -->
|
||||
<Border Width="15" Height="15" Grid.Column="1" Background="{Binding Path=FilterableBrush}" CornerRadius="3" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@@ -2470,7 +2470,8 @@ namespace BeWo.Scheduler.View
|
||||
CompactEmployeeDC emp = (CompactEmployeeDC)datacontext;
|
||||
//popup_infos_employee.IsOpen = true; //Wird nicht gefunden
|
||||
|
||||
var control = new SchedulerEmployeeInformationView();
|
||||
var control = new InformationView();
|
||||
control.InitView(emp);
|
||||
var beWoWindow = new BeWoWindow();
|
||||
|
||||
control.ButtonCloseClicked += () => beWoWindow.Close();
|
||||
@@ -2484,10 +2485,10 @@ namespace BeWo.Scheduler.View
|
||||
beWoWindow.ShowDialog();
|
||||
}
|
||||
|
||||
private void popup_button_infos_employee_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//private void popup_button_infos_employee_Click(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
#region Converter
|
||||
|
||||
@@ -5192,6 +5192,13 @@ namespace BeWo.ServiceProxy
|
||||
"", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
string GetColorForServiceRecordView2();
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAdditionalEmployeeInformationForSchedule" +
|
||||
"r", ReplyAction="http://tempuri.org/IOperationsService/GetAdditionalEmployeeInformationForSchedule" +
|
||||
"rResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAdditionalEmployeeInformationForSchedule" +
|
||||
"rBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
System.Collections.Generic.Dictionary<string, string> GetAdditionalEmployeeInformationForScheduler(long empOid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewAdditionalServiceBookings", ReplyAction="http://tempuri.org/IOperationsService/InsertNewAdditionalServiceBookingsResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewAdditionalServiceBookingsBeWoFault" +
|
||||
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
@@ -6421,6 +6428,11 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetColorForServiceRecordView2();
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<string, string> GetAdditionalEmployeeInformationForScheduler(long empOid)
|
||||
{
|
||||
return base.Channel.GetAdditionalEmployeeInformationForScheduler(empOid);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<long> InsertNewAdditionalServiceBookings(System.Collections.Generic.List<BS.Shared.DataContracts.AdditionalServiceBookingDC> pAdditionalServiceBookings)
|
||||
{
|
||||
return base.Channel.InsertNewAdditionalServiceBookings(pAdditionalServiceBookings);
|
||||
|
||||
28
BeWo/View/Detail/InformationView.xaml
Normal file
28
BeWo/View/Detail/InformationView.xaml
Normal file
@@ -0,0 +1,28 @@
|
||||
<localView:BeWoView x:Class="BeWo.View.Detail.InformationView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:localView="clr-namespace:BeWo.View" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
|
||||
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
|
||||
|
||||
|
||||
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<dxg:GridControl Grid.Row="0" Margin="2,3,5,5" x:Name="datagrid_employee_infos" SelectionMode="Row" >
|
||||
<dxg:GridControl.Columns>
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Key" Name="Key" />
|
||||
<dxg:GridColumn AllowEditing="False" FieldName="Value" Name="Value" Width="345"/>
|
||||
</dxg:GridControl.Columns>
|
||||
<dxg:GridControl.View>
|
||||
<dxg:TableView AutoWidth="false" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell"
|
||||
ShowHorizontalLines="False" ShowVerticalLines="False" ShowColumnHeaders="False" x:Name="tableview_employee_infos"/>
|
||||
</dxg:GridControl.View>
|
||||
</dxg:GridControl>
|
||||
<Button x:Name="button_close" Grid.Row="1" VerticalAlignment="Bottom" HorizontalAlignment="Right" Content="Schließen" Click="button_close_Click"
|
||||
Margin="0 0 5 5"/>
|
||||
</Grid>
|
||||
|
||||
</localView:BeWoView>
|
||||
58
BeWo/View/Detail/InformationView.xaml.cs
Normal file
58
BeWo/View/Detail/InformationView.xaml.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
using BeWo.Controls;
|
||||
using BeWo.Core;
|
||||
using BeWo.ServiceProxy;
|
||||
using BeWo.Validation;
|
||||
using BeWo.View.Search;
|
||||
using BeWo.ViewModel;
|
||||
using BeWo.ViewModel.ListViewModel;
|
||||
using BeWo.Core.Service;
|
||||
|
||||
using BS.Shared;
|
||||
using BS.Shared.Extensions;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.ClientPartials;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Services;
|
||||
using BS.Shared.Translation;
|
||||
using DevExpress.Xpf.RichEdit;
|
||||
using SupportConceptService = BeWo.Core.Service.SupportConceptService;
|
||||
using System.Linq;
|
||||
using DevExpress.Xpf.Grid;
|
||||
using System.Windows.Media.Imaging;
|
||||
using DevExpress.Utils;
|
||||
|
||||
namespace BeWo.View.Detail
|
||||
{
|
||||
public partial class InformationView
|
||||
{
|
||||
|
||||
public event Action ButtonCloseClicked;
|
||||
public Dictionary<string, string> dict;
|
||||
|
||||
|
||||
public InformationView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void InitView(CompactEmployeeDC employee)
|
||||
{
|
||||
dict = ServiceFacade.DoOperationsServiceSync(s => s.GetAdditionalEmployeeInformationForScheduler(employee.EmployeeOid));
|
||||
var list = dict.ToList();
|
||||
list = list.OrderBy(l => l.Key).ToList();
|
||||
datagrid_employee_infos.ItemsSource = list;
|
||||
}
|
||||
|
||||
private void button_close_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ButtonCloseClicked?.Invoke();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1061,6 +1061,10 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
string GetColorForServiceRecordView2();
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
Dictionary<string, string> GetAdditionalEmployeeInformationForScheduler(long empOid);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6583,6 +6583,37 @@ namespace BeWo.Service.ServiceImplementations
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, string> GetAdditionalEmployeeInformationForScheduler(long empOid)
|
||||
{
|
||||
Dictionary<string, string> dict = new Dictionary<string, string>();
|
||||
|
||||
var employee = DAOFactory.GenericDAO.GetByID<Employee>(empOid);
|
||||
|
||||
dict.Add("Vorname", employee.Person.FirstName);
|
||||
dict.Add("Nachname", employee.Person.LastName);
|
||||
if(employee.Person.DateOfBirth != null)
|
||||
{
|
||||
var dateAndTime = employee.Person.DateOfBirth.ToString().Split(' ');
|
||||
dict.Add("Geburtstag", dateAndTime[0]);
|
||||
}
|
||||
//if(employee.AbsenceTimes != null)
|
||||
//{
|
||||
// int c = 1;
|
||||
// foreach (var item in employee.AbsenceTimes)
|
||||
// {
|
||||
// dict.Add("Abwesenheit " + c, item.AbsenceSpan.ToDateString());
|
||||
// c++;
|
||||
// }
|
||||
//}
|
||||
if(employee.IsQualified != null)
|
||||
dict.Add("Qualifiziert", ((bool)employee.IsQualified) ? "Ja" : "Nein");
|
||||
if(employee.Schutzstufe != null)
|
||||
dict.Add("Schutzstufe", employee.Schutzstufe);
|
||||
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user