update und bugfixes
This commit is contained in:
@@ -672,6 +672,7 @@
|
||||
<Compile Include="ViewModel\ArbeitszeitEintragVM.cs" />
|
||||
<Compile Include="ViewModel\CustomerTokenRelationVM.cs" />
|
||||
<Compile Include="ViewModel\EmployeeTokenRelationVM.cs" />
|
||||
<Compile Include="ViewModel\ChatBewoMessageSyncVM.cs" />
|
||||
<Compile Include="ViewModel\QuittierungsCheckVM.cs" />
|
||||
<Compile Include="ViewModel\TokenVM.cs" />
|
||||
<Compile Include="ViewModel\ListViewModel\ArbeitszeitListVM.cs" />
|
||||
|
||||
@@ -174,6 +174,15 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetEmployeebyFullNameBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.EmployeeDC GetEmployeebyFullName(string fullName);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/CreateOrUpdateChatBewoMessageSync", ReplyAction="http://tempuri.org/IEmployeeService/CreateOrUpdateChatBewoMessageSyncResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/CreateOrUpdateChatBewoMessageSyncBeWoFaultFau" +
|
||||
"lt", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void CreateOrUpdateChatBewoMessageSync(System.Nullable<long> eOid, string text);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/GetChatBewoMessageSync", ReplyAction="http://tempuri.org/IEmployeeService/GetChatBewoMessageSyncResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetChatBewoMessageSyncBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.ChatBewoMessageSyncDC GetChatBewoMessageSync(System.Nullable<long> eOid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/ArchiveEmployee", ReplyAction="http://tempuri.org/IEmployeeService/ArchiveEmployeeResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/ArchiveEmployeeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
void ArchiveEmployee(long pOid, long pVersion);
|
||||
@@ -581,6 +590,16 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetEmployeebyFullName(fullName);
|
||||
}
|
||||
|
||||
public void CreateOrUpdateChatBewoMessageSync(System.Nullable<long> eOid, string text)
|
||||
{
|
||||
base.Channel.CreateOrUpdateChatBewoMessageSync(eOid, text);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.ChatBewoMessageSyncDC GetChatBewoMessageSync(System.Nullable<long> eOid)
|
||||
{
|
||||
return base.Channel.GetChatBewoMessageSync(eOid);
|
||||
}
|
||||
|
||||
public void ArchiveEmployee(long pOid, long pVersion)
|
||||
{
|
||||
base.Channel.ArchiveEmployee(pOid, pVersion);
|
||||
@@ -1325,7 +1344,6 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/GetPersonWithCustomerOid", ReplyAction="http://tempuri.org/ICustomerService/GetPersonWithCustomerOidResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/GetPersonWithCustomerOidBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeDC))]
|
||||
BS.Shared.DataContracts.PersonDC GetPersonWithCustomerOid(long oid);
|
||||
|
||||
@@ -1596,7 +1614,6 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/InsertNewPerson", ReplyAction="http://tempuri.org/ICustomerService/InsertNewPersonResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/InsertNewPersonBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeDC))]
|
||||
long InsertNewPerson(BS.Shared.DataContracts.PersonDC pPersonDC);
|
||||
|
||||
@@ -1619,7 +1636,6 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/LoadPerson", ReplyAction="http://tempuri.org/ICustomerService/LoadPersonResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/LoadPersonBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeDC))]
|
||||
BS.Shared.DataContracts.PersonDC LoadPerson(long pPersonOid);
|
||||
|
||||
@@ -1662,7 +1678,6 @@ namespace BeWo.ServiceProxy
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ICustomerService/UpdatePerson", ReplyAction="http://tempuri.org/ICustomerService/UpdatePersonResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/ICustomerService/UpdatePersonBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.CustomerDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.WohnheimDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.EmployeeDC))]
|
||||
long UpdatePerson(BS.Shared.DataContracts.PersonDC pPersonDC);
|
||||
|
||||
@@ -4247,7 +4262,7 @@ namespace BeWo.ServiceProxy
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateNewCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/CreateNewCustomerAPPCodeDCResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateNewCustomerAPPCodeDCBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid, string kundennummer, string apikey, long userOid);
|
||||
BS.Shared.DataContracts.CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid, string kundennummer, string apikey);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateNewChatMessagesDC", ReplyAction="http://tempuri.org/IOperationsService/CreateNewChatMessagesDCResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateNewChatMessagesDCBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
@@ -4271,7 +4286,7 @@ namespace BeWo.ServiceProxy
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateNewEmployeeAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/CreateNewEmployeeAPPCodeDCResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateNewEmployeeAPPCodeDCBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
BS.Shared.DataContracts.EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid, string kundennummer, string apikey, long userOid);
|
||||
BS.Shared.DataContracts.EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid, string kundennummer, string apikey);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveEmployeeAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveEmployeeAPPCodeDCResponse" +
|
||||
"")]
|
||||
@@ -4421,17 +4436,13 @@ 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);
|
||||
bool DeletEmloyeeChatCode(string apikey, string kundennummer, long employeeoid);
|
||||
|
||||
[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);
|
||||
bool DeletCustomerChatCode(string apikey, string kundennummer, long customeroid);
|
||||
|
||||
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetTranslationDictionary", ReplyAction="http://tempuri.org/IOperationsService/GetTranslationDictionaryResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetTranslationDictionaryBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
@@ -5057,9 +5068,9 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.InsertSignature(sig);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid, string kundennummer, string apikey, long userOid)
|
||||
public BS.Shared.DataContracts.CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid, string kundennummer, string apikey)
|
||||
{
|
||||
return base.Channel.CreateNewCustomerAPPCodeDC(customerOid, kundennummer, apikey, userOid);
|
||||
return base.Channel.CreateNewCustomerAPPCodeDC(customerOid, kundennummer, apikey);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.ChatMessageDC CreateNewChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid, string messageid)
|
||||
@@ -5082,9 +5093,9 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.FindUnreadChatMessagesForRecipient(personOid);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid, string kundennummer, string apikey, long userOid)
|
||||
public BS.Shared.DataContracts.EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid, string kundennummer, string apikey)
|
||||
{
|
||||
return base.Channel.CreateNewEmployeeAPPCodeDC(employeeOid, kundennummer, apikey, userOid);
|
||||
return base.Channel.CreateNewEmployeeAPPCodeDC(employeeOid, kundennummer, apikey);
|
||||
}
|
||||
|
||||
public void UpdateIsChatActiveEmployeeAPPCodeDC(long employeeOid, int activeType)
|
||||
@@ -5252,19 +5263,14 @@ namespace BeWo.ServiceProxy
|
||||
return base.Channel.GetLastVertreter(klientenOid);
|
||||
}
|
||||
|
||||
public BS.Shared.DataContracts.PdfChatHandoutDC GetHandOutPdfForChat(string customerId, string apikey)
|
||||
public bool DeletEmloyeeChatCode(string apikey, string kundennummer, long employeeoid)
|
||||
{
|
||||
return base.Channel.GetHandOutPdfForChat(customerId, apikey);
|
||||
return base.Channel.DeletEmloyeeChatCode(apikey, kundennummer, employeeoid);
|
||||
}
|
||||
|
||||
public bool DeletEmloyeeChatCode(string apikey, string kundennummer, long userOid)
|
||||
public bool DeletCustomerChatCode(string apikey, string kundennummer, long customeroid)
|
||||
{
|
||||
return base.Channel.DeletEmloyeeChatCode(apikey, kundennummer, userOid);
|
||||
}
|
||||
|
||||
public bool DeletCustomerChatCode(string apikey, string kundennummer, long userOid)
|
||||
{
|
||||
return base.Channel.DeletCustomerChatCode(apikey, kundennummer, userOid);
|
||||
return base.Channel.DeletCustomerChatCode(apikey, kundennummer, customeroid);
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<string, string> GetTranslationDictionary()
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace BeWo.View
|
||||
{
|
||||
StartWaiting();
|
||||
var result =
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey,personOid.Value));
|
||||
ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey));
|
||||
|
||||
EndWaiting();
|
||||
if(result != null){
|
||||
@@ -158,7 +158,7 @@ namespace BeWo.View
|
||||
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));
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewCustomerAPPCodeDC(customerOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey));
|
||||
EndWaiting();
|
||||
|
||||
if(result != null){
|
||||
@@ -316,7 +316,7 @@ namespace BeWo.View
|
||||
{
|
||||
if (MessageBox.Show("Wollen Sie den Chat-Code wirklich löschen?\nAlle Daten 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));
|
||||
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletCustomerChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, customerOid.Value));
|
||||
EndWaiting();
|
||||
|
||||
if (isdeletet)
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace BeWo.View
|
||||
MessageBoxImage.Question) == MessageBoxResult.Yes)
|
||||
{
|
||||
StartWaiting();
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewEmployeeAPPCodeDC(employeeOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey, personOid.Value));
|
||||
var result = ServiceFacade.DoOperationsServiceSync(s => s.CreateNewEmployeeAPPCodeDC(employeeOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey));
|
||||
|
||||
EndWaiting();
|
||||
if(result != null){
|
||||
@@ -109,8 +109,8 @@ namespace BeWo.View
|
||||
var result =
|
||||
ServiceFacade.DoOperationsServiceSync(
|
||||
s =>
|
||||
s.CreateNewEmployeeAPPCodeDC(employeeOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey,
|
||||
personOid.Value));
|
||||
s.CreateNewEmployeeAPPCodeDC(employeeOid.Value, BeWoApp.Tenant, BeWoApp.Mandator.Apikey));
|
||||
|
||||
EndWaiting();
|
||||
|
||||
//GeneratetTexfield.Text = result.EmployeeCode;
|
||||
@@ -212,9 +212,7 @@ namespace BeWo.View
|
||||
private void ZeigePDF_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
StartWaiting();
|
||||
|
||||
//var handout = ServiceFacade.DoOperationsServiceSync(r => r.GetHandOutPdfForChat("5473568546", "0b50c09aff87f20d9ced75340e04e5ccaa11dd3e7bcf25e9c4f94dc20d3cbb97"/*BeWoApp.Tenant, BeWoApp.Mandator.Apikey*/));
|
||||
|
||||
|
||||
List<string> parameter = new List<string>();
|
||||
parameter.Add(BeWoApp.Tenant);
|
||||
parameter.Add(BeWoApp.Mandator.Apikey);
|
||||
@@ -469,7 +467,7 @@ namespace BeWo.View
|
||||
{
|
||||
StartWaiting();
|
||||
|
||||
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletEmloyeeChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, personOid.Value));
|
||||
var isdeletet = ServiceFacade.DoOperationsServiceSync(r => r.DeletEmloyeeChatCode(BeWoApp.Mandator.Apikey, BeWoApp.Tenant, employeeOid.Value));
|
||||
|
||||
EndWaiting();
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ namespace BeWo.View
|
||||
ChatMainControl.InitMitChatdaten(chatDaten);
|
||||
ChatMainControl.AddContextMenu("In Dokumentation übernehmen", ChatMainControl_OnClickContextMenuItem);
|
||||
|
||||
|
||||
//in einem thread auslagern
|
||||
LadeMessageInfoAusDatenBank();
|
||||
|
||||
Thread newThread = new Thread(ChatMainControl.SynchronisationVeranlassen);
|
||||
newThread.IsBackground = true;
|
||||
newThread.Start();
|
||||
@@ -61,8 +61,7 @@ namespace BeWo.View
|
||||
private void CloseWindow()
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) =>
|
||||
{
|
||||
//Close();
|
||||
{
|
||||
Visibility = Visibility.Hidden;
|
||||
|
||||
if (_emojiView != null)
|
||||
@@ -71,7 +70,8 @@ namespace BeWo.View
|
||||
|
||||
}
|
||||
|
||||
ChatMainControl.SpeichereMessageInfoInDatei();
|
||||
|
||||
SpeichereMessageInfosInDatenBank();
|
||||
|
||||
}));
|
||||
}
|
||||
@@ -173,11 +173,9 @@ namespace BeWo.View
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Close chat
|
||||
#region Close chat / wird nicht benutzt
|
||||
private void MainWindow_OnClosed(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
//_emojiView = null;
|
||||
//ChatMainControl.SpeichereMessageInfoInDatei();
|
||||
|
||||
@@ -202,5 +200,48 @@ namespace BeWo.View
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Speichere/Lade MessageSync In DB
|
||||
|
||||
private void SpeichereMessageInfosInDatenBank()
|
||||
{
|
||||
var liste = ChatMainControl.UebergebeMessageInfoDatenFuerDb();
|
||||
|
||||
if (liste.Count != 0)
|
||||
{
|
||||
string text="";
|
||||
foreach (var item in liste)
|
||||
{
|
||||
text += item.GroupId + ";" + item.TimeStamp + ";"+"&";
|
||||
}
|
||||
|
||||
ServiceFacade.DoEmployeeServiceSync(r => r.CreateOrUpdateChatBewoMessageSync(BeWoApp.LoggedOnUser.Employee.EmployeeOid,text));
|
||||
}
|
||||
}
|
||||
|
||||
private void LadeMessageInfoAusDatenBank()
|
||||
{
|
||||
var item = ServiceFacade.DoEmployeeServiceSync(r => r.GetChatBewoMessageSync(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
string[] messageSynctext = item.MessageSyncText.Split('&');
|
||||
|
||||
Dictionary<long,DateTime> aa = new Dictionary<long, DateTime>();
|
||||
|
||||
foreach (var text in messageSynctext)
|
||||
{
|
||||
if (!text.Equals("")) {
|
||||
string[] splitten = text.Split(';');
|
||||
|
||||
aa.Add(Convert.ToInt64(splitten[0]), DateTime.Parse(splitten[1]));
|
||||
}
|
||||
}
|
||||
|
||||
ChatMainControl.ErhalteMessageInfoVonDb(aa);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
46
BeWo/ViewModel/ChatBewoMessageSyncVM.cs
Normal file
46
BeWo/ViewModel/ChatBewoMessageSyncVM.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using System;
|
||||
|
||||
namespace BeWo.ViewModel
|
||||
{
|
||||
public class ChatBewoMessageSyncVM : AbstractDCMapperVM<ChatBewoMessageSyncDC>
|
||||
{
|
||||
public static string PropertyName_MessageSyncText = "MessageSyncText";
|
||||
|
||||
private string _MessageSyncText;
|
||||
|
||||
public ChatBewoMessageSyncVM(ChatBewoMessageSyncDC pDC)
|
||||
: base(pDC, true)
|
||||
{
|
||||
}
|
||||
|
||||
public string MessageSyncText
|
||||
{
|
||||
get { return this._MessageSyncText; }
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._MessageSyncText, value))
|
||||
{
|
||||
this._MessageSyncText = value;
|
||||
this.StoreDirtyInformation(this.AreDifferent(this.DataContract.MessageSyncText, value), PropertyName_MessageSyncText);
|
||||
this.FirePropertyChanged(PropertyName_MessageSyncText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitByDataContract(ChatBewoMessageSyncDC pDataContract)
|
||||
{
|
||||
this._MessageSyncText = pDataContract.MessageSyncText;
|
||||
|
||||
}
|
||||
|
||||
protected override ChatBewoMessageSyncDC MapToDataContract(ChatBewoMessageSyncDC pDataContract, bool doCommit)
|
||||
{
|
||||
pDataContract.MessageSyncText = _MessageSyncText;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2187,5 +2187,13 @@ namespace BeWo.Data.Access
|
||||
|
||||
return criteria.List<TextModule>();
|
||||
}
|
||||
|
||||
public IEnumerable<ChatBewoMessageSync> FindEmployeeChatBewoMessageSync(long oid)
|
||||
{
|
||||
var c = CreateCriteriaIsActive<ChatBewoMessageSync>()
|
||||
.Add(Restrictions.Eq(ChatBewoMessageSync.PropertyName_EmployeeOid, oid));
|
||||
|
||||
return c.List<ChatBewoMessageSync>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +168,7 @@
|
||||
<Compile Include="Entities\ArbeitszeitListe.cs" />
|
||||
<Compile Include="Entities\Customer2Token.cs" />
|
||||
<Compile Include="Entities\Employee2Token.cs" />
|
||||
<Compile Include="Entities\ChatBewoMessageSync.cs" />
|
||||
<Compile Include="Entities\QuittierungsCheck.cs" />
|
||||
<Compile Include="Entities\Token.cs" />
|
||||
<Compile Include="Entities\VertretungsListe.cs" />
|
||||
@@ -569,6 +570,9 @@
|
||||
</Content>
|
||||
<Content Include="ICD10\icd10gm2012syst_claml_20110923.xml" />
|
||||
<Content Include="Mappings\CustomerTeam.hbm.xml" />
|
||||
<EmbeddedResource Include="Mappings\ChatBewoMessageSync.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Mappings\QuittierungsCheck.hbm.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
|
||||
54
Data/Entities/ChatBewoMessageSync.cs
Normal file
54
Data/Entities/ChatBewoMessageSync.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using BS.Shared;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BeWo.Data.Entities
|
||||
{
|
||||
public class ChatBewoMessageSync : BeWoEntityBase
|
||||
{
|
||||
public static string PropertyName_EmployeeOid = "EmployeeOid";
|
||||
|
||||
public static string PropertyName_MessageSyncText = "MessageSyncText";
|
||||
|
||||
private long? _EmployeeOid;
|
||||
|
||||
private string _MessageSyncText;
|
||||
|
||||
public ChatBewoMessageSync()
|
||||
{
|
||||
this._Tid = TableID.ChatBewoMessageSync;
|
||||
}
|
||||
|
||||
public virtual string MessageSyncText
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._MessageSyncText;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (this.AreDifferent(this._MessageSyncText, value))
|
||||
{
|
||||
this._MessageSyncText = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual long? EmployeeOid
|
||||
{
|
||||
get
|
||||
{
|
||||
return _EmployeeOid;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (AreDifferent(_EmployeeOid, value))
|
||||
{
|
||||
_EmployeeOid = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
21
Data/Mappings/ChatBewoMessageSync.hbm.xml
Normal file
21
Data/Mappings/ChatBewoMessageSync.hbm.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
|
||||
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
|
||||
<class name="BeWo.Data.Entities.ChatBewoMessageSync,BeWo.Data" table="chatbewomessagesync">
|
||||
<id name="Oid" column ="Oid" unsaved-value="null">
|
||||
<generator class="identity" />
|
||||
</id>
|
||||
<version type="Int64" column="Version" name="Version" />
|
||||
<property name="InsTs" />
|
||||
<property name="InsUser" />
|
||||
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
|
||||
<property name="UdpUser" />
|
||||
<property name="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" />
|
||||
<property name="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" />
|
||||
<property name="Notice" column="Notice" length="1024" />
|
||||
|
||||
<property name="EmployeeOid" column="EmployeeOid" />
|
||||
<property name="MessageSyncText" column="MessageSyncText" />
|
||||
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
24
Model/Changes_2017_11_08.txt
Normal file
24
Model/Changes_2017_11_08.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
CREATE TABLE `1234567890`.`chatbewomessagesync` (
|
||||
`Oid` BIGINT(19) NOT NULL AUTO_INCREMENT COMMENT '',
|
||||
|
||||
`EmployeeOid` BIGINT(19) NULL COMMENT '',
|
||||
|
||||
`Tid` INT(10) NULL COMMENT '',
|
||||
|
||||
`Notice` VARCHAR(1024) NULL COMMENT '',
|
||||
|
||||
`InsTs` DATETIME NULL COMMENT '',
|
||||
|
||||
`InsUser` VARCHAR(1024) NULL COMMENT '',
|
||||
|
||||
`Version` BIGINT(19) NULL COMMENT '',
|
||||
|
||||
`UdpUser` VARCHAR(256) NULL COMMENT '',
|
||||
|
||||
`isActive` TINYINT(4) NULL COMMENT '',
|
||||
|
||||
`SystemEntryID` INT(10) NULL COMMENT '',
|
||||
|
||||
`MessageSyncText` VARCHAR(1024) NULL COMMENT '',
|
||||
|
||||
PRIMARY KEY (`Oid`) COMMENT '');
|
||||
@@ -0,0 +1,37 @@
|
||||
using System.IO;
|
||||
using BeWo.Data.Entities;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
|
||||
namespace BeWo.Service.DCEntityMapper
|
||||
{
|
||||
public class ChatBewoMessageSyncDC_ChatBewoMessageSync : AbstractIDCEntityMapper<ChatBewoMessageSync, ChatBewoMessageSyncDC>
|
||||
{
|
||||
public override ChatBewoMessageSyncDC MergeWithDC(ChatBewoMessageSync pEntity, ChatBewoMessageSyncDC pDataContract)
|
||||
{
|
||||
pDataContract.EmployeeOid = pEntity.EmployeeOid;
|
||||
pDataContract.MessageSyncText = pEntity.MessageSyncText;
|
||||
|
||||
return pDataContract;
|
||||
}
|
||||
|
||||
public override ChatBewoMessageSync MergeWithEntity(ChatBewoMessageSyncDC pDataContract, ChatBewoMessageSync pEntity)
|
||||
{
|
||||
pEntity.EmployeeOid = pDataContract.EmployeeOid;
|
||||
pEntity.MessageSyncText = pDataContract.MessageSyncText;
|
||||
|
||||
return pEntity;
|
||||
}
|
||||
|
||||
protected override bool AreDCAndEntityEqual(ChatBewoMessageSyncDC pDC, ChatBewoMessageSync pEntity)
|
||||
{
|
||||
|
||||
if (pDC.ChatBewoMessageSyncOid == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return pDC.ChatBewoMessageSyncOid == pEntity.Oid;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,6 +47,8 @@ namespace BeWo.Service.DCEntityMapper
|
||||
|
||||
private static VertretungDC_Vertretung _VertretungDC_Vertretung;
|
||||
|
||||
private static ChatBewoMessageSyncDC_ChatBewoMessageSync _ChatBewoMessageSyncDC_ChatBewoMessageSync;
|
||||
|
||||
private static TokenDC_Token _TokenDC_Token;
|
||||
|
||||
private static QuittierungsCheckDC_QuittierungsCheck _QuittierungsCheckDC_QuittierungsCheck;
|
||||
@@ -552,6 +554,14 @@ namespace BeWo.Service.DCEntityMapper
|
||||
}
|
||||
}
|
||||
|
||||
public static ChatBewoMessageSyncDC_ChatBewoMessageSync ChatBewoMessageSyncDC_ChatBewoMessageSync
|
||||
{
|
||||
get
|
||||
{
|
||||
return _ChatBewoMessageSyncDC_ChatBewoMessageSync ?? (_ChatBewoMessageSyncDC_ChatBewoMessageSync = new ChatBewoMessageSyncDC_ChatBewoMessageSync());
|
||||
}
|
||||
}
|
||||
|
||||
public static TokenDC_Token TokenDC_Token
|
||||
{
|
||||
get
|
||||
|
||||
@@ -230,6 +230,7 @@
|
||||
<Compile Include="DCEntityMapper\CustomerTokenRelationDC_Customer2Token.cs" />
|
||||
<Compile Include="DCEntityMapper\EmployeeTokenRelationDC_Employee2Token.cs" />
|
||||
<Compile Include="DCEntityMapper\CompactTokenDC_Token.cs" />
|
||||
<Compile Include="DCEntityMapper\ChatBewoMessageSyncDC_ChatBewoMessageSync.cs" />
|
||||
<Compile Include="DCEntityMapper\QuittierungsCheckDC_QuittierungsCheck.cs" />
|
||||
<Compile Include="DCEntityMapper\TokenDC_Token.cs" />
|
||||
<Compile Include="DCEntityMapper\VertretungsListeDC_VertretungsListe.cs" />
|
||||
|
||||
@@ -359,5 +359,13 @@ namespace BeWo.Service.ServiceContracts
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
EmployeeDC GetEmployeebyFullName(string fullName);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
void CreateOrUpdateChatBewoMessageSync(long? eOid, string text);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
ChatBewoMessageSyncDC GetChatBewoMessageSync(long? eOid);
|
||||
}
|
||||
}
|
||||
@@ -524,7 +524,7 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid, string kundennummer, string apikey, long userOid);
|
||||
CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid, string kundennummer, string apikey);
|
||||
|
||||
[FaultContract(typeof (BeWoFault))]
|
||||
[OperationContract]
|
||||
@@ -544,7 +544,7 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid, string kundennummer, string apikey, long userOid);
|
||||
EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid, string kundennummer, string apikey);
|
||||
|
||||
[FaultContract(typeof (BeWoFault))]
|
||||
[OperationContract]
|
||||
@@ -698,15 +698,11 @@ namespace BeWo.Service.ServiceContracts
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
PdfChatHandoutDC GetHandOutPdfForChat(string customerId, string apikey);
|
||||
bool DeletEmloyeeChatCode(string apikey, string kundennummer, long employeeoid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
bool DeletEmloyeeChatCode(string apikey, string kundennummer, long userOid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
bool DeletCustomerChatCode(string apikey, string kundennummer, long userOid);
|
||||
bool DeletCustomerChatCode(string apikey, string kundennummer, long customeroid);
|
||||
|
||||
[FaultContract(typeof(BeWoFault))]
|
||||
[OperationContract]
|
||||
|
||||
@@ -1352,6 +1352,68 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateOrUpdateChatBewoMessageSync(long? eOid, string text)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var chatMessageSync = DAOFactory.SearchDAO.FindEmployeeChatBewoMessageSync(eOid.Value);
|
||||
|
||||
int count = chatMessageSync.Count();
|
||||
if(count > 0) {
|
||||
|
||||
foreach (var item in chatMessageSync)
|
||||
{
|
||||
item.MessageSyncText = text;
|
||||
}
|
||||
|
||||
DAOFactory.GenericDAO.Update(chatMessageSync);
|
||||
}
|
||||
else {
|
||||
ChatBewoMessageSyncDC cms = new ChatBewoMessageSyncDC();
|
||||
|
||||
cms.EmployeeOid = eOid;
|
||||
cms.MessageSyncText = text;
|
||||
|
||||
var x = MapperFactory.ChatBewoMessageSyncDC_ChatBewoMessageSync.MapToNewEntity(cms);
|
||||
DAOFactory.GenericDAO.Insert(x);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public ChatBewoMessageSyncDC GetChatBewoMessageSync(long? eOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var chatMessageSync = DAOFactory.GenericDAO.GetAllActive<ChatBewoMessageSync>();
|
||||
|
||||
ChatBewoMessageSync cms = null;
|
||||
foreach (var item in chatMessageSync)
|
||||
{
|
||||
if (eOid == item.EmployeeOid)
|
||||
{
|
||||
cms = item;
|
||||
}
|
||||
}
|
||||
|
||||
if (cms != null)
|
||||
{
|
||||
var x = MapperFactory.ChatBewoMessageSyncDC_ChatBewoMessageSync.MapToNewDC(cms);
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3164,14 +3164,14 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid,string kundennummer,string apikey ,long userOid)
|
||||
public EmployeeAPPCodeDC CreateNewEmployeeAPPCodeDC(long employeeOid,string kundennummer,string apikey)
|
||||
{
|
||||
try
|
||||
{
|
||||
DeletZufallsCode(apikey, kundennummer, "E" + userOid);
|
||||
DeletZufallsCode(apikey, kundennummer, "E" + employeeOid);
|
||||
EmployeeAPPCode newCode = new EmployeeAPPCode();
|
||||
|
||||
string zufallscode = ErzeugeZufallsCode(apikey, kundennummer, "E" + userOid);
|
||||
string zufallscode = ErzeugeZufallsCode(apikey, kundennummer, "E" + employeeOid);
|
||||
|
||||
if (zufallscode != null) {
|
||||
newCode.EmployeeCode = zufallscode;
|
||||
@@ -3253,7 +3253,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid,string kundennummer, string apikey, long userOid)
|
||||
public CustomerAPPCodeDC CreateNewCustomerAPPCodeDC(long customerOid,string kundennummer, string apikey)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -3262,12 +3262,12 @@ namespace BeWo.Service.ServiceImplementations
|
||||
apikey = "0b50c09aff87f20d9ced75340e04e5ccaa11dd3e7bcf25e9c4f94dc20d3cbb97";
|
||||
#endif
|
||||
//TODO Abfragen erweitern
|
||||
DeletZufallsCode(apikey, kundennummer, "C" + userOid);
|
||||
DeletZufallsCode(apikey, kundennummer, "C" + customerOid);
|
||||
|
||||
|
||||
|
||||
//abfangeritis starten
|
||||
string zufallscode = ErzeugeZufallsCode(apikey, kundennummer, "C" + userOid);
|
||||
string zufallscode = ErzeugeZufallsCode(apikey, kundennummer, "C" + customerOid);
|
||||
|
||||
if (zufallscode != null)
|
||||
{
|
||||
@@ -4545,8 +4545,6 @@ namespace BeWo.Service.ServiceImplementations
|
||||
return lResult.OrderBy(s => s.Description).ToList();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void CreateNewPerson2OrganisationRelation(long organi, ValueListEntryDC value, long personOid, string mail, string fax, string tele, string notice)
|
||||
{
|
||||
try
|
||||
@@ -4575,210 +4573,13 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public PdfChatHandoutDC GetHandOutPdfForChat(string customerId,string apikey)
|
||||
public bool DeletCustomerChatCode(string apikey,string kundennummer,long customeroid)
|
||||
{
|
||||
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;
|
||||
|
||||
|
||||
// Post Gedönse mit übergeben
|
||||
#region neuer nicht funktionsfähiger bereich
|
||||
|
||||
|
||||
#region TestBereich Multipart
|
||||
//Bereich zum Testen Multiform Test gedönse
|
||||
//using (MultipartFormDataContent multiPartContent = new MultipartFormDataContent())
|
||||
//{
|
||||
// Uri requestUri = new Uri(ChatDaten.ServerUrl + "/api/ownchat/createpdfmanual/");
|
||||
|
||||
// Links Content / Rechts name
|
||||
// multiPartContent.Add(new StringContent(chatcode + ""), "chatcode");
|
||||
// multiPartContent.Add(new StringContent(login + ""), "login");
|
||||
// multiPartContent.Add(new StringContent(password + ""), "password");
|
||||
// multiPartContent.Add(new StringContent("https://support.bewoplaner.de/bewoplaner_logo_big.png"), "custom_logo_url");
|
||||
|
||||
// httpRequest = new HttpRequestMessage();
|
||||
// httpRequest.Method = HttpMethod.Post;
|
||||
// httpRequest.RequestUri = requestUri;
|
||||
// httpRequest.Content = multiPartContent;
|
||||
|
||||
// httpRequest.Headers.Add("Token", apikey);
|
||||
// httpRequest.Headers.Add("CustomerID", customerId);
|
||||
|
||||
|
||||
// HttpResponseMessage httpResponse = null;
|
||||
|
||||
// HttpClient httpClient = new HttpClient();
|
||||
|
||||
// httpResponse = await httpClient.SendAsync(httpRequest, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
|
||||
// string antwortResponse = await httpResponse.Content.ReadAsStringAsync();
|
||||
|
||||
// var jsonDatentyp = JsonConvert.DeserializeObject<PdfChatHandoutDC>(antwortResponse);
|
||||
|
||||
// return jsonDatentyp;
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
#region TestBereich Normal Post
|
||||
//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
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
//############################
|
||||
Dictionary<string, string> postparameter = new Dictionary<string, string>();
|
||||
|
||||
postparameter.Add("username", "HAns");
|
||||
postparameter.Add("password", "Dito");
|
||||
|
||||
//neu | hinzufügen laut document
|
||||
postparameter.Add("chatcode", "yyAbrams");
|
||||
|
||||
string postdaten = "";
|
||||
int i = 0;
|
||||
foreach (var key in postparameter.Keys)
|
||||
{
|
||||
//hier noch chatcode übergeben
|
||||
postdaten += HttpUtility.UrlEncode(key) + "=" + HttpUtility.UrlEncode(postparameter[key]) + "&";
|
||||
|
||||
}
|
||||
|
||||
WebRequest requesten = WebRequest.Create(endurl);
|
||||
|
||||
requesten.Method = "POST";
|
||||
requesten.ContentType = "application/x-www-form-urlencoded";
|
||||
|
||||
byte[] daten = Encoding.ASCII.GetBytes(postdaten);
|
||||
|
||||
requesten.ContentLength = daten.Length;
|
||||
|
||||
try
|
||||
{
|
||||
Stream requestStream = requesten.GetRequestStream();
|
||||
|
||||
requestStream.Write(daten, 0, daten.Length);
|
||||
|
||||
requestStream.Close();
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("Es konnte keine Verbindung aufgebaut werden.", "Fehler", MessageBoxButton.OK);
|
||||
|
||||
}
|
||||
|
||||
//response bereich | Verarbeiten
|
||||
HttpWebResponse response = (HttpWebResponse)requesten.GetResponse();
|
||||
//response.ContentType = "application/pdf";
|
||||
|
||||
//######################################################################
|
||||
|
||||
//alt get bereich
|
||||
//WebRequest request = WebRequest.Create(endurl);
|
||||
|
||||
//request.Method = WebRequestMethods.Http.Post;
|
||||
|
||||
//request.Credentials = CredentialCache.DefaultCredentials;
|
||||
//request.Proxy = null;
|
||||
|
||||
//WebResponse response = request.GetResponse();
|
||||
|
||||
using (Stream stream = response.GetResponseStream())
|
||||
{
|
||||
byte[] buffer = new byte[stream.Length];
|
||||
stream.Read(buffer, 0, buffer.Length);
|
||||
File.WriteAllBytes("foo.pdf", buffer);
|
||||
}
|
||||
|
||||
string responseFromServer = ReadStreamForChatCode(response);
|
||||
|
||||
if (responseFromServer.Contains("PDF"))
|
||||
{
|
||||
PdfChatHandoutDC hd = new PdfChatHandoutDC();
|
||||
hd.File = responseFromServer;
|
||||
hd.Result = 0;
|
||||
//hd.TestStream = dataStream;
|
||||
|
||||
return hd;
|
||||
}
|
||||
else
|
||||
{
|
||||
var jsonDatentyp = JsonConvert.DeserializeObject<PdfChatHandoutDC>(responseFromServer);
|
||||
|
||||
return jsonDatentyp;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//throw Utils.CreateBeWoFaultException(e);
|
||||
var handout = new PdfChatHandoutDC();
|
||||
handout.Result = 60;
|
||||
handout.File = e.Message;
|
||||
|
||||
return handout;
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeletCustomerChatCode(string apikey,string kundennummer,long userOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
DeletZufallsCode(apikey, kundennummer, "C" + userOid);
|
||||
DeletZufallsCode(apikey, kundennummer, "C" + customeroid);
|
||||
|
||||
var customerappcode = DAOFactory.SearchDAO.FindAllCustomerAppCodes(userOid);
|
||||
var customerappcode = DAOFactory.SearchDAO.FindAllCustomerAppCodes(customeroid);
|
||||
|
||||
var anzahl = customerappcode.Count();
|
||||
|
||||
@@ -4806,13 +4607,13 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public bool DeletEmloyeeChatCode(string apikey, string kundennummer, long userOid)
|
||||
public bool DeletEmloyeeChatCode(string apikey, string kundennummer,long employeeoid)
|
||||
{
|
||||
try
|
||||
{
|
||||
DeletZufallsCode(apikey, kundennummer, "E" + userOid);
|
||||
DeletZufallsCode(apikey, kundennummer, "E" + employeeoid);
|
||||
|
||||
var employeeappcode = DAOFactory.SearchDAO.FindAllEmployeeAppCodes(userOid);
|
||||
var employeeappcode = DAOFactory.SearchDAO.FindAllEmployeeAppCodes(employeeoid);
|
||||
|
||||
var anzahl = employeeappcode.Count();
|
||||
|
||||
|
||||
@@ -128,8 +128,9 @@ namespace BS.Shared
|
||||
Vertretung = 121,
|
||||
Employee2Token = 122,
|
||||
QuittierungsCheck = 123,
|
||||
CustomerTeam = 124
|
||||
}
|
||||
CustomerTeam = 124,
|
||||
ChatBewoMessageSync = 125
|
||||
}
|
||||
|
||||
public enum SystemEntryID
|
||||
{
|
||||
|
||||
20
Shared/DataContracts/ChatBewoMessageSyncDC.cs
Normal file
20
Shared/DataContracts/ChatBewoMessageSyncDC.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace BS.Shared.DataContracts
|
||||
{
|
||||
[DataContract]
|
||||
public class ChatBewoMessageSyncDC : IDataContract
|
||||
{
|
||||
[DataMember]
|
||||
public long? ChatBewoMessageSyncOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public long? EmployeeOid { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string MessageSyncText { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -186,6 +186,7 @@
|
||||
<Compile Include="DataContracts\ArbeitszeitEintragDC.cs" />
|
||||
<Compile Include="DataContracts\CustomerTokenRelationDC.cs" />
|
||||
<Compile Include="DataContracts\EmployeeTokenRelationDC.cs" />
|
||||
<Compile Include="DataContracts\ChatBewoMessageSyncDC.cs" />
|
||||
<Compile Include="DataContracts\QuittierungsCheckDC.cs" />
|
||||
<Compile Include="DataContracts\VertretungsKlientAccountingsListeItemsDC.cs" />
|
||||
<Compile Include="DataContracts\QuittierungsCheckViewListItemsDC.cs" />
|
||||
|
||||
Reference in New Issue
Block a user