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

This commit is contained in:
Lyndon
2017-10-17 11:11:50 +02:00
32 changed files with 677 additions and 206 deletions

1
.gitignore vendored
View File

@@ -256,3 +256,4 @@
/ReportImp/Taubblindendienst/obj/Debug
/BeWoPlanerMobil/logs
/Host/logs
/.vs/BeWoGit/v15

View File

@@ -29,7 +29,7 @@
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<PublishUrl>D:\Projects\beyondsoft\BeWoPlaner\Publish\</PublishUrl>
<PublishUrl>D:\Projects\beyondsoft\BeWoPlaner\Publish45\</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
@@ -39,16 +39,16 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>true</UpdateRequired>
<MapFileExtensions>false</MapFileExtensions>
<InstallUrl>http://fortis-bewoplaner.fortis-ev.org.local/</InstallUrl>
<InstallUrl>http://app.beyondsoft.de/dev/</InstallUrl>
<TargetCulture>de-DE</TargetCulture>
<ProductName>BeWoPlaner</ProductName>
<PublisherName>beyondSoft GmbH</PublisherName>
<MinimumRequiredVersion>2.0.1.129</MinimumRequiredVersion>
<MinimumRequiredVersion>2.0.1.130</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
<TrustUrlParameters>true</TrustUrlParameters>
<ApplicationRevision>130</ApplicationRevision>
<ApplicationRevision>131</ApplicationRevision>
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>

View File

@@ -39,7 +39,7 @@ namespace BeWo
//public static string Version = "Version 2.0";
public static string Version = "Version 2.3.4";
public static string Version = "Version 2.4.1";
public static int RenderTier = 0;
@@ -243,7 +243,7 @@ namespace BeWo
{
isOnlyYearMonthVisible = true;
}
isOnlyYearMonthVisible = true;
val = GetSettingValue(_Mandator.Settings, "IsZeiterfassungInStdMin");
if (val != null && val.Equals("1"))
{

View File

@@ -244,13 +244,41 @@ namespace BeWo.SchulbegleitenderDienst
// hier den Tag merken um auch für WOCHEN bereich die spalte orange zu machen
}
if (item.isCustomerKrank)
{
xyc.IsCustomerKrank = true;
xyc.IsKunde = 2;
}
//hier bereich zu abfrage Vertretung Gewünscht / nicht gewünscht
//################## Besser auf Server auslagern ?? #############################################
List<long> custOid = new List<long>();
custOid.Add(customer.Key);
var cus = ServiceFacade.DoCustomerServiceSync(r => r.GetCustomersById(custOid));
foreach (var c in cus)
{
// 1 für Grün | 0 für Rot
if (c.VertretungDringendErforderlich == false && c.VertretungGewuenscht == false)
{
//anzeige Grün machen
xyc.IsKunde = 1;
}
//else if (c.VertretungDringendErforderlich == false && c.VertretungGewuenscht == true)
//{
// // anzeige noral halten
// xyc.IsKunde = 2;
//}
//else if (c.VertretungDringendErforderlich == true && c.VertretungGewuenscht == true)
//{
// //anzeige normal halten
// xyc.IsKunde = 2;
//}
}
//############################
_items.Add(xyc);
}

View File

@@ -4411,6 +4411,18 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetLastVertreterBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.Compact.CompactVertreterEmployeeDC> GetLastVertreter(System.Nullable<long> klientenOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetHandOutPdfForChat", ReplyAction="http://tempuri.org/IOperationsService/GetHandOutPdfForChatResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetHandOutPdfForChatBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.PdfChatHandoutDC GetHandOutPdfForChat(string customerId, string apikey);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeletEmloyeeChatCode", ReplyAction="http://tempuri.org/IOperationsService/DeletEmloyeeChatCodeResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeletEmloyeeChatCodeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
bool DeletEmloyeeChatCode(string apikey, string kundennummer, long userOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeletCustomerChatCode", ReplyAction="http://tempuri.org/IOperationsService/DeletCustomerChatCodeResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeletCustomerChatCodeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
bool DeletCustomerChatCode(string apikey, string kundennummer, long userOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateInvoices", ReplyAction="http://tempuri.org/IOperationsService/DeactivateInvoicesResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateInvoicesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void DeactivateInvoices(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceDC> invoices);
@@ -5226,6 +5238,21 @@ namespace BeWo.ServiceProxy
return base.Channel.GetLastVertreter(klientenOid);
}
public BS.Shared.DataContracts.PdfChatHandoutDC GetHandOutPdfForChat(string customerId, string apikey)
{
return base.Channel.GetHandOutPdfForChat(customerId, apikey);
}
public bool DeletEmloyeeChatCode(string apikey, string kundennummer, long userOid)
{
return base.Channel.DeletEmloyeeChatCode(apikey, kundennummer, userOid);
}
public bool DeletCustomerChatCode(string apikey, string kundennummer, long userOid)
{
return base.Channel.DeletCustomerChatCode(apikey, kundennummer, userOid);
}
public void DeactivateInvoices(System.Collections.Generic.List<BS.Shared.DataContracts.InvoiceDC> invoices)
{
base.Channel.DeactivateInvoices(invoices);

View File

@@ -40,19 +40,33 @@
Height="21" x:Name="GenerateButon"/>
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" MinWidth="120" x:Name="GeneratetTexfield" IsReadOnly="True"/>
<Label x:Name="lblIsChatAktive" Grid.Column="0" Grid.Row="1" Margin="3" Content="Chat Aktivieren" />
<Button Grid.Row="0" Grid.Column="2" Margin="3" Height="23" Click="RemoveCode_OnClick" ToolTip="Aktuellen Chat-Code löschen.">
<Image Height="15" Width="15" Source='/Ressources/Icons/Symbol Delete.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
</Button>
<!-- <Label x:Name="lblIsChatAktive" Grid.Column="0" Grid.Row="1" Margin="3" Content="Chat Aktivieren" />-->
<CheckBox x:Name="ChatAktive" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked"/>
<!--<CheckBox x:Name="ChatAktive" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked"/>-->
<Label Grid.Row="2" Grid.Column="0" Content="Benutzer Name" Margin="3" />
<TextBox Grid.Row="2" Grid.Column="1" Margin="3" x:Name="TXTBenutzerName" KeyDown="TXTBenutzerName_OnKeyDown" LostFocus="TXTBenutzerName_OnLostFocus" />
<TextBox Grid.Row="2" Grid.Column="1" Margin="3" x:Name="TXTBenutzerName" />
<Label Grid.Row="3" Grid.Column="0" Content="Passwort" Margin="3" />
<TextBox Grid.Row="3" Grid.Column="1" Margin="3" x:Name="TXTPasswort" KeyDown="TXTPasswort_OnKeyDown" LostFocus="TXTPasswort_OnLostFocus" />
<TextBox Grid.Row="3" Grid.Column="1" Margin="3" x:Name="TXTPasswort" />
<Button Content="Speichern" Click="SpeicherButton_OnClick" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" Margin="3" HorizontalAlignment="Right" />
<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>
<!-- IsChecked="{Binding Path=IsChatAktiv, UpdateSourceTrigger=PropertyChanged}" -->

View File

@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows;
@@ -152,7 +153,7 @@ namespace BeWo.View
if (!GeneratetTexfield.Text.Equals("") && BeWoApp.Tenant != null && BeWoApp.Mandator.Apikey != null)
{
if (MessageBox.Show("Wollen sie wirklich ihren Code ändern?", "Achtung", MessageBoxButton.YesNo,
if (MessageBox.Show("Wollen Sie wirklich den Code ändern?", "Achtung", MessageBoxButton.YesNo,
MessageBoxImage.Question) == MessageBoxResult.Yes)
{
var result =
@@ -162,7 +163,7 @@ namespace BeWo.View
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 Chatcodes ist ein Fehler aufgetreten.");
}
//GeneratetTexfield.Text = result.CustomerCode;
@@ -175,13 +176,13 @@ namespace BeWo.View
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 Chatcodes ist ein Fehler aufgetreten.");
}
//GeneratetTexfield.Text = result.CustomerCode;
}
else
{
MessageBox.Show("Sie besitzen derzeit keinen API-Key. Bitte wenden sie sich an den Suppoert. ","Info",MessageBoxButton.OK);
MessageBox.Show("Sie besitzen derzeit keinen API-Key. Bitte wenden sie sich an den Support.","Info",MessageBoxButton.OK);
}
//#endif
}
@@ -211,17 +212,21 @@ namespace BeWo.View
GeneratetTexfield.Text = getCustomerAppCode[getCustomerAppCode.Count - 1].CustomerCode;
}
else
x = 0;
if (x == 0)
{
ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, false);
}
else
{
ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, true);
if (!GeneratetTexfield.Text.Equals("")) {
GenerateButon.Content = "Chat-Code erneuern";
}
//else
// x = 0;
//if (x == 0)
//{
// ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, false);
//}
//else
//{
// ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, true);
//}
if (getCustomerAppCode.Count > 0)
{
@@ -231,41 +236,115 @@ namespace BeWo.View
}
//######### Erstmal vorrübergehend #####################################################################################
//#region Passwort geändert
// private void TXTPasswort_OnKeyDown(object sender, KeyEventArgs e)
// {
// if (e.Key == Key.Enter) {
// var passwort = TXTPasswort.Text;
#region Passwort
private void TXTPasswort_OnKeyDown(object sender, KeyEventArgs e)
// ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value,"", passwort));
// }
// }
// private void TXTPasswort_OnLostFocus(object sender, RoutedEventArgs e)
// {
// var passwort = TXTPasswort.Text;
// ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, "", passwort));
// }
//#endregion
//#region BenutzerName
// private void TXTBenutzerName_OnKeyDown(object sender, KeyEventArgs e)
// {
// if(e.Key == Key.Enter) {
// var benutzerName = TXTBenutzerName.Text;
// ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, benutzerName, ""));
// }
// }
// private void TXTBenutzerName_OnLostFocus(object sender, RoutedEventArgs e)
// {
// var benutzerName = TXTBenutzerName.Text;
// ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, benutzerName, ""));
// }
//#endregion
private void SpeicherButton_OnClick(object sender, RoutedEventArgs e)
{
if (e.Key == Key.Enter) {
var passwort = TXTPasswort.Text;
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value,"", passwort));
if (BeWoApp.AppSettings.IsPasswordSecurityActiv)
{
if (TXTPasswort.Text.Length >= 8)
{
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, TXTBenutzerName.Text, TXTPasswort.Text));
}
else
{
MessageBox.Show("Das Passwort ist zu schwach.");
}
}
else
{
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, TXTBenutzerName.Text, TXTPasswort.Text));
}
}
private void TXTPasswort_OnLostFocus(object sender, RoutedEventArgs e)
private void RemoveCode_OnClick(object sender, RoutedEventArgs e)
{
var passwort = TXTPasswort.Text;
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, "", passwort));
}
#endregion
if (!GeneratetTexfield.Text.Equals(""))
{
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletCustomerChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, personOid.Value));
#region BenutzerName
private void TXTBenutzerName_OnKeyDown(object sender, KeyEventArgs e)
{
if(e.Key == Key.Enter) {
var benutzerName = TXTBenutzerName.Text;
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, benutzerName, ""));
if (isdeletet)
{
GeneratetTexfield.Text = "";
}
else
{
MessageBox.Show("Löschen des ChatCodes Fehlgeschlagen.", "Fehler");
}
}
else
{
MessageBox.Show("Sie müssen vorher einen Chat-Code generieren, bevor sie ihn löschen können", "Info",
MessageBoxButton.OK, MessageBoxImage.Information);
}
}
private void TXTBenutzerName_OnLostFocus(object sender, RoutedEventArgs e)
private void ZeigeHandoutPDF_OnClick(object sender, RoutedEventArgs e)
{
var benutzerName = TXTBenutzerName.Text;
ServiceFacade.DoCustomerServiceSync(s => s.SetBenutzerPasswortChatAppCode(customerOid.Value, benutzerName, ""));
}
#endregion
var handout = ServiceFacade.DoOperationsServiceSync(r => r.GetHandOutPdfForChat(BeWoApp.Tenant, BeWoApp.Mandator.Apikey));
if (handout.File != null && !handout.File.Equals(""))
{
handout.Result = 0;
}
switch (handout.Result)
{
case 0:
//Hier die pdf anzeigen
Process.Start(handout.File);
break;
case 11:
MessageBox.Show("Kundennummer unbekannt.", "Fehler", MessageBoxButton.OK);
break;
case 12:
MessageBox.Show("Der API-Key ist falsch -> Auth-Error.", "Fehler", MessageBoxButton.OK);
break;
case 13:
MessageBox.Show("Es existiert kein API-Key für die angegebene Kundennummer.", "Fehler", MessageBoxButton.OK);
break;
case 40:
MessageBox.Show("Vorlage nicht gefunden.", "Fehler", MessageBoxButton.OK);
break;
case 41:
MessageBox.Show("Ungültige Custom-Logo-URL.", "Fehler", MessageBoxButton.OK);
break;
}
}
}
}

View File

@@ -23,17 +23,17 @@
<GroupBox Grid.ColumnSpan="2" Padding="5" Style="{StaticResource ObjectEditGroupBox}" Header="Chat Service">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Button Grid.Column="0" Grid.Row="0" Content="Code Generieren" Click="GenerateCodeClick" Margin="3" VerticalAlignment="Center" HorizontalAlignment="Left"
@@ -41,7 +41,11 @@
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" MinWidth="120" x:Name="GeneratetTexfield" IsReadOnly="True" />
<Label x:Name="lblIsChatAktive" Grid.Column="0" Grid.Row="1" Content="Chat Aktivieren" />
<Button Grid.Row="0" Grid.Column="2" Height="23" Click="RemoveCode_OnClick" ToolTip="Aktuellen Chat-Code löschen.">
<Image Height="15" Width="15" Source='/Ressources/Icons/Symbol Delete.png' Margin="3" RenderOptions.BitmapScalingMode="HighQuality" HorizontalAlignment="Center" />
</Button>
<!--<Label x:Name="lblIsChatAktive" Grid.Column="0" Grid.Row="1" Content="Chat Aktivieren" />
<CheckBox x:Name="ChatAktive" Grid.Column="1" Grid.Row="1" Margin="3" Height="23" Checked="CheckBox_Checked" Unchecked="CheckBox_Unchecked" />
@@ -51,9 +55,11 @@
<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" />
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>
</GroupBox>

View File

@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Windows;
@@ -96,7 +97,7 @@ namespace BeWo.View
//#else
if (!GeneratetTexfield.Text.Equals("") && BeWoApp.Tenant != null && BeWoApp.Mandator.Apikey != null)
{
if (MessageBox.Show("Wollen sie wirklich ihren Code ändern?", "Achtung", MessageBoxButton.YesNo,
if (MessageBox.Show("Wollen Sie wirklich den Code ändern?", "Achtung", MessageBoxButton.YesNo,
MessageBoxImage.Question) == MessageBoxResult.Yes)
{
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewEmployeeAPPCodeDC(employeeOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey, personOid.Value));
@@ -104,7 +105,8 @@ 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 Chatcodes ist ein Fehler aufgetreten.");
//result.Result mit switc case Fehler ausgabe
}
}
}
@@ -124,102 +126,147 @@ 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 Chatcodes ist ein Fehler aufgetreten.");
//result.Result mit switc case Fehler ausgabe
}
}
else
{
MessageBox.Show("Sie besitzen derzeit keinen API-Key. Bitte wenden sie sich an den Suppoert. ","Info",MessageBoxButton.OK);
MessageBox.Show("Sie besitzen derzeit keinen API-Key. Bitte wenden Sie sich an den Support.",
"Info", MessageBoxButton.OK);
}
}
//#endif
}
private void CheckBox_Checked(object sender, RoutedEventArgs e)
{
ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveEmployeeAPPCodeDC(employeeOid.Value, 1));
}
#region Nicht benutzte Events
//private void CheckBox_Checked(object sender, RoutedEventArgs e)
//{
// ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveEmployeeAPPCodeDC(employeeOid.Value, 1));
//}
private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
{
ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveEmployeeAPPCodeDC(employeeOid.Value, 0));
}
private void Creat_NotfallMessage(object sender, RoutedEventArgs e)
{
if(!NotfallTexfield.Text.Equals(""))
ServiceFacade.DoOperationsServiceSync(s => s.UpdateNotfallNacrichtEmployeeAPPCodeDC(employeeOid.Value, NotfallTexfield.Text));
}
//private void CheckBox_Unchecked(object sender, RoutedEventArgs e)
//{
// ServiceFacade.DoOperationsServiceSync(s => s.UpdateIsChatActiveEmployeeAPPCodeDC(employeeOid.Value, 0));
//}
//private void Creat_NotfallMessage(object sender, RoutedEventArgs e)
//{
// if(!NotfallTexfield.Text.Equals(""))
// ServiceFacade.DoOperationsServiceSync(s => s.UpdateNotfallNacrichtEmployeeAPPCodeDC(employeeOid.Value, NotfallTexfield.Text));
//}
#endregion
private void LaodInfostoView()
{
{
var getEmployeeAppCode = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllEmployeeAppCodes(employeeOid.Value));
/* String a = "";
String b = "";
bool c = false;
*/
int x;
if (getEmployeeAppCode.Count > 0){
x = getEmployeeAppCode[getEmployeeAppCode.Count - 1].IsChatAktive;
GeneratetTexfield.Text = getEmployeeAppCode[getEmployeeAppCode.Count - 1].EmployeeCode;
// a = getEmployeeAppCode[getEmployeeAppCode.Count - 1].EmployeeCode;
NotfallTexfield.Text = getEmployeeAppCode[0].NotfallStatement;
//b = getEmployeeAppCode[0].NotfallStatement;
GeneratetTexfield.Text = getEmployeeAppCode[getEmployeeAppCode.Count - 1].EmployeeCode;
}
else
x = 0;
if (x == 0)
{
ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, false);
//c = false;
}
else
{
ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, true);
// c = true;
}
// ChatServiceBuilder builder = new ChatServiceBuilder(c,b,a);
}
}
public class ChatServiceBuilder
{
public ChatServiceBuilder(bool isChecked, string notfallstatement, string code)
{
IsChecked = isChecked;
Notfallstatement = notfallstatement;
Code = code;
}
public bool IsChecked { get; set; }
public string Notfallstatement { get; set; }
/* get { return _Notfallstatement; }
set
{
if (value != _Notfallstatement)
{
_Notfallstatement = value;
OnPropertyChanged("Notfallstatement");
}
}*/
public string Code { get; set; }
if (!GeneratetTexfield.Text.Equals(""))
{
GenerateButon.Content = "Chat-Code erneuern";
}
#region Nicht mehr gebrauchter Code
/* String a = "";
String b = "";
bool c = false;
*/
// a = getEmployeeAppCode[getEmployeeAppCode.Count - 1].EmployeeCode;
//NotfallTexfield.Text = getEmployeeAppCode[0].NotfallStatement;
//b = getEmployeeAppCode[0].NotfallStatement;
//else
// x = 0;
//if (x == 0)
//{
// ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, false);
// //c = false;
//}
//else
//{
// ChatAktive.SetCurrentValue(CheckBox.IsCheckedProperty, true);
// // c = true;
//}
// ChatServiceBuilder builder = new ChatServiceBuilder(c,b,a);
#endregion
}
private void ZeigePDF_OnClick(object sender, RoutedEventArgs e)
{
//zu Testzwecken
//var handout = ServiceFacade.DoOperationsServiceSync(r => r.GetHandOutPdfForChat("5473568546", "12345678 "));
var handout = ServiceFacade.DoOperationsServiceSync(r => r.GetHandOutPdfForChat(BeWoApp.Tenant, BeWoApp.Mandator.Apikey));
if (handout.File != null && !handout.File.Equals(""))
{
handout.Result = 0;
}
switch (handout.Result)
{
case 0:
//Hier die pdf anzeigen
Process.Start(handout.File);
break;
case 11:
MessageBox.Show("Kundennummer unbekannt.", "Fehler", MessageBoxButton.OK);
break;
case 12:
MessageBox.Show("Der API-Key ist falsch -> Auth-Error.", "Fehler", MessageBoxButton.OK);
break;
case 13:
MessageBox.Show("Es existiert kein API-Key für die angegebene Kundennummer.", "Fehler", MessageBoxButton.OK);
break;
case 40:
MessageBox.Show("Vorlage nicht gefunden.", "Fehler", MessageBoxButton.OK);
break;
case 41:
MessageBox.Show("Ungültige Custom-Logo-URL.", "Fehler", MessageBoxButton.OK);
break;
}
}
private void RemoveCode_OnClick(object sender, RoutedEventArgs e)
{
if (!GeneratetTexfield.Text.Equals(""))
{
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletEmloyeeChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, personOid.Value));
if (isdeletet)
{
GeneratetTexfield.Text = "";
}
else
{
MessageBox.Show("Löschen des ChatCodes Fehlgeschlagen.", "Fehler");
}
}
else
{
MessageBox.Show("Sie müssen vorher einen Chat-Code generieren, bevor sie ihn löschen können", "Info",
MessageBoxButton.OK, MessageBoxImage.Information);
}
}
}
}

View File

@@ -223,7 +223,7 @@ namespace BeWo.View.Detail
{
chkMultiBooking.Visibility = Visibility.Collapsed;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesNurEigeneAnsehen))
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneAnsehen))
{
TextModuleTreeViewControl1.Visibility = Visibility.Collapsed;
TextbausteineBearbeitenButton1.Visibility = Visibility.Collapsed;
@@ -236,7 +236,7 @@ namespace BeWo.View.Detail
TextModuleTreeViewControl5.Visibility = Visibility.Collapsed;
TextbausteineBearbeitenButton5.Visibility = Visibility.Collapsed;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleBearbeiten) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesNurEigeneBearbeiten))
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten))
{
TextbausteineBearbeitenButton1.Visibility = Visibility.Collapsed;
TextbausteineBearbeitenButton2.Visibility = Visibility.Collapsed;
@@ -3630,13 +3630,13 @@ namespace BeWo.View.Detail
textbausteineOptionen.Click += EditTextbausteineClick;
textbausteine.TextModuleSelected += TextModuleTreeViewControl_OnTextModuleSelected;
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesNurEigeneAnsehen))
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneAnsehen))
{
textbausteine.Visibility = Visibility.Collapsed;
textbausteineOptionen.Visibility = Visibility.Collapsed;
}
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleBearbeiten) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesNurEigeneBearbeiten))
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten))
{
textbausteineOptionen.Visibility = Visibility.Collapsed;
}

View File

@@ -38,7 +38,7 @@ namespace BeWo.View.Detail
public bool IsInAdministrationView { get; }
public bool AreUserControlsEnabled => IsInAdministrationView ? BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleBearbeiten) : BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesNurEigeneBearbeiten);
public bool AreUserControlsEnabled => IsInAdministrationView ? BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten) : BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
public TextModuleView(TextModuleListVM pViewModel, bool pIsInAdministrationView = false)
{
@@ -141,9 +141,9 @@ namespace BeWo.View.Detail
{
var isOwn = textModuleVM.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid);
var hasRight2EditAll = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleBearbeiten);
var hasRight2EditOwn = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesNurEigeneBearbeiten);
var hasRight2Create4All = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleBearbeiten);
var hasRight2EditAll = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
var hasRight2EditOwn = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
var hasRight2Create4All = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
if(parameter != null && parameter.ToString().Equals("IsOnlyForEmployeeCheckBox"))
{

View File

@@ -108,26 +108,27 @@ namespace BeWo.View
MessageBox.Show("Verbindung geglückt.", "Info", MessageBoxButton.OK,MessageBoxImage.Information);
});*/
//var berechtigung = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllChatActiveEmployeesCompact());
//foreach (var list in berechtigung)
//{
// if (list.PersonOid == BeWoApp.LoggedOnUser.Employee.PersonOid)
// {
// berechtigt = true;
// }
//}
var berechtigung = ServiceFacade.DoEmployeeServiceSync(s => s.GetAllChatActiveEmployeesCompact());
foreach (var list in berechtigung)
{
if (list.PersonOid == BeWoApp.LoggedOnUser.Employee.PersonOid)
{
berechtigt = true;
}
}
if (berechtigt)
{
{
//asx = new Thread(ConnectWithServer);
//asx.Start();
BewoChat.Visibility = Visibility.Visible;//Hidden
}
else
{
// BewoChat.Visibility = Visibility.Visible;//Hidden
BewoChat.Visibility = Visibility.Hidden;//Hidden
}
PruefePasswortStaerke();
@@ -1307,34 +1308,55 @@ namespace BeWo.View
{
var empAppCodes = ServiceFacade.DoEmployeeServiceSync(r=>r.GetAllEmployeeAppCodes(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
var xxx = empAppCodes.Last();
string _kundennummer = BeWoApp.Tenant;
string _ChatCode = xxx.EmployeeCode;
string _benutzername = BeWoApp.UserName;
string _passwort = "12345678"; // welches passwort wird hier benutzt
string _apikey;
if (BeWoApp.Mandator.Apikey != null)
_apikey = BeWoApp.Mandator.Apikey;
else
_apikey = "0000"; //erstmal zu default zwecken damit nichts abstürzt
Login _login = new Login(_kundennummer, _ChatCode, _benutzername, _passwort, _apikey);
var x = _login.AnmeldevorgangDurchFuehren();
if (x != null)
if (empAppCodes != null && empAppCodes.Count > 0)
{
ServiceChatView = new ChatView(x);
ServiceChatView.Show();
var xxx = empAppCodes.Last();
string _kundennummer = BeWoApp.Tenant;
string _benutzername = BeWoApp.UserName;
string _passwort = "12345678"; // welches passwort wird hier benutzt
string _apikey;
string _ChatCode = "";
if (xxx.EmployeeCode != null && !xxx.EmployeeCode.Equals(""))
{
_ChatCode = xxx.EmployeeCode;
}
if (BeWoApp.Mandator.Apikey != null)
_apikey = BeWoApp.Mandator.Apikey;
else
_apikey = "0000"; //erstmal zu default zwecken damit nichts abstürzt
if (_ChatCode.Equals("")) //Weitere Abfragen von nöten
{
Login _login = new Login(_kundennummer, _ChatCode, _benutzername, _passwort, _apikey);
var x = _login.AnmeldevorgangDurchFuehren();
if (x != null)
{
ServiceChatView = new ChatView(x);
ServiceChatView.Show();
}
else
{
//fehlermeldungen weiter Spezifizieren
MessageBox.Show(
"Es konnte keine Verbindung hergestellt werden.\nBitte versuchen sie es später erneut");
}
}
else
{
MessageBox.Show("Sie benötgen einen gültigen Chat-Code.", "Info");
}
}
else
{
//fehlermeldungen weiter Spezifizieren
MessageBox.Show("Es konnte keine Verbindung hergestellt werden.\nBitte versuchen sie es später erneut");
MessageBox.Show("Sie benötgen einen gültigen zugang zum Chat. Bitte wenden sie sich an den Support.", "Info");
}
}
else if (ServiceChatView.Visibility == Visibility.Visible)
{

View File

@@ -54,7 +54,7 @@ namespace BeWo.View.Master
tabitem_medikamentenarten.Visibility = Visibility.Collapsed;
}
if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleBearbeiten))
if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten))
{
tabitem_textbausteine.Visibility = Visibility.Collapsed;
}

View File

@@ -45,7 +45,7 @@ namespace BeWo.View.Search
{
r = r.OrderBy(tb => tb.ServiceCategory == null).ThenBy(tb => tb.Position).ThenBy(tb => tb.Name).ToList();
r = !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleAnsehen) ?
r = !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleAnsehen) ?
r.Where(w => w.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid)).ToList() :
r.Where(w => !(w.IsOnlyForEmployee && !w.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid))).ToList();

View File

@@ -175,7 +175,7 @@ namespace BeWo.ViewModel
{
ServiceFacade.DoEmployeeServiceSync(s => _Employee = s.LoadCompactEmployee(BeWoApp.LoggedOnEmployee.EmployeeOid.Value));
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesNurEigeneBearbeiten) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleBearbeiten))
if (BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten))
{
_IsOnlyForEmployee = true;
}

View File

@@ -437,7 +437,7 @@ namespace BeWo.ViewModel
public static void CreateTextModuleListVMAsync(Action<TextModuleListVM> pCallBack, bool pIsInAdministrationView = false, bool pIsInTextModuleEditor = false)
{
ServiceFacade.DoOperationsServiceAsync(s1 => s1.GetTextModules(pIsInTextModuleEditor, BeWoApp.LoggedOnEmployee.EmployeeOid.Value, BeWoApp.LoggedOnUser.HasRight(UserRightType.TextModulesAlleAnsehen), pIsInAdministrationView), r1 => ServiceFacade.DoOperationsServiceAsync(
ServiceFacade.DoOperationsServiceAsync(s1 => s1.GetTextModules(pIsInTextModuleEditor, BeWoApp.LoggedOnEmployee.EmployeeOid.Value, BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleAnsehen), pIsInAdministrationView), r1 => ServiceFacade.DoOperationsServiceAsync(
s2 => s2.GetAllServiceCategories(),
s3 =>
{

View File

@@ -161,7 +161,7 @@ namespace BeWoPlanerMobil.Controllers
}
JsonInputKlient1 input = new JsonInputKlient1(daten.Oid.ToString(),"1",
daten.Person.FirstName, daten.Person.LastName, daten.CustomerAlias, mobilnummer, chatcode.CustomerCode, inputList);
daten.Person.FirstName, daten.Person.LastName, daten.CustomerAlias, mobilnummer, chatcode.CustomerCode,chatcode.BenutzerName,chatcode.BCryptPassword, inputList);
if (daten.IsActive == ActivationTypeId.Deleted)
@@ -255,7 +255,7 @@ namespace BeWoPlanerMobil.Controllers
{
miInput = new JsonRueckgabeMitarbeiterInput(appus[daten.Oid].Oid.ToString(),
daten.Oid.ToString(), "1", appus[daten.Oid].LoginName,
appus[daten.Oid].HashedPassword, daten.Person.FirstName,
appus[daten.Oid].BCryptPassword, daten.Person.FirstName,
daten.Person.LastName,
chatcode.EmployeeCode, handy, daten.Person.Oid.ToString(), instsStr);
}
@@ -422,10 +422,12 @@ namespace BeWoPlanerMobil.Controllers
public string Alias { get; set; }
public string Mobile { get; set; }
public string ChatCode { get; set; }
public string Login { get; set; }
public string Password { get; set; }
public List<JsonInputKlient2> Guardians { get; set; }
public JsonInputKlient1(string oid,string status, string firstname, string lastname, string alias,string mobile,string chatCode, List<JsonInputKlient2> guardians)
public JsonInputKlient1(string oid,string status, string firstname, string lastname, string alias,string mobile,string chatCode,string login,string password, List<JsonInputKlient2> guardians)
{
Oid = "C"+oid;
Status = status;
@@ -434,6 +436,8 @@ namespace BeWoPlanerMobil.Controllers
Alias = alias;
Mobile = mobile;
ChatCode = chatCode;
Login = login;
Password = password;
Guardians = guardians;
}
}

View File

@@ -514,14 +514,14 @@ namespace BeWoPlanerMobil.Controllers
public string LoadTextbausteineForServiceCategory(long pServiceCategoryOid)
{
if (!MobileSessionFacade.CheckForUserRight(UserRightType.TextModulesNurEigeneAnsehen) && !MobileSessionFacade.CheckForUserRight(UserRightType.TextModulesAlleAnsehen))
if (!MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineNurEigeneAnsehen) && !MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineAlleAnsehen))
{
return null;
}
var textbausteine = OperationsService.GetTextModulesByServiceCategory(pServiceCategoryOid);
if(MobileSessionFacade.CheckForUserRight(UserRightType.TextModulesNurEigeneAnsehen))
if(MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineNurEigeneAnsehen))
{
textbausteine = textbausteine.Where(w => w.Employee.EmployeeOid == Model.Employee.EmployeeOid).ToList();
}

View File

@@ -113,8 +113,8 @@ namespace BeWoPlanerMobil.Models
{
get
{
return MobileSessionFacade.CheckForUserRight(UserRightType.TextModulesAlleAnsehen) ||
MobileSessionFacade.CheckForUserRight(UserRightType.TextModulesNurEigeneAnsehen);
return MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineAlleAnsehen) ||
MobileSessionFacade.CheckForUserRight(UserRightType.TextbausteineNurEigeneAnsehen);
}
}

View File

@@ -18,6 +18,8 @@ namespace BeWo.Data.Entities
public static string PropertyName_Passwort = "Passwort";
public static string PropertyName_BCryptPassword = "BCryptPassword";
private string _CustomerCode;
private DateTime _CustomerCodeGenDate;
@@ -30,6 +32,8 @@ namespace BeWo.Data.Entities
private string _Passwort;
private string _BCryptPassword;
public virtual string CustomerCode
{
get
@@ -126,5 +130,18 @@ namespace BeWo.Data.Entities
}
}
public virtual string BCryptPassword
{
get { return _BCryptPassword; }
set
{
if (AreDifferent(_BCryptPassword, value))
{
_BCryptPassword = value;
}
}
}
}
}

View File

@@ -19,5 +19,6 @@
<property name="IsChatAktiv" column="IsChatActive" />
<property name="BenutzerName" column="BenutzerName" />
<property name="Passwort" column="Passwort" />
<property name="BCryptPassword" column="PasswordHash" />
</class>
</hibernate-mapping>

View File

@@ -1,2 +1,4 @@
ALTER TABLE `applicationuser`
ADD COLUMN `PasswordHash` VARCHAR(1024) NULL DEFAULT NULL COMMENT '';
ADD COLUMN `PasswordHash` VARCHAR(1024) NULL DEFAULT NULL COMMENT '';
ALTER TABLE textbaustein ADD COLUMN `IsParent` TINYINT(1);

View File

@@ -0,0 +1,3 @@
ALTER TABLE `CustomerAppCode`
ADD COLUMN `PasswordHash` VARCHAR(1024) NULL DEFAULT NULL COMMENT '';

View File

@@ -695,5 +695,17 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<CompactVertreterEmployeeDC> GetLastVertreter(long? klientenOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
PdfChatHandoutDC GetHandOutPdfForChat(string customerId, string apikey);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
bool DeletEmloyeeChatCode(string apikey, string kundennummer, long userOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
bool DeletCustomerChatCode(string apikey, string kundennummer, long userOid);
}
}

View File

@@ -5,6 +5,7 @@ using System.ServiceModel;
using BeWo.Data.Access;
using BeWo.Data.Entities;
using BeWo.Data.Security;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.Plugins;
@@ -3680,26 +3681,53 @@ namespace BeWo.Service.ServiceImplementations
}
}
//vorrübergehend
public void SetBenutzerPasswortChatAppCode(long pCustomerOid, string benutzerName, string passwort )
{
try
{
var cusappcode = DAOFactory.SearchDAO.FindAllCustomerAppCodes(pCustomerOid);
int anzahl = cusappcode.Count();
foreach (var appcode in cusappcode)
if (anzahl > 0)
{
if(!benutzerName.Equals("") && appcode.BenutzerName != null && !appcode.BenutzerName.Equals(benutzerName)) {
appcode.BenutzerName = benutzerName;
foreach (var appcode in cusappcode)
{
if (!benutzerName.Equals("") && appcode.BenutzerName != null &&
!appcode.BenutzerName.Equals(benutzerName))
{
appcode.BenutzerName = benutzerName;
}
if (!passwort.Equals("") && appcode.Passwort != null && !appcode.Passwort.Equals(passwort))
{
appcode.Passwort = passwort;
string salt = BCrypt.GenerateSalt();
appcode.BCryptPassword = BCrypt.HashPassword(passwort, salt);
}
}
if (!passwort.Equals("") && appcode.Passwort != null && !appcode.Passwort.Equals(passwort)) {
appcode.Passwort = passwort;
if (!benutzerName.Equals("") || !passwort.Equals("")) {
DAOFactory.GenericDAO.Update(cusappcode);
}
}
DAOFactory.GenericDAO.Update(cusappcode);
else
{
CustomerAPPCodeDC cusApp = new CustomerAPPCodeDC();
cusApp.Benutzername = benutzerName;
cusApp.Passwort = passwort;
cusApp.CustomerOid = pCustomerOid;
var yx = MapperFactory.CustomerAPPCodeDC_CustomerAPPCode.MapToNewEntity(cusApp);
if (!benutzerName.Equals("") || !passwort.Equals(""))
{
DAOFactory.GenericDAO.Insert(yx);
}
}
}
catch (Exception e)
{

View File

@@ -7,6 +7,7 @@ using System.Net;
using System.ServiceModel;
using System.Text;
using System.Threading;
using System.Web;
using System.Windows;
using System.Windows.Documents;
using BeWo.Data;
@@ -4561,6 +4562,160 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
public PdfChatHandoutDC GetHandOutPdfForChat(string customerId,string apikey)
{
try
{
var handout = new PdfChatHandoutDC();
string serverUrl = ErmittleServerURL(customerId);
if (serverUrl == null)
{
handout.Result = 11;
return handout;
}
else if (serverUrl.Equals(""))
{
handout.Result = 11;
return handout;
}
var endurl = serverUrl + "/api/ownchat/createpdfmanual/" + apikey + "/" + customerId;
#region neuer nicht funktionsfähiger bereich
//neu post bereich
//Dictionary<string, string> dic = new Dictionary<string, string>();
//dic.Add("chatcode", "Hier ChatCode");
//dic.Add("login", "hier benutzername");
//dic.Add("password", "hier passwort");
//dic.Add("custom_logo_url", "https://support.bewoplaner.de/bewoplaner_logo_big.png");
//string postdaten = "";
//foreach (var key in dic.Keys)
//{
// postdaten += HttpUtility.UrlEncode(key) + "=" + HttpUtility.UrlEncode(dic[key]) + "&";
//}
//WebRequest requesten = WebRequest.Create(endurl);
//requesten.Method = "POST";
//requesten.ContentType = "application/x-www-form-urlencoded";
////requesten.Headers["Token"] = "hier ggf. token hin ";
//requesten.Headers["CustomerID"] = customerId;
//byte[] daten = Encoding.ASCII.GetBytes(postdaten);
//requesten.ContentLength = daten.Length;
//Stream requestStream = requesten.GetRequestStream();
//requestStream.Write(daten, 0, daten.Length);
//requestStream.Close();
//neu ende
#endregion
//alt get bereich
WebRequest request = WebRequest.Create(endurl);
request.Credentials = CredentialCache.DefaultCredentials;
request.Proxy = null;
WebResponse response = request.GetResponse();
string responseFromServer = ReadStreamForChatCode(response);
var jsonDatentyp = JsonConvert.DeserializeObject<PdfChatHandoutDC>(responseFromServer);
return jsonDatentyp;
}
catch (Exception e)
{
//throw Utils.CreateBeWoFaultException(e);
var handout = new PdfChatHandoutDC();
handout.Result = 13;
return handout;
}
}
public bool DeletCustomerChatCode(string apikey,string kundennummer,long userOid)
{
try
{
DeletZufallsCode(apikey, kundennummer, "C" + userOid);
var customerappcode = DAOFactory.SearchDAO.FindAllCustomerAppCodes(userOid);
var anzahl = customerappcode.Count();
if (anzahl > 0)
{
foreach (var code in customerappcode)
{
code.CustomerCode = "";
code.CustomerCodeGenDate = DateTime.Now;
}
DAOFactory.GenericDAO.Update(customerappcode);
return true;
}
else
{
return false;
}
}
catch (Exception e)
{
return false;
// throw Utils.CreateBeWoFaultException(e);
}
}
public bool DeletEmloyeeChatCode(string apikey, string kundennummer, long userOid)
{
try
{
DeletZufallsCode(apikey, kundennummer, "E" + userOid);
var employeeappcode = DAOFactory.SearchDAO.FindAllEmployeeAppCodes(userOid);
var anzahl = employeeappcode.Count();
if (anzahl > 0)
{
foreach (var code in employeeappcode)
{
code.EmployeeCode = "";
code.EmployeeCodeGenDate = DateTime.Now;
}
DAOFactory.GenericDAO.Update(employeeappcode);
return true;
}
else
{
return false;
}
}
catch (Exception e)
{
return false;
//throw Utils.CreateBeWoFaultException(e);
}
}
#endregion
}

View File

@@ -416,10 +416,10 @@ namespace BS.Shared
AllowChangeOwnPassword = 20800,
TextModulesAlleAnsehen = 20900,
TextModulesNurEigeneAnsehen = 20901,
TextModulesAlleBearbeiten = 20902,
TextModulesNurEigeneBearbeiten = 20903,
TextbausteineAlleAnsehen = 20900,
TextbausteineNurEigeneAnsehen = 20901,
TextbausteineAlleBearbeiten = 20902,
TextbausteineNurEigeneBearbeiten = 20903,
//TextbausteineAlleAnlegen = 20904,
//TextbausteineNurEigeneAnlegen = 20905,

View File

@@ -452,16 +452,16 @@ namespace BS.Shared.Core
UserRightType.KalenderInZeiterfassungUebernehmen, "Termine in Zeiterfassung übernehmen"
},
{
UserRightType.TextModulesAlleAnsehen, "Textbausteine ansehen (allgemeine)"
UserRightType.TextbausteineAlleAnsehen, "Textbausteine ansehen (allgemeine)"
},
{
UserRightType.TextModulesNurEigeneAnsehen, "Textbausteine ansehen (eigene)"
UserRightType.TextbausteineNurEigeneAnsehen, "Textbausteine ansehen (eigene)"
},
{
UserRightType.TextModulesAlleBearbeiten, "Textbausteine bearbeiten (allgemeine)"
UserRightType.TextbausteineAlleBearbeiten, "Textbausteine bearbeiten (allgemeine)"
},
{
UserRightType.TextModulesNurEigeneBearbeiten, "Textbausteine bearbeiten (eigene)"
UserRightType.TextbausteineNurEigeneBearbeiten, "Textbausteine bearbeiten (eigene)"
},
//{
// UserRightType.TextbausteineAlleAnlegen, "Textbausteine für alle Mitarbeiter anlegen"

View File

@@ -29,5 +29,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public string Passwort { get; set; }
[DataMember]
public int Result { get; set; }
}
}

View File

@@ -25,7 +25,10 @@ namespace BS.Shared.DataContracts
[DataMember]
public string NotfallStatement { get; set; }
[DataMember]
public int Result { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
{
[DataContract]
public class PdfChatHandoutDC : IDataContract
{
[DataMember]
public string File { get; set; }
[DataMember]
public int Result { get; set; }
}
}

View File

@@ -169,6 +169,7 @@
<Compile Include="DataContracts\Compact\CompactCustomerTeamDC.cs" />
<Compile Include="DataContracts\Compact\CompactGroupOfPeopleDC.cs" />
<Compile Include="DataContracts\Compact\CompactWohnheimDC.cs" />
<Compile Include="DataContracts\PdfChatHandoutDC.cs" />
<Compile Include="DataContracts\CustomerTeamDC.cs" />
<Compile Include="DataContracts\Compact\CompactVertreterEmployeeDC.cs" />
<Compile Include="DataContracts\Compact\CompactTokenDC.cs" />