Update. Sehr viel Design aenderungen und einige kleine code anpassungen

This commit is contained in:
Waldi
2016-09-28 10:05:04 +02:00
parent 9892bf9465
commit d1c9431305
20 changed files with 495 additions and 146 deletions

View File

@@ -2401,6 +2401,24 @@
<ItemGroup>
<Resource Include="Ressources\Icons\trauriges-smiley.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Ressources\Icons\mitarbeiter-team-avatar.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Ressources\Icons\klient-avatar.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Ressources\Icons\mitarbeiter-avatar.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Ressources\Icons\sortiert.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Ressources\Icons\unsortiert.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Ressources\Icons\glucklicher.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

View File

@@ -5,44 +5,45 @@
Title="Chat View" Height="800" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None"
AllowsTransparency="True"
Background="Transparent"
ResizeMode="NoResize"
ResizeMode="CanResizeWithGrip"
x:Name="ChatViewName">
<Grid >
<GroupBox Header="Chat" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
<Grid >
<GroupBox Header="Chat" x:Name="rootGroupBox" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}" >
<TextBox x:Name="ServerStats" Height="23" Margin="539,13,7,0" TextWrapping="Wrap" VerticalAlignment="Top" ToolTip="Server Info" IsEnabled="False" VerticalContentAlignment="Center">
<!--<TextBox x:Name="ServerStats" Height="23" Margin="539,13,7,0" TextWrapping="Wrap" VerticalAlignment="Top" ToolTip="Server Info" IsEnabled="False" VerticalContentAlignment="Center">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Padding" Value="10,0,0,0" />
</Style>
</TextBox.Resources>
</TextBox>
</TextBox>-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBox x:Name="Chatbox" HorizontalAlignment="Left" Margin="221,720,0,10" TextWrapping="Wrap" Text="Nachricht schreiben" TextChanged="Chatbox_OnTextChanged" VerticalScrollBarVisibility="Auto" MaxLines="5" MaxHeight="70"
VerticalContentAlignment="Center" Width="416" MinHeight="25" ToolTip="Schreiben Sie hier eine Nachricht hinein" KeyDown="OnKeyDownHandler" GotFocus="OnFocus" Foreground="DarkGray" >
VerticalContentAlignment="Center" Width="416" MinHeight="25" ToolTip="Schreiben Sie hier eine Nachricht hinein" KeyDown="OnKeyDownHandler" GotFocus="OnFocus" Foreground="DarkGray" >
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Padding" Value="10,0,0,0" />
</Style>
<Setter Property="Padding" Value="10,0,0,0" />
</Style>
</TextBox.Resources>
</TextBox>
<Button HorizontalAlignment="Left" x:Name="EmojiButton" Margin="642,720,-18,0" VerticalAlignment="Top" Width="23" Height="25" Click="SmileyButton_OnClick">
<Image x:Name="Smiley" ToolTip="Smiley einfügen" Source="/BeWoPlaner;component/Ressources/Icons/trauriges-smiley.png" />
<Button HorizontalAlignment="Left" x:Name="EmojiButton" Margin="642,720,-18,0" VerticalAlignment="Top" Width="25" Height="25" Click="SmileyButton_OnClick">
<Image x:Name="Smiley" ToolTip="Smiley einfügen" Source="/BeWoPlaner;component/Ressources/Icons/glucklicher.png" Stretch="UniformToFill" VerticalAlignment="Center" HorizontalAlignment="Center" RenderOptions.BitmapScalingMode="HighQuality" />
</Button>
</Grid>
<ListBox x:Name="Chat" HorizontalAlignment="Left" Height="630" Margin="221,64,0,0" VerticalAlignment="Top" Width="564" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" SelectionMode="Extended" MouseRightButtonDown="OnRightClickEvent" >
@@ -78,7 +79,7 @@
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
<!-- <ListBox.ItemsPanel> falls der Text von unten kommen soll
<!-- <ListBox.ItemsPanel> der Text kommt von unten und die neuste nachricht steht immer oben
<ItemsPanelTemplate>
<StackPanel VerticalAlignment="Bottom"/>
@@ -86,21 +87,22 @@
</ListBox.ItemsPanel>-->
</ListBox>
<!--###################################### Liste aller User mit Chat Berechtigung ######################################################-->
<!--###################################### Liste aller User mit Chat Berechtigung ###################################################### -->
<ListView x:Name="Clientlist" HorizontalAlignment="Left" Height="680" Margin="10,64,0,0" VerticalAlignment="Top" Width="206" SelectionChanged="ListBoxSelectedIndexChanged" Style="{DynamicResource ResourceKey=styleListBox}" ItemTemplate="{DynamicResource DataTemplate1}">
<ListView.Resources>
<DataTemplate x:Key="DataTemplate1">
<Grid Margin="15,0,0,0">
<Grid Margin="7,0,0,0" x:Name="GridMargin">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="35"/>
<ColumnDefinition Width="15"/>
<ColumnDefinition Width="7"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="25"/>
<ColumnDefinition Width="12"/>
</Grid.ColumnDefinitions>
<Border BorderThickness="0.25" CornerRadius="3" Grid.RowSpan="2" Grid.ColumnSpan="4" Background="White" >
<Border BorderThickness="0.25" CornerRadius="3" Grid.RowSpan="2" Grid.ColumnSpan="5" Background="White" >
<Border.BorderBrush>
<SolidColorBrush Color="Black" />
</Border.BorderBrush>
@@ -113,19 +115,23 @@
</Ellipse>
<StackPanel Grid.Column="1" Height="30" >
<Ellipse Width='15' Height='15' Fill="{Binding Path=Color}" Margin="0,6,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Fill" />
<Ellipse Width='7' Height='7' Fill="{Binding Path=Color}" Margin="-23,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Fill" />
</StackPanel>
<StackPanel Grid.Column="2" Margin="5" >
<StackPanel Orientation="Horizontal" TextBlock.FontWeight="Bold" >
<TextBlock Text="{Binding Path=Name, FallbackValue=FirstName}" />
</StackPanel>
<TextBlock Text="{Binding Path=StatusTyp, FallbackValue=Message}" />
<!-- <TextBlock Text="{Binding Path=StatusTyp, FallbackValue=Message}" />-->
</StackPanel>
<!--Für die anzeige der anzahl ungelesener Nachrichten Height="30"-->
<StackPanel Grid.Column="3" Margin="5">
<TextBlock Text="{Binding Path=Receivems}" FontWeight="Bold" Foreground="DarkRed" />
<TextBlock Text="{Binding Path=Receivems}" FontWeight="Bold" Foreground="Black" />
</StackPanel>
<StackPanel Grid.Column="4" Margin="7,0,0,0">
<Rectangle Fill="{Binding Path=ColorType}" Stretch="Fill" Height="30" Width="2" />
</StackPanel>
</Grid>
@@ -143,9 +149,9 @@
<ControlTemplate>
<Expander IsExpanded="True">
<Expander.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="Black" FontSize="18" VerticalAlignment="Bottom" />
<TextBlock Text="{Binding ItemCount}" FontSize="12" Foreground="OrangeRed" FontWeight="Bold" FontStyle="Italic" Margin="10,0,0,0" VerticalAlignment="Bottom" />
<StackPanel Orientation="Horizontal" >
<TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="Black" FontSize="18" VerticalAlignment="Bottom" Width="148" />
<TextBlock Text="{Binding ItemCount}" FontSize="12" Foreground="Black" FontWeight="Bold" Margin="10,0,0,1" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
</StackPanel>
</Expander.Header>
@@ -160,18 +166,50 @@
</ListView.GroupStyle>
</ListView>
<!--###################################### Ende Liste #######################################################-->
<Button x:Name="SendButton" Content="Senden" HorizontalAlignment="Left" Margin="672,720,0,0" VerticalAlignment="Top" Width="111" Click="SendButton_Click" Height="25"/>
<Label Content="Aktuelle Liste:" HorizontalAlignment="Left" Margin="10,41,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.622,0.045" Width="132"/>
<Grid Margin="10,13,574,691" Width="206" Height="50">
<Grid.RowDefinitions>
<RowDefinition Height="25"/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="206"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" Width="180" HorizontalAlignment="Left" >
<Label Content="Mein Status: " Width="80"/>
<RadioButton GroupName="status" x:Name="RadioButtonOnline" BorderBrush="Green" Width="15" ToolTip="Online" VerticalAlignment="Center" Checked="ComboBox_SelectionChanged" Foreground="Green"/>
<RadioButton GroupName="status" x:Name="RadioButtonOffline" BorderBrush="Red" Width="15" ToolTip="Offline" VerticalAlignment="Center" Checked="ComboBox_SelectionChanged" Foreground="Red"/>
<RadioButton GroupName="status" x:Name="RadioButtonBeschaeftigt" BorderBrush="DarkOrange" Width="15" ToolTip="Beschäftigt" VerticalAlignment="Center" Checked="ComboBox_SelectionChanged" Foreground="DarkOrange"/>
</StackPanel>
<StackPanel Grid.Row="0" Width="20" HorizontalAlignment="Right" Orientation="Horizontal" >
<Button Style="{DynamicResource IconButtonStyle}" x:Name="ButtonSortLabel" Background="Transparent" BorderBrush="Transparent" HorizontalAlignment="Right" VerticalAlignment="Center" Width="20" Height="20" Click="ButtonSortLabel_OnClick" >
<Image x:Name="SortLabel" ToolTip="Sortierung ändern" Source="pack://application:,,,/Ressources/icons/unsortiert.png" />
</Button>
</StackPanel>
<TextBox x:Name="Suche" Grid.Column="1" VerticalContentAlignment="Center" KeyDown="Suche_OnKeyDown" Grid.Row="1" TextChanged="Suche_OnTextChanged" LostFocus="Suche_OnLostFocus">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="3"/>
<Setter Property="Padding" Value="5,0,0,0" />
</Style>
</TextBox.Resources>
</TextBox>
</Grid>
</Grid>
</GroupBox>
<!-- Online | Offline | Beschäftigt -->
<ComboBox x:Name="StatusSetting" HorizontalAlignment="Left" Margin="17,53,0,0" VerticalAlignment="Top" Width="100" SelectionChanged="ComboBox_SelectionChanged"/>
<ListBox x:Name="AktChatUser" HorizontalAlignment="Left" Background="Transparent" BorderBrush="Transparent" Height="50" Margin="228,52,0,0" VerticalAlignment="Top" Width="312" ItemTemplate="{DynamicResource DataTemplate2}">
<ListBox.Resources>
<DataTemplate x:Key="DataTemplate2">
@@ -180,20 +218,23 @@
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<!-- <Border Margin="5" BorderBrush="DarkGray" BorderThickness="1"> -->
<Ellipse Width='30' Height='30'>
<Ellipse Width='30' Height='30' VerticalAlignment="Center">
<Ellipse.Fill>
<ImageBrush ImageSource='{Binding Image}' Stretch='Fill' />
</Ellipse.Fill>
</Ellipse>
<!-- <Image Source="{Binding Path=Image}" Stretch="Fill" Width="30" Height="30" />-->
<!-- </Border> -->
<StackPanel Grid.Column="1" Margin="5">
<StackPanel Grid.Column="1" Margin="5" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal" TextBlock.FontWeight="Bold" >
<TextBlock Text="{Binding Path=Name, FallbackValue=FirstName}" />
</StackPanel>
<TextBlock Text="{Binding Path=StatusTyp, FallbackValue=Message}" />
<!-- <TextBlock Text="{Binding Path=StatusTyp, FallbackValue=Message}" />-->
</StackPanel>
</Grid>
</DataTemplate>

View File

@@ -64,6 +64,9 @@ namespace BeWo.View
protected PropertyGroupDescription groupDescription;
protected bool isOnFocus = false;
protected bool sortLabelSwitch = false;
protected ContextMenu context;
public ChatView(String nameinf, String Chatinf, TcpClient tcpClient)
@@ -77,11 +80,11 @@ namespace BeWo.View
CloseWindow();
LoadallChatKontakts();
ErstelleContextMenue();
SetChatSetting();
// SetChatSetting();
}
private void SetChatSetting()
/*private void SetChatSetting()
{
try
{
@@ -97,7 +100,7 @@ namespace BeWo.View
{
MessageBox.Show("Das Aufbauen der Chat-Settings ist fehlgeschlagen. " + edf.Message + "\n" + edf.StackTrace, "Fehler: 2200 ", MessageBoxButton.OK);
}
}
}*/
public void UpdateTcp(TcpClient tcpClient)
{
@@ -212,6 +215,36 @@ namespace BeWo.View
}
}
public void SetAnzahlErhalteneNachricht(long personoid)
{
try
{
foreach (var abc in ita)
{
if (abc.EmpfaengerOid == personoid && abc.TypeChat != ChatType.Team)
{
int x;
bool wasdrin = int.TryParse(abc.Receivems, out x);
if (wasdrin)
{
x++;
abc.Receivems = x.ToString();
}
else
abc.Receivems = 1.ToString();
}
}
view.Refresh();
}
catch (Exception edf)
{
MessageBox.Show("Beim Setzen der Anzahl angekommender Nachrichten ist ein Fehler aufgetreten. " + edf.Message + "\n" + edf.StackTrace, "Fehler 2391", MessageBoxButton.OK);
}
}
public void RefreshViewModel()
{
view.Refresh();
@@ -233,7 +266,7 @@ namespace BeWo.View
{
var mitarbeiter = ServiceFacade.DoEmployeeServiceSync(s => s.GetEmployeeWithPersonOid(personoid));
KontaktlistBuilder konbuild = new KontaktlistBuilder(clientname,StatusType.Online, BuildImg(mitarbeiter.EmployeeImage), personoid, ChatType.Mitarbeiter);//"Online"
KontaktlistBuilder konbuild = new KontaktlistBuilder(clientname,StatusType.Online, BuildImg(mitarbeiter.EmployeeImage,ChatType.Mitarbeiter), personoid, ChatType.Mitarbeiter);//"Online"
var zugehorigkeit = ServiceFacade.DoEmployeeServiceSync(s => s.GetTeamOidsByEmployee(personoid));
@@ -253,7 +286,14 @@ namespace BeWo.View
}
}
}
view.Refresh();
// if (SortCheckBox.IsChecked.Value)
// {
view.Refresh();
// }
// else
// {
// ChatViewName.RefreshUI();
// }
}
else if (a == PersonType.Customer)
{
@@ -268,7 +308,7 @@ namespace BeWo.View
customerCompact.LastName = klienten.LastName;
customerCompact.DateOfBirth = klienten.DateOfBirth;
KontaktlistBuilder konbuild = new KontaktlistBuilder(clientname, StatusType.Online, BuildImg(klienten.CustomerImage), personoid, ChatType.Klienten, customerCompact);//"Online"
KontaktlistBuilder konbuild = new KontaktlistBuilder(clientname, StatusType.Online, BuildImg(klienten.CustomerImage,ChatType.Klienten), personoid, ChatType.Klienten, customerCompact);//"Online"
foreach (var variable in ita)
{
@@ -413,7 +453,7 @@ namespace BeWo.View
public void SetServerStats(String servstats)
{
ServerStats.Text = servstats;
//ServerStats.Text = servstats;
}
private void SendButton_Click(object sender, RoutedEventArgs e)
@@ -510,25 +550,19 @@ namespace BeWo.View
try
{
var employeeteamoids = ServiceFacade.DoEmployeeServiceSync(s => s.GetTeamOidsByEmployee(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
var offmitarbeiter =
ServiceFacade.DoEmployeeServiceSync(s => s.GetAllChatActiveEmployeesCompact());
var offklienten = ServiceFacade.DoCustomerServiceSync(s => s.GetAllChatActiveCustomersCompact(BeWoApp.LoggedOnUser.Employee.EmployeeOid)); // dieser code muss erweitert werden
/* var employee = ServiceFacade.DoEmployeeServiceSync(
s => s.GetEmployeeWithPersonOid(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
employee.Employee2CustomerList.Select(s => s.CustomerOid.Value);*/
var offmitarbeiter = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllChatActiveEmployeesCompact());
var offklienten = ServiceFacade.DoCustomerServiceSync(s => s.GetAllChatActiveCustomersCompact(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
foreach (var team in employeeteamoids)
{
Clientlist.Items.Add(new KontaktlistBuilder(team.Name, StatusType.Offline, BuildImg(null), team.TeamOid, ChatType.Team));
Clientlist.Items.Add(new KontaktlistBuilder(team.Name, StatusType.Offline, BuildImg(null,ChatType.Team), team.TeamOid, ChatType.Team));
}
foreach (var list in offmitarbeiter)
{
if(list.PersonOid != BeWoApp.LoggedOnUser.Employee.PersonOid){
Clientlist.Items.Add(new KontaktlistBuilder(list.FirstName + " " + list.LastName, StatusType.Offline,
BuildImg(ServiceFacade.DoEmployeeServiceSync(s => s.GetEmployeeImage(list.EmployeeOid))),
BuildImg(ServiceFacade.DoEmployeeServiceSync(s => s.GetEmployeeImage(list.EmployeeOid)),ChatType.Mitarbeiter),
list.PersonOid, ChatType.Mitarbeiter));
}
}
@@ -536,7 +570,7 @@ namespace BeWo.View
{
Clientlist.Items.Add(new KontaktlistBuilder(list.FirstName + " " + list.LastName, StatusType.Offline,
BuildImg(ServiceFacade.DoCustomerServiceSync(s => s.GetCustomerImage(list.CustomerOid))),
BuildImg(ServiceFacade.DoCustomerServiceSync(s => s.GetCustomerImage(list.CustomerOid)),ChatType.Klienten),
list.PersonOid, ChatType.Klienten,list));
}
@@ -552,8 +586,16 @@ namespace BeWo.View
Clientlist.ItemsSource = ita;
view = (CollectionView)CollectionViewSource.GetDefaultView(Clientlist.ItemsSource);
groupDescription = new PropertyGroupDescription("TypeChat");
view.GroupDescriptions.Add(groupDescription);
view.SortDescriptions.Add(new SortDescription("Receivems", ListSortDirection.Ascending));
view.SortDescriptions.Add(new SortDescription("StatusType", ListSortDirection.Ascending));
view.Filter = UserFilter;
if (sortLabelSwitch == true)
{
groupDescription = new PropertyGroupDescription("TypeChat");
view.GroupDescriptions.Add(groupDescription);
}
}
catch (Exception edf)
{
@@ -593,7 +635,7 @@ namespace BeWo.View
{
if (!idteamspeicher.Contains(var.TeamOid) && idteamspeicher.Count <= employeeteamoids.Count)
{
ita.Add(new KontaktlistBuilder(var.Name,StatusType.Offline, BuildImg(null), var.TeamOid, ChatType.Team));
ita.Add(new KontaktlistBuilder(var.Name,StatusType.Offline, BuildImg(null,ChatType.Team), var.TeamOid, ChatType.Team));
view.Refresh();
}
@@ -606,7 +648,7 @@ namespace BeWo.View
if (!idMitarbeitspeicher.Contains(var.PersonOid) && idMitarbeitspeicher.Count <= offmitarbeiter.Count && var.PersonOid != BeWoApp.LoggedOnUser.Employee.PersonOid)
{
ita.Add(new KontaktlistBuilder(var.FirstName + " " + var.LastName,StatusType.Offline,
BuildImg(ServiceFacade.DoEmployeeServiceSync(s => s.GetEmployeeImage(var.EmployeeOid))),
BuildImg(ServiceFacade.DoEmployeeServiceSync(s => s.GetEmployeeImage(var.EmployeeOid)),ChatType.Mitarbeiter),
var.PersonOid, ChatType.Mitarbeiter));
view.Refresh();
}
@@ -620,7 +662,7 @@ namespace BeWo.View
if (!idKlientspeicher.Contains(var.PersonOid) && idKlientspeicher.Count <= offklienten.Count)
{
ita.Add(new KontaktlistBuilder(var.FirstName + " " + var.LastName, StatusType.Offline,
BuildImg(ServiceFacade.DoCustomerServiceSync(s => s.GetCustomerImage(var.CustomerOid))),
BuildImg(ServiceFacade.DoCustomerServiceSync(s => s.GetCustomerImage(var.CustomerOid)),ChatType.Klienten),
var.PersonOid, ChatType.Klienten,var));
view.Refresh();
}
@@ -658,6 +700,20 @@ namespace BeWo.View
view.Refresh();
}
if (sortLabelSwitch == true)
{
groupDescription = new PropertyGroupDescription("TypeChat");
view.GroupDescriptions.Add(groupDescription);
view.Refresh();
}
else
{
view.GroupDescriptions.Clear();
view.Refresh();
}
}
catch (Exception edf)
{
@@ -672,7 +728,7 @@ namespace BeWo.View
list.StatusTyp = StatusType.Offline;
}
view.Refresh();
view.Refresh();
}
public void SetUserBeschäftigt(long oid, DataIdentifier type)
@@ -768,60 +824,62 @@ namespace BeWo.View
}
private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
private void ComboBox_SelectionChanged(object sender, RoutedEventArgs e)
{
try
{
switch (StatusSetting.SelectedIndex)
{
case 0:
if (RadioButtonOnline.IsChecked.Value)
{
if (tcpClient == null)
{
StatusSetting.SelectedIndex = 1;
RadioButtonOffline.IsChecked = true;
}
else if (!tcpClient.Connected)
{
StatusSetting.SelectedIndex = 1;
RadioButtonOffline.IsChecked = true;
}
else
{
SendUserStatus(DataIdentifier.StatusNotificationOnline);
}
}
break;
case 1:
if (RadioButtonOffline.IsChecked.Value)
{
if (tcpClient == null)
{
StatusSetting.SelectedIndex = 1;
RadioButtonOffline.IsChecked = true;
}
else if (!tcpClient.Connected)
{
StatusSetting.SelectedIndex = 1;
RadioButtonOffline.IsChecked = true;
}
else
{
{
SendUserStatus(DataIdentifier.StatusNotificationOffline);
}
break;
}
case 2:
if (RadioButtonBeschaeftigt.IsChecked.Value)
{
if (tcpClient == null)
{
StatusSetting.SelectedIndex = 1;
RadioButtonOffline.IsChecked = true;
}
else if (!tcpClient.Connected)
{
StatusSetting.SelectedIndex = 1;
RadioButtonOffline.IsChecked = true;
}
else
{
SendUserStatus(DataIdentifier.StatusNotificationBeschäftigt);
}
break;
}
}
}
catch (Exception edf)
{
@@ -918,40 +976,47 @@ namespace BeWo.View
AktChatUser.Items.Clear();
if (!curItem.Receivems.Equals(""))
{
curItem.Receivems = "";
}
if (curItem.TypeChat == ChatType.Klienten)
{
AktChatUser.Items.Add(new KontaktlistBuilder(curItem.Name, curItem.StatusTyp, curItem.Image, curItem.EmpfaengerOid, curItem.TypeChat, curItem.Customer));
}
else
{
AktChatUser.Items.Add(new KontaktlistBuilder(curItem.Name, curItem.StatusTyp, curItem.Image, curItem.EmpfaengerOid, curItem.TypeChat));
}
if(curItem != null){
if (!curItem.Receivems.Equals(""))
{
curItem.Receivems = "";
}
if (curItem.TypeChat == ChatType.Klienten)
{
AktChatUser.Items.Add(new KontaktlistBuilder(curItem.Name, curItem.StatusTyp, curItem.Image, curItem.EmpfaengerOid, curItem.TypeChat, curItem.Customer));
}
else
{
AktChatUser.Items.Add(new KontaktlistBuilder(curItem.Name, curItem.StatusTyp, curItem.Image, curItem.EmpfaengerOid, curItem.TypeChat));
}
LoadChatMessagefromDB(BeWoApp.LoggedOnEmployee.PersonOid.Value, curItem.EmpfaengerOid, curItem);
Chat.Items.MoveCurrentToLast();
Chat.ScrollIntoView(Chat.Items.CurrentItem);
view.Refresh();
LoadChatMessagefromDB(BeWoApp.LoggedOnEmployee.PersonOid.Value, curItem.EmpfaengerOid, curItem);
Chat.Items.MoveCurrentToLast();
Chat.ScrollIntoView(Chat.Items.CurrentItem);
if (curItem.TypeChat == ChatType.Klienten)
{
context.Visibility = Visibility.Visible;
Chat.SelectionMode = SelectionMode.Extended;
Chat.Focusable = true;
}
else
{
context.Visibility = Visibility.Collapsed;
Chat.SelectionMode = SelectionMode.Single;
Chat.Focusable = false;
}
Suche.Text = "";
view.Refresh();
if (curItem.TypeChat == ChatType.Klienten)
{
context.Visibility = Visibility.Visible;
Chat.SelectionMode = SelectionMode.Extended;
Chat.Focusable = true;
}
else
{
context.Visibility = Visibility.Collapsed;
Chat.SelectionMode = SelectionMode.Single;
Chat.Focusable = false;
}
}
}
}
catch (Exception s)
@@ -961,7 +1026,7 @@ namespace BeWo.View
}
}
public ImageSource BuildImg(Byte[] c)
public ImageSource BuildImg(Byte[] c ,ChatType x)
{
try
{
@@ -983,12 +1048,40 @@ namespace BeWo.View
{
//return null;
//return new BitmapImage(new Uri(@"..\..\Ressources\Icons\UserHomeBoyDisabled.png", UriKind.Relative));
BitmapImage bi = new BitmapImage();
bi.BeginInit();
bi.UriSource = new Uri("pack://application:,,,/Ressources/icons/UserHomeBoyDisabled.png");
bi.EndInit();
return bi;
if (x == ChatType.Klienten)
{
BitmapImage bix = new BitmapImage();
bix.BeginInit();
bix.UriSource = new Uri("pack://application:,,,/Ressources/icons/klient-avatar.png");
bix.EndInit();
return bix;
}else
if (x == ChatType.Mitarbeiter)
{
BitmapImage biy = new BitmapImage();
biy.BeginInit();
biy.UriSource = new Uri("pack://application:,,,/Ressources/icons/mitarbeiter-avatar.png");
biy.EndInit();
return biy;
}else
if (x == ChatType.Team)
{
BitmapImage biz = new BitmapImage();
biz.BeginInit();
biz.UriSource = new Uri("pack://application:,,,/Ressources/icons/mitarbeiter-team-avatar.png");
biz.EndInit();
return biz;
}
else
{
BitmapImage bi = new BitmapImage();
bi.BeginInit();
bi.UriSource = new Uri("pack://application:,,,/Ressources/icons/UserHomeBoyDisabled.png");
bi.EndInit();
return bi;
}
//return new ImageSource new BitmapImage(new Uri(@"..\..\Ressources\Icons\UserHomeBoyDisabled.png", UriKind.Relative));
//(ImageSource)
@@ -1042,7 +1135,7 @@ namespace BeWo.View
serverStream.Write(outStream, 0, outStream.Length);
serverStream.Flush();
ServerStats.Text = "Nachricht erfolgreich gesendet";
// ServerStats.Text = "Nachricht erfolgreich gesendet";
}
else
{
@@ -1056,7 +1149,7 @@ namespace BeWo.View
MessageBox.Show("Beim Senden einer Nachricht zum Server ist ein Fehler aufgetreten. " + xe.Message + "\n" + xe.StackTrace,
"Fehler: 2300 ", MessageBoxButton.OK);
ServerStats.Text = "Fehler: Die Nachricht konnte nicht gesendet werden.";
//ServerStats.Text = "Fehler: Die Nachricht konnte nicht gesendet werden.";
}
}
}
@@ -1134,7 +1227,7 @@ namespace BeWo.View
if (anzeige.IstGelesen != 1)
{
ServiceFacade.DoCustomerServiceAsync(s => s.UpdateIstGelesen(anzeige.EmpfängerPersonOid.Value,anzeige.SenderPersonOid.Value,true));
ServiceFacade.DoCustomerServiceSync(s => s.UpdateIstGelesen(anzeige.EmpfängerPersonOid.Value,anzeige.SenderPersonOid.Value,true));
}
}
@@ -1193,7 +1286,7 @@ namespace BeWo.View
}
}
}
ServiceFacade.DoCustomerServiceAsync(s => s.UpdateIstGelesen(empfaengerOid, senderoid, true));
ServiceFacade.DoCustomerServiceSync(s => s.UpdateIstGelesen(empfaengerOid, senderoid, true));
}
}
catch (Exception edf)
@@ -1202,7 +1295,6 @@ namespace BeWo.View
}
}
//placeholder
private void OnFocus(object sender, EventArgs e)
{
try
@@ -1231,7 +1323,7 @@ namespace BeWo.View
}
//Rechte Maus Taste an dem Chat
public void OnRightClickEvent(object sender, RoutedEventArgs e)
{
e.Handled = true;
@@ -1345,6 +1437,70 @@ namespace BeWo.View
MessageBox.Show("Fehler :" + e.Message + "\n" + e.StackTrace, "Info", MessageBoxButton.OK);
}
}
private void SortCheckBox_OnChecked(object sender, RoutedEventArgs e)
{
//AktualisiereChatKontakt();
}
private void Suche_OnKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Return)
{
Suche.Text = "";
}
}
private void Suche_OnTextChanged(object sender, TextChangedEventArgs e)
{
CollectionViewSource.GetDefaultView(Clientlist.ItemsSource).Refresh();
}
private bool UserFilter(object item)
{
if (String.IsNullOrEmpty(Suche.Text))
return true;
else
return ((item as KontaktlistBuilder).Name.IndexOf(Suche.Text, StringComparison.OrdinalIgnoreCase) >= 0);
}
private void Suche_OnLostFocus(object sender, RoutedEventArgs e)
{
// Suche.Text = "";
}
private void ButtonSortLabel_OnClick(object sender, RoutedEventArgs e)
{
//if() clicked dann immer wechseln + abfrage true und false ;
if (sortLabelSwitch == false)
{
BitmapImage biy = new BitmapImage();
biy.BeginInit();
biy.UriSource = new Uri("pack://application:,,,/Ressources/icons/sortiert.png");
biy.EndInit();
SortLabel.Source = biy;
sortLabelSwitch = true;
AktualisiereChatKontakt();
}
else
{
BitmapImage biy = new BitmapImage();
biy.BeginInit();
biy.UriSource = new Uri("pack://application:,,,/Ressources/icons/unsortiert.png");
biy.EndInit();
SortLabel.Source = biy;
sortLabelSwitch = false;
AktualisiereChatKontakt();
}
}
}
public class KontaktlistBuilder : INotifyPropertyChanged
@@ -1372,6 +1528,19 @@ namespace BeWo.View
{
this.Color = new SolidColorBrush(Colors.Orange);
}
if (typeChat == ChatType.Team)
{
_colorType = new SolidColorBrush(Colors.DarkViolet);
}
else if (typeChat == ChatType.Klienten)
{
_colorType = new SolidColorBrush(Colors.Blue);
}
else
{
_colorType = new SolidColorBrush(Colors.Green);
}
}
public KontaktlistBuilder(string name, StatusType statustyp, ImageSource image, long empfaengerid, ChatType typeChat, CompactCustomerDC customer)
@@ -1397,6 +1566,19 @@ namespace BeWo.View
{
this.Color = new SolidColorBrush(Colors.Orange);
}
if (typeChat == ChatType.Team)
{
_colorType = new SolidColorBrush(Colors.DarkViolet);
}
else if (typeChat == ChatType.Klienten)
{
_colorType = new SolidColorBrush(Colors.Blue);
}
else
{
_colorType = new SolidColorBrush(Colors.Green);
}
}
public string Name { get; private set; }
@@ -1452,7 +1634,33 @@ namespace BeWo.View
//_color = value;
OnPropertyChanged("Color"); }
}
private Brush _colorType;
public Brush ColorType
{
get
{
return _colorType;
}
set
{
if (TypeChat == ChatType.Team)
{
_colorType = new SolidColorBrush(Colors.DarkViolet);
}
else if (TypeChat == ChatType.Klienten)
{
_colorType = new SolidColorBrush(Colors.Blue);
}
else
{
_colorType = new SolidColorBrush(Colors.Green);
}
//_color = value;
OnPropertyChanged("ColorType");
}
}
public CompactCustomerDC Customer { get; set; }
public event PropertyChangedEventHandler PropertyChanged;

View File

@@ -183,6 +183,11 @@
</dxg:GridColumn>
<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>
<dxg:GridColumn FieldName="Notice" Header="Erläuterung" Width="250" />
</dxg:GridControl.Columns>
<dxg:GridControl.View>
@@ -983,6 +988,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -1005,10 +1011,12 @@
<Label Content="Notiz" Grid.Row="2" Grid.Column="0" VerticalAlignment="Top" />
<TextBox Grid.Row="2" Grid.Column="1" Height="50" Margin="3" Grid.ColumnSpan="2"
Text="{Binding Path=EmployeeRelations.NewVM.Notice, UpdateSourceTrigger=PropertyChanged}" />
<Button Grid.Row="3" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="25"
<Label Content="Chatpartner" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center"/>
<CheckBox Grid.Row="3" Grid.Column="2" IsChecked="{Binding Path=EmployeeRelations.NewVM.Chatpartner, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Right" Margin="3"/>
<Button Grid.Row="4" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Height="25"
Margin="3" Content="Hinzufügen" x:Name="button_addEmployeeRelation"
Click="button_addEmployeeRelation_Click" />
<Button Grid.Row="3" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="25"
<Button Grid.Row="4" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Height="25"
Margin="3" Content="Abbrechen" x:Name="button_cancelEmployeeRelation"
Click="button_cancelEmployeeRelation_Click" />
</Grid>

View File

@@ -80,7 +80,7 @@ namespace BeWo.View.Detail
public CustomerView(CustomerVM pCustomerVM)
{
InitializeComponent();
BehinderungsartenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupBehinderungsarten.IsOpen = false; })));
MerkzeichenSelection.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => this.Dispatch(() => { PopupMerkzeichen.IsOpen = false; })));
@@ -238,6 +238,9 @@ namespace BeWo.View.Detail
}
Img.EditValueChanged += Image_EditValueChanged;
}
void Image_EditValueChanged(object sender, DevExpress.Xpf.Editors.EditValueChangedEventArgs e)
@@ -491,6 +494,12 @@ namespace BeWo.View.Detail
{
grid_EmployeeRelation.Columns["Role"].EditSettings = new ComboBoxEditSettings { ItemsSource = ViewModel.EmployeeRelations.PossibleRoles };
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ChatSettings))
{
grid_EmployeeRelation.Columns["Chatpartner"].Visible = false;
}
}
if (grid_TeamRelation == null)
{

View File

@@ -1210,8 +1210,8 @@ namespace BeWo.View
(ThreadStart) delegate
{
chatView.SetServerStats("Verbunden");
chatView.StatusSetting.SelectedIndex = 0;
chatView.RadioButtonOnline.IsChecked = true;
chatView.ButtonAlarmLabel.Visibility = Visibility.Collapsed;
});
@@ -1233,7 +1233,7 @@ namespace BeWo.View
(ThreadStart) delegate
{
chatView.SetServerStats("Zurzeit nicht Verbunden");
chatView.StatusSetting.SelectedIndex = 1;
chatView.RadioButtonOffline.IsChecked = true;
});
}
@@ -1403,7 +1403,7 @@ namespace BeWo.View
{
if (chatView != null)
{
chatView.StatusSetting.SelectedIndex = 1;
chatView.RadioButtonOffline.IsChecked = true;
chatView.setConnectionLostIcon();
}
@@ -1458,7 +1458,7 @@ namespace BeWo.View
if (chatView == null)
{
SaveAnkommendeServerMeldungen.Add(zaehler, messagePaket); // muss noch ordnungsgemäß gesetzt werden
SaveAnkommendeServerMeldungen.Add(zaehler, messagePaket);
zaehler++;
}
else
@@ -1480,7 +1480,7 @@ namespace BeWo.View
zaehler = 1;
WaitForMsFromServer();
}
//original
}
WaitForMsFromServer();
}
@@ -1651,8 +1651,8 @@ namespace BeWo.View
if (chatView.Visibility == Visibility.Collapsed &&
miniChatViewList[personoid].Visibility == Visibility.Collapsed)
{
miniChatViewList[personoid].Visibility = Visibility.Visible;
miniChatViewList[personoid].SetText(text, 1);
// miniChatViewList[personoid].Visibility = Visibility.Visible;
// miniChatViewList[personoid].SetText(text, 1);
}
else if (miniChatViewList[personoid].Visibility == Visibility.Collapsed && chatView.Visibility == Visibility.Visible && curItem.EmpfaengerOid.Equals(personoid))
{
@@ -1660,12 +1660,15 @@ namespace BeWo.View
}
else if (miniChatViewList[personoid].Visibility == Visibility.Collapsed && !curItem.EmpfaengerOid.Equals(personoid))
{
miniChatViewList[personoid].Visibility = Visibility.Visible;
miniChatViewList[personoid].SetText(text, 1);
// miniChatViewList[personoid].Visibility = Visibility.Visible;
// miniChatViewList[personoid].SetText(text, 1);
chatView.SetAnzahlErhalteneNachricht(personoid);
}
else
else if (chatView.Visibility == Visibility.Collapsed && !curItem.EmpfaengerOid.Equals(personoid))
{
miniChatViewList[personoid].AppendTextwhileViewOpen(text, 1);
//miniChatViewList[personoid].AppendTextwhileViewOpen(text, 1);
chatView.SetAnzahlErhalteneNachricht(personoid);
}
}
else
@@ -1673,17 +1676,20 @@ namespace BeWo.View
if (chatView.Visibility == Visibility.Collapsed &&
miniChatViewList[personoid].Visibility == Visibility.Collapsed)
{
miniChatViewList[personoid].Visibility = Visibility.Visible;
miniChatViewList[personoid].SetText(text, 1);
//miniChatViewList[personoid].Visibility = Visibility.Visible;
//miniChatViewList[personoid].SetText(text, 1);
chatView.SetAnzahlErhalteneNachricht(personoid);
}
else if (miniChatViewList[personoid].Visibility == Visibility.Collapsed && chatView.Visibility == Visibility.Visible)
{
miniChatViewList[personoid].Visibility = Visibility.Visible;
miniChatViewList[personoid].SetText(text, 1);
//miniChatViewList[personoid].Visibility = Visibility.Visible;
//miniChatViewList[personoid].SetText(text, 1);
chatView.SetAnzahlErhalteneNachricht(personoid);
}
else
{
miniChatViewList[personoid].AppendTextwhileViewOpen(text, 1);
// miniChatViewList[personoid].AppendTextwhileViewOpen(text, 1);
}
}
}
@@ -1797,7 +1803,7 @@ namespace BeWo.View
chatView.ButtonAlarmLabel.Visibility = Visibility.Visible;
chatView.SetAllUserOfflineIfNoInet();
chatView.StatusSetting.SelectedIndex = 1;
chatView.RadioButtonOffline.IsChecked = true;
chatView.SetServerStats("Verbindung zum Server Unterbrochen");
}
});

View File

@@ -20,6 +20,8 @@ namespace BeWo.ViewModel
public static string PropertyName_Role = "Role";
public static string PropertyName_Chatpartner = "Chatpartner";
private CompactCustomerDC _Customer;
private CompactEmployeeDC _Employee;
@@ -28,6 +30,8 @@ namespace BeWo.ViewModel
private ValueListEntryDC _Role;
private bool _Chatpartner;
public CustomerEmployeeRelationVM(CustomerEmployeeRelationDC pDC) : base(pDC, pDC.Employee2CustomerOid == null)
{
}
@@ -95,6 +99,20 @@ namespace BeWo.ViewModel
}
}
public bool Chatpartner
{
get { return _Chatpartner; }
set
{
if (this.AreDifferent(this._Chatpartner, value))
{
_Chatpartner = value;
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.Chatpartner, value), PropertyName_Chatpartner);
this.FirePropertyChanged(PropertyName_Chatpartner);
}
}
}
[Validation(ValidationRule = ValidationRules.NotNullOrStringEmpty)]
public ValueListEntryDC Role
{
@@ -119,6 +137,7 @@ namespace BeWo.ViewModel
this._Customer = pDataContract.Customer;
this._Role = pDataContract.RelationRole;
this._Notice = pDataContract.Notice;
_Chatpartner = pDataContract.Chatpartner;
}
}
@@ -128,6 +147,7 @@ namespace BeWo.ViewModel
pDataContract.Customer = this._Customer;
pDataContract.RelationRole = this._Role;
pDataContract.Notice = this._Notice;
pDataContract.Chatpartner = _Chatpartner;
return pDataContract;
}

View File

@@ -1519,6 +1519,15 @@ namespace BeWo.Data.Access
return c2.List<Customer>();
}
public IEnumerable<Employee2Customer> FindAllChatpartnerEmployee2Customer(long pRecipientOid)
{
var c = CreateCriteriaIsActive<Employee2Customer>()
.Add(Restrictions.Eq(Employee2Customer.PropertyName_EmployeeOid, pRecipientOid))
.Add(Restrictions.Eq(Employee2Customer.PropertyName_Chatpartner,true));
return c.List<Employee2Customer>();
}
public IEnumerable<ChatMessage> FindAllChatMessages(long senderOid, long empfaengerOid)
{
var c = CreateCriteriaIsActive<ChatMessage>()

View File

@@ -16,6 +16,8 @@ namespace BeWo.Data.Entities
public static string PropertyName_ValueList = "ValueList";
public static string PropertyName_Chatpartner = "Chatpartner";
private Customer _Customer;
private long? _CustomerOid;
@@ -26,6 +28,8 @@ namespace BeWo.Data.Entities
private IList<ValueListEntry2Object> _ValueList;
private bool _Chatpartner;
public Employee2Customer()
{
this._Tid = TableID.Employee2Customer;
@@ -128,5 +132,17 @@ namespace BeWo.Data.Entities
}
}
}
public virtual bool Chatpartner
{
get { return _Chatpartner; }
set
{
if (this.AreDifferent(_Chatpartner, value))
{
_Chatpartner = value;
}
}
}
}
}

View File

@@ -17,6 +17,7 @@
<property column="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" name="SystemEntryID" />
<property column="EmployeeOid" type="Int64" name="EmployeeOid" update="false" insert="false" />
<property column="CustomerOid" type="Int64" name="CustomerOid" update="false" insert="false" />
<property column="Chatpartner" name="Chatpartner" />
<many-to-one name="Employee" column="EmployeeOid" class="BeWo.Data.Entities.Employee,BeWo.Data" cascade="none" />
<many-to-one name="Customer" column="CustomerOid" class="BeWo.Data.Entities.Customer,BeWo.Data" cascade="none" />

View File

@@ -0,0 +1,2 @@
ALTER TABLE `1234567890`.`employee2customer`
ADD COLUMN `Chatpartner` TINYINT(4) NULL DEFAULT 0 COMMENT '' AFTER `SystemEntryID`;

View File

@@ -20,6 +20,7 @@ namespace BeWo.Service.DCEntityMapper
pDataContract.Employee2CustomerOid = pEntity.Oid;
pDataContract.Employee2CustomerVersion = pEntity.Version;
pDataContract.Notice = pEntity.Notice;
pDataContract.Chatpartner = pEntity.Chatpartner;
return pDataContract;
}
@@ -42,6 +43,7 @@ namespace BeWo.Service.DCEntityMapper
pEntity.Oid = pDataContract.Employee2CustomerOid;
pEntity.Notice = pDataContract.Notice;
pEntity.Chatpartner = pDataContract.Chatpartner;
return pEntity;
}

View File

@@ -3146,23 +3146,28 @@ namespace BeWo.Service.ServiceImplementations
}
}
// TODO: CompactPersonDCs benutzen
public List<CompactCustomerDC> GetAllChatActiveCustomersCompact(long personOid)
{
try
{
var customers = DAOFactory.SearchDAO.FindAllChatActiveCustomers();
var employee = DAOFactory.SearchDAO.FindEmployeeWithPersonOid(personOid);
var chatpartner = DAOFactory.SearchDAO.FindAllChatpartnerEmployee2Customer(personOid);
var customeroids = employee.Employee2CustomerList.Select(s => s.CustomerOid.Value);
List<Customer> customerpartner = new List<Customer>();
foreach (var x in customers)
{
foreach (var y in chatpartner)
{
if (x.Oid == y.CustomerOid)
{
customerpartner.Add(x);
}
}
}
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customers);
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customerpartner);
}
catch (Exception e)
{

View File

@@ -24,5 +24,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public ValueListEntryDC RelationRole { get; set; }
[DataMember]
public bool Chatpartner { get; set; }
}
}