diff --git a/.gitignore b/.gitignore
index d9805409f..f0d36d9a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -256,3 +256,4 @@
/ReportImp/Taubblindendienst/obj/Debug
/BeWoPlanerMobil/logs
/Host/logs
+/.vs/BeWoGit/v15
diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index e4818c8dc..c649cfd05 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -29,7 +29,7 @@
3.5
- D:\Projects\beyondsoft\BeWoPlaner\Publish\
+ D:\Projects\beyondsoft\BeWoPlaner\Publish45\
true
Web
true
@@ -39,16 +39,16 @@
false
true
false
- http://fortis-bewoplaner.fortis-ev.org.local/
+ http://app.beyondsoft.de/dev/
de-DE
BeWoPlaner
beyondSoft GmbH
- 2.0.1.129
+ 2.0.1.130
true
publish.htm
false
true
- 130
+ 131
2.0.1.%2a
false
true
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 9f7da0f05..d963e688e 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -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"))
{
diff --git a/BeWo/SchulbegleitenderDienst/NewSchulbegleitenderDienstView.xaml.cs b/BeWo/SchulbegleitenderDienst/NewSchulbegleitenderDienstView.xaml.cs
index c7f9f7879..bd8de940f 100644
--- a/BeWo/SchulbegleitenderDienst/NewSchulbegleitenderDienstView.xaml.cs
+++ b/BeWo/SchulbegleitenderDienst/NewSchulbegleitenderDienstView.xaml.cs
@@ -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 custOid = new List();
+ 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);
}
diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs
index f41f54e9f..c3872f444 100644
--- a/BeWo/ServiceProxy/Generated.cs
+++ b/BeWo/ServiceProxy/Generated.cs
@@ -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 GetLastVertreter(System.Nullable 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 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 invoices)
{
base.Channel.DeactivateInvoices(invoices);
diff --git a/BeWo/View/ChatServiceCustomer.xaml b/BeWo/View/ChatServiceCustomer.xaml
index d39ab71eb..bea5ef48a 100644
--- a/BeWo/View/ChatServiceCustomer.xaml
+++ b/BeWo/View/ChatServiceCustomer.xaml
@@ -40,19 +40,33 @@
Height="21" x:Name="GenerateButon"/>
-
-
+
+
+
-
+
-
+
-
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/ChatServiceCustomer.xaml.cs b/BeWo/View/ChatServiceCustomer.xaml.cs
index a36cc2265..e23870132 100644
--- a/BeWo/View/ChatServiceCustomer.xaml.cs
+++ b/BeWo/View/ChatServiceCustomer.xaml.cs
@@ -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;
+ }
+
+ }
}
}
\ No newline at end of file
diff --git a/BeWo/View/ChatServiceEmployee.xaml b/BeWo/View/ChatServiceEmployee.xaml
index c52fbe4c9..c2a2a476b 100644
--- a/BeWo/View/ChatServiceEmployee.xaml
+++ b/BeWo/View/ChatServiceEmployee.xaml
@@ -23,17 +23,17 @@
+
+
-
-
-
+
-
+
+
+
+
+
diff --git a/BeWo/View/ChatServiceEmployee.xaml.cs b/BeWo/View/ChatServiceEmployee.xaml.cs
index 74362a3e9..d066a2dce 100644
--- a/BeWo/View/ChatServiceEmployee.xaml.cs
+++ b/BeWo/View/ChatServiceEmployee.xaml.cs
@@ -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);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
index 16cdf79c7..a3b988aac 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
@@ -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;
}
diff --git a/BeWo/View/Detail/TextModuleView.xaml.cs b/BeWo/View/Detail/TextModuleView.xaml.cs
index 02ba8270a..b4bdeda17 100644
--- a/BeWo/View/Detail/TextModuleView.xaml.cs
+++ b/BeWo/View/Detail/TextModuleView.xaml.cs
@@ -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"))
{
diff --git a/BeWo/View/HomeDragPanelView.xaml.cs b/BeWo/View/HomeDragPanelView.xaml.cs
index e3a3e6398..2fe52ed2a 100644
--- a/BeWo/View/HomeDragPanelView.xaml.cs
+++ b/BeWo/View/HomeDragPanelView.xaml.cs
@@ -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)
{
diff --git a/BeWo/View/Master/AdministrationView.xaml.cs b/BeWo/View/Master/AdministrationView.xaml.cs
index 0af76906e..7d3e21b1f 100644
--- a/BeWo/View/Master/AdministrationView.xaml.cs
+++ b/BeWo/View/Master/AdministrationView.xaml.cs
@@ -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;
}
diff --git a/BeWo/View/Search/TextModuleSearchView.cs b/BeWo/View/Search/TextModuleSearchView.cs
index 3947bc7c6..1a3aac911 100644
--- a/BeWo/View/Search/TextModuleSearchView.cs
+++ b/BeWo/View/Search/TextModuleSearchView.cs
@@ -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();
diff --git a/BeWo/ViewModel/TextModuleVM.cs b/BeWo/ViewModel/TextModuleVM.cs
index 89aa68dee..63d880a55 100644
--- a/BeWo/ViewModel/TextModuleVM.cs
+++ b/BeWo/ViewModel/TextModuleVM.cs
@@ -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;
}
diff --git a/BeWo/ViewModel/VMFactory.cs b/BeWo/ViewModel/VMFactory.cs
index 2a228eeb7..469ce8f25 100644
--- a/BeWo/ViewModel/VMFactory.cs
+++ b/BeWo/ViewModel/VMFactory.cs
@@ -437,7 +437,7 @@ namespace BeWo.ViewModel
public static void CreateTextModuleListVMAsync(Action 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 =>
{
diff --git a/BeWoPlanerMobil/Controllers/ChatController.cs b/BeWoPlanerMobil/Controllers/ChatController.cs
index e20940f09..6b48c89d1 100644
--- a/BeWoPlanerMobil/Controllers/ChatController.cs
+++ b/BeWoPlanerMobil/Controllers/ChatController.cs
@@ -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 Guardians { get; set; }
- public JsonInputKlient1(string oid,string status, string firstname, string lastname, string alias,string mobile,string chatCode, List guardians)
+ public JsonInputKlient1(string oid,string status, string firstname, string lastname, string alias,string mobile,string chatCode,string login,string password, List 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;
}
}
diff --git a/BeWoPlanerMobil/Controllers/MainController.cs b/BeWoPlanerMobil/Controllers/MainController.cs
index 8b553dc0d..43be55771 100644
--- a/BeWoPlanerMobil/Controllers/MainController.cs
+++ b/BeWoPlanerMobil/Controllers/MainController.cs
@@ -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();
}
diff --git a/BeWoPlanerMobil/Models/MainModel.cs b/BeWoPlanerMobil/Models/MainModel.cs
index 5b697ff20..537cc8370 100644
--- a/BeWoPlanerMobil/Models/MainModel.cs
+++ b/BeWoPlanerMobil/Models/MainModel.cs
@@ -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);
}
}
diff --git a/Data/Entities/CustomerAPPCode.cs b/Data/Entities/CustomerAPPCode.cs
index 8c2af6a1c..d4dc065a5 100644
--- a/Data/Entities/CustomerAPPCode.cs
+++ b/Data/Entities/CustomerAPPCode.cs
@@ -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;
+ }
+ }
+ }
+
}
}
\ No newline at end of file
diff --git a/Data/Mappings/CustomerAPPCode.hbm.xml b/Data/Mappings/CustomerAPPCode.hbm.xml
index 2577b5f20..423715a33 100644
--- a/Data/Mappings/CustomerAPPCode.hbm.xml
+++ b/Data/Mappings/CustomerAPPCode.hbm.xml
@@ -19,5 +19,6 @@
+
\ No newline at end of file
diff --git a/Model/Changes_2017_10_09.txt b/Model/Changes_2017_10_09.txt
index 765ec0720..3fa7dd29d 100644
--- a/Model/Changes_2017_10_09.txt
+++ b/Model/Changes_2017_10_09.txt
@@ -1,2 +1,4 @@
ALTER TABLE `applicationuser`
-ADD COLUMN `PasswordHash` VARCHAR(1024) NULL DEFAULT NULL COMMENT '';
\ No newline at end of file
+ADD COLUMN `PasswordHash` VARCHAR(1024) NULL DEFAULT NULL COMMENT '';
+
+ALTER TABLE textbaustein ADD COLUMN `IsParent` TINYINT(1);
\ No newline at end of file
diff --git a/Model/Changes_2017_10_13.txt b/Model/Changes_2017_10_13.txt
new file mode 100644
index 000000000..b29ea2d1b
--- /dev/null
+++ b/Model/Changes_2017_10_13.txt
@@ -0,0 +1,3 @@
+
+ALTER TABLE `CustomerAppCode`
+ADD COLUMN `PasswordHash` VARCHAR(1024) NULL DEFAULT NULL COMMENT '';
\ No newline at end of file
diff --git a/Service/ServiceContracts/IOperationsService.cs b/Service/ServiceContracts/IOperationsService.cs
index e170b4de9..4141641c8 100644
--- a/Service/ServiceContracts/IOperationsService.cs
+++ b/Service/ServiceContracts/IOperationsService.cs
@@ -695,5 +695,17 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List 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);
}
}
\ No newline at end of file
diff --git a/Service/ServiceImplementations/CustomerServiceImp.cs b/Service/ServiceImplementations/CustomerServiceImp.cs
index 443613243..6fca40dc6 100644
--- a/Service/ServiceImplementations/CustomerServiceImp.cs
+++ b/Service/ServiceImplementations/CustomerServiceImp.cs
@@ -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)
{
diff --git a/Service/ServiceImplementations/OperationsServiceImp.cs b/Service/ServiceImplementations/OperationsServiceImp.cs
index 649aab507..8a2bec432 100644
--- a/Service/ServiceImplementations/OperationsServiceImp.cs
+++ b/Service/ServiceImplementations/OperationsServiceImp.cs
@@ -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 dic = new Dictionary();
+
+ //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(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
}
diff --git a/Shared/BeWoEntityEnums.cs b/Shared/BeWoEntityEnums.cs
index 2b1f7cfff..d03941aa0 100644
--- a/Shared/BeWoEntityEnums.cs
+++ b/Shared/BeWoEntityEnums.cs
@@ -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,
diff --git a/Shared/Core/EnumTranslations.cs b/Shared/Core/EnumTranslations.cs
index 057eaea73..feb41e1f5 100644
--- a/Shared/Core/EnumTranslations.cs
+++ b/Shared/Core/EnumTranslations.cs
@@ -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"
diff --git a/Shared/DataContracts/CustomerAPPCodeDC.cs b/Shared/DataContracts/CustomerAPPCodeDC.cs
index 800ba9046..e43ba34b9 100644
--- a/Shared/DataContracts/CustomerAPPCodeDC.cs
+++ b/Shared/DataContracts/CustomerAPPCodeDC.cs
@@ -29,5 +29,9 @@ namespace BS.Shared.DataContracts
[DataMember]
public string Passwort { get; set; }
+ [DataMember]
+ public int Result { get; set; }
+
+
}
}
\ No newline at end of file
diff --git a/Shared/DataContracts/EmployeeAPPCodeDC.cs b/Shared/DataContracts/EmployeeAPPCodeDC.cs
index 1f4666bbf..8dd176304 100644
--- a/Shared/DataContracts/EmployeeAPPCodeDC.cs
+++ b/Shared/DataContracts/EmployeeAPPCodeDC.cs
@@ -25,7 +25,10 @@ namespace BS.Shared.DataContracts
[DataMember]
public string NotfallStatement { get; set; }
-
+
+ [DataMember]
+ public int Result { get; set; }
+
}
}
\ No newline at end of file
diff --git a/Shared/DataContracts/PdfChatHandoutDC.cs b/Shared/DataContracts/PdfChatHandoutDC.cs
new file mode 100644
index 000000000..6d9a7fa32
--- /dev/null
+++ b/Shared/DataContracts/PdfChatHandoutDC.cs
@@ -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; }
+
+ }
+}
\ No newline at end of file
diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj
index ee61762a5..be5750ba9 100644
--- a/Shared/Shared.csproj
+++ b/Shared/Shared.csproj
@@ -169,6 +169,7 @@
+