Fixes und Upadates
This commit is contained in:
@@ -2511,6 +2511,15 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Ressources\Icons\ArrowLeft.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Ressources\Icons\adobe-pdf-icon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Ressources\Icons\DocumentWithAdd.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Ressources\Icons\DocumentWithAdd2.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
|
||||
BIN
BeWo/Ressources/Icons/DocumentWithAdd.png
Normal file
BIN
BeWo/Ressources/Icons/DocumentWithAdd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
BeWo/Ressources/Icons/DocumentWithAdd2.png
Normal file
BIN
BeWo/Ressources/Icons/DocumentWithAdd2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
BIN
BeWo/Ressources/Icons/adobe-pdf-icon.png
Normal file
BIN
BeWo/Ressources/Icons/adobe-pdf-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
@@ -1372,6 +1372,11 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/SetBenutzerPasswortChatAppCodeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void SetBenutzerPasswortChatAppCode(long pCustomerOid, string benutzerName, string passwort);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/PruefeObBenutzerKontoSchonVorhanden", ReplyAction="http://tempuri.org/ICustomerService/PruefeObBenutzerKontoSchonVorhandenResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/PruefeObBenutzerKontoSchonVorhandenBeWoFaultF" +
|
||||
"ault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
bool PruefeObBenutzerKontoSchonVorhanden(long customerOid, string benutzername);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/ArchiveCustomer", ReplyAction="http://tempuri.org/ICustomerService/ArchiveCustomerResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/ArchiveCustomerBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void ArchiveCustomer(long pOid, long pVersion);
|
||||
@@ -2186,6 +2191,11 @@ namespace BeWo.ServiceProxy
|
||||
base.Channel.SetBenutzerPasswortChatAppCode(pCustomerOid, benutzerName, passwort);
|
||||
}
|
||||
|
||||
public bool PruefeObBenutzerKontoSchonVorhanden(long customerOid, string benutzername)
|
||||
{
|
||||
return base.Channel.PruefeObBenutzerKontoSchonVorhanden(customerOid, benutzername);
|
||||
}
|
||||
|
||||
public void ArchiveCustomer(long pOid, long pVersion)
|
||||
{
|
||||
base.Channel.ArchiveCustomer(pOid, pVersion);
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -36,12 +37,17 @@
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="0" Content=" Code Generieren" Click="GenerateCodeClick" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Height="21" x:Name="GenerateButon"/>
|
||||
|
||||
<Label Content="Chat-Code:" x:Name="lblGenerateCode" Grid.Column="0" Grid.Row="0" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="21" />
|
||||
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" MinWidth="120" x:Name="GeneratetTexfield" IsReadOnly="True"/>
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="2" Margin="3" Height="23" Click="RemoveCode_OnClick" ToolTip="Aktuellen Chat-Code löschen." x:Name="RemoveButton" Visibility="Collapsed">
|
||||
<Button Grid.Column="2" Grid.Row="0" Click="GenerateCodeClick" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="Chat-Code anfordern"
|
||||
Height="23" x:Name="ButtonGenerateCode" >
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/DocumentWithAdd2.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" x:Name="ImageGenerateCode"/>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="3" Margin="3" Height="23" Click="RemoveCode_OnClick" ToolTip="Aktuellen Chat-Code löschen." x:Name="RemoveButton" Visibility="Collapsed">
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/Symbol Delete.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
@@ -50,7 +56,7 @@
|
||||
|
||||
<!--<CheckBox x:Name="ChatAktive" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked"/>-->
|
||||
|
||||
<GroupBox Margin="3" Grid.Row="2" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="3" Header="ownChat Benutzer Konto" Style="{x:Null}" >
|
||||
<GroupBox Margin="3" Grid.Row="2" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="4" Header="ownChat Benutzer Konto" Style="{x:Null}" x:Name="CustomerBenutzerKontoGroupBox" Visibility="Collapsed">
|
||||
<!-- ####################### Style Design gedönse ## -->
|
||||
<GroupBox.Template>
|
||||
<ControlTemplate TargetType="{x:Type GroupBox}">
|
||||
@@ -116,8 +122,8 @@
|
||||
</GroupBox>
|
||||
|
||||
|
||||
<Button Grid.Column="3" Grid.Row="0" Click="ZeigeHandoutPDF_OnClick " Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="23" ToolTip="ownChat Kurzanleitung für Klient herunterladen.">
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/ClipboardDisabled.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
||||
<Button Grid.Column="4" Grid.Row="0" Click="ZeigeHandoutPDF_OnClick " Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="23" ToolTip="ownChat Kurzanleitung für Klient herunterladen." x:Name="CustomerHandoutButton" Visibility="Collapsed">
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/adobe-pdf-icon.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
|
||||
|
||||
@@ -5,12 +5,14 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Forms;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Threading;
|
||||
|
||||
@@ -153,39 +155,38 @@ namespace BeWo.View
|
||||
|
||||
//#else
|
||||
|
||||
//Abfrage mit null catchen
|
||||
|
||||
//Abfrage mit null catchen
|
||||
if (!GeneratetTexfield.Text.Equals("") && BeWoApp.Tenant != null && BeWoApp.Mandator.Apikey != null)
|
||||
{
|
||||
if (MessageBox.Show("Wollen Sie wirklich den Code ändern?", "Achtung", MessageBoxButton.YesNo,
|
||||
if (MessageBox.Show("Wollen Sie wirklich den Chat-Code ändern?\nAlle Daten auf Mobilgeräte werden gelöscht.", "Achtung", MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question) == MessageBoxResult.Yes)
|
||||
{
|
||||
StartWaiting();
|
||||
var result =
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey,personOid.Value)); // die useroid muss noch rausgeholt werden
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey,personOid.Value));
|
||||
|
||||
EndWaiting();
|
||||
if(result != null){
|
||||
GeneratetTexfield.Text = result.CustomerCode;
|
||||
}else{
|
||||
MessageBox.Show("Beim Erstellen eines neuen Chatcodes ist ein Fehler aufgetreten.");
|
||||
MessageBox.Show("Beim erstellen eines neuen Chat-Codes ist ein Fehler aufgetreten.");
|
||||
}
|
||||
|
||||
//GeneratetTexfield.Text = result.CustomerCode;
|
||||
}
|
||||
}
|
||||
else if (BeWoApp.Tenant != null && BeWoApp.Mandator.Apikey != null)
|
||||
{
|
||||
{
|
||||
StartWaiting();
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey, personOid.Value));// die useroid muss noch rausgeholt werden
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey, personOid.Value));
|
||||
EndWaiting();
|
||||
|
||||
if(result != null){
|
||||
GeneratetTexfield.Text = result.CustomerCode;
|
||||
}else{
|
||||
MessageBox.Show("Beim Erstellen eines neuen Chatcodes ist ein Fehler aufgetreten.");
|
||||
MessageBox.Show("Beim Erstellen eines neuen Chat-Codes ist ein Fehler aufgetreten.");
|
||||
}
|
||||
//GeneratetTexfield.Text = result.CustomerCode;
|
||||
//GeneratetTexfield.Text = result.CustomerCode;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -195,15 +196,15 @@ namespace BeWo.View
|
||||
}
|
||||
|
||||
|
||||
private void CheckBox_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveCustomerAPPCodeDC(customerOid.Value, 1));
|
||||
}
|
||||
//private void CheckBox_Checked(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveCustomerAPPCodeDC(customerOid.Value, 1));
|
||||
//}
|
||||
|
||||
private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveCustomerAPPCodeDC(customerOid.Value, 0));
|
||||
}
|
||||
//private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
|
||||
//{
|
||||
// ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveCustomerAPPCodeDC(customerOid.Value, 0));
|
||||
//}
|
||||
|
||||
|
||||
private void LaodInfostoView()
|
||||
@@ -220,9 +221,22 @@ namespace BeWo.View
|
||||
GeneratetTexfield.Text = getCustomerAppCode[getCustomerAppCode.Count - 1].CustomerCode;
|
||||
}
|
||||
|
||||
if (!GeneratetTexfield.Text.Equals("")) {
|
||||
GenerateButon.Content = "Chat-Code erneuern";
|
||||
if (!GeneratetTexfield.Text.Equals("")) {
|
||||
//lblGenerateCode.Content = "Chat-Code erneuern";
|
||||
RemoveButton.Visibility = Visibility.Visible;
|
||||
CustomerHandoutButton.Visibility = Visibility.Visible;
|
||||
CustomerBenutzerKontoGroupBox.Visibility = Visibility.Visible;
|
||||
ButtonGenerateCode.ToolTip = "Chat-Code erneuern";
|
||||
|
||||
var image = new Image
|
||||
{
|
||||
Source = new BitmapImage(
|
||||
new Uri(
|
||||
"pack://application:,,,/ChatController;component/Ressourcen/SymbolRefresh32.png"))
|
||||
};
|
||||
|
||||
ImageGenerateCode.Source = image.Source;
|
||||
|
||||
}
|
||||
//else
|
||||
// x = 0;
|
||||
@@ -278,15 +292,34 @@ namespace BeWo.View
|
||||
// }
|
||||
//#endregion
|
||||
|
||||
//Genauer bearbeiten
|
||||
private void SpeicherButton_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (BeWoApp.AppSettings.IsPasswordSecurityActiv)
|
||||
{
|
||||
if (TXTPasswort.Text.Length >= 8)
|
||||
{
|
||||
|
||||
StartWaiting();
|
||||
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, TXTBenutzerName.Text, TXTPasswort.Text));
|
||||
EndWaiting();
|
||||
|
||||
var isBenutzerNameVorhanden = ServiceFacade.DoCustomerServiceSync(r => r.PruefeObBenutzerKontoSchonVorhanden(customerOid.Value, TXTBenutzerName.Text));
|
||||
|
||||
if (!isBenutzerNameVorhanden)
|
||||
{
|
||||
ServiceFacade.DoCustomerServiceSync(
|
||||
s =>
|
||||
s.SetBenutzerPasswortChatAppCode(customerOid.Value, TXTBenutzerName.Text,
|
||||
TXTPasswort.Text));
|
||||
EndWaiting();
|
||||
MessageBox.Show("Speichern Erfolgreich.", "Info");
|
||||
}
|
||||
else
|
||||
{
|
||||
EndWaiting();
|
||||
|
||||
MessageBox.Show("Dieser Benutzername ist bereits vergeben.\nBitte ändern sie den Benutzernamen.", "Achtung");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -296,8 +329,22 @@ namespace BeWo.View
|
||||
else
|
||||
{
|
||||
StartWaiting();
|
||||
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, TXTBenutzerName.Text, TXTPasswort.Text));
|
||||
EndWaiting();
|
||||
var isBenutzerNameVorhanden = ServiceFacade.DoCustomerServiceSync(r => r.PruefeObBenutzerKontoSchonVorhanden(customerOid.Value, TXTBenutzerName.Text));
|
||||
|
||||
if (!isBenutzerNameVorhanden)
|
||||
{
|
||||
|
||||
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, TXTBenutzerName.Text, TXTPasswort.Text));
|
||||
EndWaiting();
|
||||
MessageBox.Show("Speichern Erfolgreich.", "Info");
|
||||
}
|
||||
else
|
||||
{
|
||||
EndWaiting();
|
||||
|
||||
MessageBox.Show("Dieser Benutzername ist bereits vergeben.\nBitte ändern sie den Benutzernamen.", "Achtung");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -305,17 +352,19 @@ namespace BeWo.View
|
||||
{
|
||||
if (!GeneratetTexfield.Text.Equals(""))
|
||||
{
|
||||
StartWaiting();
|
||||
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletCustomerChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, personOid.Value));
|
||||
EndWaiting();
|
||||
if (MessageBox.Show("Wollen Sie den Chat-Code wirklich löschen?\nAlle Daten auf Mobilgeräte werden gelöscht.", "Achtung", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) {
|
||||
StartWaiting();
|
||||
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletCustomerChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, personOid.Value));
|
||||
EndWaiting();
|
||||
|
||||
if (isdeletet)
|
||||
{
|
||||
GeneratetTexfield.Text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Löschen des ChatCodes Fehlgeschlagen.", "Fehler");
|
||||
if (isdeletet)
|
||||
{
|
||||
GeneratetTexfield.Text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Löschen des Chat-Codes Fehlgeschlagen.", "Fehler");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -339,7 +388,7 @@ namespace BeWo.View
|
||||
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
|
||||
|
||||
saveFileDialog1.Title = "PDF Speichern";
|
||||
saveFileDialog1.FileName = Path.GetFileName("ownChatHandoutCustomer.pdf");
|
||||
saveFileDialog1.FileName = Path.GetFileName("ownChat-Kurzanleitung.pdf");
|
||||
saveFileDialog1.ShowDialog();
|
||||
|
||||
wc.DownloadFile(handout.File, saveFileDialog1.FileName);
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -36,12 +37,16 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Grid.Column="0" Grid.Row="0" Content="Code Generieren" Click="GenerateCodeClick" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Height="21" x:Name="GenerateButon" />
|
||||
<Label Content="Chat-Code:" x:Name="lblGenerateCode"/>
|
||||
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" MinWidth="120" x:Name="GeneratetTexfield" IsReadOnly="True" />
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="2" Height="23" Click="RemoveCode_OnClick" ToolTip="Aktuellen Chat-Code löschen." x:Name="RemoveButton" Visibility="Collapsed">
|
||||
<Button Grid.Column="2" Grid.Row="0" Click="GenerateCodeClick" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="Chat-Code anfordern"
|
||||
Height="23" x:Name="ButtonGenerateCode">
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/DocumentWithAdd2.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" x:Name="ImageGenerateCode"/>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Row="0" Grid.Column="3" Height="23" Click="RemoveCode_OnClick" ToolTip="Aktuellen Chat-Code löschen." x:Name="RemoveButton" Visibility="Collapsed">
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/Symbol Delete.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
@@ -57,8 +62,8 @@
|
||||
<Button Grid.Column="0" Grid.Row="3" Content="Save Notfall Message" Click="Creat_NotfallMessage" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Height="21" x:Name="SaveMSButon" />-->
|
||||
|
||||
<Button Grid.Column="3" Grid.Row="0" Click="ZeigePDF_OnClick" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="23" ToolTip="ownChat Kurzanleitung für Mitarbeiter herunterladen.">
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/ClipboardDisabled.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
||||
<Button Grid.Column="4" Grid.Row="0" Click="ZeigePDF_OnClick" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left" Height="23" ToolTip="ownChat Kurzanleitung für Mitarbeiter herunterladen." x:Name="EmployeeHandoutButton" Visibility="Collapsed">
|
||||
<Image Height="15" Width="15" Source='/Ressources/Icons/adobe-pdf-icon.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Threading;
|
||||
|
||||
@@ -78,7 +79,7 @@ namespace BeWo.View
|
||||
{
|
||||
if (!GeneratetTexfield.Text.Equals("") && BeWoApp.Tenant != null && BeWoApp.Mandator.Apikey != null)
|
||||
{
|
||||
if (MessageBox.Show("Wollen Sie wirklich den Code ändern?", "Achtung", MessageBoxButton.YesNo,
|
||||
if (MessageBox.Show("Wollen Sie wirklich den Chat-Code ändern?\nAlle Daten auf Mobilgeräte werden gelöscht.", "Achtung", MessageBoxButton.YesNo,
|
||||
MessageBoxImage.Question) == MessageBoxResult.Yes)
|
||||
{
|
||||
StartWaiting();
|
||||
@@ -88,7 +89,7 @@ namespace BeWo.View
|
||||
if(result != null){
|
||||
GeneratetTexfield.Text = result.EmployeeCode;
|
||||
}else{
|
||||
MessageBox.Show("Beim Erstellen eines neuen Chatcodes ist ein Fehler aufgetreten.");
|
||||
MessageBox.Show("Beim Erstellen eines neuen Chat-Codes ist ein Fehler aufgetreten.");
|
||||
//result.Result mit switc case Fehler ausgabe
|
||||
}
|
||||
}
|
||||
@@ -110,7 +111,7 @@ namespace BeWo.View
|
||||
if(result != null){
|
||||
GeneratetTexfield.Text = result.EmployeeCode;
|
||||
}else{
|
||||
MessageBox.Show("Beim Erstellen eines neuen Chatcodes ist ein Fehler aufgetreten.");
|
||||
MessageBox.Show("Beim erstellen eines neuen Chat-Codes ist ein Fehler aufgetreten.");
|
||||
//result.Result mit switc case Fehler ausgabe
|
||||
}
|
||||
}
|
||||
@@ -156,11 +157,26 @@ namespace BeWo.View
|
||||
|
||||
if (!GeneratetTexfield.Text.Equals(""))
|
||||
{
|
||||
GenerateButon.Content = "Chat-Code erneuern";
|
||||
//lblGenerateCode.Content = "Chat-Code erneuern";
|
||||
RemoveButton.Visibility = Visibility.Visible;
|
||||
EmployeeHandoutButton.Visibility = Visibility.Visible;
|
||||
|
||||
ButtonGenerateCode.ToolTip = "Chat-Code erneuern";
|
||||
|
||||
var image = new Image
|
||||
{
|
||||
Source = new BitmapImage(
|
||||
new Uri(
|
||||
"pack://application:,,,/ChatController;component/Ressourcen/SymbolRefresh32.png"))
|
||||
};
|
||||
|
||||
ImageGenerateCode.Source = image.Source;
|
||||
|
||||
}
|
||||
|
||||
#region Nicht mehr gebrauchter Code
|
||||
|
||||
|
||||
#region Nicht mehr gebrauchter Code
|
||||
|
||||
/* String a = "";
|
||||
String b = "";
|
||||
@@ -190,7 +206,7 @@ namespace BeWo.View
|
||||
|
||||
// ChatServiceBuilder builder = new ChatServiceBuilder(c,b,a);
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
|
||||
private void ZeigePDF_OnClick(object sender, RoutedEventArgs e)
|
||||
@@ -208,7 +224,7 @@ namespace BeWo.View
|
||||
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
|
||||
|
||||
saveFileDialog1.Title = "PDF Speichern";
|
||||
saveFileDialog1.FileName = Path.GetFileName("ownChatHandoutEmployee.pdf");
|
||||
saveFileDialog1.FileName = Path.GetFileName("ownChat-Kurzanleitung.pdf");
|
||||
saveFileDialog1.ShowDialog();
|
||||
|
||||
wc.DownloadFile(handout.File, saveFileDialog1.FileName);//@"c:\temp\ownChatHandoutEmployee.pdf"
|
||||
@@ -245,18 +261,20 @@ namespace BeWo.View
|
||||
StartWaiting();
|
||||
if (!GeneratetTexfield.Text.Equals(""))
|
||||
{
|
||||
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletEmloyeeChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, personOid.Value));
|
||||
|
||||
|
||||
EndWaiting();
|
||||
|
||||
if (isdeletet)
|
||||
if (MessageBox.Show("Wollen Sie den Chat-Code wirklich löschen?\nAlle Daten auf Mobilgeräte werden gelöscht.", "Achtung", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
|
||||
{
|
||||
GeneratetTexfield.Text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Löschen des ChatCodes Fehlgeschlagen.", "Fehler");
|
||||
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletEmloyeeChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, personOid.Value));
|
||||
|
||||
EndWaiting();
|
||||
|
||||
if (isdeletet)
|
||||
{
|
||||
GeneratetTexfield.Text = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("Löschen des Chat-Codes Fehlgeschlagen.", "Fehler");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1796,6 +1796,15 @@ namespace BeWo.Data.Access
|
||||
return c.List<CustomerAPPCode>();
|
||||
}
|
||||
|
||||
public IEnumerable<CustomerAPPCode> FindAllCustomerAppCodeBenutzer(string benutzername)
|
||||
{
|
||||
var c =
|
||||
CreateCriteriaIsActive<CustomerAPPCode>()
|
||||
.Add(Restrictions.Eq(CustomerAPPCode.PropertyName_Benutzername, benutzername));
|
||||
|
||||
return c.List<CustomerAPPCode>();
|
||||
}
|
||||
|
||||
public IEnumerable<ChatMessage> FindAllChatMessagesForAndroid(long pSenderOid, long pRecipientOid, List<string> pExceptions, bool pForTeam)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ChatMessage>()
|
||||
|
||||
@@ -680,5 +680,9 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void SetBenutzerPasswortChatAppCode(long pCustomerOid, string benutzerName, string passwort);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
bool PruefeObBenutzerKontoSchonVorhanden(long customerOid, string benutzername);
|
||||
}
|
||||
}
|
||||
@@ -3735,6 +3735,40 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public bool PruefeObBenutzerKontoSchonVorhanden(long customerOid,string benutzername)
|
||||
{
|
||||
try
|
||||
{
|
||||
var cusappcode = DAOFactory.SearchDAO.FindAllCustomerAppCodeBenutzer(benutzername);
|
||||
|
||||
if (cusappcode != null) {
|
||||
var count = cusappcode.Count();
|
||||
if (count > 0)
|
||||
{
|
||||
foreach (var item in cusappcode)
|
||||
{
|
||||
if (item.CustomerOid != null && customerOid == item.CustomerOid.Value)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
internal struct WohnheimbuchungsIntervallStruct
|
||||
|
||||
Reference in New Issue
Block a user