diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 3cbd04235..8f6217bac 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -38,16 +38,16 @@ false true false - http://FOBP01.fortis-ev.org.local/ + http://app.beyondsoft.de/intern/ de-DE BeWoPlaner beyondSoft GmbH - 2.0.1.103 + 2.0.1.113 true publish.htm false true - 104 + 114 2.0.1.%2a false true @@ -401,6 +401,14 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + MSBuild:Compile Designer @@ -759,6 +767,12 @@ ChatServiceEmployee.xaml + + ChatDokumentationsView.xaml + + + ChatEmojisView.xaml + MiniChatView.xaml @@ -2379,12 +2393,14 @@ - + + + diff --git a/BeWo/BeWo.csproj.user b/BeWo/BeWo.csproj.user index 793f7ebf9..0c15cac27 100644 --- a/BeWo/BeWo.csproj.user +++ b/BeWo/BeWo.csproj.user @@ -2,7 +2,7 @@ D:\Projects\beyondsoft\BeWoPlaner\Publish\|C:\Projects\beyondsoft\BeWoPlaner\Publish\|D:\Projects\BEYONDSOFT\BeWoPlaner\Publish\|C:\Projects\BEYONDSOFT\BeWoPlaner\Publish\|C:\Projects\BEYONDSOFT\BeWoPlaner\Publish4\ - http://FOBP01.fortis-ev.org.local/|http://10.0.116.4/|http://app.beyondsoft.de/|http://app.beyondsoft.de/test/|http://app.beyondsoft.de/deploy/ + http://app.beyondsoft.de/intern/|http://app.beyondsoft.de/deploy/|http://FOBP01.fortis-ev.org.local/|http://10.0.116.4/|http://app.beyondsoft.de/ diff --git a/BeWo/MainWindow.xaml.cs b/BeWo/MainWindow.xaml.cs index 7ea221032..590d61053 100644 --- a/BeWo/MainWindow.xaml.cs +++ b/BeWo/MainWindow.xaml.cs @@ -82,11 +82,11 @@ namespace BeWo try { - if (BeWoApp.MainControl.HomeView.clientSocket.Connected) - { + // if (BeWoApp.MainControl.HomeView.clientSocket.Connected) + // { BeWoApp.MainControl.HomeView.CloseServerConnection(); - } + // } } catch (Exception edf) { diff --git a/BeWo/View/ChatDokumentationsView.xaml b/BeWo/View/ChatDokumentationsView.xaml new file mode 100644 index 000000000..50e109198 --- /dev/null +++ b/BeWo/View/ChatDokumentationsView.xaml @@ -0,0 +1,14 @@ + + + + + + + diff --git a/BeWo/View/ChatDokumentationsView.xaml.cs b/BeWo/View/ChatDokumentationsView.xaml.cs new file mode 100644 index 000000000..5d82ae403 --- /dev/null +++ b/BeWo/View/ChatDokumentationsView.xaml.cs @@ -0,0 +1,216 @@ +using System; +using System.Linq; +using System.Windows; +using System.Windows.Input; +using System.Windows.Media; + +using BeWo.ServiceProxy; +using BeWo.ViewModel; + +using BS.Shared.Extensions; +using System.Windows.Controls; +using System.Net.Sockets; +using System.Threading; +using System.Windows.Threading; +using System.Collections; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.ComponentModel; +using System.IO; +using System.Text; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Media.Imaging; +using BeWo.Core.Service; +using BeWo.View.Detail; +using BeWo.ViewModel.ListViewModel; +using BS.Shared; +using BS.Shared.DataContracts; +using BS.Shared.DataContracts.Compact; +using DevExpress.Xpf.Core; +using DevExpress.XtraPrinting.Native; +using DevExpress.XtraPrinting.XamlExport; +using Microsoft.Office.Interop.Word; +using Color = System.Drawing.Color; + +namespace BeWo.View +{ + public partial class ChatDokumentationsView + { + protected List listarray; + protected long? loggedOnMitarbeiter; + + private ServiceRecordVM serviceRecord; + + public ChatDokumentationsView(List _listarray, long? _loggedOnMitarbeiter,long _customerPersonOid,CompactCustomerDC _compactCustomer) + { + InitializeComponent(); + + listarray = _listarray; + loggedOnMitarbeiter = _loggedOnMitarbeiter; + + + + long? customerOid = _customerPersonOid; + string message = ""; + + + listarray.Sort((a, b) => a.SendTime.CompareTo(b.SendTime)); //-> Sortiere nach datum / hätte auch ein order by geholfen? + + foreach (var ita in listarray) + { + message += ita.SendTime + " - "+ ita.Username + ": " + ita.UserMessage + "\n"; + } + var firstTime = listarray.Min(r => + { + var dt = DateTime.Parse(r.SendTime); + dt = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0); + return dt; + }); + var lastTime = listarray.Max(r => + { + var dt = DateTime.Parse(r.SendTime); + dt = new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0); + return dt; + }); + CompactCustomerDC customerCompact = _compactCustomer; + + Cache.GetInstance().GetActiveSupportConceptCostbearer(scList => + VMFactory.CreateServiceRecordVMAsync( + BeWoApp.LoggedOnUser.Employee.EmployeeOid, + vm => this.Dispatch( + delegate + { + ServiceRecordEditView newView = new ServiceRecordEditView(); + + vm.DispatcherObject = this; + + var dc = new ServiceRecordDC(); + dc.Start = firstTime; + dc.End = lastTime; + dc.Employee = BeWoApp.LoggedOnUser.Employee; + dc.Customer = customerCompact; + dc.SupportConcept = HoleHilfeplanAusListe(scList, customerCompact, firstTime, lastTime); + + if (vm.PrototypeVM.SortedCategories != null && vm.PrototypeVM.SortedCategories.Count > 0) + { + var cat1 = vm.PrototypeVM.SortedCategories[0]; + + dc.ServiceDescription = vm.PrototypeVM.Category2Services[cat1][0]; + } + serviceRecord = new ServiceRecordVM(dc, vm.PrototypeVM.Category2Services, vm.PrototypeVM.AllGoalCategories, vm.PrototypeVM.AllGoals); + serviceRecord.Notice = message; + + newView.InitView(vm, serviceRecord,false); + if (customerCompact != null) + { + newView.SetSearchText(customerCompact.LastName); + } + else + { + newView.SetSearchText(""); + } + + if (newView.CommandBindings.Count == 0) + { + newView.CommandBindings.Add( + new CommandBinding( + ApplicationCommands.Close, + (s, e) => + { + if (!newView.DoSaveCheck()) + { + return; + } + + Close(); + })); + newView.CommandBindings.Add( + new CommandBinding( + ApplicationCommands.Save, + (s, e) => + { + bool save = newView.IsValid(); + + if (!save) + { + return; + } + + newView.SaveData(); + Close(); + + })); + } + + + popup_contentChat.Child = newView; + + popup_contentChat.Visibility = Visibility.Visible; + + + + //newView.SetStartTimeEndTime(first, last); + //newView.SetLoggedOnEmployee(); + + }))); + + + + + + /* + //rootGroupBox.Header = nameinf; + + this.tcpClient = tcpClient; + + closeWindow(); + LoadallChatKontakts(); + ErstelleContextMenue(); + SetChatSetting();*/ + } + + private CompactSupportConceptDC HoleHilfeplanAusListe(List scList, CompactCustomerDC customerCompact, DateTime firstTime, DateTime lastTime) + { + foreach (var sc in scList) + { + if (sc.Customer.Oid == customerCompact.Oid) + { + if (sc.StartDate.HasValue && sc.EndDate.HasValue && sc.StartDate <= lastTime && + sc.EndDate >= firstTime) + { + return sc; + } + } + } + + return null; + } + + + + private void RootGroupBox_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + try + { + DragMove(); + } + catch (Exception) + { + } + } + + + private DateTime ConvertToDateTimeStart(string startTime) + { + + return DateTime.Parse(startTime); + } + + private DateTime ConvertToDateTimeEnd(string endTime) + { + return DateTime.Parse(endTime); + } + + } +} diff --git a/BeWo/View/ChatView.xaml b/BeWo/View/ChatView.xaml index 0f93e4b6b..daf559b6a 100644 --- a/BeWo/View/ChatView.xaml +++ b/BeWo/View/ChatView.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:view="clr-namespace:BeWo.View" - Title="Chat View" Height="800" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" + Title="Chat View" Height="800" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" Background="Transparent" ResizeMode="NoResize"> @@ -18,8 +18,17 @@ - + + + + + + + + + + - - + + + + +