Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -2792,11 +2792,12 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="EmployeeDetailColumn1"/>
|
||||
<ColumnDefinition Width="Auto" SharedSizeGroup="EmployeeDetailColumn2"/>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -2806,7 +2807,8 @@
|
||||
<TextBlock x:Name="txtDetail1" Grid.Row="0" Grid.Column="1" Grid.RowSpan="2" Text="{Binding Path=DetailDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center" />
|
||||
<TextBlock x:Name="txtDetail2" Grid.Row="0" Grid.Column="2" Grid.RowSpan="2" Text="{Binding Path=Details2}" Margin="16,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center" />
|
||||
<TextBlock x:Name="txtDetail3" Grid.Row="0" Grid.Column="3" Grid.RowSpan="2" Text="{Binding Path=Details3}" Margin="16,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="4" Margin="0,0,3,0" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
|
||||
<TextBlock x:Name="txtTeams" Grid.Row="0" Grid.Column="4" Grid.RowSpan="2" Text="{Binding Path=Teams}" Margin="16,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center" />
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="5" Margin="0,0,3,0" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
|
||||
<TextBlock.Visibility>
|
||||
<Binding Path="IsDeleted" ConverterParameter="Employee">
|
||||
<Binding.Converter>
|
||||
@@ -2818,7 +2820,7 @@
|
||||
Anonymisieren
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="5" Margin="0,0,3,0" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="6" Margin="0,0,3,0" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
|
||||
<TextBlock.Visibility>
|
||||
<Binding Path="IsDeleted" ConverterParameter="Employee">
|
||||
<Binding.Converter>
|
||||
@@ -2830,7 +2832,7 @@
|
||||
Endgültig löschen
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="6" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="7" FontSize="12" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center">
|
||||
<TextBlock.Visibility>
|
||||
<Binding Path="IsDeleted" ConverterParameter="Employee">
|
||||
<Binding.Converter>
|
||||
@@ -2842,7 +2844,7 @@
|
||||
Reaktivieren
|
||||
</Hyperlink>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="7" FontSize="12" Foreground="#FFFFFFFF" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<TextBlock Grid.Row="0" Grid.RowSpan="2" Grid.Column="8" FontSize="12" Foreground="#FFFFFFFF" FontFamily="Microsoft Sans Serif" VerticalAlignment="Center" Margin="5,0,0,0">
|
||||
<Hyperlink Click="Hyperlink_Employee_Print_Click" TargetName="_NewWindow" Foreground="#FFFFFFFF" Tag="{Binding}">
|
||||
Drucken
|
||||
</Hyperlink>
|
||||
|
||||
@@ -42,7 +42,9 @@
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
|
||||
<TextBlock x:Name="txtDetail1" Text="{Binding Path=SimpleDescription}" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
<TextBlock x:Name="txtDetail2" Text="{Binding Path=DateOfBirthString}" Margin="6,0,0,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
<TextBlock x:Name="txtDetailTeams" Text="{Binding Path=Teams}" Margin="0,0,6,0" FontSize="14" Foreground="#FFD2D2D2" FontFamily="Microsoft Sans Serif" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Grid.Row="1" Orientation="Horizontal">
|
||||
<TextBlock x:Name="txtDetail3" Text="{Binding Path=AddressString}" FontSize="12" Foreground="#FFA0A0A0" FontFamily="Microsoft Sans Serif" />
|
||||
</StackPanel>
|
||||
|
||||
@@ -73,6 +73,9 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
var result = new List<CompactCustomerDC>();
|
||||
|
||||
var es = new EmployeeService();
|
||||
var teams = es.GetAllTeamsCompact();
|
||||
|
||||
var cProcessed = new Dictionary<long, bool>();
|
||||
var customers = DAOFactory.SearchDAO.GetAllCustomersWithRelatedEmployee();
|
||||
|
||||
@@ -89,6 +92,24 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
CompactCustomerDC dc = CreateCompactCustomerDCWithEmployeeRelation(customer, fetchReferenceNumbers, true, currentEmployeeOid, teamOids);
|
||||
|
||||
// Alle zugehörigen Teamnamen setzen
|
||||
if (dc.RelatedTeamOids != null)
|
||||
{
|
||||
foreach (var oid in dc.RelatedTeamOids)
|
||||
{
|
||||
var team = teams.FirstOrDefault(t => t.TeamOid == oid);
|
||||
if (team != null)
|
||||
{
|
||||
if (dc.RelatedTeams == null)
|
||||
dc.RelatedTeams = " | Teams: " + team.Name + ", ";
|
||||
else
|
||||
dc.RelatedTeams += team.Name + ", ";
|
||||
}
|
||||
}
|
||||
if (dc.RelatedTeams != null && dc.RelatedTeams.Length > 0)
|
||||
dc.RelatedTeams = dc.RelatedTeams.Remove(dc.RelatedTeams.Length - 2, 1);
|
||||
}
|
||||
|
||||
result.Add(dc);
|
||||
|
||||
cProcessed.Add(customer.Oid.Value, true);
|
||||
|
||||
@@ -59,8 +59,50 @@ namespace BeWo.Service.Plugins
|
||||
public virtual List<CompactEmployeeDC> GetAllCompactEmployees()
|
||||
{
|
||||
var employees = DAOFactory.GenericDAO.GetAll<Employee>();
|
||||
|
||||
var dcs = MapperFactory.CompactEmployeeDC_Employee.MapToNewDCs(employees);
|
||||
var teams = GetAllTeamsCompact();
|
||||
|
||||
var teamDCs = new List<TeamDC>();
|
||||
foreach (var ct in teams)
|
||||
teamDCs.Add(MapperFactory.TeamDC_Team.MapToNewDC(DAOFactory.GenericDAO.GetByID<Team>(ct.TeamOid)));
|
||||
|
||||
foreach (var dc in dcs)
|
||||
{
|
||||
foreach (var tDC in teamDCs)
|
||||
{
|
||||
if (tDC.Member.Contains(dc))
|
||||
{
|
||||
if (dc.TeamOids == null)
|
||||
dc.TeamOids = new List<long>();
|
||||
|
||||
if (!dc.TeamOids.Contains(tDC.TeamOid.Value))
|
||||
dc.TeamOids.Add(tDC.TeamOid.Value);
|
||||
}
|
||||
}
|
||||
|
||||
if (dc.TeamOids != null)
|
||||
{
|
||||
foreach (var oid in dc.TeamOids)
|
||||
{
|
||||
var team = teamDCs.FirstOrDefault(t => t.TeamOid == oid);
|
||||
if (team != null)
|
||||
{
|
||||
|
||||
|
||||
if (dc.RelatedTeams == null)
|
||||
dc.RelatedTeams = "Teams: " + team.Name + ", ";
|
||||
else
|
||||
dc.RelatedTeams += team.Name + ", ";
|
||||
}
|
||||
}
|
||||
if (dc.RelatedTeams != null && dc.RelatedTeams.Length > 0)
|
||||
dc.RelatedTeams = dc.RelatedTeams.Remove(dc.RelatedTeams.Length - 2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return MapperFactory.CompactEmployeeDC_Employee.MapToNewDCs(employees);
|
||||
|
||||
return dcs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace BeWo.Service.Plugins
|
||||
//t = "4858885375"; // BewoTrio
|
||||
//t = "9734214365"; // Wegfinder Rhein-Ruhr
|
||||
//t = "1011478760"; // Autismus Köln/Bonn e.V.
|
||||
t = "8184278271"; // Ambulant Betreutes Wohnen Stephan Schillings
|
||||
//t = "8184278271"; // Ambulant Betreutes Wohnen Stephan Schillings
|
||||
|
||||
return t;
|
||||
#else
|
||||
|
||||
@@ -129,6 +129,14 @@ namespace BS.Shared.DataContracts.Compact
|
||||
}
|
||||
}
|
||||
|
||||
public string Teams
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.RelatedTeams;
|
||||
}
|
||||
}
|
||||
|
||||
public bool SupportsActivationType
|
||||
{
|
||||
get
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace BS.Shared.DataContracts.Compact
|
||||
|
||||
public string SimpleDescription => LastName + ", " + FirstName;
|
||||
|
||||
public string Teams => this.RelatedTeams;
|
||||
|
||||
public bool SupportsActivationType => true;
|
||||
|
||||
public long Version
|
||||
|
||||
@@ -120,6 +120,9 @@ namespace BS.Shared.DataContracts.Compact
|
||||
[DataMember]
|
||||
public List<long> RelatedTeamOids { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string RelatedTeams { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public String CustomerAlias { get; set; }
|
||||
|
||||
|
||||
@@ -39,6 +39,9 @@ namespace BS.Shared.DataContracts.Compact
|
||||
[DataMember]
|
||||
public List<long> TeamOids { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string RelatedTeams { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public List<long> AllTeamMemberOids { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user