From f56353dc62a9f1c1665bf99ad86c096afb87f641 Mon Sep 17 00:00:00 2001 From: Waldi Date: Tue, 8 Nov 2016 13:50:58 +0100 Subject: [PATCH] Viele Todos und Weitreichende aenderungen am Chat, die so Weitreichend sind, dass es jetz sinlos waere darueber zu schnacken --- BeWo/MainWindow.xaml.cs | 18 +- BeWo/ServiceProxy/Generated.cs | 123 +- BeWo/View/ChatProgressBarView.xaml | 14 + BeWo/View/ChatProgressBarView.xaml.cs | 21 + BeWo/View/ChatView.xaml | 83 +- BeWo/View/ChatView.xaml.cs | 1414 ++++++++++------- BeWo/View/Detail/OrganisationView.xaml | 13 +- BeWo/View/Detail/OrganisationView.xaml.cs | 1 + BeWo/View/Detail/SupportConceptView.xaml | 25 +- BeWo/View/Detail/SupportConceptView.xaml.cs | 110 +- BeWo/View/Detail/ValueListView.xaml | 64 +- BeWo/View/Detail/ValueListView.xaml.cs | 4 +- BeWo/View/HomeDragPanelView.xaml.cs | 14 +- BeWo/View/Master/AdministrationView.xaml.cs | 7 +- BeWo/ViewModel/ChatMessageVM.cs | 76 +- BeWo/ViewModel/OrganisationVM.cs | 51 +- ...pportConceptApprovalPeriodEmployeeRelVM.cs | 28 +- BeWo/ViewModel/VMFactory.cs | 8 +- Data/Entities/ChatMessage.cs | 60 +- Data/Entities/Organisation.cs | 20 + .../SupportConceptApprovalPeriod2Employee.cs | 15 + Data/Mappings/ChatMessage.hbm.xml | 7 +- Data/Mappings/Organisation.hbm.xml | 1 + ...portConceptApprovalPeriod2Employee.hbm.xml | 1 + Model/Changes_03_11_2016.txt | 12 + Model/Changes_04_11_2016.txt | 3 + Model/Changes_07_11_2016.txt | 3 + .../ChatMessageDC_ChatMessage.cs | 11 +- Service/DCEntityMapper/CustomerDC_Customer.cs | 2 +- .../OrganisationDC_Organisation.cs | 14 + ...C_SupportConceptApprovalPeriod2Employee.cs | 2 + Service/Service.csproj | 2 + Service/ServiceContracts/IEmployeeService.cs | 4 + .../ServiceContracts/IOperationsService.cs | 8 +- Service/ServiceContracts/IStreamingService.cs | 6 + .../CustomerServiceImp.cs | 3 +- .../EmployeeServiceImp.cs | 17 + .../OperationsServiceImp.cs | 44 +- .../StreamingServiceImp.cs | 50 +- Shared/BeWoEntityEnums.cs | 4 +- Shared/Core/EnumTranslations.cs | 10 +- Shared/DataContracts/ChatMessageDC.cs | 8 +- .../ClientPartials/CompactCustomerDC.cs | 2 +- .../ClientPartials/CompactSupportConceptDC.cs | 2 +- Shared/DataContracts/OrganisationDC.cs | 3 + ...pportConceptApprovalPeriodEmployeeRelDC.cs | 3 + 46 files changed, 1526 insertions(+), 865 deletions(-) create mode 100644 BeWo/View/ChatProgressBarView.xaml create mode 100644 BeWo/View/ChatProgressBarView.xaml.cs create mode 100644 Model/Changes_03_11_2016.txt create mode 100644 Model/Changes_04_11_2016.txt create mode 100644 Model/Changes_07_11_2016.txt diff --git a/BeWo/MainWindow.xaml.cs b/BeWo/MainWindow.xaml.cs index 590d61053..5ada5e2a2 100644 --- a/BeWo/MainWindow.xaml.cs +++ b/BeWo/MainWindow.xaml.cs @@ -1,5 +1,6 @@ using System; using System.ComponentModel; +using System.IO; using System.Net; using System.Windows; using System.Windows.Controls; @@ -82,11 +83,18 @@ namespace BeWo try { - // if (BeWoApp.MainControl.HomeView.clientSocket.Connected) - // { - BeWoApp.MainControl.HomeView.CloseServerConnection(); - - // } + BeWoApp.MainControl.HomeView.CloseServerConnection(); + + foreach (var xyz in BeWoApp.MainControl.HomeView.chatView.Speicherpfad) + { + try + { + File.Delete(xyz.Value); + } + catch (Exception esx) + { + } + } } catch (Exception edf) { diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs index 4c6cc3d5b..d86579ac6 100644 --- a/BeWo/ServiceProxy/Generated.cs +++ b/BeWo/ServiceProxy/Generated.cs @@ -493,6 +493,12 @@ namespace BeWo.ServiceProxy [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/GetEmployeeThumbnail", ReplyAction="http://tempuri.org/IEmployeeService/GetEmployeeThumbnailResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/GetEmployeeThumbnailBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] byte[] GetEmployeeThumbnail(long employeeOid); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEmployeeService/DeleteEmployeeCustomerRelationForEmployee", ReplyAction="http://tempuri.org/IEmployeeService/DeleteEmployeeCustomerRelationForEmployeeResp" + + "onse")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEmployeeService/DeleteEmployeeCustomerRelationForEmployeeBeWo" + + "FaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + void DeleteEmployeeCustomerRelationForEmployee(long employeeOid); } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] @@ -918,6 +924,11 @@ namespace BeWo.ServiceProxy { return base.Channel.GetEmployeeThumbnail(employeeOid); } + + public void DeleteEmployeeCustomerRelationForEmployee(long employeeOid) + { + base.Channel.DeleteEmployeeCustomerRelationForEmployee(employeeOid); + } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] @@ -2704,6 +2715,13 @@ namespace BeWo.ServiceProxy [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/UpdateDocument", ReplyAction="http://tempuri.org/IStreamingService/UpdateDocumentResponse")] [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/UpdateDocumentBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] BeWo.ServiceProxy.UploadResult UpdateDocument(BeWo.ServiceProxy.UpdatePackage request); + + // CODEGEN: Der Nachrichtenvertrag wird generiert, da der Wrappername (UploadChatPackage) von Nachricht "UploadChatPackage" nicht mit dem Standardwert (CreateNewSpeziallStreamChatMessagesDC) übereinstimmt. + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDC", ReplyAction="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCRespons" + + "e")] + [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IStreamingService/CreateNewSpeziallStreamChatMessagesDCBeWoFau" + + "ltFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] + BeWo.ServiceProxy.UploadChatResult CreateNewSpeziallStreamChatMessagesDC(BeWo.ServiceProxy.UploadChatPackage request); } [System.Diagnostics.DebuggerStepThroughAttribute()] @@ -2818,6 +2836,74 @@ namespace BeWo.ServiceProxy } } + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="UploadChatPackage", WrapperNamespace="http://tempuri.org/", IsWrapped=true)] + public partial class UploadChatPackage + { + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")] + public long empfängerOid; + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")] + public bool isDeliverd; + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")] + public int mediatype; + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")] + public string message; + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")] + public string messageid; + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")] + public long senderOid; + + [System.ServiceModel.MessageHeaderAttribute(Namespace="http://tempuri.org/")] + public long teamid; + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)] + public System.IO.Stream Stream; + + public UploadChatPackage() + { + } + + public UploadChatPackage(long empfängerOid, bool isDeliverd, int mediatype, string message, string messageid, long senderOid, long teamid, System.IO.Stream Stream) + { + this.empfängerOid = empfängerOid; + this.isDeliverd = isDeliverd; + this.mediatype = mediatype; + this.message = message; + this.messageid = messageid; + this.senderOid = senderOid; + this.teamid = teamid; + this.Stream = Stream; + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + [System.ServiceModel.MessageContractAttribute(WrapperName="UploadChatResult", WrapperNamespace="http://tempuri.org/", IsWrapped=true)] + public partial class UploadChatResult + { + + [System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)] + public BS.Shared.DataContracts.ChatMessageDC ChatMessage; + + public UploadChatResult() + { + } + + public UploadChatResult(BS.Shared.DataContracts.ChatMessageDC ChatMessage) + { + this.ChatMessage = ChatMessage; + } + } + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] public interface IStreamingServiceChannel : BeWo.ServiceProxy.IStreamingService, System.ServiceModel.IClientChannel { @@ -2912,6 +2998,27 @@ namespace BeWo.ServiceProxy BeWo.ServiceProxy.UploadResult retVal = ((BeWo.ServiceProxy.IStreamingService)(this)).UpdateDocument(inValue); return retVal.Attachment; } + + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)] + BeWo.ServiceProxy.UploadChatResult BeWo.ServiceProxy.IStreamingService.CreateNewSpeziallStreamChatMessagesDC(BeWo.ServiceProxy.UploadChatPackage request) + { + return base.Channel.CreateNewSpeziallStreamChatMessagesDC(request); + } + + public BS.Shared.DataContracts.ChatMessageDC CreateNewSpeziallStreamChatMessagesDC(long empfängerOid, bool isDeliverd, int mediatype, string message, string messageid, long senderOid, long teamid, System.IO.Stream Stream) + { + BeWo.ServiceProxy.UploadChatPackage inValue = new BeWo.ServiceProxy.UploadChatPackage(); + inValue.empfängerOid = empfängerOid; + inValue.isDeliverd = isDeliverd; + inValue.mediatype = mediatype; + inValue.message = message; + inValue.messageid = messageid; + inValue.senderOid = senderOid; + inValue.teamid = teamid; + inValue.Stream = Stream; + BeWo.ServiceProxy.UploadChatResult retVal = ((BeWo.ServiceProxy.IStreamingService)(this)).CreateNewSpeziallStreamChatMessagesDC(inValue); + return retVal.ChatMessage; + } } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] @@ -3811,12 +3918,7 @@ namespace BeWo.ServiceProxy [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")] - BS.Shared.DataContracts.ChatMessageDC CreateNewChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid); - - [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/CreateNewSpeziallChatMessagesDC", ReplyAction="http://tempuri.org/IOperationsService/CreateNewSpeziallChatMessagesDCResponse")] - [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/CreateNewSpeziallChatMessagesDCBeWoFaultFau" + - "lt", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")] - BS.Shared.DataContracts.ChatMessageDC CreateNewSpeziallChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid, byte[] sound, byte[] doku, byte[] bild); + BS.Shared.DataContracts.ChatMessageDC CreateNewChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid, string messageid); [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" + "")] @@ -4483,14 +4585,9 @@ namespace BeWo.ServiceProxy return base.Channel.CreateNewCustomerAPPCodeDC(customerOid); } - public BS.Shared.DataContracts.ChatMessageDC CreateNewChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid) + public BS.Shared.DataContracts.ChatMessageDC CreateNewChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid, string messageid) { - return base.Channel.CreateNewChatMessagesDC(senderOid, empfängerOid, message, isDeliverd, teamid); - } - - public BS.Shared.DataContracts.ChatMessageDC CreateNewSpeziallChatMessagesDC(long senderOid, long empfängerOid, string message, bool isDeliverd, long teamid, byte[] sound, byte[] doku, byte[] bild) - { - return base.Channel.CreateNewSpeziallChatMessagesDC(senderOid, empfängerOid, message, isDeliverd, teamid, sound, doku, bild); + return base.Channel.CreateNewChatMessagesDC(senderOid, empfängerOid, message, isDeliverd, teamid, messageid); } public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType) diff --git a/BeWo/View/ChatProgressBarView.xaml b/BeWo/View/ChatProgressBarView.xaml new file mode 100644 index 000000000..e93d8cb9e --- /dev/null +++ b/BeWo/View/ChatProgressBarView.xaml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/BeWo/View/ChatProgressBarView.xaml.cs b/BeWo/View/ChatProgressBarView.xaml.cs new file mode 100644 index 000000000..e3d5a0570 --- /dev/null +++ b/BeWo/View/ChatProgressBarView.xaml.cs @@ -0,0 +1,21 @@ +using System; +using System.ComponentModel; + + +namespace BeWo.View +{ + public partial class ChatProgressBarView + { + + ChatView chatView; + BackgroundWorker worker = null; + int ubergabe = 0; + + public ChatProgressBarView(String name) + { + InitializeComponent(); + + Title = name; + } + } +} diff --git a/BeWo/View/ChatView.xaml b/BeWo/View/ChatView.xaml index 1a846f5fb..a66158473 100644 --- a/BeWo/View/ChatView.xaml +++ b/BeWo/View/ChatView.xaml @@ -53,7 +53,7 @@ - +