diff --git a/.gitignore b/.gitignore
index 2aa02fc2a..a2b92df9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,7 +7,6 @@
/BeWoPlanerAndroid/obj
/BeWoPlanerMobil/bin
/BeWoPlanerMobil/obj
-/BeWoPlanerMobil/node_modules
/Host/bin
/Host/obj
/Controls/bin
@@ -416,4 +415,47 @@
/ReportImp/KuhringBetreuung/obj/Release
/ReportImp/LebenshilfeFrankfurtOder/obj/Debug
/ReportImp/LebenshilfeFrankfurtOder/obj/Release
-/BeWoPlanerMobil/delete_and_ignore_file.txt
+/ReportImp/AbwKlassen/bin/Debug
+/ReportImp/AbwKlassen/bin/Release
+/ReportImp/AbwKlassen/obj/Debug
+/ReportImp/AbwKlassen/obj/Release
+/ReportImp/DiakonischesWerkMuelheimTwg/bin/Debug
+/ReportImp/DiakonischesWerkMuelheimTwg/obj/Debug
+/ReportImp/DiakonischesWerkMuelheimTwg/obj/Release
+/ReportImp/Inkomm/obj/Debug
+/ReportImp/Inkomm/obj/Release
+/ReportImp/LebenshilfeDorsten/obj/Debug
+/ReportImp/LebenshilfeDorsten/obj/Release
+/ReportImp/QuerFaelltEin/obj/Debug
+/ReportImp/QuerFaelltEin/obj/Release
+/ReportImp/AsbRuhr/obj/Debug
+/ReportImp/AsbRuhr/obj/Release
+/ReportImp/DiePerspektive/obj/Debug
+/ReportImp/DiePerspektive/obj/Release
+/ReportImp/PhoenixBeWo/obj/Debug
+/ReportImp/PhoenixBeWo/obj/Release
+/ReportImp/EvangelischeKirchengemeindeBottrop/obj/Debug
+/ReportImp/EvangelischeKirchengemeindeBottrop/obj/Release
+/ReportImp/InputFamilienhilfe/obj/Debug
+/ReportImp/InputFamilienhilfe/obj/Release
+/ReportImp/LebenshilfeWolfsburg/obj/Debug
+/ReportImp/LebenshilfeWolfsburg/obj/Release
+/ReportImp/SichtWeise/obj/Debug
+/ReportImp/SichtWeise/obj/Release
+/packages
+/ReportImp/BfpDus/obj/Debug
+/ReportImp/BfpDus/obj/Release
+/ReportImp/DiakonischesWerkWesel/obj/Debug
+/ReportImp/DiakonischesWerkWesel/obj/Release
+/ReportImp/KcmGmbH/obj/Debug
+/ReportImp/KcmGmbH/obj/Release
+/ReportImp/LebenshilfeRodenkirchen2Reports/obj/Debug
+/ReportImp/LebenshilfeRodenkirchen2Reports/obj/Release
+/ReportImp/PraunheimerWerkstaetten3/obj/Debug
+/ReportImp/PraunheimerWerkstaetten3/obj/Release
+/ReportImp/PraunheimerWerkstaetten2/obj/Release
+/ReportImp/PraunheimerWerkstaetten2/obj/Debug
+/ReportImp/RosegGmbH/obj/Debug
+/ReportImp/RosegGmbH/obj/Release
+/ReportImp/VkmHamm2/obj/Debug
+/ReportImp/VkmHamm2/obj/Release
diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 91d05c396..4884438c6 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -19,7 +19,7 @@
false
- D9ACF3EBC5E47956B8D786361F7061E3F6D6F286
+ D7D02C6BE66C484058796E17BD368F3C81B4AA88
true
false
3.0.1927.0
@@ -39,16 +39,16 @@
false
true
false
- http://app.beyondsoft.de/dev/
+ http://app.beyondsoft.de/sbdtest/
de-DE
BeWoPlaner
beyondSoft GmbH
- 2.0.1.172
+ 2.0.1.184
true
publish.htm
false
true
- 173
+ 185
2.0.1.%2a
false
true
@@ -290,6 +290,18 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -306,6 +318,10 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -346,6 +362,14 @@
MSBuild:Compile
Designer
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -354,6 +378,10 @@
Designer
MSBuild:Compile
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
@@ -798,8 +826,14 @@
+
+
+
+
+
+
@@ -822,6 +856,8 @@
+
+
@@ -889,6 +925,15 @@
ValueListEntryEditControl.xaml
+
+ RatingTypeView.xaml
+
+
+ DienstView.xaml
+
+
+ GoalImportControl.xaml
+
NotizenKategorieView.xaml
@@ -898,6 +943,9 @@
AbsenceTimesView.xaml
+
+ Dienstplaner.xaml
+
AbwesenheitstabelleView.xaml
@@ -934,12 +982,21 @@
TimeSheetMailView.xaml
+
+ RatingEditView.xaml
+
+
+ SupportConceptGoalRatingView.xaml
+
HomeView.xaml
KilometerauslastungsView.xaml
+
+
+ RatingReportView.xaml
StundenplanView.xaml
@@ -2778,7 +2835,13 @@
-
+
+
+
+
+
+
+
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index e243629d1..cb7497b17 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -44,7 +44,7 @@ namespace BeWo
public static MainControl MainControl;
- public static string Version = "Version 2.4.6 TEST";
+ public static string Version = "Version 2.4.7 Test";
public static int RenderTier = 0;
@@ -500,16 +500,15 @@ namespace BeWo
{
int i;
- if (url.IndexOf("fortis") < 0)
- {
- if (Int32.TryParse(url, out i))
- url = "app" + url;
+
+ if (Int32.TryParse(url, out i))
+ url = "app" + url;
- if (url.IndexOf('.') < 0)
- {
- url += ".bewoplaner.de";
- }
+ if (url.IndexOf('.') < 0)
+ {
+ url += ".bewoplaner.de";
}
+
//if (url.IndexOf("/service45") < 0)
//{
// url += "/service45";
@@ -519,9 +518,7 @@ namespace BeWo
url += "/servicesbd";
}
- if (ServerAddress == "10.0.116.4") //LH Würzburg
- return new Uri(String.Format("http://{0}", url));
- return new Uri(String.Format("https://{0}", url));
+ return new Uri(String.Format("https://{0}", url));
}
return new Uri(url);
}
@@ -1007,8 +1004,7 @@ namespace BeWo
callback?.Invoke(chatServerURL);
}
}
-
- public static void Cleanup()
+ public static void Cleanup()
{
_lockedContent = null;
LoginControl = null;
diff --git a/BeWo/Converter/CellColorConverter.cs b/BeWo/Converter/CellColorConverter.cs
index 528c6e7bf..cc18937d4 100644
--- a/BeWo/Converter/CellColorConverter.cs
+++ b/BeWo/Converter/CellColorConverter.cs
@@ -5,7 +5,9 @@ using System.Linq;
using System.Windows.Data;
using System.Windows.Markup;
using System.Windows.Media;
+using BeWo.View.Detail;
using BeWo.ViewModel;
+using BS.Shared.DataContracts;
using DevExpress.Xpf.Grid;
namespace BeWo.Converter
@@ -23,9 +25,45 @@ namespace BeWo.Converter
var viewTag = cellData.View.Tag as List;
var date = int.Parse(value[1].ToString().Split('.')[0], NumberStyles.Integer);
+
+ if (viewTag != null && viewTag.Count > 0 && value.Length > 2 && value[2] is Teilnehmer)
+ {
+ var booking = viewTag[0];
+
+ if (date <= DateTime.DaysInMonth(booking.Date.Year, booking.Date.Month))
+ {
+
+ var dt = new DateTime(booking.Date.Year, booking.Date.Month, date);
+
+ if (dt.DayOfWeek == DayOfWeek.Saturday || dt.DayOfWeek == DayOfWeek.Sunday)
+ {
+ return Brushes.CornflowerBlue;
+ }
+
+ var t = (Teilnehmer) value[2];
+
+ if (IsAbsence(dt, t.Customer.AbsenceTimes))
+ {
+ return Brushes.Red;
+ }
+ }
+ }
return viewTag.Any(v => v.Date.Day.Equals(date)) ? Brushes.White : b;
}
+ private bool IsAbsence(DateTime dt, List absenceTimes)
+ {
+ foreach (var at in absenceTimes)
+ {
+ if ((!at.Start.HasValue || at.Start.Value <= dt) && (!at.End.HasValue || at.End.Value >= dt))
+ {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
public object[] ConvertBack(object value, Type[] targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); }
public override object ProvideValue(IServiceProvider serviceProvider) { return this; }
diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs
index 25194354e..3e770800a 100644
--- a/BeWo/Core/BeWoUtils.cs
+++ b/BeWo/Core/BeWoUtils.cs
@@ -2131,7 +2131,7 @@ namespace BeWo.Core
}
public static void OwnChatSynchronisationVeranlassen()
- {
+ {
if (!BeWoApp.Mandator.Apikey.IsNullOrEmpty())
{
try
@@ -2167,11 +2167,11 @@ namespace BeWo.Core
// response.Close();
// response.Dispose();
- //}
+
}
catch (Exception exception)
{
- // MessageBox.Show("Die Verbindung konnte nicht aufgebaut werden.", "ownChat Fehler ", MessageBoxButton.OK);
+ // MessageBox.Show("Die Verbindung konnte nicht aufgebaut werden.", "ownChat Fehler ", MessageBoxButton.OK);
}
}
diff --git a/BeWo/Core/Service/Cache.cs b/BeWo/Core/Service/Cache.cs
index 284c9b738..1e7184a8c 100644
--- a/BeWo/Core/Service/Cache.cs
+++ b/BeWo/Core/Service/Cache.cs
@@ -38,7 +38,9 @@ namespace BeWo.Core.Service
private List mTeamMembers;
- private Dictionary> mCats2ResInDic;
+ private List mRatingTypes;
+
+ private Dictionary> mCats2ResInDic;
private Cache()
{
@@ -63,6 +65,7 @@ namespace BeWo.Core.Service
this.ClearCustomers();
this.ClearWohnheims();
ClearResources();
+ ClearRatingTypes();
}
public void ClearAllValueListEntries()
@@ -115,7 +118,12 @@ namespace BeWo.Core.Service
mCats2ResInDic = null;
}
- public void GetActiveSupportConceptCostbearer(Action> callback)
+ public void ClearRatingTypes()
+ {
+ mRatingTypes = null;
+ }
+
+ public void GetActiveSupportConceptCostbearer(Action> callback)
{
if (this.mActiveSupportConceptCostbearerList == null)
{
@@ -247,6 +255,16 @@ namespace BeWo.Core.Service
}
}
+ public List GetAllRatingTypeList()
+ {
+ if(mRatingTypes == null)
+ {
+ ServiceFacade.DoOperationsServiceSync(cs => mRatingTypes = cs.GetAllRatingTypes());
+ }
+
+ return mRatingTypes;
+ }
+
public void GetServiceCategoryDescriptionDict(Action>> callback)
{
if (this.mServiceCategoryDescriptionDict == null)
diff --git a/BeWo/Core/Service/GoalService.cs b/BeWo/Core/Service/GoalService.cs
index e5d67061d..93380853a 100644
--- a/BeWo/Core/Service/GoalService.cs
+++ b/BeWo/Core/Service/GoalService.cs
@@ -302,7 +302,7 @@ namespace BeWo.Core.Service
{
ValueListEntryDC copyVe = new ValueListEntryDC();
copyVe.Abbreviation = ve.Abbreviation;
- copyVe.Rating = copyRating ? ve.Rating : null;
+ copyVe.RatingTypeOid = copyRating ? ve.RatingTypeOid : null;
copyVe.Notice = ve.Notice;
copyVe.IsSystemEntry = ve.IsSystemEntry;
copyVe.ParentOid = ve.ParentOid;
diff --git a/BeWo/Core/Service/SupportConceptService.cs b/BeWo/Core/Service/SupportConceptService.cs
index 489ebe8da..2dfff3c29 100644
--- a/BeWo/Core/Service/SupportConceptService.cs
+++ b/BeWo/Core/Service/SupportConceptService.cs
@@ -91,7 +91,16 @@ namespace BeWo.Core.Service
if (existingGoal.Equals(goal.GoalEntryDC))
{
goal.IsChecked = true;
- goal.GoalEntryDC.Rating = existingGoal.Rating;
+ goal.GoalEntryDC.RatingTypeOid = existingGoal.RatingTypeOid;
+ if (existingGoal.RatingTypeOid.HasValue)
+ {
+ var rdc = Cache.GetInstance().GetAllRatingTypeList()
+ .FirstOrDefault(r => r.RatingTypeOid == existingGoal.RatingTypeOid);
+ if (rdc != null)
+ {
+ goal.RatingName = rdc.DisplayName;
+ }
+ }
}
}
diff --git a/BeWo/Core/SupportConceptGoalTreeItem.cs b/BeWo/Core/SupportConceptGoalTreeItem.cs
index 9bd2ddb80..d42f70d27 100644
--- a/BeWo/Core/SupportConceptGoalTreeItem.cs
+++ b/BeWo/Core/SupportConceptGoalTreeItem.cs
@@ -36,6 +36,8 @@ namespace BeWo.Core
}
}
+ public bool IsHidden { get; set; }
+
public BindingList Items
{
get => _Children ?? (_Children = new BindingList());
diff --git a/BeWo/CustomDXLocalizer.cs b/BeWo/CustomDXLocalizer.cs
index f81dd21d1..3fdf8cd84 100644
--- a/BeWo/CustomDXLocalizer.cs
+++ b/BeWo/CustomDXLocalizer.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using DevExpress.Xpf.Editors;
+using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Scheduler;
namespace BeWo
@@ -17,6 +18,22 @@ namespace BeWo
}
}
+ //class CustomGridLocalizer : GridControlLocalizer
+ //{
+ // protected override void PopulateStringTable()
+ // {
+ // base.PopulateStringTable();
+
+ // for (int i = 0; i < 10000; i++)
+ // {
+ // var enumInt = (GridControlStringId)i;
+ // AddString(enumInt, enumInt.ToString());
+ // }
+ // ;
+ // }
+ //}
+
+
//class CustomSchedulerResXLocalizer : SchedulerControlResXLocalizer
//{
// public override string GetLocalizedString(SchedulerControlStringId id)
@@ -28,7 +45,7 @@ namespace BeWo
// {
// base.PopulateStringTable();
-
+
// }
//}
diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs
index df7469ecd..c051e8d02 100644
--- a/BeWo/LoginControl.xaml.cs
+++ b/BeWo/LoginControl.xaml.cs
@@ -181,37 +181,7 @@ namespace BeWo
{
}
-
-
- if (ProfileList.Count == 0 || String.IsNullOrEmpty(ProfileList[0].Tenant))
- {
- //LH Würzburg Hack:
- if (ApplicationDeployment.IsNetworkDeployed)
- {
- Uri uri = ApplicationDeployment.CurrentDeployment.ActivationUri;
- if (uri == null)
- {
- uri = ApplicationDeployment.CurrentDeployment.UpdateLocation;
- }
- if (uri != null)
- {
- if (uri.Host.IndexOf("10.0.116.4") >= 0 || uri.Host.IndexOf("lebenshilfe-wuerzburg") >= 0)
- {
- BeWoProfile bp = new BeWoProfile("Lebenshilfe Würzburg", "10.0.116.4", "1");
- ProfileList.Add(bp);
- SaveProfileListToFile();
- }
- else if (uri.Host.IndexOf("fortis") >= 0)
- {
- BeWoProfile bp = new BeWoProfile("Fortis", "fortis-bewoplaner.fortis-ev.org.local", "4526293996");
- ProfileList.Add(bp);
- SaveProfileListToFile();
- }
- }
- }
-
- }
-
+
// IP-Adresse holen
try
@@ -288,16 +258,17 @@ namespace BeWo
Loaded += LoginControl_Loaded;
+ ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
+
+ PinCertificate();
+
+
if (!IsTechSupport)
return;
linkLine.Margin = new Thickness(linkLine.Margin.Left, linkLine.Margin.Top + 25, linkLine.Margin.Right, linkLine.Margin.Bottom);
gridLogin.Height += 25;
-
-
- ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
-
- PinCertificate();
+
}
@@ -350,8 +321,49 @@ namespace BeWo
private bool CheckStatusMessage(BeWoProfile profile, String url)
{
#if DEBUG
+
+ //String message = @"Sehr geehrte Kundin, sehr geehrter Kunde,
+
+ // Ihr BeWoPlaner Nutzungszeitraum endet automatisch am 31.01.2020.
+ // Bitte wenden Sie sich an den BeWoPlaner - Support, sofern Sie den Nutzungszeitraum verlängern möchten.
+
+ // Vielen Dank.
+ // Ihr BeWoPlaner-Team;1";
+
+ //if (!String.IsNullOrWhiteSpace(message) && message.Trim().Length > 2)
+ //{
+ // String ende = message.Substring(message.Length - 2);
+
+ // message = message.Replace("\\n", "\n");
+ // message = message.Substring(0, message.Length - 2);
+ // MessageDialog dlg = new MessageDialog();
+
+ // if (message.Contains("<") && message.Contains(">"))
+ // {
+ // dlg.SetXaml(message);
+ // }
+ // else
+ // {
+ // dlg.Message = message;
+ // }
+
+
+ // var test = this.GetRootParent() as Window;
+ // if (test != null)
+ // {
+ // dlg.Owner = test;
+ // dlg.WindowStartupLocation = WindowStartupLocation.CenterOwner;
+ // }
+
+ // var result = dlg.ShowDialog();
+ // if (ende.EndsWith(";0"))
+ // {
+ // return false;
+ // }
+
+ //}
return true;
-#endif
+#else
try
{
using (WebClient client = new WebClient())
@@ -404,6 +416,7 @@ namespace BeWo
}
return true;
+#endif
}
private BeWoProfile ReadSelectedProfile()
@@ -987,8 +1000,13 @@ namespace BeWo
private void LoginResult( WaitLayer2 lWaitLayer, UserValidationResult result, String lUserName, String lPassword, String lPIN = "")
{
+ //
+ // GetState hierhin
+ //
+ //
if (result == UserValidationResult.UserValid)
{
+
//this.Dispatch(delegate
//{
// if (BeWoApp.Tenant == "demo")
diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs
index c412fbf98..1d57ba61c 100644
--- a/BeWo/MainControl.xaml.cs
+++ b/BeWo/MainControl.xaml.cs
@@ -29,6 +29,7 @@ using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
using DevExpress.Xpf.Editors;
+using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Scheduler;
using Hyperlink = System.Windows.Documents.Hyperlink;
@@ -76,8 +77,10 @@ namespace BeWo
KeyDown += MainControl_KeyDown;
NavigateToHomeView();
- EditorLocalizer.Active = new CustomDXEditorLocalizer();
- SchedulerControlLocalizer.Active = new CustomSchedulerLocalizer();
+ //EditorLocalizer.Active = new CustomDXEditorLocalizer();
+ //SchedulerControlLocalizer.Active = new CustomSchedulerLocalizer();
+ //GridControlLocalizer.Active = new CustomGridLocalizer();
+
OpenedModalViewWindows = new List();
diff --git a/BeWo/MainWindow.xaml.cs b/BeWo/MainWindow.xaml.cs
index 3ad24e1a3..a00fa39bf 100644
--- a/BeWo/MainWindow.xaml.cs
+++ b/BeWo/MainWindow.xaml.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
+using System.Threading;
using System.Windows;
using BeWo.Core.Config;
using BeWo.MultiLanguage;
@@ -18,7 +19,6 @@ namespace BeWo
InitializeComponent();
ApplicationThemeHelper.ApplicationThemeName = "Office2010Black";
-
ShowLoginControl();
}
diff --git a/BeWo/Ressources/Icons/Favorites16.png b/BeWo/Ressources/Icons/Favorites16.png
new file mode 100644
index 000000000..459af3f89
Binary files /dev/null and b/BeWo/Ressources/Icons/Favorites16.png differ
diff --git a/BeWo/Ressources/Icons/Favorites32.png b/BeWo/Ressources/Icons/Favorites32.png
new file mode 100644
index 000000000..f169f537b
Binary files /dev/null and b/BeWo/Ressources/Icons/Favorites32.png differ
diff --git a/BeWo/Ressources/Icons/FavoritesDisabled32.png b/BeWo/Ressources/Icons/FavoritesDisabled32.png
new file mode 100644
index 000000000..3ba8055e7
Binary files /dev/null and b/BeWo/Ressources/Icons/FavoritesDisabled32.png differ
diff --git a/BeWo/SchulbegleitenderDienst/SBDUtils/SBDUtils.cs b/BeWo/SchulbegleitenderDienst/SBDUtils/SBDUtils.cs
index eabe2b61a..0c640759d 100644
--- a/BeWo/SchulbegleitenderDienst/SBDUtils/SBDUtils.cs
+++ b/BeWo/SchulbegleitenderDienst/SBDUtils/SBDUtils.cs
@@ -20,7 +20,11 @@ namespace BeWo.SchulbegleitenderDienst.SBDUtils
{
var substitutionStartingDayCountCondition = SubstitutionStartingDayCountCondition(viewModel);
- if (substitutionStartingDayCountCondition || viewModel.Vertretung?.VertretenderMitarbeiterOid != null || viewModel.Customer != null && viewModel.Customer.SubstitutionNeed == SubstitutionNeed.NoSubstitutionWanted)
+ if (viewModel.VertretungsStatus == VertretungsStatus.KlientUndMitarbeiterKrank || viewModel.VertretungsStatus == VertretungsStatus.MaKrankKeineVertretungBenoetigt)
+ {
+ unwantedSubstitutionList.AddIfNotIn(viewModel);
+ }
+ else if (substitutionStartingDayCountCondition || viewModel.Vertretung?.VertretenderMitarbeiterOid != null || viewModel.Customer != null && viewModel.Customer.SubstitutionNeed == SubstitutionNeed.NoSubstitutionWanted)
{
unwantedSubstitutionList.AddIfNotIn(viewModel);
}
diff --git a/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml b/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml
index 56ee9bb64..40c1d4dea 100644
--- a/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml
+++ b/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml
@@ -211,7 +211,7 @@
-
+
diff --git a/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml.cs b/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml.cs
index 1dc878a45..4086c4cf8 100644
--- a/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml.cs
+++ b/BeWo/SchulbegleitenderDienst/VertretungsMainViewV2.xaml.cs
@@ -621,6 +621,15 @@ namespace BeWo.SchulbegleitenderDienst
var barButtonItem2 = new BarButtonItem {Content = "Steckbrief anzeigen"};
barButtonItem2.ItemClick += ShowCharacteristics;
e.Customizations.Add(barButtonItem2);
+
+ var selectedViewModel = (TagesansichtVM)GridDataControlTagesansichtMitarbeiter.SelectedItem;
+
+ if (selectedViewModel != null && selectedViewModel.Vertretung != null)
+ {
+ var barButtonItem3 = new BarButtonItem {Content = "Vertretung löschen", Tag = e.Source.DataControl.SelectedItem };
+ barButtonItem3.ItemClick += DeleteVertretung_OnClick;
+ e.Customizations.Add(barButtonItem3);
+ }
}
private void ShowCharacteristics(object sender, RoutedEventArgs e)
@@ -679,6 +688,18 @@ namespace BeWo.SchulbegleitenderDienst
}
}
+ //private void DeleteVertretung_OnClick(object sender, RoutedEventArgs e)
+ //{
+ // if (MessageBox.Show("Möchten Sie die Vertretung wirklich löschen?", "Abwesenheit löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+ // {
+ // var selectedViewModel = (TagesansichtVM)GridDataControlTagesansichtMitarbeiter.SelectedItem;
+
+ // _Tagesvertretung.DeleteVertretung(selectedViewModel);
+
+ // LadeTagesansicht(Datepicker.DateTime.Date);
+ // }
+ //}
+
private void DeleteKlientKrankmeldung_OnClick(object sender, RoutedEventArgs e)
{
if (MessageBox.Show("Möchten Sie die Abwesenheit wirklich löschen?", "Abwesenheit löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
@@ -693,6 +714,9 @@ namespace BeWo.SchulbegleitenderDienst
private static bool? ShowDeletionMessageBox(AbsenceTimeDC absenceTime)
{
+ // erstmal nur ganze Abwesenheit
+ return true;
+
if(absenceTime.Start != null && absenceTime.End != null && absenceTime.Start.Value.Date == absenceTime.End.Value.Date)
{
return true;
@@ -1033,8 +1057,16 @@ namespace BeWo.SchulbegleitenderDienst
{
var barButtonItem = new BarButtonItem {Content = "Abwesenheit löschen", Tag = e.Source.DataControl.SelectedItem};
barButtonItem.ItemClick += DeleteCustomerAbsenceTime_OnClick;
-
e.Customizations.Add(barButtonItem);
+
+ var selectedTagesansichtVM = (TagesansichtVM)barButtonItem.Tag;
+ if (selectedTagesansichtVM != null && selectedTagesansichtVM.Vertreter != null)
+ {
+ var barButtonItem2 = new BarButtonItem { Content = "Vertretung löschen", Tag = e.Source.DataControl.SelectedItem };
+ barButtonItem2.ItemClick += DeleteVertretung_OnClick;
+ e.Customizations.Add(barButtonItem2);
+ }
+
}
private void DeleteCustomerAbsenceTime_OnClick(object sender, RoutedEventArgs e)
@@ -1049,7 +1081,20 @@ namespace BeWo.SchulbegleitenderDienst
LadeTagesansicht(Datepicker.DateTime);
}
}
-
+
+ private void DeleteVertretung_OnClick(object sender, RoutedEventArgs e)
+ {
+ var barButtonItem = (BarButtonItem)sender;
+ var selectedTagesansichtVM = (TagesansichtVM)barButtonItem.Tag;
+
+ if (MessageBox.Show("Möchten Sie die Vertretung wirklich löschen?", "Abwesenheit löschen", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
+ {
+ _Tagesvertretung.DeleteVertretung(selectedTagesansichtVM);
+
+ LadeTagesansicht(Datepicker.DateTime);
+ }
+ }
+
private void GridControlSubUnwanted_OnCellValueChanged(object sender, CellValueChangedEventArgs e)
{
_Tagesvertretung.UpdateRowData((TagesansichtVM) SubstitutionUnwantedDayViewGridControl.SelectedItem);
diff --git a/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml b/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml
index 3c6778905..2ef6a820d 100644
--- a/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml
+++ b/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml
@@ -44,34 +44,35 @@
+
-
-
-
-
-
+
+
+
-
-
-
-
+
+
+
+
+
-
-
+
+
+
-
-
+
+
@@ -131,7 +132,7 @@
-
+
diff --git a/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml.cs b/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml.cs
index ce6cfcc08..664d4faaa 100644
--- a/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml.cs
+++ b/BeWo/SchulbegleitenderDienst/VertretungsSearchView.xaml.cs
@@ -182,33 +182,45 @@ namespace BeWo.SchulbegleitenderDienst
private void RootGroupBox_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
- DragMove();
+ try
+ {
+ DragMove();
+ }
+ catch (Exception exception)
+ {
+ //ignore
+ }
+
}
private void SetCustomerInfos()
{
lblCustomerName.Content = string.Empty;
- lblCustomerStreet.Content = string.Empty;
- lblCustomerCity.Content = string.Empty;
-
lblSchoolName.Content = string.Empty;
- lblSchoolStreet.Content = string.Empty;
- lblSchoolCity.Content = string.Empty;
-
+ lblBetreuungszeiten.Content = string.Empty;
+
if (_Tagesansicht.Customer != null)
- {
- lblCustomerName.Content = _Tagesansicht.Customer.Name;
- lblCustomerStreet.Content = _Tagesansicht.Customer.Street;
- lblCustomerCity.Content = $"{_Tagesansicht.Customer.PostalCode} {_Tagesansicht.Customer.Town}";
+ {
+ lblCustomerName.Content = String.Format("{0}\n{1}\n{2} {3}", _Tagesansicht.Customer.Name,
+ _Tagesansicht.Customer.Street, _Tagesansicht.Customer.PostalCode, _Tagesansicht.Customer.Town);
}
- if (_Tagesansicht.Schule != null)
+ if (_Tagesansicht.Schools != null && _Tagesansicht.Schools.Count > 0)
{
- lblSchoolName.Content = _Tagesansicht.Schule.Name;
- lblSchoolStreet.Content = _Tagesansicht.Schule.Street;
- lblSchoolCity.Content = $"{_Tagesansicht.Schule.PostalCode} {_Tagesansicht.Schule.Town}";
+ var c2o = _Tagesansicht.Schools[0];
+ var schule = c2o.Organisation;
+
+ lblSchoolName.Content = String.Format("{0}\n{1}\n{2} {3}", schule.Name, schule.Street, schule.PostalCode, schule.Town);
+ // _Tagesansicht.Schule.Street, _Tagesansicht.Schule.PostalCode, _Tagesansicht.Schule.Town);
}
- }
+
+ if (_Tagesansicht.AssistanceTimeEntry != null)
+ {
+ lblBetreuungszeiten.Content = _Tagesansicht.AssistanceTimeEntry.ToString();
+ }
+
+ //"Montag 09:00 - 12:00\nDienstag 10:00 - 11:00\nMittwoch 08:00 - 12:00\nDonnerstag 08:00 - 12:00\nFreitag 08:00 - 12:00";
+ }
private void SetzeLetzteVertreter()
{
@@ -269,7 +281,12 @@ namespace BeWo.SchulbegleitenderDienst
{
if (eintrag != null && (int)_Tagesansicht.Datum.DayOfWeek == (int)eintrag.Tag + 1)
{
- arbeitszeitEintrag = eintrag.UhrzeitVon + " - " + eintrag.UhrzeitBis;
+ if (arbeitszeitEintrag.Length > 0)
+ {
+ arbeitszeitEintrag += ", ";
+ }
+
+ arbeitszeitEintrag += eintrag.UhrzeitVon + " - " + eintrag.UhrzeitBis;
}
}
}
diff --git a/BeWo/ServiceProxy/Generated.cs b/BeWo/ServiceProxy/Generated.cs
index c92b552d6..113eb147e 100644
--- a/BeWo/ServiceProxy/Generated.cs
+++ b/BeWo/ServiceProxy/Generated.cs
@@ -1412,6 +1412,11 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.SettingsDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.UserGroupDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.RatingDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.GoalRatingDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.RatingTypeDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ServiceAccountingDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
@@ -1517,6 +1522,9 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTemplateDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ReportTypes))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstDC))]
+ [System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldkassenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List))]
@@ -4732,6 +4740,42 @@ namespace BeWo.ServiceProxy
"FaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List GetSupportConceptCostBearerRelDCsByOids(System.Collections.Generic.List supportConcept2CostbearerOids);
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllDienste", ReplyAction="http://tempuri.org/IOperationsService/GetAllDiensteResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllDiensteBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Collections.Generic.List GetAllDienste();
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewDienst", ReplyAction="http://tempuri.org/IOperationsService/InsertNewDienstResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void InsertNewDienst(System.Collections.Generic.List dienst);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateDienst", ReplyAction="http://tempuri.org/IOperationsService/DeactivateDienstResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void DeactivateDienst(System.Collections.Generic.Dictionary pOid2Version);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateDienst", ReplyAction="http://tempuri.org/IOperationsService/UpdateDienstResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateDienstBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void UpdateDienst(System.Collections.Generic.List dienste);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetAllRatingTypes", ReplyAction="http://tempuri.org/IOperationsService/GetAllRatingTypesResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetAllRatingTypesBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Collections.Generic.List GetAllRatingTypes();
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertNewRatingType", ReplyAction="http://tempuri.org/IOperationsService/InsertNewRatingTypeResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewRatingTypeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void InsertNewRatingType(System.Collections.Generic.List ratingTypes);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeactivateRatingType", ReplyAction="http://tempuri.org/IOperationsService/DeactivateRatingTypeResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeactivateRatingTypeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void DeactivateRatingType(System.Collections.Generic.Dictionary pOid2Version);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateRatingType", ReplyAction="http://tempuri.org/IOperationsService/UpdateRatingTypeResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateRatingTypeBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void UpdateRatingType(System.Collections.Generic.List ratingTypes);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/FetchServiceRecordRatings", ReplyAction="http://tempuri.org/IOperationsService/FetchServiceRecordRatingsResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/FetchServiceRecordRatingsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ System.Collections.Generic.List FetchServiceRecordRatings(System.Nullable supportConceptOid, System.Nullable costBearer2SupportConceptOid, System.Nullable supportConceptApprovalPeriodOid, System.Nullable serviceCategoryOid, System.Nullable start, System.Nullable end);
+
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
"")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCBeWoFaul" +
@@ -5707,6 +5751,51 @@ namespace BeWo.ServiceProxy
return base.Channel.GetSupportConceptCostBearerRelDCsByOids(supportConcept2CostbearerOids);
}
+ public System.Collections.Generic.List GetAllDienste()
+ {
+ return base.Channel.GetAllDienste();
+ }
+
+ public void InsertNewDienst(System.Collections.Generic.List dienst)
+ {
+ base.Channel.InsertNewDienst(dienst);
+ }
+
+ public void DeactivateDienst(System.Collections.Generic.Dictionary pOid2Version)
+ {
+ base.Channel.DeactivateDienst(pOid2Version);
+ }
+
+ public void UpdateDienst(System.Collections.Generic.List dienste)
+ {
+ base.Channel.UpdateDienst(dienste);
+ }
+
+ public System.Collections.Generic.List GetAllRatingTypes()
+ {
+ return base.Channel.GetAllRatingTypes();
+ }
+
+ public void InsertNewRatingType(System.Collections.Generic.List ratingTypes)
+ {
+ base.Channel.InsertNewRatingType(ratingTypes);
+ }
+
+ public void DeactivateRatingType(System.Collections.Generic.Dictionary pOid2Version)
+ {
+ base.Channel.DeactivateRatingType(pOid2Version);
+ }
+
+ public void UpdateRatingType(System.Collections.Generic.List ratingTypes)
+ {
+ base.Channel.UpdateRatingType(ratingTypes);
+ }
+
+ public System.Collections.Generic.List FetchServiceRecordRatings(System.Nullable supportConceptOid, System.Nullable costBearer2SupportConceptOid, System.Nullable supportConceptApprovalPeriodOid, System.Nullable serviceCategoryOid, System.Nullable start, System.Nullable end)
+ {
+ return base.Channel.FetchServiceRecordRatings(supportConceptOid, costBearer2SupportConceptOid, supportConceptApprovalPeriodOid, serviceCategoryOid, start, end);
+ }
+
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
{
base.Channel.UpdateIsChatActiveCustomerAPPCodeDC(customerOid, activeType);
diff --git a/BeWo/Styles/OrangeBlack.xaml b/BeWo/Styles/OrangeBlack.xaml
index 66b418d67..eac7b76d1 100644
--- a/BeWo/Styles/OrangeBlack.xaml
+++ b/BeWo/Styles/OrangeBlack.xaml
@@ -2790,6 +2790,8 @@
+
+
@@ -2802,7 +2804,9 @@
-
+
+
+
@@ -2814,7 +2818,7 @@
Anonymisieren
-
+
@@ -2826,7 +2830,7 @@
Endgültig löschen
-
+
@@ -2838,7 +2842,7 @@
Reaktivieren
-
+
Drucken
@@ -2850,9 +2854,13 @@
+
+
+
+
@@ -3180,10 +3188,7 @@
-
diff --git a/BeWo/View/BeWoWindow.xaml.cs b/BeWo/View/BeWoWindow.xaml.cs
index 6fe27f70c..2c2afec03 100644
--- a/BeWo/View/BeWoWindow.xaml.cs
+++ b/BeWo/View/BeWoWindow.xaml.cs
@@ -53,7 +53,11 @@ namespace BeWo.View
{
try
{
- DragMove();
+ var p = e.GetPosition(this);
+ if (p.Y <= 40)
+ {
+ DragMove();
+ }
}
catch (Exception){}
}
diff --git a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml
index 1b0fb9eae..e6a0e38b0 100644
--- a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml
+++ b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml
@@ -150,15 +150,9 @@
-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs
index 81fdfc6ca..aa1cb794d 100644
--- a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs
+++ b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml.cs
@@ -5,7 +5,7 @@ using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
-
+using BeWo.Core.Service;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.ClientPartials;
@@ -40,6 +40,26 @@ namespace BeWo.View.Controls
{
InitializeComponent();
DataContext = this;
+ InitRatings();
+ }
+
+ private void InitRatings()
+ {
+ ratingPanel.Children.Clear();
+ var ratingList = Cache.GetInstance().GetAllRatingTypeList();
+ foreach (var r in ratingList)
+ {
+ //
+
+ var rb = new RadioButton();
+ rb.Margin = new Thickness(3);
+ rb.FontSize = 12;
+ rb.Click += RatingButton_OnClick;
+ rb.Tag = r;
+ rb.Content = r.DisplayName;
+
+ ratingPanel.Children.Add(rb);
+ }
}
private void ShowCheckedValues()
@@ -187,33 +207,24 @@ namespace BeWo.View.Controls
RatingPopup.IsOpen = visible;
RadioButtonNone.IsChecked = true;
- if (lastCheckedSupportConceptGoal.GoalEntryDC.Rating != null)
+ if (lastCheckedSupportConceptGoal.GoalEntryDC.RatingTypeOid.HasValue)
{
- switch (lastCheckedSupportConceptGoal.GoalEntryDC.Rating.Value)
+ foreach (var c in ratingPanel.Children)
{
- case 0:
- RadioButton0.IsChecked = true;
- break;
- case 1:
- RadioButton1.IsChecked = true;
- break;
- case 2:
- RadioButton2.IsChecked = true;
- break;
- case 3:
- RadioButton3.IsChecked = true;
- break;
- case 4:
- RadioButton4.IsChecked = true;
- break;
- case 8:
- RadioButton8.IsChecked = true;
- break;
- case 9:
- RadioButton9.IsChecked = true;
- break;
+ RadioButton rb = c as RadioButton;
+ if (rb != null && rb.Tag != null)
+ {
+ RatingTypeDC rbRating = rb.Tag as RatingTypeDC;
+ if (rbRating != null && rbRating.RatingTypeOid ==
+ lastCheckedSupportConceptGoal.GoalEntryDC.RatingTypeOid)
+ {
+ rb.IsChecked = true;
+ }
+
+ }
}
+
}
}
@@ -305,11 +316,11 @@ namespace BeWo.View.Controls
RadioButton rb = sender as RadioButton;
if (rb.Tag != null)
{
- int rating = 0;
-
- if (Int32.TryParse(rb.Tag.ToString(), out rating))
+ var rt = rb.Tag as RatingTypeDC;
+
+ if (rt != null)
{
- lastCheckedSupportConceptGoal.SetRating(rating);
+ lastCheckedSupportConceptGoal.SetRatingType(rt);
}
}
}
diff --git a/BeWo/View/Controls/GoalRatingControl.xaml.cs b/BeWo/View/Controls/GoalRatingControl.xaml.cs
index ae46b8c89..2328770a7 100644
--- a/BeWo/View/Controls/GoalRatingControl.xaml.cs
+++ b/BeWo/View/Controls/GoalRatingControl.xaml.cs
@@ -9,6 +9,8 @@ using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
+using BeWo.Core.Service;
+using BS.Shared.DataContracts;
using BS.Shared.DataContracts.ClientPartials;
using BS.Shared.Translation;
using DevExpress.Data.Helpers;
@@ -26,29 +28,17 @@ namespace BeWo.View.Controls
public event Action CancelButtonClicked;
public event Action ActionButtonClicked;
- private List _Ratings;
public GoalRatingControl()
{
InitializeComponent();
- InitRatings();
- ColumnRating.EditSettings = new ComboBoxEditSettings { ItemsSource = _Ratings, IsTextEditable = false };
+
+
+ ColumnRating.EditSettings = new ComboBoxEditSettings { ItemsSource = Cache.GetInstance().GetAllRatingTypeList(), IsTextEditable = false };
IsDirty = false;
}
-
- private void InitRatings()
- {
- _Ratings = new List();
- _Ratings.Add(new GoalRating { RatingValue = -1, RatingName = "Keine Bewertung"});
- _Ratings.Add(new GoalRating { RatingValue = 0, RatingName = "xxx.0 - Problem nicht vorhanden (ohne, kein, unerheblich ...) 0 bis 4 %" });
- _Ratings.Add(new GoalRating { RatingValue = 1, RatingName = "xxx.1 - Problem leicht ausgeprägt (schwach, gering ...) 5 bis 24 %" });
- _Ratings.Add(new GoalRating { RatingValue = 2, RatingName = "xxx.2 - Problem mäßig ausgeprägt (mittel, ziemlich ...) 25 bis 49 %" });
- _Ratings.Add(new GoalRating { RatingValue = 3, RatingName = "xxx.3 - Problem erheblich ausgeprägt (hoch, äußerst ...) 50 bis 95 %" });
- _Ratings.Add(new GoalRating { RatingValue = 4, RatingName = "xxx.4 - Problem voll ausgeprägt (komplett, total ...) 96 bis 100 %" });
- _Ratings.Add(new GoalRating { RatingValue = 8, RatingName = "xxx.8 - Nicht spezifiziert" });
- _Ratings.Add(new GoalRating { RatingValue = 9, RatingName = "xxx.9 - Nicht anwendbar" });
- }
-
+
+
public List Goals
{
get { return _Goals;}
@@ -69,7 +59,7 @@ namespace BeWo.View.Controls
entry.Name = goal.DetailDescription;
if (goal.HasRating)
{
- entry.GoalRating = _Ratings.FirstOrDefault(r => r.RatingValue == goal.GoalEntryDC.Rating.Value);
+ entry.RatingType = Cache.GetInstance().GetAllRatingTypeList().FirstOrDefault(r => r.RatingTypeOid == goal.GoalEntryDC.RatingTypeOid);
}
entries.Add(entry);
@@ -120,13 +110,13 @@ namespace BeWo.View.Controls
{
foreach (var e in Entries)
{
- if (e.GoalRating != null)
+ if (e.RatingType != null)
{
- e.Goal.SetRating(e.GoalRating.RatingValue);
+ e.Goal.SetRatingType(e.RatingType);
}
else
{
- e.Goal.SetRating(null);
+ e.Goal.SetRatingType(null);
}
}
}
@@ -137,34 +127,7 @@ namespace BeWo.View.Controls
{
public SupportConceptGoalDC Goal { get; set; }
public String Name { get; set; }
- public GoalRating GoalRating { get; set; }
- }
-
- public class GoalRating
- {
- public int RatingValue { get; set; }
- public String RatingName { get; set; }
-
- public override string ToString()
- {
- return RatingName;
- }
-
- public override bool Equals(object obj)
- {
- var gr = obj as GoalRating;
-
- if (gr != null)
- {
- return this.RatingName.Equals(((GoalRating) obj).RatingName);
- }
-
- return false;
- }
-
- public override int GetHashCode()
- {
- return RatingName.GetHashCode();
- }
+ public RatingTypeDC RatingType { get; set; }
}
+
}
diff --git a/BeWo/View/Detail/AbsenceReasonView.xaml.cs b/BeWo/View/Detail/AbsenceReasonView.xaml.cs
index 81df815ce..bd1bb8c80 100644
--- a/BeWo/View/Detail/AbsenceReasonView.xaml.cs
+++ b/BeWo/View/Detail/AbsenceReasonView.xaml.cs
@@ -103,8 +103,8 @@ namespace BeWo.View.Detail
private void colorEditor_Loaded(object sender, RoutedEventArgs e)
{
- ((ListBox) sender).ItemsSource = ViewModel.AllBrushes;
- ((ListBox) sender).ItemTemplateSelector = new ComboBoxTemplateSelector((ListBox) sender);
+ ((ListBox)sender).ItemsSource = ViewModel.AllBrushes;
+ ((ListBox)sender).ItemTemplateSelector = new ComboBoxTemplateSelector((ListBox) sender);
}
private void listbox_colorpicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
@@ -128,7 +128,6 @@ namespace BeWo.View.Detail
vm.Brush = selection as SolidColorBrush;
}
}
-
popup_color.IsOpen = false;
}
}
diff --git a/BeWo/View/Detail/Accounting/EquityInvoiceView.xaml b/BeWo/View/Detail/Accounting/EquityInvoiceView.xaml
index 5b413d589..9c06b94f3 100644
--- a/BeWo/View/Detail/Accounting/EquityInvoiceView.xaml
+++ b/BeWo/View/Detail/Accounting/EquityInvoiceView.xaml
@@ -4,6 +4,7 @@
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localsearch="clr-namespace:BeWo.View.Search"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
+ xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True" >
@@ -20,7 +21,7 @@
-
+
-
+
diff --git a/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs b/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs
index 45a83c143..d813cc53f 100644
--- a/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs
+++ b/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs
@@ -271,6 +271,7 @@ namespace BeWo.View.Detail.Accounting
lHeaderCaptions.Add("Art der Rechnung");
lHeaderCaptions.Add("Klient/in");
+ lHeaderCaptions.Add("Zeitraum");
lHeaderCaptions.Add("Nummer");
lHeaderCaptions.Add("Datum");
lHeaderCaptions.Add("Empfänger");
@@ -282,7 +283,7 @@ namespace BeWo.View.Detail.Accounting
{
lContent.AddRange(list.Select(vm => new List
{
- vm.TypeString, vm.CustomerName, vm.InvoiceNumber, vm.InvoiceDate.Value.ToShortDateString(), vm.RecipientString, string.Format("{0:0.00}", vm.TotalAmount), vm.Notice, vm.IsPaid ? "Ja" : ""
+ vm.TypeString, vm.CustomerName, vm.AccountingPeriodString, vm.InvoiceNumber, vm.InvoiceDate.Value.ToShortDateString(), vm.RecipientString, string.Format("{0:0.00}", vm.TotalAmount), vm.Notice, vm.IsPaid ? "Ja" : ""
}));
}
var path = BeWoApp.GetAndCreateUserAppDataPath() + "\\Rechnungen.xls";
diff --git a/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml b/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml
index efcb924aa..209e62bb9 100644
--- a/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml
+++ b/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml
@@ -1,4 +1,5 @@
-
+
@@ -17,7 +18,7 @@
-
+
+
@@ -669,7 +670,7 @@
-
+
diff --git a/BeWo/View/Detail/BudgetView.xaml.cs b/BeWo/View/Detail/BudgetView.xaml.cs
index 88a807849..def221b4d 100644
--- a/BeWo/View/Detail/BudgetView.xaml.cs
+++ b/BeWo/View/Detail/BudgetView.xaml.cs
@@ -96,27 +96,20 @@ namespace BeWo.View.Detail
}
}
- private void PART_Editor_Click(object sender, RoutedEventArgs e)
- {
- RowData data = DatagridRegions.View.FocusedRowData;
+ //private void PART_Editor_Click(object sender, RoutedEventArgs e)
+ //{
+ // RowData data = DatagridRegions.View.FocusedRowData;
- if (data != null && data.RowHandle != null)
- {
- var vm = DatagridRegions.GetRow(data.RowHandle.Value) as BudgetVM;
+ // if (data != null && data.RowHandle != null)
+ // {
+ // var vm = DatagridRegions.GetRow(data.RowHandle.Value) as BudgetVM;
- if (vm != null)
- {
- ViewModel.EditVM = vm;
- //popup_costrateperiods.IsOpen = true;
- }
- }
- }
-
- private void button_edit_Click(object sender, RoutedEventArgs e)
- {
- //this.ViewModel.EditVM.Values = this.ViewModel.PossibleValues.Where(i => i.IsEditSelected).ToList();
-
- //popup_costrateperiods.IsOpen = false;
- }
+ // if (vm != null)
+ // {
+ // ViewModel.EditVM = vm;
+ // //popup_costrateperiods.IsOpen = true;
+ // }
+ // }
+ //}
}
}
diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs
index de1d26028..a282f0267 100644
--- a/BeWo/View/Detail/CustomerView.xaml.cs
+++ b/BeWo/View/Detail/CustomerView.xaml.cs
@@ -518,7 +518,7 @@ namespace BeWo.View.Detail
if (DoOwnChatSync && BeWoApp.AppSettings.IsChatAllowed)
{
- BeWoUtils.OwnChatSynchronisationVeranlassen();
+ //BeWoUtils.OwnChatSynchronisationVeranlassen();
}
}
});
diff --git a/BeWo/View/Detail/DienstView.xaml b/BeWo/View/Detail/DienstView.xaml
new file mode 100644
index 000000000..64e88adf5
--- /dev/null
+++ b/BeWo/View/Detail/DienstView.xaml
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/DienstView.xaml.cs b/BeWo/View/Detail/DienstView.xaml.cs
new file mode 100644
index 000000000..083fa3ff1
--- /dev/null
+++ b/BeWo/View/Detail/DienstView.xaml.cs
@@ -0,0 +1,131 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows;
+using BS.Shared.Core;
+using BS.Shared.Extensions;
+
+using BeWo.Core;
+using BeWo.Core.Service;
+using BeWo.ServiceProxy;
+using BeWo.Validation;
+using BeWo.ViewModel;
+using BeWo.ViewModel.ListViewModel;
+
+using DevExpress.Xpf.Editors.Settings;
+using DevExpress.Xpf.Grid;
+using System.Windows.Controls;
+using System.Windows.Media;
+
+namespace BeWo.View.Detail
+{
+ public partial class DienstView : BeWoView
+ {
+ private DienstListVM _ViewModel;
+
+ public DienstView(DienstListVM listVM)
+ {
+ InitializeComponent();
+ _FarbeComboBox.ItemTemplateSelector = new ComboBoxTemplateSelector(_FarbeComboBox);
+ ViewModel = listVM;
+ }
+
+ public override bool IsDirty
+ {
+ get { return ViewModel != null && ViewModel.IsDirty; }
+ }
+
+ public override string Title
+ {
+ get { return "Dienste"; }
+ }
+
+ private DienstListVM ViewModel
+ {
+ get { return _ViewModel; }
+
+ set
+ {
+ _ViewModel = value;
+ root.DataContext = value;
+ }
+ }
+
+ protected override void Save()
+ {
+ var lToDos = new List>();
+
+ if (ViewModel.AddedCount > 0)
+ {
+ lToDos.Add(s => s.InsertNewDienst(ViewModel.CommitAdded()));
+ }
+
+ if (ViewModel.RemovedCount > 0)
+ {
+ lToDos.Add(s => s.DeactivateDienst(ViewModel.GetRemoved().ToDictionary(dc => dc.DienstOid.Value, dc => dc.DienstVersion.Value)));
+ }
+
+ if (ViewModel.ChangedCount > 0)
+ {
+ lToDos.Add(s => s.UpdateDienst(ViewModel.CommitChanged()));
+ }
+
+ ServiceFacade.DoMultipleOperationsServicesAsync(lToDos, ReloadViewModel);
+ }
+
+ private void ReloadViewModel()
+ {
+ VMFactory.CreateDienstListVMAsync(r => this.Dispatch(delegate { ViewModel = r; }));
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ if (ValidationTrigger.Validate(this))
+ {
+ ViewModel.AddNewVMToList();
+ }
+ }
+
+ private void DeleteButton_Click(object sender, RoutedEventArgs e)
+ {
+ ViewModel.VMList.Remove(_GridControl.GetCurrentValue());
+ BeWoWpfUtils.RefreshDXGrid(_GridControl);
+ }
+
+ private void Part_Editor_Click(object sender, RoutedEventArgs e)
+ {
+ _PopupColorPicker.IsOpen = true;
+ }
+
+ private void ColorEditor_Loaded(object sender, RoutedEventArgs e)
+ {
+ ((ListBox)sender).ItemsSource = ViewModel.AllBrushes;
+ ((ListBox)sender).ItemTemplateSelector = new ComboBoxTemplateSelector((ListBox)sender);
+ }
+
+ private void Listbox_Colorpicker_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
+ {
+ if (e.AddedItems.Count == 1)
+ {
+ object selection = e.AddedItems[0];
+
+ DataViewBase view = _GridControl.View;
+
+ RowData data = view.FocusedRowData;
+
+ if (data != null && data.RowHandle != null)
+ {
+ int rowHandle = data.RowHandle.Value;
+
+ var vm = _GridControl.GetRow(rowHandle) as DienstVM;
+
+ if (vm != null)
+ {
+ vm.Farbe = selection as SolidColorBrush;
+ }
+ }
+ _PopupColorPicker.IsOpen = false;
+ }
+ }
+ }
+}
diff --git a/BeWo/View/Detail/EmployeeView.xaml b/BeWo/View/Detail/EmployeeView.xaml
index a7d55c34e..c4fbf68fc 100644
--- a/BeWo/View/Detail/EmployeeView.xaml
+++ b/BeWo/View/Detail/EmployeeView.xaml
@@ -67,7 +67,7 @@
-
+
diff --git a/BeWo/View/Detail/EmployeeView.xaml.cs b/BeWo/View/Detail/EmployeeView.xaml.cs
index 215946871..af4c85d87 100644
--- a/BeWo/View/Detail/EmployeeView.xaml.cs
+++ b/BeWo/View/Detail/EmployeeView.xaml.cs
@@ -346,7 +346,7 @@ namespace BeWo.View.Detail
if (_DoOwnChatSync && BeWoApp.AppSettings.IsChatAllowed)
{
- BeWoUtils.OwnChatSynchronisationVeranlassen();
+ //BeWoUtils.OwnChatSynchronisationVeranlassen();
}
}));
}
diff --git a/BeWo/View/Detail/GoalImportControl.xaml b/BeWo/View/Detail/GoalImportControl.xaml
new file mode 100644
index 000000000..8e6a41ba6
--- /dev/null
+++ b/BeWo/View/Detail/GoalImportControl.xaml
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/GoalImportControl.xaml.cs b/BeWo/View/Detail/GoalImportControl.xaml.cs
new file mode 100644
index 000000000..204a12851
--- /dev/null
+++ b/BeWo/View/Detail/GoalImportControl.xaml.cs
@@ -0,0 +1,131 @@
+using BeWo.Core;
+using BeWo.ServiceProxy;
+using BS.Shared.Extensions;
+using DevExpress.Utils;
+using DevExpress.XtraGrid.Views.Grid.ViewInfo;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using BeWo.ViewModel;
+using BS.Shared;
+using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.ClientPartials;
+using DevExpress.Data;
+using DevExpress.Mvvm.Native;
+using DevExpress.Xpf.Grid;
+using DevExpress.Xpf.Scheduler.UI;
+using DevExpress.XtraExport.Xls;
+using static BeWo.View.Detail.Report.FlexibleReportView;
+
+namespace BeWo.View.Detail
+{
+ public partial class GoalImportControl
+ {
+
+ public event Action ButtonImportClicked;
+ public event Action ButtonCancelClicked;
+ //private SupportConceptGoalDC _TreeViewGoalItem;
+
+
+ public GoalImportControl(ObservableCollection goalTree)
+ {
+ InitializeComponent();
+
+ DataContext = this;
+
+ GoalTree = goalTree;
+ }
+
+ public ObservableCollection GoalTree { get; set; }
+
+
+ public IList GetSelectedGoals()
+ {
+ var list = new ObservableCollection();
+
+ foreach (var item in GoalTree)
+ {
+ IterateThroughSelectedGoalsAndMassnahmen(item, list);
+ }
+
+ return list;
+ }
+
+ private void IterateThroughSelectedGoalsAndMassnahmen(SupportConceptGoalTreeItem item, ObservableCollection list)
+ {
+ if (item.IsChecked && item.Items.Count == 0)
+ {
+ list.Add(item);
+ }
+
+ foreach (var child in item.Items)
+ {
+ IterateThroughSelectedGoalsAndMassnahmen(child, list);
+ }
+ }
+
+ private void ButtonImport_Click(object sender, RoutedEventArgs e)
+ {
+ ButtonImportClicked?.Invoke();
+ }
+
+ private void ButtonCancel_Click(object sender, RoutedEventArgs e)
+ {
+ ButtonCancelClicked?.Invoke();
+ }
+
+ private void button_checkAllGoals_Click(object sender, RoutedEventArgs e)
+ {
+ CheckAllGoalTreeItems(true);
+ }
+
+ private void button_uncheckAllGoals_Click(object sender, RoutedEventArgs e)
+ {
+ CheckAllGoalTreeItems(false);
+ }
+
+ private void button_aufklappenAllGoals_Click(object sender, RoutedEventArgs e)
+ {
+ SwitchAllGoalTreeItems(true);
+ }
+
+ private void button_zuklappenAllGoals_Click(object sender, RoutedEventArgs e)
+ {
+ SwitchAllGoalTreeItems(false);
+ }
+
+ private void SwitchAllGoalTreeItems(bool check)
+ {
+ Style stylee = new Style
+ {
+ TargetType = typeof(TreeViewItem)
+ };
+
+ stylee.Setters.Add(new Setter(TreeViewItem.IsExpandedProperty, check));
+ TreeView.ItemContainerStyle = stylee;
+ }
+
+ private void CheckAllGoalTreeItems(bool check)
+ {
+ var allItems = TreeView.ItemsSource as ObservableCollection;
+
+ var test = TreeView.ItemsSource;
+
+ foreach (var item in TreeView.ItemsSource)
+ {
+ var goal = item as SupportConceptGoalTreeItem;
+ if (goal != null)
+ {
+ goal.IsChecked = check;
+ }
+ }
+ }
+
+ }
+}
diff --git a/BeWo/View/Detail/InvoiceNumberView.xaml b/BeWo/View/Detail/InvoiceNumberView.xaml
index ae149845c..baf252431 100644
--- a/BeWo/View/Detail/InvoiceNumberView.xaml
+++ b/BeWo/View/Detail/InvoiceNumberView.xaml
@@ -25,7 +25,7 @@
-
diff --git a/BeWo/View/Detail/MandatorView.xaml b/BeWo/View/Detail/MandatorView.xaml
index 97ea07e17..e38f850c5 100644
--- a/BeWo/View/Detail/MandatorView.xaml
+++ b/BeWo/View/Detail/MandatorView.xaml
@@ -139,7 +139,7 @@
-
diff --git a/BeWo/View/Detail/MassnahmenTreeViewView.xaml b/BeWo/View/Detail/MassnahmenTreeViewView.xaml
index 5e9d2302e..e5963e800 100644
--- a/BeWo/View/Detail/MassnahmenTreeViewView.xaml
+++ b/BeWo/View/Detail/MassnahmenTreeViewView.xaml
@@ -81,14 +81,22 @@
-
-
-
+ FontWeight="{Binding Path=IsGoal, Converter={StaticResource ValueListEntryTypeToFontWeightConverter}}" ToolTipService.ShowDuration="100000">
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/MassnahmenTreeViewView.xaml.cs b/BeWo/View/Detail/MassnahmenTreeViewView.xaml.cs
index d87319a4e..251085ced 100644
--- a/BeWo/View/Detail/MassnahmenTreeViewView.xaml.cs
+++ b/BeWo/View/Detail/MassnahmenTreeViewView.xaml.cs
@@ -510,9 +510,10 @@ namespace BeWo.View.Detail
foreach (var goal in ViewModel.VMList.Where(w => w.Type.Equals(ValueListEntryType.SupportConceptGoalType)))
{
+
var item = new SupportConceptGoalTreeItem { GoalEntryVM = goal };
- if (goal.ParentEntry == null || !dictOid2TreeItem.ContainsKey(goal.ParentEntry.ValueListEntryOid.Value))
+ if (goal.ParentEntry == null || !goal.ParentEntry.ValueListEntryOid.HasValue || !dictOid2TreeItem.ContainsKey(goal.ParentEntry.ValueListEntryOid.Value))
{
iGoalList.Add(item);
}
diff --git a/BeWo/View/Detail/RatingEditView.xaml b/BeWo/View/Detail/RatingEditView.xaml
new file mode 100644
index 000000000..29d46ddba
--- /dev/null
+++ b/BeWo/View/Detail/RatingEditView.xaml
@@ -0,0 +1,665 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/RatingEditView.xaml.cs b/BeWo/View/Detail/RatingEditView.xaml.cs
new file mode 100644
index 000000000..7f01f98f4
--- /dev/null
+++ b/BeWo/View/Detail/RatingEditView.xaml.cs
@@ -0,0 +1,139 @@
+using System;
+using System.Collections.Generic;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+
+using BeWo.Controls;
+using BeWo.Core;
+using BeWo.ServiceProxy;
+using BeWo.Validation;
+using BeWo.View.Search;
+using BeWo.ViewModel;
+using BeWo.ViewModel.ListViewModel;
+using BeWo.Core.Service;
+
+using BS.Shared;
+using BS.Shared.Extensions;
+using BS.Shared.Core;
+using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.ClientPartials;
+using BS.Shared.DataContracts.Compact;
+using BS.Shared.Services;
+using BS.Shared.Translation;
+using DevExpress.Xpf.RichEdit;
+using SupportConceptService = BeWo.Core.Service.SupportConceptService;
+
+namespace BeWo.View.Detail
+{
+ public partial class RatingEditView
+ {
+ public event Action ButtonSavedClicked;
+ public event Action ButtonCancelClicked;
+
+ private RatingVM _RatingVM;
+
+
+ public RatingEditView()
+ {
+ InitializeComponent();
+ }
+
+ public override bool CanDelete
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public override bool IsDirty
+ {
+ get
+ {
+
+ //if (ViewModel.SelectedVMForEditing != null && _SelectedEmployee != null &&
+ // !_SelectedEmployee.Equals(ViewModel.SelectedVMForEditing.Employee))
+ // return true;
+
+ return _RatingVM != null && _RatingVM.IsDirty;
+ }
+ }
+
+ public override string SaveObjectName
+ {
+ get
+ {
+ return Translator.Translate("dieser Bewertung");
+ }
+ }
+
+ public override string Title
+ {
+ get
+ {
+ return Translator.Translate("Bewertung bearbeiten");
+ }
+ }
+
+ public RatingVM ViewModel { get; set; }
+
+ public void InitView(RatingVM rating)
+ {
+ InitializeComponent();
+
+ _RatingVM = rating;
+
+ DataContext = rating;
+
+ ViewModel = rating;
+ ColumnRatingTypeComboBox.ItemsSource = rating.GoalRatingList.AllRatingTypes;
+
+ richEditControl1.RtfText = rating.RTFNotice;
+
+ Focus();
+
+ //ConfigureRTFDocTypes();
+
+
+ }
+
+
+ public bool IsValid()
+ {
+ bool lValid = ValidationTrigger.Validate(rootGrid);
+
+ return lValid;
+ }
+
+ private void RichEditControl_OnContentChanged(object sender, EventArgs e)
+ {
+ ViewModel.Notice = richEditControl1.Text;
+ ViewModel.RTFNotice = richEditControl1.RtfText;
+ }
+
+ private void BtnSave_OnClick(object sender, RoutedEventArgs e)
+ {
+ ButtonSavedClicked?.Invoke();
+ }
+
+ private void BtnClose_OnClick(object sender, RoutedEventArgs e)
+ {
+ bool close = true;
+ if (ViewModel.IsDirty)
+ {
+ if (MessageBox.Show(
+ Translator.Translate("Möchten Sie wirklich abbrechen und die Änderungen verwerfen?"),
+ "BeWoPlaner", MessageBoxButton.OKCancel, MessageBoxImage.Question) == MessageBoxResult.Cancel)
+ {
+ close = false;
+ }
+ }
+
+ if (close)
+ {
+ ButtonCancelClicked?.Invoke();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Detail/RatingTypeView.xaml b/BeWo/View/Detail/RatingTypeView.xaml
new file mode 100644
index 000000000..b6909c171
--- /dev/null
+++ b/BeWo/View/Detail/RatingTypeView.xaml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/View/Detail/RatingTypeView.xaml.cs b/BeWo/View/Detail/RatingTypeView.xaml.cs
new file mode 100644
index 000000000..dc8d743bc
--- /dev/null
+++ b/BeWo/View/Detail/RatingTypeView.xaml.cs
@@ -0,0 +1,117 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Windows;
+using BS.Shared.Core;
+using BS.Shared.Extensions;
+
+using BeWo.Core;
+using BeWo.Core.Service;
+using BeWo.ServiceProxy;
+using BeWo.Validation;
+using BeWo.ViewModel;
+using BeWo.ViewModel.ListViewModel;
+
+using DevExpress.Xpf.Editors.Settings;
+using DevExpress.Xpf.Grid;
+
+namespace BeWo.View.Detail
+{
+ public partial class RatingTypeView : BeWoView
+ {
+ private RatingTypeListVM _ViewModel;
+
+ public RatingTypeView(RatingTypeListVM pViewModel)
+ {
+ InitializeComponent();
+
+ ViewModel = pViewModel;
+ }
+
+ public override bool IsDirty
+ {
+ get { return ViewModel != null && ViewModel.IsDirty; }
+ }
+
+ public override string Title
+ {
+ get { return "Bewertungsarten"; }
+ }
+
+ // TODO
+ internal override DependencyObject ValidationOnSaveRootElement
+ {
+ get { return button_addRatingType; }
+ }
+
+ private RatingTypeListVM ViewModel
+ {
+ get { return _ViewModel; }
+
+ set
+ {
+ _ViewModel = value;
+ root.DataContext = value;
+ }
+ }
+
+ protected override void Save()
+ {
+ var lToDos = new List>();
+
+ if(ViewModel.AddedCount > 0)
+ {
+ lToDos.Add(s => s.InsertNewRatingType(ViewModel.CommitAdded()));
+ }
+
+ if (ViewModel.RemovedCount > 0)
+ {
+ lToDos.Add(s => s.DeactivateRatingType(ViewModel.GetRemoved().ToDictionary(dc => dc.RatingTypeOid.Value, dc => dc.RatingTypeVersion.Value)));
+ }
+
+ if (ViewModel.ChangedCount > 0)
+ {
+ lToDos.Add(s => s.UpdateRatingType(ViewModel.CommitChanged()));
+ }
+
+ ServiceFacade.DoMultipleOperationsServicesAsync(lToDos, ReloadViewModel);
+
+ }
+
+ private void DeleteButton_Click(object sender, RoutedEventArgs e)
+ {
+ ViewModel.VMList.Remove(DatagridRatingTypes.GetCurrentValue());
+ BeWoWpfUtils.RefreshDXGrid(DatagridRatingTypes);
+ }
+
+ private void ReloadViewModel()
+ {
+ Cache.GetInstance().ClearRatingTypes();
+ VMFactory.CreateRatingTypeListVMAsync(r => this.Dispatch(delegate { ViewModel = r; }));
+ }
+
+ private void Button_addRatingType_Click(object sender, RoutedEventArgs e)
+ {
+ if (ValidationTrigger.Validate(this))
+ {
+ ViewModel.AddNewVMToList();
+ }
+ }
+
+ //private void PART_Editor_Click(object sender, RoutedEventArgs e)
+ //{
+ // RowData data = DatagridRegions.View.FocusedRowData;
+
+ // if (data != null && data.RowHandle != null)
+ // {
+ // var vm = DatagridRegions.GetRow(data.RowHandle.Value) as BudgetVM;
+
+ // if (vm != null)
+ // {
+ // ViewModel.EditVM = vm;
+ // //popup_costrateperiods.IsOpen = true;
+ // }
+ // }
+ //}
+ }
+}
diff --git a/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs b/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs
index 87a57789f..f75089e2d 100644
--- a/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs
+++ b/BeWo/View/Detail/Report/AbwesenheitstabelleView.xaml.cs
@@ -169,8 +169,10 @@ namespace BeWo.View.Detail.Report
foreach (var reason in _AbsenceReasonDCs)
{
var label = _LabelStorage.CreateNewLabel(reason.AbsenceReasonOid.ToString(), reason.Description);
-
- label.Color = (Color)ColorConverter.ConvertFromString(reason.Color);
+ if (!String.IsNullOrEmpty(reason.Color))
+ {
+ label.Color = (Color) ColorConverter.ConvertFromString(reason.Color);
+ }
_LabelStorage.Add(label);
}
diff --git a/BeWo/View/Detail/Report/Dienstplaner.xaml b/BeWo/View/Detail/Report/Dienstplaner.xaml
new file mode 100644
index 000000000..57d2ee248
--- /dev/null
+++ b/BeWo/View/Detail/Report/Dienstplaner.xaml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/Dienstplaner.xaml.cs b/BeWo/View/Detail/Report/Dienstplaner.xaml.cs
new file mode 100644
index 000000000..02cac4193
--- /dev/null
+++ b/BeWo/View/Detail/Report/Dienstplaner.xaml.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Input;
+using System.Windows.Forms;
+using System.Windows.Media;
+
+using BeWo.Controls;
+using BeWo.Core;
+using BeWo.ServiceProxy;
+using BeWo.ViewModel;
+
+using BS.Shared;
+using BS.Shared.Core;
+using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.Compact;
+using BS.Shared.Extensions;
+using BS.Shared.Translation;
+
+using DevExpress.Services;
+using DevExpress.XtraScheduler;
+using DevExpress.Xpf.Scheduler;
+using DevExpress.Xpf.Scheduler.Native;
+
+using SchedulerStorage = DevExpress.Xpf.Scheduler.SchedulerStorage;
+using ResourceStorage = DevExpress.Xpf.Scheduler.ResourceStorage;
+using AppointmentStorage = DevExpress.Xpf.Scheduler.AppointmentStorage;
+using IAppointmentLabelStorage = DevExpress.Xpf.Scheduler.AppointmentLabelCollection;
+using BeWo.Scheduler.View;
+using AppointmentLabel = DevExpress.Xpf.Scheduler.AppointmentLabel;
+
+namespace BeWo.View.Detail.Report
+{
+ ///
+ /// Interaction logic for Dienstplaner.xaml
+ ///
+ public partial class Dienstplaner : BeWoView
+ {
+ public Dienstplaner()
+ {
+ InitializeComponent();
+ }
+ }
+}
\ No newline at end of file
diff --git a/BeWo/View/Detail/Report/FlexibleReportView.xaml b/BeWo/View/Detail/Report/FlexibleReportView.xaml
index 469019808..8404f8d62 100644
--- a/BeWo/View/Detail/Report/FlexibleReportView.xaml
+++ b/BeWo/View/Detail/Report/FlexibleReportView.xaml
@@ -51,7 +51,7 @@
-
+
@@ -77,10 +77,10 @@
-
+
-
+
@@ -101,14 +101,14 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
@@ -123,30 +123,30 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
-
+
+
+
-
-
+
+
diff --git a/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs b/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs
index d97941c6e..d8c9eb5ec 100644
--- a/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs
+++ b/BeWo/View/Detail/Report/FlexibleReportView.xaml.cs
@@ -25,7 +25,6 @@ using DevExpress.Xpf.PivotGrid;
using DevExpress.Xpf.Charts;
using System.IO;
using MessageBox = System.Windows.MessageBox;
-using BeWo.Data.Access;
using DevExpress.XtraReports.UI;
using DevExpress.Data.PivotGrid;
using System.Windows.Media;
@@ -99,14 +98,14 @@ namespace BeWo.View.Detail.Report
myPivotGridControl.FieldListIncludeVisibleFields = true;
myPivotGridControl.GroupFieldsInFieldList = true;
- checkBetrag.IsChecked = true;
- checkHilepläne.IsChecked = true;
- checkIst.IsChecked = true;
- checkKilometer.IsChecked = true;
+ //checkBetrag.IsChecked = true;
+ //checkHilepläne.IsChecked = true;
+ //checkIst.IsChecked = true;
+ //checkKilometer.IsChecked = true;
checkKlienten.IsChecked = true;
checkMitarbeiter.IsChecked = true;
- checkRecords.IsChecked = true;
- checkSoll.IsChecked = true;
+ //checkRecords.IsChecked = true;
+ //checkSoll.IsChecked = true;
LayoutGroupPivotChart.IsCollapsible = true;
LayoutGroupPivotChart.Visibility = Visibility.Collapsed;
@@ -123,16 +122,16 @@ namespace BeWo.View.Detail.Report
{
StartDatum = datePickerStartDate.DateTime,
EndDatum = datePickerEndDate.DateTime,
- ReduzierteAnsicht = checkReduzierteAnsicht.IsChecked,
- AlleHilfeplaneAnzeigen = checkHilepläne.IsChecked,
+ ReduzierteAnsicht = false, //checkReduzierteAnsicht.IsChecked,
+ AlleHilfeplaneAnzeigen = true, //checkHilepläne.IsChecked,
AlleKlientenAnzeigen = checkKlienten.IsChecked,
AlleMitarbeiterAnzeigen = checkMitarbeiter.IsChecked,
- AlleServiceBerichteAnzeigen = checkRecords.IsChecked,
- BetragAnzeigen = checkBetrag.IsChecked,
- GefahreneKilometerAnzeigen = checkKilometer.IsChecked,
- IstAnzeigen = checkIst.IsChecked,
- SollAnzeigen = checkSoll.IsChecked
- };
+ AlleServiceBerichteAnzeigen = true, //checkRecords.IsChecked,
+ BetragAnzeigen = true, //checkBetrag.IsChecked,
+ GefahreneKilometerAnzeigen = true, //checkKilometer.IsChecked,
+ IstAnzeigen = true, //checkIst.IsChecked,
+ SollAnzeigen = true //checkSoll.IsChecked
+ };
ServiceFacade.DoOperationsServiceAsync(
s => s.GetFlexibleReportResult(filter),
diff --git a/BeWo/View/Detail/Report/IcfImportControl.xaml b/BeWo/View/Detail/Report/IcfImportControl.xaml
index 388ff4522..b0467c564 100644
--- a/BeWo/View/Detail/Report/IcfImportControl.xaml
+++ b/BeWo/View/Detail/Report/IcfImportControl.xaml
@@ -21,8 +21,8 @@
-
-
@@ -40,20 +40,30 @@
-
+
-
-
+ IsReadOnly="True" Text="{Binding Path=GoalEntryDC.DisplayName, Mode=OneWay}" FontWeight="Bold" ToolTipService.ShowDuration="100000">
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
diff --git a/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs b/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs
index 42631392b..0823a038b 100644
--- a/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs
+++ b/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs
@@ -106,7 +106,7 @@ namespace BeWo.View.Detail.Report
}
this.combobox_year.ItemsSource = years;
- if (monthIdx == 1)
+ if (monthIdx == 0)
{
this.combobox_year.SelectedItem = DateTime.Now.Year + 1;
}
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
index b384b67f4..f3ab30926 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
@@ -1401,7 +1401,7 @@ namespace BeWo.View.Detail
foreach (var item in ViewModel.PrototypeVM.GoalTree)
{
item.IsChecked = false;
- item.SetRating(null);
+ item.SetRatingType(null);
}
}
@@ -2409,7 +2409,7 @@ namespace BeWo.View.Detail
foreach (var item in ViewModel.PrototypeVM.GoalTree)
{
item.IsChecked = false;
- item.SetRating(null);
+ item.SetRatingType(null);
}
ComboBoxTreeViewControl.TreeViewSourceList = ViewModel.PrototypeVM.GoalTree;
diff --git a/BeWo/View/Detail/SupportConceptGoalRatingView.xaml b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml
new file mode 100644
index 000000000..8ed086fcd
--- /dev/null
+++ b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs
new file mode 100644
index 000000000..c7606a538
--- /dev/null
+++ b/BeWo/View/Detail/SupportConceptGoalRatingView.xaml.cs
@@ -0,0 +1,893 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Threading;
+using BeWo.Core;
+using BeWo.ServiceProxy;
+using BeWo.ViewModel;
+using BeWo.ViewModel.ListViewModel;
+using BS.Shared;
+using BS.Shared.DataContracts;
+using BS.Shared.DataContracts.ClientPartials;
+using BS.Shared.Extensions;
+using DevExpress.Xpf.Charts;
+using DevExpress.Xpf.Editors;
+
+namespace BeWo.View.Detail
+{
+ public partial class SupportConceptGoalRatingView : BeWoView
+ {
+ public static readonly DependencyProperty RatingListProperty = DependencyProperty.Register(
+ "RatingList",
+ typeof(RatingListVM),
+ typeof(SupportConceptGoalRatingView),
+ new UIPropertyMetadata(
+ (s, e) =>
+ {
+ //var c = s as SupportConceptGoalRatingView;
+ //var d = e.NewValue as RatingListVM;
+
+ //if (c != null && d != null)
+ //{
+ // c.InitListView();
+ //}
+ }));
+
+ public static readonly DependencyProperty SupportConceptProperty = DependencyProperty.Register(
+ "SupportConcept",
+ typeof(SupportConceptVM),
+ typeof(SupportConceptGoalRatingView),
+ new UIPropertyMetadata(
+ (s, e) =>
+ {
+ var c = s as SupportConceptGoalRatingView;
+ c.ResetControl();
+
+ //var d = e.NewValue as RatingListVM;
+
+ //if (c != null && d != null)
+ //{
+ // c.InitListView();
+ //}
+ }));
+
+ private SupportConceptVM _ViewModel;
+ private IList serviceRecordRatings = null;
+ private ObservableCollection _SelectedGoals;
+
+ public SupportConceptGoalRatingView()
+ {
+ this.InitializeComponent();
+ ChartRatings.CrosshairOptions = new CrosshairOptions();
+ ChartRatings.CrosshairOptions.ShowValueLabels = false;
+ ChartRatings.CrosshairOptions.ShowArgumentLabels = false;
+ ChartRatings.CrosshairOptions.ShowArgumentLine = true;
+ ChartRatings.CrosshairOptions.ShowGroupHeaders = false;
+ //ChartRatings.CrosshairOptions.ShowValueLabels
+ //XYDiagram2D diag = ChartRatings.Diagram as XYDiagram2D;
+
+ //var a = diag.AxisX;
+ //var o = a.DateTimeScaleOptions;
+ //var co = a.DateTimeScaleOptions as ContinuousDateTimeScaleOptions;
+ //co.GridAlignment = DateTimeGridAlignment.Day;
+ //co.AutoGrid = true;
+ }
+
+ public DateTime? StartDate { get; set; }
+ public DateTime? EndDate { get; set; }
+
+ public void ResetControl()
+ {
+ serviceRecordRatings = null;
+ }
+
+ public void UpdateControl()
+ {
+ //if (chkShowServiceRecordRatings.IsChecked.HasValue && chkShowServiceRecordRatings.IsChecked.Value)
+ //{
+ FetchServiceRecords();
+ //}
+ FetchStatistics();
+
+ ListBoxGoals.ItemsSource = null;
+
+ var allGoallist = new List();
+
+ var listBoxGoals = new List();
+
+ foreach (var goal in SupportConcept.GetSelectedGoals())
+ {
+
+
+ if (goal.Type == ValueListEntryType.SupportConceptGoalCategoryType ||
+ goal.Type == ValueListEntryType.SupportConceptIndividualGoalCategoryType)
+ {
+
+ var item = new ListBoxGoalItem();
+ item.GoalEntry = goal;
+
+ SetzeGeleisteteStunden(item);
+
+ listBoxGoals.Add(item);
+
+
+
+ }
+
+ }
+ decimal stdGesamt = 0;
+ foreach (var g in listBoxGoals)
+ {
+ stdGesamt += g.GeleisteteMinuten;
+ }
+
+ if (stdGesamt > 0)
+ {
+ foreach (var g in listBoxGoals)
+ {
+ g.GeleistetProzentual = (g.GeleisteteMinuten / stdGesamt) * 100;
+
+ }
+ }
+
+ ListBoxGoals.ItemsSource = listBoxGoals;
+ ListBoxGoals.SelectAll();
+ //if (RatingList != null && RatingList.VMList.Count > 0)
+ //{
+ // var goals = new List();
+ // foreach (var gr in RatingList.VMList[0].GoalRatingList.VMList)
+ // {
+ // var item = new ListBoxGoalItem();
+ // item.GoalEntry = gr.GoalEntry;
+
+ // SetzeGeleisteteStunden(item);
+
+ // goals.Add(item);
+ // }
+
+ // decimal stdGesamt = 0;
+ // foreach (var g in goals)
+ // {
+ // stdGesamt += g.GeleisteteMinuten;
+ // }
+
+ // if (stdGesamt > 0)
+ // {
+ // foreach (var g in goals)
+ // {
+ // g.GeleistetProzentual = (g.GeleisteteMinuten / stdGesamt) * 100;
+
+ // }
+ // }
+
+ // ListBoxGoals.ItemsSource = goals;
+ // ListBoxGoals.SelectAll();
+ //}
+
+
+
+ UpdateChart();
+ //ListBoxGoals.ItemsSource = ViewModel.Goals;
+ }
+
+ private void SetzeGeleisteteStunden(ListBoxGoalItem item)
+ {
+ if (serviceRecordRatings != null)
+ {
+ foreach (var srr in serviceRecordRatings)
+ {
+ if (srr.ServiceRecord != null && srr.GoalEntry.ValueListEntryOid == item.GoalEntry.ValueListEntryOid)
+ {
+ item.GeleisteteMinuten += srr.ServiceRecord.RoundedDuration;
+ }
+ }
+ }
+ }
+
+ private void UpdateChart()
+ {
+ ChartRatings.DataSource = CreateChartData();
+ SetSeriesVisibility();
+ }
+
+ private IList CreateChartData()
+ {
+ var dataList = new List();
+
+ foreach (var rating in RatingList.VMList)
+ {
+ if (rating.StartDate.HasValue && (!StartDate.HasValue || rating.StartDate >= StartDate.Value) && (!EndDate.HasValue || rating.StartDate <= EndDate.Value))
+ {
+ foreach (var goalrating in rating.GoalRatingList.VMList)
+ {
+ if (goalrating.GoalEntry != null && goalrating.RatingType != null)
+ {
+ var cdata = new ChartData
+ {
+ Date = rating.StartDate.Value.Date,
+ Goal = goalrating.GoalEntry.DisplayName,
+ Rating = goalrating.RatingType.RatingId ?? 0,
+ RatingType = goalrating.RatingType,
+ GoalEntry = goalrating.GoalEntry
+
+
+ };
+ dataList.Add(cdata);
+ }
+ }
+ }
+ }
+
+ if (chkShowServiceRecordRatings.IsChecked.HasValue && chkShowServiceRecordRatings.IsChecked.Value && serviceRecordRatings != null)
+ {
+ foreach (var goalrating in serviceRecordRatings)
+ {
+ if (goalrating.GoalEntry != null && goalrating.RatingType != null && goalrating.ServiceRecord != null && (!StartDate.HasValue || goalrating.ServiceRecord.Start >= StartDate.Value) && (!EndDate.HasValue || goalrating.ServiceRecord.Start <= EndDate.Value))
+ {
+ var cdata = new ChartData
+ {
+ Date = goalrating.ServiceRecord.Start.Value,
+ Goal = goalrating.GoalEntry.DisplayName,
+ Rating = goalrating.RatingType.RatingId ?? 0,
+ RatingType = goalrating.RatingType,
+ GoalEntry = goalrating.GoalEntry,
+ ServiceRecord = goalrating.ServiceRecord
+ };
+ dataList.Add(cdata);
+ }
+ }
+ }
+ return dataList;
+ }
+
+ public RatingListVM RatingList
+ {
+ get
+ {
+ return (RatingListVM)this.GetValue(RatingListProperty);
+ }
+
+ set
+ {
+ this.SetValue(RatingListProperty, value);
+ }
+ }
+
+ public SupportConceptVM SupportConcept
+ {
+ get
+ {
+ return (SupportConceptVM)this.GetValue(SupportConceptProperty);
+ }
+
+ set
+ {
+ this.SetValue(SupportConceptProperty, value);
+ }
+ }
+
+ private void button_checkAllGoals_Click(object sender, RoutedEventArgs e)
+ {
+ ListBoxGoals.SelectAll();
+ }
+
+ private void button_uncheckAllGoals_Click(object sender, RoutedEventArgs e)
+ {
+ ListBoxGoals.UnSelectAll();
+ }
+
+
+ private bool IsSeriesSelected(Series serie)
+ {
+ var selected = ListBoxGoals.SelectedItems;
+ foreach (var item in selected)
+ {
+ var goal = item as ListBoxGoalItem;
+
+ if (goal != null && goal.GoalEntry != null && goal.GoalEntry.DisplayName == serie.DisplayName)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private void ListBoxGoals_OnEditValueChanged(object sender, EditValueChangedEventArgs e)
+ {
+ SetSeriesVisibility();
+ }
+
+ private void SetSeriesVisibility()
+ {
+ foreach (var serie in ChartRatings.Diagram.Series)
+ {
+ serie.Visible = IsSeriesSelected(serie);
+ }
+ }
+
+
+ private void ChkShowServiceRecordRatings_OnChecked(object sender, RoutedEventArgs e)
+ {
+ FetchServiceRecords();
+
+ UpdateChart();
+ }
+
+ private void FetchServiceRecords()
+ {
+ if (serviceRecordRatings == null)
+ {
+ serviceRecordRatings = ServiceFacade.DoOperationsServiceSync(s => s.FetchServiceRecordRatings(SupportConcept.DataContract.SupportConceptOid.Value, null, null, null, null, null));
+ }
+ }
+
+ private void ChkShowServiceRecordRatings_OnUnchecked(object sender, RoutedEventArgs e)
+ {
+ UpdateChart();
+ }
+
+ private void chartControl1_MouseMove(object sender, MouseEventArgs e)
+ {
+ TooltipPanel.Children.Clear();
+
+ ChartHitInfo hitInfo = ChartRatings.CalcHitInfo(e.GetPosition(ChartRatings));
+
+ if (hitInfo != null && hitInfo.SeriesPoint != null)
+ {
+ SeriesPoint point = hitInfo.SeriesPoint;
+
+ var cdList = point.Tag as List