diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index 5736d8f02..ec9588375 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -153,6 +153,7 @@
..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll
+
3.5
@@ -246,7 +247,7 @@
MSBuild:Compile
Designer
-
+
Designer
MSBuild:Compile
@@ -690,7 +691,7 @@
MSBuild:Compile
Designer
-
+
BSLogoControl.xaml
@@ -736,6 +737,7 @@
MainDictionary.xaml
+
@@ -780,6 +782,7 @@
+
UploadDialog.xaml
@@ -787,8 +790,8 @@
LockedPage.xaml
-
- MainView.xaml
+
+ MainPage.xaml
@@ -2296,20 +2299,17 @@
{8a83c4dc-a0b1-4a51-ae1d-366d7a05b298}
ChatController
-
- {e3ba193a-a64f-4ce6-91be-f54e551797be}
- BeWoLauncher
-
{D5E53B0F-BF5A-41E8-93E2-0F32845FC729}
Controls
-
+
{efe05c79-e0dd-4311-8b90-a8da7ebdf36f}
- SharedLite
+ SharedLauncher
+ False
- {2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}
+ {2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}
Shared
diff --git a/BeWo/BeWoApp.cs b/BeWo/BeWoApp.cs
deleted file mode 100644
index 81fb4851b..000000000
--- a/BeWo/BeWoApp.cs
+++ /dev/null
@@ -1,989 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Media;
-using System.Windows.Threading;
-
-using BeWo.Core;
-using BeWo.Core.Config;
-using BeWo.ServiceProxy;
-using BeWo.View;
-using BeWo.View.Navigation;
-using BeWo.View.Navigation.Filter;
-
-using BS.Shared;
-using BS.Shared.DataContracts;
-using BS.Shared.DataContracts.Compact;
-using BS.Shared.Extensions;
-using BS.Shared.Core;
-
-using ChatController.HauptKlassen;
-using DevExpress.Xpf.Core;
-using DevExpress.Xpf.Grid;
-using BeWoLauncher.Views.Interface;
-using BeWoLauncher;
-using BeWoLauncher.Cache;
-using BS.SharedLite;
-
-namespace BeWo
-{
- ///
- /// Interaction logic for App.xaml
- ///
- public class BeWoApp : INotifyPropertyChanged
- {
- private static BeWoApp app;
-
- private static FrameworkElement _lockedContent;
-
- public static string ShortVersion = "3";
- public static string Version = "Version 3.0 TEST";
-
- public static int RenderTier = 0;
-
- private static AppSettings _AppSettings;
-
- private static CompactEmployeeDC _CompactLoggedOnEmployee;
- private static EmployeeDC _LoggedOnEmployee;
-
- private static UserDC _LoggedOnUser;
-
- private static MandatorDC _Mandator;
- private static int _LockUITime = 30;
- private static List OpenDevExpressEditForms = new List();
-
- private static DocumentWatcher _DocumentWatcher;
-
- internal static PasswortSecurityStrength PasswortStrength;
-
- public static MainView MainView { get; set; }
- //public static Window MainWindow { get; set; }
- public static WindowCollection Windows{ get; set; }
- public static Application CurrentApplication { get; set; }
-
- public BeWoApp(Application application)
- {
- CurrentApplication = application;
- Windows = new WindowCollection();
- app = this;
-
- app.Resources.MergedDictionaries.Add(new MainDictionary());
-
- //Licenser.LicenseKey = "DGF20-AUTJ7-3K8MD-DNNA";
- DataControlBase.AllowInfiniteGridSize = true;
- //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),
- // new FrameworkPropertyMetadata { DefaultValue = 30 });
-
- RenderTier = RenderCapability.Tier >> 16;
-
- //AppDomain.CurrentDomain.UnhandledException += (s, ex) => ShowError(null, ex.ExceptionObject as Exception, true);
-
- FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
- }
-
- public static void Init2(MainView mainView)
- {
- MainView = mainView;
-
- mainView.GetParent().Dispatcher.UnhandledException += (s, ex)
- =>
- {
- if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded") || !ex.Exception.ToString().Contains("DevExpress.Xpf.Grid.Native.SelectionStrategyCellBase.IsCellSelected"))
- {
- MainView.GetParent().ShowError(null, ex.Exception, true);
- }
- ex.Handled = true;
- };
- }
-
- public static BeWoApp CurrentBeWo => app;
- public Window MainWindow => MainView.GetParent();
-
- public ResourceDictionary Resources { get; set; }
-
- public static Dictionary ICD10Diagnosis { get; set; }
-
- public static EmployeeDC LoggedOnEmployee
- {
- get { return _LoggedOnEmployee; }
-
- set { _LoggedOnEmployee = value; }
- }
-
- public static long? LoggedOnEmployeeOid => _LoggedOnEmployee?.EmployeeOid;
-
- public static CompactEmployeeDC CompactLoggedOnEmployee
- {
- get => _CompactLoggedOnEmployee;
-
- set => _CompactLoggedOnEmployee = value;
- }
-
- public ObservableCollection LoggedOnUsersRights
- {
- get
- {
- if (LoggedOnUser != null)
- return LoggedOnUser.GetGrantedRights().ToObservableCollection();
- return null;
- }
- }
-
- public DocumentWatcher DocumentWatcher
- {
- get
- {
- if (_DocumentWatcher == null)
- {
- _DocumentWatcher = new DocumentWatcher();
- }
-
- return _DocumentWatcher;
- }
- }
-
- public static AppSettings AppSettings
- {
- get
- {
- if (_AppSettings == null)
- {
- RestoreAppSettings();
- }
-
- return _AppSettings;
- }
- }
-
- internal static UserDC LoggedOnUser
- {
- get => _LoggedOnUser;
-
- set
- {
- _LoggedOnUser = value;
- if (_LoggedOnUser != null)
- {
- var settings = _LoggedOnUser.Settings;
-
- ServiceFacade.DoEmployeeServiceAsync(s => s.LoadEmployee(value.Employee.EmployeeOid),
- r =>
- {
- _LoggedOnEmployee = r;
-
- ServiceFacade.DoEmployeeServiceAsync(s => s.LoadCompactEmployee(value.Employee.EmployeeOid), r2 => { _CompactLoggedOnEmployee = r2; });
-
- MainView.GetParent().Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)(() => MainView.InitOffeneTermine()));
- });
- }
-
- CurrentBeWo.FirePropertyChanged("LoggedOnUsersRights");
- }
- }
-
- internal static MandatorDC Mandator
- {
- get => _Mandator;
-
- set
- {
- _Mandator = value;
-
- bool showDatevFields = false;
- bool isServiceRecordNoticeMandatory = true;
- bool isPasswordSecurityActiv = false;
- bool showServiceRecordsDistanceFields = false;
- bool showHilfeplanBezeichnung = false;
- bool showArbeitszeiten = false;
- bool showCustomerDistanceFields = false;
- bool showAdditionalService = false;
- bool showRoundedDurationInEmployeeAnalysis = true;
- bool showTeamNews = false;
- bool showMarker = false;
- bool showAnnualReport = false;
- int maxDaysEditServiceRecordsAllowed = 0;
- int hilfeplanAuslaufAuswahl = 3;
- int anzTageZeiterfassErfolgt = 0;
- int zeiterfassungsSchwellwert = 80;
- bool printerSettingsUseLandscape = false;
- bool printerSettingsUseMargins = false;
- bool printerSettingsUsePaperKind = false;
- var hideServiceRecordInsertedByAndInsertedOn = false;
- bool isEndDateVisible = false;
- bool isOnlyYearMonthVisible = false;
- bool isZeiterfassDateNormal = true;
- bool isZeiterfassungInStdMin = false;
- int lastSelectedStundenkontoIntervall = 3;
- bool showSignatures = false;
- bool showRtfTextfield = false;
- bool showPivotGrid = false;
- bool showUrlaubsplanung = false;
- bool dontShowSpitzabrechnung = false;
- bool showDienstplanung = false;
-
-
- AppSettings.ShowAdvisedAttendedFlag = false;
- String timeRecordingMenuName = "";
-
- if (_Mandator != null)
- {
- string val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowMedication");
- AppSettings.IsMedicationAllowed = val != null && val.Equals("1");
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowScheduler");
- AppSettings.IsSchedulerAllowed = val != null && val.Equals("1");
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowWohnheime");
- AppSettings.IsWohnheimAllowed = val != null && val.Equals("1");
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowChat");
- AppSettings.IsChatAllowed = val != null && val.Equals("1");
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsServiceRecordNoticeMandatory");
- if (val != null && val.Equals("0"))
- {
- isServiceRecordNoticeMandatory = false;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsPasswordSecurityActiv");
- if (val != null && val.Equals("1"))
- {
- isPasswordSecurityActiv = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsEndDateVisible");
- if (val != null && val.Equals("1"))
- {
- isEndDateVisible = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsOnlyYearMonthVisible");
- if (val != null && val.Equals("1"))
- {
- isOnlyYearMonthVisible = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsZeiterfassungInStdMin");
- if (val != null && val.Equals("1"))
- {
- isZeiterfassungInStdMin = true;
- }
- if (!isZeiterfassungInStdMin)
- {
- AppSettings.LetzteZeiterfassungsDauer = ZeiterfassungsDauer.Minuten;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsZeiterfassDateNormal");
- if (val != null && val.Equals("0"))
- {
- isZeiterfassDateNormal = false;
- }
-
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "MaxDaysEditServiceRecordsAllowed");
- int result;
- if (Int32.TryParse(val, out result))
- {
- maxDaysEditServiceRecordsAllowed = result;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "HilfeplanAuslaufAuswahl");
- int resultplan;
- if (Int32.TryParse(val, out resultplan))
- {
- hilfeplanAuslaufAuswahl = resultplan;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "LastSelectedStundenkontoIntervall");
- int resultinterval;
- if (Int32.TryParse(val, out resultinterval))
- {
- lastSelectedStundenkontoIntervall = resultinterval;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "AnzTageZeiterfassErfolgt");
- int resultzeitplan;
- if (Int32.TryParse(val, out resultzeitplan))
- {
- anzTageZeiterfassErfolgt = resultzeitplan;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ZeiterfassungsSchwellwert");
- int resultschwell;
- if (Int32.TryParse(val, out resultschwell))
- {
- zeiterfassungsSchwellwert = resultschwell;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowDistanceFields");
- if (val != null && val.Equals("1"))
- {
- showServiceRecordsDistanceFields = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowHilfeplanBezeichnung");
- if (val != null && val.Equals("1"))
- {
- showHilfeplanBezeichnung = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowArbeitszeiten");
- if (val != null && val.Equals("1"))
- {
- showArbeitszeiten = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowRessources");
- AppSettings.ShowRessources = val != null && val.Equals("1");
-
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowTeamNews");
- if (val != null && val.Equals("1"))
- {
- showTeamNews = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowPivotGrid");
- if (val != null && val.Equals("1"))
- {
- showPivotGrid = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowUrlaubsplanung");
- if (val != null && val.Equals("1"))
- {
- showUrlaubsplanung = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "dontShowSpitzabrechnung");
- if (val != null && val.Equals("1"))
- {
- dontShowSpitzabrechnung = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowDienstplanung");
- if (val != null && val.Equals("1"))
- {
- showDienstplanung = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowMarker");
- if (val != null && val.Equals("1"))
- {
- showMarker = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowAnnualReport");
- if (val != null && val.Equals("1"))
- {
- showAnnualReport = true;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowCustomerDistanceFields");
- if (val != null && val.Equals("1"))
- {
- showCustomerDistanceFields = true;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowAdditionalService");
- if (val != null && val.Equals("1"))
- {
- showAdditionalService = true;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowRoundedDurationInEmployeeAnalysis");
- if (val != null && val.Equals("0"))
- {
- showRoundedDurationInEmployeeAnalysis = false;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowDatevFields");
- if (val != null && val.Equals("1"))
- {
- showDatevFields = true;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "PrinterSettingsUseLandscape");
- if (val != null && val.Equals("1"))
- {
- printerSettingsUseLandscape = true;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "PrinterSettingsUseMargins");
- if (val != null && val.Equals("1"))
- {
- printerSettingsUseMargins = true;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "PrinterSettingsUsePaperKind");
- if (val != null && val.Equals("1"))
- {
- printerSettingsUsePaperKind = true;
- }
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "HideServiceRecordInsertedByAndInsertedOn");
- if (val != null && val.Equals("1"))
- {
- hideServiceRecordInsertedByAndInsertedOn = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowSignature");
- if (val != null && val.Equals("1"))
- {
- showSignatures = true;
- }
-
- val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowRtfTextfield");
- if (val != null && val.Equals("1"))
- {
- showRtfTextfield = true;
- }
-
-
- switch (_Mandator.BeWoClientType)
- {
- case 1:
- //Die Kette
- showDatevFields = true;
- AppSettings.ShowAdvisedAttendedFlag = true;
- break;
- case 2:
- //Datev
- showDatevFields = true;
- break;
- case 3:
- ////Köln Ring
- showDatevFields = true;
- timeRecordingMenuName = "Dokumentation";
- break;
- case 4:
- //Betreuwo
- break;
-
- case 5:
- //Kontakt und Krisenhilfe
- AppSettings.ShowLargeCustomerNotice = true;
- break;
- case 6:
- // Nur Jahresbericht
- break;
- case 7:
- //IBP
- showDatevFields = true;
- break;
- case 8:
- //LH Würzburg
- break;
- case 9:
- //Caritas Frankfurt+Aids Hilfe Gießen + Alle mit Korridor (Kostenträger Hessen)
- break;
- case 10:
- //Integra
- showDatevFields = true;
- break;
- case 11:
- //Hannover
- showDatevFields = true;
- break;
- }
- }
-
- AppSettings.ShowDatevFields = showDatevFields;
- AppSettings.IsServiceRecordNoticeMandatory = isServiceRecordNoticeMandatory;
- AppSettings.IsPasswordSecurityActiv = isPasswordSecurityActiv;
- AppSettings.IsEndDateVisible = isEndDateVisible;
- AppSettings.IsOnlyYearMonthVisible = isOnlyYearMonthVisible;
- AppSettings.IsZeiterfassDateNormal = isZeiterfassDateNormal;
- AppSettings.IsZeiterfassungInStdMin = isZeiterfassungInStdMin;
- AppSettings.MaxDaysEditServiceRecordsAllowed = maxDaysEditServiceRecordsAllowed;
- AppSettings.HilfeplanAuslaufAuswahl = hilfeplanAuslaufAuswahl;
- AppSettings.LastSelectedStundenkontoIntervall = lastSelectedStundenkontoIntervall;
- AppSettings.AnzTageZeiterfassErfolgt = anzTageZeiterfassErfolgt;
- AppSettings.ZeiterfassungsSchwellwert = zeiterfassungsSchwellwert;
- AppSettings.TimeRecordingMenuName = timeRecordingMenuName;
- AppSettings.ShowDistanceFields = showServiceRecordsDistanceFields;
- AppSettings.ShowHilfeplanBezeichnung = showHilfeplanBezeichnung;
- AppSettings.ShowArbeitszeiten = showArbeitszeiten;
- AppSettings.ShowSignatures = showSignatures;
- AppSettings.ShowRtfTextfield = showRtfTextfield;
- AppSettings.ShowCustomerDistanceFields = showCustomerDistanceFields;
- AppSettings.ShowAdditionalService = showAdditionalService;
- AppSettings.ShowRoundedDurationInEmployeeAnalysis = showRoundedDurationInEmployeeAnalysis;
- AppSettings.HideServiceRecordInsertedByAndInsertedOn = hideServiceRecordInsertedByAndInsertedOn;
- AppSettings.ShowTeamNews = showTeamNews;
- AppSettings.ShowMarker = showMarker;
- AppSettings.ShowAnnualReport = showAnnualReport;
- AppSettings.PrinterSettingsUseLandscape = printerSettingsUseLandscape;
- AppSettings.PrinterSettingsUseMargins = printerSettingsUseMargins;
- AppSettings.PrinterSettingsUsePaperKind = printerSettingsUsePaperKind;
- AppSettings.ShowPivotGrid = showPivotGrid;
- AppSettings.ShowUrlaubsplanung = showUrlaubsplanung;
- AppSettings.DontShowSpitzabrechnung = dontShowSpitzabrechnung;
- AppSettings.ShowDienstplanung = showDienstplanung;
-
- BS.Shared.Settings.ApplicationSettings.SupportConceptExpirationLimitInMonths = AppSettings.HilfeplanAuslaufAuswahl;
- }
- }
-
- internal static void ShowError(string p, Exception e, bool v)
- {
- BeWoLaApp.ShowError(p, e, v);
- }
-
- public static int LockUITime
- {
- get
- {
- var lockTime = _Mandator.Settings.SplitToKeyValuePairList(";", "=").FirstOrDefault(f => f.Key.Equals("TimeUntilUILock")).Value;
-
- if (_LoggedOnUser != null && lockTime != null)
- {
- return Convert.ToInt32(lockTime);
- }
-
- return _LockUITime;
- }
-
- set
- {
- _LockUITime = value;
-
- if (_LoggedOnUser == null)
- {
- return;
- }
-
- AutoLockUI.LockUITime = value;
- AutoLockUI.StopTimer();
- AutoLockUI.StartAutoLockUIOption();
- }
- }
-
- public event PropertyChangedEventHandler PropertyChanged;
-
- public static string GetAndCreateUserAppDataPath()
- {
- try
- {
- string localAppData = Environment.GetFolderPath(
- Environment.SpecialFolder.LocalApplicationData);
- string companyFilePath
- = Path.Combine(localAppData, "beyondSoft");
-
- if (!Directory.Exists(companyFilePath))
- Directory.CreateDirectory(companyFilePath);
-
- string bewoFilePath
- = Path.Combine(companyFilePath, "BeWoPlaner");
-
- if (!Directory.Exists(bewoFilePath))
- Directory.CreateDirectory(bewoFilePath);
-
- return bewoFilePath;
- }
- catch (Exception ex)
- {
- MessageBox.Show(
- "Fehler beim Anlegen des Anwendungsordners. Sie besitzen nicht die erforderlichen Rechte, bitte wenden Sie sich an Ihren Systemadministrator.\n" +
- ex.Message, "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- }
- return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
- }
-
- internal static bool HasLoggedOnUserRight(UserRightType[] pRight)
- {
- if (LoggedOnUser != null)
- {
- return pRight == null || (pRight.Length == 1 && pRight[0] == UserRightType.None) || LoggedOnUser.GetGrantedRights().Exists(
- right =>
- {
- var rightAsString = pRight.ToString();
- var vals = rightAsString.Split(",");
-
- foreach (var urt in pRight)
- {
- if (urt == right)
- {
- return true;
- }
- }
-
- return false;
- });
- }
-
- return false;
- }
-
- internal static void SaveAppSettings()
- {
- if (_AppSettings != null && _LoggedOnUser != null && _AppSettings.IsDirty)
- {
- _AppSettings.IsDirty = false;
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "WindowStateType", ((int)_AppSettings.WindowState).ToString(), _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "LastSelectedServiceRecordTimeInterval", ((int)_AppSettings.LastSelectedServiceRecordTimeInterval).ToString(), _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "CustomerFilterInZeiterfassung", ((int)_AppSettings.CustomerFilterInZeiterfassung).ToString(), _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "CustomerFilterSupportConcepts", ((int)_AppSettings.CustomerFilterSupportConcepts).ToString(), _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "CustomerFilterCustomers", ((int)_AppSettings.CustomerFilterCustomers).ToString(), _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "ShowExpiredSupportConcepts", _AppSettings.ShowExpiredSupportConcepts ? "1" : "0", _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "ShowServiceRecordGridControl", _AppSettings.ShowServiceRecordGridControl ? "1" : "0", _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "StartupPanelMaximized", _AppSettings.StartupPanelMaximized, _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "HideServiceRecordInsertedByAndInsertedOn", _AppSettings.HideServiceRecordInsertedByAndInsertedOn ? "1" : "0", _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "DocumentationFontSize", _AppSettings.DocumentationFontSize.ToString(), _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "ZeigeNurMeineTermine", _AppSettings.ZeigeNurMeineTermine ? "1" : "0", _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "LastSelectedServiceRecordTimeIntervalDays", _AppSettings.LastSelectedServiceRecordTimeIntervalDays.ToString(), _LoggedOnUser.Settings);
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "LetzteZeiterfassungsDauer", ((int)_AppSettings.LetzteZeiterfassungsDauer).ToString(), _LoggedOnUser.Settings);
-
- string val = string.Empty;
- if (_AppSettings.StartupPanelOrder != null)
- {
- foreach (string item in _AppSettings.StartupPanelOrder)
- {
- if (val.Length > 0)
- {
- val += "|";
- }
-
- val += item;
- }
- }
-
- UserSettingsUtils.SetSettingValue(SettingsType.ApplicationSettings, "StartupPanelOrder", val, _LoggedOnUser.Settings);
-
- ServiceFacade.DoUserServiceAsync(s => s.UpdateUserSettings(_LoggedOnUser.UserOid.Value, _LoggedOnUser.Settings), ReloadSettings, false);
- }
- }
-
- internal void FirePropertyChanged(string pPropertyName)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(pPropertyName));
- }
- }
-
- public static void InitAutoUILocking()
- {
- EventManager.RegisterClassHandler(typeof(Window), UIElement.PreviewMouseDownEvent, new MouseButtonEventHandler(OnPreviewMouseDown));
- EventManager.RegisterClassHandler(typeof(Window), UIElement.PreviewKeyDownEvent, new KeyEventHandler(OnPreviewKeyDown));
-
- var settingsKeyValuePairList = _Mandator.Settings.SplitToKeyValuePairList(";", "=").ToList();
-
- var x = settingsKeyValuePairList.FirstOrDefault(f => f.Key.Equals("TimeUntilUILock")).Value ?? "NULL";
-
- var y = _LockUITime;
-
- AutoLockUI.LockUITime = Convert.ToInt32(settingsKeyValuePairList.FirstOrDefault(f => f.Key.Equals("TimeUntilUILock")).Value ?? LockUITime.ToString());
-
-
- AutoLockUI.DoAutoLockUIEvent += AutoLockUIDoAutoLockUIEvent;
- AutoLockUI.StartAutoLockUIOption();
- }
-
- private static void ReloadSettings(List settings)
- {
- if (_LoggedOnUser != null)
- _LoggedOnUser.Settings = settings;
- }
-
- private static void RestoreAppSettings()
- {
- if (_LoggedOnUser != null)
- {
- _AppSettings = new AppSettings();
- var settings = _LoggedOnUser.Settings;
-
- var val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "WindowStateType", settings);
- if (int.TryParse(val, out var result))
- {
- _AppSettings.WindowState = (AppSettings.WindowStateType)result;
- }
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "LastSelectedServiceRecordTimeInterval", settings);
- if (int.TryParse(val, out result))
- {
- _AppSettings.LastSelectedServiceRecordTimeInterval = (ServiceRecordTimeInterval)result;
- }
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "CustomerFilterInZeiterfassung", settings);
- if (int.TryParse(val, out result))
- {
- _AppSettings.CustomerFilterInZeiterfassung = (CustomerFilterEnum)result;
- }
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "CustomerFilterSupportConcepts", settings);
- if (int.TryParse(val, out result))
- {
- _AppSettings.CustomerFilterSupportConcepts = (CustomerFilterEnum)result;
- }
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "CustomerFilterCustomers", settings);
- if (int.TryParse(val, out result))
- {
- _AppSettings.CustomerFilterCustomers = (CustomerFilterEnum)result;
- }
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "ShowServiceRecordGridControl", settings);
- _AppSettings.ShowServiceRecordGridControl = val == "1";
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "ShowExpiredSupportConcepts", settings);
- _AppSettings.ShowExpiredSupportConcepts = val != "0";
-
-
-
- _AppSettings.StartupPanelMaximized = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "StartupPanelMaximized", settings);
-
- _AppSettings.DocumentationFontSize = Convert.ToDouble(UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "DocumentationFontSize", settings));
-
- //val = GetSettingValue(SettingsType.ApplicationSettings, "ZeigeNurMeineTermine");
- //_AppSettings.ZeigeNurMeineTermine = val != "0";
-
- _AppSettings.ZeigeNurMeineTermine = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "ZeigeNurMeineTermine", settings) == "1";
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "LastSelectedServiceRecordTimeIntervalDays", settings);
- if (val != null)
- {
- _AppSettings.LastSelectedServiceRecordTimeIntervalDays = Convert.ToInt32(UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "LastSelectedServiceRecordTimeIntervalDays", settings));
- }
-
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "LetzteZeiterfassungsDauer", settings);
- if (val != null)
- {
- var x = Convert.ToInt32(UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "LetzteZeiterfassungsDauer", settings));
- _AppSettings.LetzteZeiterfassungsDauer = x == 0 ? ZeiterfassungsDauer.Minuten : ZeiterfassungsDauer.Stunden;
- }
-
- val = UserSettingsUtils.GetSettingValue(SettingsType.ApplicationSettings, "StartupPanelOrder", settings);
- if (val != null)
- {
- _AppSettings.StartupPanelOrder = new List();
- var panels = val.Split('|');
-
- foreach (var item in panels)
- {
- _AppSettings.StartupPanelOrder.Add(item);
- }
- }
-
- _AppSettings.IsDirty = false;
- }
-
- }
-
- private void BtnOpenServiceRecordView_Click(object sender, RoutedEventArgs e)
- {
- var btn = sender as Button;
- if (btn == null) return;
-
- var dc = btn.Tag as CompactSupportConceptDC;
-
- if (dc == null) return;
-
- if (MainView != null)
- MainView.NavigateToServiceRecordView(dc.SupportConceptOid);
- }
-
- private void Togglebutton_maximise_Checked(object sender, RoutedEventArgs e)
- {
- if (MainView != null)
- MainView.Maximize();
- }
-
- private void Togglebutton_maximise_Unchecked(object sender, RoutedEventArgs e)
- {
- if (MainView != null)
- MainView.Minimize();
- }
-
- private void TogglebuttonChat_maximise_Unchecked(object sender, RoutedEventArgs e)
- {
- if (MainView.HomeView.ServiceChatView != null)
- MainView.HomeView.ServiceChatView.Normal();
- }
-
- private void TogglebuttonChat_maximise_Checked(object sender, RoutedEventArgs e)
- {
- if (MainView.HomeView.ServiceChatView != null)
- MainView.HomeView.ServiceChatView.Maximize();
- }
-
- private void TogglebuttonChat_Minimize_Checked(object sender, RoutedEventArgs e)
- {
- if (MainView.HomeView.ServiceChatView != null)
- MainView.HomeView.ServiceChatView.Minimize();
- }
-
- private void FrameLeftMouseDown(object sender, MouseButtonEventArgs e)
- {
- var border = (Border)sender;
- var borderParent = (Grid)border.Parent;
- DependencyObject template = borderParent.TemplatedParent;
- var parent = new Window();
-
- var x = (FrameworkElement)template;
- if (x != null)
- {
- var y = new FrameworkElement();
- while (y != null)
- {
- y = (FrameworkElement)x.Parent;
- if (y != null)
- x = y;
- }
-
- if (x is Window)
- {
- parent = (Window)x;
- parent.DragMove();
- }
- }
- }
-
- private static void AutoLockUIDoAutoLockUIEvent()
- {
- if (ConnectionInformation.Username.Equals("BSAdmin"))
- {
- AutoLockUI.StartAutoLockUIOption();
- return;
- }
-
- if (MainView.Content is LockedPage)
- {
- AutoLockUI.StartAutoLockUIOption();
- return;
- }
-
- _lockedContent = MainView.Content as FrameworkElement;
-
- //if (_lockedContent is Grid && (_lockedContent as Grid).Children.Contains(LoginControl))
- //{
- // AutoLockUI.StartAutoLockUIOption();
- // return;
- //}
-
- var openWindowCollection = Windows;
- foreach (var blubb in openWindowCollection)
- {
- var abc = (Window)blubb;
-
- if (!abc.Title.Equals("BeWoPlaner") && blubb.GetType() == typeof(WindowContentHolder))
- {
- abc.Close();
- }
- }
-
- MainView.HideCurrentModalViewWindows();
-
- var lockedPage = new LockedPage();
- lockedPage.ButtonLogin.Click += UnlockBeWoPlaner;
-
- CurrentApplication.MainWindow.Content = lockedPage;
-
- CurrentApplication.Dispatcher.Invoke(new Action(() => CurrentApplication.MainWindow?.Activate()));
-
- AutoLockUI.StartAutoLockUIOption();
- }
-
- private static void UnlockBeWoPlaner(object sender, RoutedEventArgs e)
- {
- var lbtn = (Button)sender;
-
- var lbtnParent = (Grid)lbtn.Parent;
- var mainWindowUIElements = new UIElement[lbtnParent.Children.Count];
- lbtnParent.Children.CopyTo(mainWindowUIElements, 0);
-
- var elementList = mainWindowUIElements.ToList();
- var username = ((TextBox)elementList.Where(el => el is TextBox && ((TextBox)el).Name.Equals("TextBoxUsername")).ToList()[0]).Text;
- var password = ((PasswordBox)elementList.Where(el => el is PasswordBox && ((PasswordBox)el).Name.Equals("PasswordBoxPassword")).ToList()[0]).Password;
-
- if (string.IsNullOrEmpty(username) || !username.Equals(_LoggedOnUser.LoginName, StringComparison.OrdinalIgnoreCase))
- {
- MessageBox.Show("Das Programm kann nur vom Benutzer '" + _LoggedOnUser.LoginName + "' entsperrt werden.", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- return;
- }
-
- username = $"{username}//Version=Sperrung aufgehoben";
-
- ServiceFacade.DoUserServiceAsync(u => u.IsUserValid(username, password, ""), r =>
- {
- if (!r.Equals(UserValidationResult.UserValid))
- {
- MessageBox.Show("Anmeldeinformationen nicht bekannt. Bitte überprüfen Sie den Benutzernamen und das Passwort!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- return;
- }
-
- AutoLockUI.HasJustBeenUnlocked = true;
-
- CurrentApplication.Dispatcher.Invoke(delegate
- {
- CurrentApplication.MainWindow.Content = _lockedContent;
-
- MainView.ShowCurrentModalViewWindowsAgain();
- });
- }, true);
- }
-
- private static void OnPreviewMouseDown(object sender, MouseButtonEventArgs e)
- {
- AutoLockUI.ResetLockUITimer();
- }
-
- private static void OnPreviewKeyDown(object sender, KeyEventArgs e)
- {
- AutoLockUI.ResetLockUITimer();
- }
-
- private void Hyperlink_Hilfeplan_Reaktivieren_Click(object sender, RoutedEventArgs e)
- {
- var scNavView = (SupportConceptNavigationView)MainView.ActiveView;
-
- if (scNavView != null)
- {
- var supportConcept = (CompactSupportConceptDC)((Hyperlink)sender).Tag;
- scNavView.MainNavigationView_OnReactivateObject(supportConcept);
- }
- }
-
- public static void GetChatServerUrlAsync(Action callback)
- {
- if (string.IsNullOrWhiteSpace(ConnectionInformation.ServerName))
- {
- var tenant = ConnectionInformation.Tenant;
-
-#if DEBUG
- tenant = "5473568546";
-#endif
-
- var login = new Login(tenant, serverUrl =>
- {
- if (!string.IsNullOrWhiteSpace(serverUrl))
- {
- callback(serverUrl);
- }
- });
- }
- else
- {
- callback?.Invoke(ConnectionInformation.ChatServerAddress);
- }
- }
- public static void Cleanup()
- {
- _lockedContent = null;
- _AppSettings = null;
- _CompactLoggedOnEmployee = null;
- _LoggedOnEmployee = null;
- _LoggedOnUser = null;
- _Mandator = null;
- }
-
- public static void InitBlubb()
- {
- var timer = new System.Threading.Timer(
- e => MainView.AufOffeneTerminePruefen(), null, TimeSpan.Zero, TimeSpan.FromMinutes(1)
- );
- }
- }
-}
\ No newline at end of file
diff --git a/BeWo/Converter/AnonymizationRight2VisibilityConverter.cs b/BeWo/Converter/AnonymizationRight2VisibilityConverter.cs
index b36b10730..1f93bd952 100644
--- a/BeWo/Converter/AnonymizationRight2VisibilityConverter.cs
+++ b/BeWo/Converter/AnonymizationRight2VisibilityConverter.cs
@@ -21,10 +21,10 @@ namespace BeWo.Converter
switch(parameter.ToString())
{
case "Customer":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_Anonymization);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.Customer_Anonymization);
break;
case "Employee":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_Anonymization);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.Employee_Anonymization);
break;
}
diff --git a/BeWo/Converter/ClientType2VisibilityConverter.cs b/BeWo/Converter/ClientType2VisibilityConverter.cs
index 3ba40289b..1a68dd4cc 100644
--- a/BeWo/Converter/ClientType2VisibilityConverter.cs
+++ b/BeWo/Converter/ClientType2VisibilityConverter.cs
@@ -19,7 +19,7 @@ namespace BeWo.Converter
{
Int32.TryParse((string)parameter, out clienttype);
- if (clienttype == BeWoApp.Mandator.BeWoClientType)
+ if (clienttype == MainSession.Mandator.BeWoClientType)
{
return Visibility.Visible;
}
diff --git a/BeWo/Converter/CustomerDCPrintURLConverter.cs b/BeWo/Converter/CustomerDCPrintURLConverter.cs
index 1ccdb964c..5a2be263a 100644
--- a/BeWo/Converter/CustomerDCPrintURLConverter.cs
+++ b/BeWo/Converter/CustomerDCPrintURLConverter.cs
@@ -7,6 +7,7 @@ using BeWo.Core;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
+using BS.SharedLauncher.Information;
namespace BeWo.Converter
{
@@ -21,7 +22,7 @@ namespace BeWo.Converter
return null;
}
- string url = BeWoLauncher.Cache.ConnectionInformation.CoreServerAddressOrigin + "/ReportView.aspx?cOid=" + lDC.CustomerOid + "&type=" + Utils.EnumName(ReportTypes.CustomerData);
+ string url = ConnectionInformation.CoreServerAddressOrigin + "/ReportView.aspx?cOid=" + lDC.CustomerOid + "&type=" + Utils.EnumName(ReportTypes.CustomerData);
url = BeWoWpfUtils.GetHTMLEncodedURL(url);
return new Uri(url);
diff --git a/BeWo/Converter/DeleteForGoodRight2VisibilityConverter.cs b/BeWo/Converter/DeleteForGoodRight2VisibilityConverter.cs
index a4006d403..2f79d9391 100644
--- a/BeWo/Converter/DeleteForGoodRight2VisibilityConverter.cs
+++ b/BeWo/Converter/DeleteForGoodRight2VisibilityConverter.cs
@@ -21,13 +21,13 @@ namespace BeWo.Converter
switch(parameter.ToString())
{
case "Customer":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_Full_Delete);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.Customer_Full_Delete);
break;
case "Employee":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_Full_Delete);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.Employee_Full_Delete);
break;
case "Person":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.Person_Full_Delete);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.Person_Full_Delete);
break;
}
diff --git a/BeWo/Converter/DownloadURLConverter.cs b/BeWo/Converter/DownloadURLConverter.cs
index f83a1c956..05ae7b5d8 100644
--- a/BeWo/Converter/DownloadURLConverter.cs
+++ b/BeWo/Converter/DownloadURLConverter.cs
@@ -3,7 +3,7 @@ using System.Globalization;
using System.Windows.Data;
using BeWo.Core;
-using BeWoLauncher.Cache;
+using BS.SharedLauncher.Information;
namespace BeWo.Converter
{
diff --git a/BeWo/Converter/InvoiceBaseDCPrintURLConverter.cs b/BeWo/Converter/InvoiceBaseDCPrintURLConverter.cs
index df16897ed..1aeb99ffe 100644
--- a/BeWo/Converter/InvoiceBaseDCPrintURLConverter.cs
+++ b/BeWo/Converter/InvoiceBaseDCPrintURLConverter.cs
@@ -4,7 +4,7 @@ using System.Windows.Data;
using BeWo.Core;
using BeWo.ViewModel;
-using BeWoLauncher.Cache;
+using BS.SharedLauncher.Information;
namespace BeWo.Converter
{
diff --git a/BeWo/Converter/ReactivationRight2VisibilityConverter.cs b/BeWo/Converter/ReactivationRight2VisibilityConverter.cs
index 973938e6c..345f4b53d 100644
--- a/BeWo/Converter/ReactivationRight2VisibilityConverter.cs
+++ b/BeWo/Converter/ReactivationRight2VisibilityConverter.cs
@@ -20,19 +20,19 @@ namespace BeWo.Converter
switch (parameter.ToString())
{
case "Person":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.PersonAllowReactivation);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.PersonAllowReactivation);
break;
case "Organisation":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.OrganisationAllowReactivation);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.OrganisationAllowReactivation);
break;
case "SupportConcept":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptAllowReactivation);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.SupportConceptAllowReactivation);
break;
case "Customer":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerAllowReactivation);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.CustomerAllowReactivation);
break;
case "Employee":
- hasRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeAllowReactivation);
+ hasRight = MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeAllowReactivation);
break;
}
diff --git a/BeWo/Converter/Rights2DefaultBooleanConverter.cs b/BeWo/Converter/Rights2DefaultBooleanConverter.cs
index dc966913a..158adb38a 100644
--- a/BeWo/Converter/Rights2DefaultBooleanConverter.cs
+++ b/BeWo/Converter/Rights2DefaultBooleanConverter.cs
@@ -23,7 +23,7 @@ namespace BeWo.Converter
rightsList.AddRange(rights.Select(rightString => (UserRightType) Enum.Parse(typeof (UserRightType), rightString.Trim())));
- tmp = BeWoApp.HasLoggedOnUserRight(rightsList.ToArray()) ? DefaultBoolean.True : DefaultBoolean.False;
+ tmp = MainSession.HasLoggedOnUserRight(rightsList.ToArray()) ? DefaultBoolean.True : DefaultBoolean.False;
}
return tmp;
diff --git a/BeWo/Converter/SettlementDCPrintURLConverter.cs b/BeWo/Converter/SettlementDCPrintURLConverter.cs
index 7cd4f4343..86c2c7cc3 100644
--- a/BeWo/Converter/SettlementDCPrintURLConverter.cs
+++ b/BeWo/Converter/SettlementDCPrintURLConverter.cs
@@ -4,9 +4,9 @@ using System.Windows.Data;
using BeWo.Core;
using BeWo.ViewModel;
-using BeWoLauncher.Cache;
using BS.Shared.Core;
using BS.Shared.DataContracts;
+using BS.SharedLauncher.Information;
namespace BeWo.Converter
{
diff --git a/BeWo/Core/BeWoUtils.cs b/BeWo/Core/BeWoUtils.cs
index 827c0c04c..4567ee8ee 100644
--- a/BeWo/Core/BeWoUtils.cs
+++ b/BeWo/Core/BeWoUtils.cs
@@ -56,7 +56,7 @@ using RestSharp;
using Control = System.Windows.Controls.Control;
using Utils = BS.Shared.Core.Utils;
using Brush = System.Windows.Media.Brush;
-using BeWoLauncher.Cache;
+using BS.SharedLauncher.Information;
namespace BeWo.Core
{
@@ -126,7 +126,7 @@ namespace BeWo.Core
Width = 500,
WindowStartupLocation = WindowStartupLocation.CenterOwner,
GroupBoxContent = control,
- Owner = BeWoApp.CurrentApplication.MainWindow,
+ Owner = Session.GetWindow(),
rootGroupBox = { Header = "Layout speichern" }
};
@@ -151,9 +151,9 @@ namespace BeWo.Core
//var newUri = navigateUriString.Replace(typeString, "template=" + (selectedTemplate.Oid.HasValue ? selectedTemplate.Oid.Value.ToString() : "-1"));
- BeWoApp.MainView.StartWaiting();
+ MainSession.MainPage.StartWaiting();
- StartGetReportStreamAsync(GetReportStreamForWPFControl, newUri, ms => BeWoApp.MainView.Dispatch(delegate
+ StartGetReportStreamAsync(GetReportStreamForWPFControl, newUri, ms => MainSession.MainPage.Dispatch(delegate
{
if (callback != null)
{
@@ -167,9 +167,9 @@ namespace BeWo.Core
}
else
{
- BeWoApp.MainView.StartWaiting();
+ MainSession.MainPage.StartWaiting();
- StartGetReportStreamAsync(GetReportStreamForWPFControl, navigateUriString, ms => BeWoApp.MainView.Dispatch(delegate
+ StartGetReportStreamAsync(GetReportStreamForWPFControl, navigateUriString, ms => MainSession.MainPage.Dispatch(delegate
{
if (callback != null)
{
@@ -246,8 +246,8 @@ namespace BeWo.Core
}
catch (Exception e)
{
- BeWoApp.ShowError(null, e, true);
- BeWoApp.MainView.EndWaiting();
+ Session.ShowError(null, e, true);
+ MainSession.MainPage.EndWaiting();
}
},
null);
@@ -392,10 +392,10 @@ namespace BeWo.Core
Title = viewModel.ToString()
};
- BeWoApp.MainView.OpenedModalViewWindows.Add(CurrentModalViewWindow);
+ MainSession.MainPage.OpenedModalViewWindows.Add(CurrentModalViewWindow);
_ModalViewWindowsToUpdate.Add(CurrentModalViewWindow);
- foreach (var window in BeWoApp.MainView.OpenedModalViewWindows.Where(window => !BeWoApp.MainView.OpenedModalViewWindows.Last().Equals(window)))
+ foreach (var window in MainSession.MainPage.OpenedModalViewWindows.Where(window => !MainSession.MainPage.OpenedModalViewWindows.Last().Equals(window)))
{
ShowModalBackground(window.RootGrid);
}
@@ -405,15 +405,15 @@ namespace BeWo.Core
public static void RemoveModalViewWindow()
{
- if(BeWoApp.MainView.OpenedModalViewWindows.Count > 1 && CurrentModalViewWindow != null)
+ if(MainSession.MainPage.OpenedModalViewWindows.Count > 1 && CurrentModalViewWindow != null)
{
- var nextToLastWindowWithModalBackground = BeWoApp.MainView.OpenedModalViewWindows.ElementAt(BeWoApp.MainView.OpenedModalViewWindows.Count - 2);
+ var nextToLastWindowWithModalBackground = MainSession.MainPage.OpenedModalViewWindows.ElementAt(MainSession.MainPage.OpenedModalViewWindows.Count - 2);
nextToLastWindowWithModalBackground.RootGrid.Children.RemoveAt(1);
}
- BeWoApp.MainView.OpenedModalViewWindows.Remove(CurrentModalViewWindow);
+ MainSession.MainPage.OpenedModalViewWindows.Remove(CurrentModalViewWindow);
- CurrentModalViewWindow = BeWoApp.MainView.OpenedModalViewWindows.Count > 0 ? BeWoApp.MainView.OpenedModalViewWindows.ElementAt(BeWoApp.MainView.OpenedModalViewWindows.Count - 1) : null;
+ CurrentModalViewWindow = MainSession.MainPage.OpenedModalViewWindows.Count > 0 ? MainSession.MainPage.OpenedModalViewWindows.ElementAt(MainSession.MainPage.OpenedModalViewWindows.Count - 1) : null;
}
public static bool CheckViewIsCalledFromWindow(BeWoView view)
@@ -446,10 +446,10 @@ namespace BeWo.Core
public static void UpdateAllViews(T updatedObject) where T : IFilterableDC
{
- var activeView = BeWoApp.MainView.ActiveView;
+ var activeView = MainSession.MainPage.ActiveView;
UpdateView(activeView, updatedObject);
- if(BeWoApp.MainView.OpenedModalViewWindows.Count <= 0)
+ if(MainSession.MainPage.OpenedModalViewWindows.Count <= 0)
{
return;
}
@@ -933,7 +933,7 @@ namespace BeWo.Core
else if(typeof(T) == typeof(CompactSupportConceptDC))
{
var updatedSupportConcept = new CompactSupportConceptDC();
- ServiceFacade.DoCustomerServiceSync(s => updatedSupportConcept = s.LoadCompactSupportConceptDC((pUpdateObject as CompactSupportConceptDC).SupportConceptOid, BeWoApp.LoggedOnEmployee.EmployeeOid));
+ ServiceFacade.DoCustomerServiceSync(s => updatedSupportConcept = s.LoadCompactSupportConceptDC((pUpdateObject as CompactSupportConceptDC).SupportConceptOid, MainSession.LoggedOnEmployee.EmployeeOid));
if(equityInvoiceView?.SelectedSupportConcept != null)
{
@@ -1069,9 +1069,9 @@ namespace BeWo.Core
pSupportConceptView.popupedit_employee.Text = updatedEmployee.ToString();
}
- if(BeWoApp.LoggedOnUser.Employee.EmployeeOid.Equals(updatedEmployee.EmployeeOid))
+ if(MainSession.LoggedOnUser.Employee.EmployeeOid.Equals(updatedEmployee.EmployeeOid))
{
- BeWoApp.LoggedOnUser.Employee = updatedEmployee;
+ MainSession.LoggedOnUser.Employee = updatedEmployee;
}
pSupportConceptView.popupedit_employee.Text = updatedEmployee.ToString();
@@ -1264,7 +1264,7 @@ namespace BeWo.Core
pUserView.ViewModel.Employee = updatedEmployee;
var myView = new BeWoView();
- BeWoApp.MainView.Views.TryGetValue(UIContext.User, out myView);
+ MainSession.MainPage.Views.TryGetValue(UIContext.User, out myView);
if(myView is UserNavigationView naviView)
{
@@ -1568,15 +1568,15 @@ namespace BeWo.Core
private static void UpdateLoggedInEmployee(long employeeOid)
{
- if (employeeOid != BeWoApp.LoggedOnUser.Employee.EmployeeOid)
+ if (employeeOid != MainSession.LoggedOnUser.Employee.EmployeeOid)
return;
- ServiceFacade.DoEmployeeServiceSync(s => BeWoApp.LoggedOnUser.Employee = s.LoadCompactEmployee(BeWoApp.LoggedOnUser.Employee.EmployeeOid));
+ ServiceFacade.DoEmployeeServiceSync(s => MainSession.LoggedOnUser.Employee = s.LoadCompactEmployee(MainSession.LoggedOnUser.Employee.EmployeeOid));
- if (BeWoApp.MainView.HomeButtonPanel == null)
+ if (MainSession.MainPage.HomeButtonPanel == null)
return;
- //BeWoApp.MainView.HomeView.txtHeader.Text = BeWoApp.LoggedOnUser.Employee.ToString();
+ //MainSession.MainPage.HomeView.txtHeader.Text = MainSession.LoggedOnUser.Employee.ToString();
}
public static void WriteExcelFile(string content, string path)
@@ -1678,7 +1678,7 @@ namespace BeWo.Core
var dc = vm.CommitToDataContract();
- dc.Employee = selectedEmployee ?? BeWoApp.LoggedOnUser.Employee;
+ dc.Employee = selectedEmployee ?? MainSession.LoggedOnUser.Employee;
dc.SupportConcept = scDc;
dc.CostBearer = cbDc;
@@ -1733,12 +1733,12 @@ namespace BeWo.Core
var r = new List();
- var maxdays = BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed;
+ var maxdays = MainSession.AppSettings.MaxDaysEditServiceRecordsAllowed;
- if (withoutClient && BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed <= 0)
+ if (withoutClient && MainSession.AppSettings.MaxDaysEditServiceRecordsAllowed <= 0)
maxdays = -1;
- if (BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
+ if (MainSession.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowEditAfterMaxDaysInNextMonth))
maxdays = -1;
var test = dc.Start;
@@ -1761,20 +1761,20 @@ namespace BeWo.Core
exitLoop = true;
break;
case ServiceRecordValidationResult.OutOfEditLimit:
- MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da bereits der " + BeWoApp.AppSettings.MaxDaysEditServiceRecordsAllowed + ". des nachfolgenden Monats überschritten ist.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
+ MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da bereits der " + MainSession.AppSettings.MaxDaysEditServiceRecordsAllowed + ". des nachfolgenden Monats überschritten ist.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
lValid = false;
exitLoop = true;
break;
case ServiceRecordValidationResult.FristAbgelaufen:
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecordAllowEditAfterMindays))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ServiceRecordAllowEditAfterMindays))
{
- if (BeWoApp.AppSettings.AnzTageZeiterfassErfolgt == 1)
+ if (MainSession.AppSettings.AnzTageZeiterfassErfolgt == 1)
{
MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von einem Tag erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
}
else
{
- MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von " + BeWoApp.AppSettings.AnzTageZeiterfassErfolgt + " Tagen erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
+ MessageBox.Show("Sie können keine neuen Leistungen für den " + vm.DateAndTime.Value.ToShortDateString() + " dokumentieren, da die Zeiterfassung innerhalb von " + MainSession.AppSettings.AnzTageZeiterfassErfolgt + " Tagen erfolgen muss.", "Speichern", MessageBoxButton.OK, MessageBoxImage.Information);
}
lValid = false;
@@ -1788,7 +1788,7 @@ namespace BeWo.Core
break;
case ServiceRecordValidationResult.ServiceRecordOverlapping:
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLS))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLS))
{
MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag (" + result.Message + " bei Klient/in " + result.CustomerName + ") .\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
lValid = false;
@@ -1801,7 +1801,7 @@ namespace BeWo.Core
break;
case ServiceRecordValidationResult.EmployeeOverlapping:
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLSForEmployee))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateOverlappingFLSForEmployee))
{
MessageBox.Show("An dem gewählten Datum '" + vm.DateAndTime.Value.ToShortDateString() + " " + vm.DateAndTime.Value.ToShortTimeString() + "' existiert bereits ein Eintrag von " + result.EmployeeName + "\n(" + result.Message + ").\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
lValid = false;
@@ -1823,7 +1823,7 @@ namespace BeWo.Core
"Die für {2} genehmigten FLS ({0:N}) werden mit diesem Eintrag überschritten. ({1:N}).",
result.ApprovedHours, result.HoursNew, klient);
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateMoreFLSThanApproved))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ServiceRecord_AllowCreateMoreFLSThanApproved))
{
MessageBox.Show(msg + ").\nSpeichern nicht möglich.", "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Information);
lValid = false;
@@ -1840,7 +1840,7 @@ namespace BeWo.Core
{
klient2 = "Klient/in " + result.CustomerName;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.BookServiceRecordAfterSettlementInvoice))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.BookServiceRecordAfterSettlementInvoice))
{
MessageBox.Show(String.Format("Sie können den Eintrag nicht bearbeiten, da bereits eine Spitzabrechnung für {0} erstellt wurde.", klient2), "Speichern nicht möglich", MessageBoxButton.OK, MessageBoxImage.Warning);
lValid = false;
@@ -1883,7 +1883,7 @@ namespace BeWo.Core
var dc = vm.CommitToDataContract();
- var emp = BeWoApp.LoggedOnUser.Employee;
+ var emp = MainSession.LoggedOnUser.Employee;
var r = new List();
@@ -1956,7 +1956,7 @@ namespace BeWo.Core
var serienTermine = (List)variablen["serienTermine"];
var mehrtaegigeTermine = (List)variablen["mehrtaegigeTermine"];
- ServiceFacade.DoReportServiceAsync(strom => strom.CreateKalenderReport(appointmentIds, employeeOid, serienTermine, selectedDays, mehrtaegigeTermine), ms => BeWoApp.MainView.Dispatch(() => ShowReportWindow(ms, title)));
+ ServiceFacade.DoReportServiceAsync(strom => strom.CreateKalenderReport(appointmentIds, employeeOid, serienTermine, selectedDays, mehrtaegigeTermine), ms => MainSession.MainPage.Dispatch(() => ShowReportWindow(ms, title)));
break;
case ReportEnum.KassenbuchReportEnum:
@@ -1967,7 +1967,7 @@ namespace BeWo.Core
var kasse = (BargeldkassenDC) variablen["bargeldkasse"];
- ServiceFacade.DoReportServiceAsync(strom => strom.CreateKassenbuchReportImZeitraum(zeitraum,endzeitraum, kasse, objectOid, objectTid), ms => BeWoApp.MainView.Dispatch(() => ShowReportWindow(ms, title)));
+ ServiceFacade.DoReportServiceAsync(strom => strom.CreateKassenbuchReportImZeitraum(zeitraum,endzeitraum, kasse, objectOid, objectTid), ms => MainSession.MainPage.Dispatch(() => ShowReportWindow(ms, title)));
break;
case ReportEnum.ZahlungsbelegEnum:
@@ -1975,7 +1975,7 @@ namespace BeWo.Core
var objectOid2 = Convert.ToInt64(variablen["objectoid"]);
var objectTid2 = (TableID) Enum.Parse(typeof(TableID), variablen["objecttid"].ToString());
- ServiceFacade.DoReportServiceAsync(strom => strom.CreateKassenbelegReport(transaktion, objectOid2, objectTid2), ms => BeWoApp.MainView.Dispatch(() => ShowReportWindow(ms, title)));
+ ServiceFacade.DoReportServiceAsync(strom => strom.CreateKassenbelegReport(transaktion, objectOid2, objectTid2), ms => MainSession.MainPage.Dispatch(() => ShowReportWindow(ms, title)));
break;
}
@@ -1999,9 +1999,9 @@ namespace BeWo.Core
ms.Close();
ms.Dispose();
- //report.DefaultPrinterSettingsUsing.UseLandscape = BeWoApp.AppSettings.PrinterSettingsUseLandscape;
- //report.DefaultPrinterSettingsUsing.UseMargins = BeWoApp.AppSettings.PrinterSettingsUseMargins;
- //report.DefaultPrinterSettingsUsing.UsePaperKind = BeWoApp.AppSettings.PrinterSettingsUsePaperKind;
+ //report.DefaultPrinterSettingsUsing.UseLandscape = MainSession.AppSettings.PrinterSettingsUseLandscape;
+ //report.DefaultPrinterSettingsUsing.UseMargins = MainSession.AppSettings.PrinterSettingsUseMargins;
+ //report.DefaultPrinterSettingsUsing.UsePaperKind = MainSession.AppSettings.PrinterSettingsUsePaperKind;
BeWoWindow window = null;
@@ -2013,7 +2013,7 @@ namespace BeWo.Core
documentPreviewControl.Loaded += CustomizeReportPreviewToolBar;
documentPreviewControl.SnapsToDevicePixels = true;
- window = new BeWoWindow { GroupBoxContent = documentPreviewControl, Owner = BeWoApp.CurrentApplication.MainWindow };
+ window = new BeWoWindow { GroupBoxContent = documentPreviewControl, Owner = Session.GetWindow() };
ThemeManager.SetTheme(window, Theme.Office2010Black);
}
@@ -2031,7 +2031,7 @@ namespace BeWo.Core
documentPreviewControl.Visibility = Visibility.Visible;
- BeWoApp.MainView.EndWaiting();
+ MainSession.MainPage.EndWaiting();
}
public static PasswortSecurityStrength CheckPasswordSecurity(string paswd)
@@ -2105,7 +2105,7 @@ namespace BeWo.Core
{
if (employees.Count == 0)
{
- employees.Add(BeWoApp.CompactLoggedOnEmployee);
+ employees.Add(MainSession.CompactLoggedOnEmployee);
}
// Gruppenbuchungen
@@ -2135,7 +2135,7 @@ namespace BeWo.Core
{
if(employees.Count == 0)
{
- employees.Add(BeWoApp.CompactLoggedOnEmployee);
+ employees.Add(MainSession.CompactLoggedOnEmployee);
}
// Gruppenbuchungen
@@ -2147,7 +2147,7 @@ namespace BeWo.Core
public static void OwnChatSynchronisationVeranlassen()
{
- if (!BeWoApp.Mandator.Apikey.IsNullOrEmpty())
+ if (!MainSession.Mandator.Apikey.IsNullOrEmpty())
{
try
{
@@ -2157,22 +2157,22 @@ namespace BeWo.Core
tenant = "5473568546";
#endif
- BeWoApp.GetChatServerUrlAsync(serverUrl =>
+ MainSession.GetChatServerUrlAsync(serverUrl =>
{
- var client = new RestClient($"{serverUrl}/api/ownchat/sync/schedule/{BeWoApp.Mandator.Apikey}/{tenant}");
+ var client = new RestClient($"{serverUrl}/api/ownchat/sync/schedule/{MainSession.Mandator.Apikey}/{tenant}");
var request = new RestRequest();
client.ExecuteAsync(request, null);
});
-// var serverUrl = BeWoApp.GetChatServerURL();
+// var serverUrl = MainSession.GetChatServerURL();
// if (!string.IsNullOrEmpty(serverUrl))
// {
//#if DEBUG
-// var endurl = serverUrl + "/api/ownchat/sync/schedule/" + BeWoApp.Mandator.Apikey + "/5473568546";
+// var endurl = serverUrl + "/api/ownchat/sync/schedule/" + MainSession.Mandator.Apikey + "/5473568546";
//#else
-// var endurl = serverUrl + "/api/ownchat/sync/schedule/" + BeWoApp.Mandator.Apikey + "/" + BeWoLauncher.Cache.ConnectionInformation.Tenant;
+// var endurl = serverUrl + "/api/ownchat/sync/schedule/" + MainSession.Mandator.Apikey + "/" + ConnectionInformation.Tenant;
//#endif
// WebRequest request = WebRequest.Create(endurl);
@@ -2194,19 +2194,19 @@ namespace BeWo.Core
public static bool HasRights(IEnumerable pUserRightTypes)
{
- return BeWoApp.HasLoggedOnUserRight(pUserRightTypes.ToArray());
+ return MainSession.HasLoggedOnUserRight(pUserRightTypes.ToArray());
}
public static bool HasRight(UserRightType pUserRightType)
{
- return BeWoApp.LoggedOnUser.HasRight(pUserRightType);
+ return MainSession.LoggedOnUser.HasRight(pUserRightType);
}
public static bool CheckSchedulerRights(Appointment pAppointment, bool pIsNew, SchedulerRightsCheckType pCheckType)
{
var storage = pAppointment.GetCustomFieldStorage();
- return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, BeWoApp.LoggedOnUser);
+ return Utils.CheckSchedulerRights(storage.CustomerList, storage.ResourceList, storage.EmployeeList.ToList(), storage.Originator, pIsNew, pCheckType, MainSession.LoggedOnUser);
}
}
}
diff --git a/BeWo/Core/DocumentWatcher.cs b/BeWo/Core/DocumentWatcher.cs
index eff4c5861..6a4744afd 100644
--- a/BeWo/Core/DocumentWatcher.cs
+++ b/BeWo/Core/DocumentWatcher.cs
@@ -4,6 +4,7 @@ using BeWo.ViewModel;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
+using BS.SharedLauncher.Information;
using System;
using System.Collections.Generic;
using System.IO;
@@ -84,7 +85,7 @@ namespace BeWo.Core
{
if (!offeneDialoge.ContainsKey(e.FullPath) )
{
- BeWoApp.CurrentApplication.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
+ Session.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
{
var dialog = new UploadDialog(e.FullPath, x);
diff --git a/BeWo/Core/DownloadLinkEngine.cs b/BeWo/Core/DownloadLinkEngine.cs
index 8a5e1f84b..f031b93c6 100644
--- a/BeWo/Core/DownloadLinkEngine.cs
+++ b/BeWo/Core/DownloadLinkEngine.cs
@@ -1,4 +1,4 @@
-using BeWoLauncher.Cache;
+using BS.SharedLauncher.Information;
using System;
using System.ComponentModel;
@@ -57,7 +57,7 @@ namespace BeWo.Core
public Uri GenerateNewExcelLink()
{
this._ExcelFileId = Guid.NewGuid() + ".xls";
- //alles nach dem ? wird beim klick auf word/excel export im jeweiligen view erstellt tenant=" + BeWoLauncher.Cache.ConnectionInformation.Tenant + "&username=" + BeWoLauncher.Cache.ConnectionInformation.Username + "&token=" + BeWoApp.LoggedOnUser.RC2Password + "&
+ //alles nach dem ? wird beim klick auf word/excel export im jeweiligen view erstellt tenant=" + ConnectionInformation.Tenant + "&username=" + ConnectionInformation.Username + "&token=" + MainSession.LoggedOnUser.RC2Password + "&
this._ExcelUri = new Uri(ConnectionInformation.CoreServerAddressOrigin + "/Download.aspx?fileid=" + this._ExcelFileId);
if (this.PropertyChanged != null)
@@ -72,7 +72,7 @@ namespace BeWo.Core
{
this._WordFileId = Guid.NewGuid() + ".doc";
//alles nach dem ? wird beim klick auf word/excel export im jeweiligen view erstellt
- this._WordUri = new Uri(ConnectionInformation.CoreServerAddressOrigin + "/Download.aspx?tenant=" + BeWoLauncher.Cache.ConnectionInformation.Tenant + "&username=" + BeWoLauncher.Cache.ConnectionInformation.Username + "&token=" + BeWoApp.LoggedOnUser.RC2Password + "&fileid=" + this._WordFileId);
+ this._WordUri = new Uri(ConnectionInformation.CoreServerAddressOrigin + "/Download.aspx?tenant=" + ConnectionInformation.Tenant + "&username=" + ConnectionInformation.Username + "&token=" + MainSession.LoggedOnUser.RC2Password + "&fileid=" + this._WordFileId);
if (this.PropertyChanged != null)
{
diff --git a/BeWo/Core/Service/Cache.cs b/BeWo/Core/Service/Cache.cs
index 9fe1669e2..1f8cc9e65 100644
--- a/BeWo/Core/Service/Cache.cs
+++ b/BeWo/Core/Service/Cache.cs
@@ -128,7 +128,7 @@ namespace BeWo.Core.Service
if (this.mActiveSupportConceptCostbearerList == null)
{
ServiceFacade.DoOperationsServiceAsync(
- s => s.GetAllActiveSupportConceptCostbearer(false, true, BeWoApp.LoggedOnEmployee.EmployeeOid.Value),
+ s => s.GetAllActiveSupportConceptCostbearer(false, true, MainSession.LoggedOnEmployee.EmployeeOid.Value),
r =>
{
r.Sort((x, y) => (x.LastName + ", " + x.FirstName).CompareTo(y.LastName + ", " + y.FirstName));
@@ -149,7 +149,7 @@ namespace BeWo.Core.Service
// {
// var list = ServiceFacade.DoOperationsServiceSync(
- // s => s.GetAllActiveSupportConceptCostbearer(false, true, BeWoApp.LoggedOnEmployee.EmployeeOid.Value));
+ // s => s.GetAllActiveSupportConceptCostbearer(false, true, MainSession.LoggedOnEmployee.EmployeeOid.Value));
// list.Sort((x, y) => { return (x.LastName + ", " + x.FirstName).CompareTo(y.LastName + ", " + y.FirstName); });
// this.mActiveSupportConceptCostbearerList = list;
@@ -166,7 +166,7 @@ namespace BeWo.Core.Service
if (this.mActiveAndApprovedSupportConceptCostbearerList == null)
{
ServiceFacade.DoOperationsServiceAsync(
- s => s.GetAllActiveSupportConceptCostbearer(true, true, BeWoApp.LoggedOnEmployee.EmployeeOid.Value),
+ s => s.GetAllActiveSupportConceptCostbearer(true, true, MainSession.LoggedOnEmployee.EmployeeOid.Value),
r =>
{
r.Sort((x, y) => { return (x.LastName + ", " + x.FirstName).CompareTo(y.LastName + ", " + y.FirstName); });
@@ -295,7 +295,7 @@ namespace BeWo.Core.Service
if (this.mSupportConceptTree == null)
{
ServiceFacade.DoOperationsServiceAsync(
- s => s.GetSupportConceptTreeByEmployee(BeWoApp.LoggedOnUser.Employee.EmployeeOid),
+ s => s.GetSupportConceptTreeByEmployee(MainSession.LoggedOnUser.Employee.EmployeeOid),
lTree =>
{
lTree.DoForEach(n => n.RecursivelySetParentOnChilds());
@@ -453,7 +453,7 @@ namespace BeWo.Core.Service
if (mAllCompactCustomers == null)
{
ServiceFacade.DoCustomerServiceAsync(
- s => s.GetAllActiveAndArchivedCustomersCompact(BeWoApp.LoggedOnEmployee.EmployeeOid.Value),
+ s => s.GetAllActiveAndArchivedCustomersCompact(MainSession.LoggedOnEmployee.EmployeeOid.Value),
r =>
{
r.Sort((x, y) => (x.LastName + ", " + x.FirstName).CompareTo(y.LastName + ", " + y.FirstName));
@@ -472,7 +472,7 @@ namespace BeWo.Core.Service
{
if (mAllCompactCustomers == null)
{
- ServiceFacade.DoCustomerServiceSync(cs => mAllCompactCustomers = cs.GetAllActiveAndArchivedCustomersCompact(BeWoApp.LoggedOnEmployee.EmployeeOid.Value));
+ ServiceFacade.DoCustomerServiceSync(cs => mAllCompactCustomers = cs.GetAllActiveAndArchivedCustomersCompact(MainSession.LoggedOnEmployee.EmployeeOid.Value));
mAllCompactCustomers.Sort((x, y) => (x.LastName + ", " + x.FirstName).CompareTo(y.LastName + ", " + y.FirstName));
}
diff --git a/BeWo/Core/Service/SupportConceptService.cs b/BeWo/Core/Service/SupportConceptService.cs
index ed7fac0ea..5c018db33 100644
--- a/BeWo/Core/Service/SupportConceptService.cs
+++ b/BeWo/Core/Service/SupportConceptService.cs
@@ -309,18 +309,18 @@ namespace BeWo.Core.Service
}
- dc.Employee = BeWoApp.LoggedOnUser.Employee;
+ dc.Employee = MainSession.LoggedOnUser.Employee;
dc.Customer = customerCompact;
if (customerCompact != null)
{
dc.SupportConcept = HoleHilfeplanAusListe(scList, customerCompact, firstTime, lastTime);
}
- if (BeWoApp.AppSettings.IsEndDateVisible)
+ if (MainSession.AppSettings.IsEndDateVisible)
{
dc.ServiceRecordFormat = ServiceRecordFormate.ZeiterfassungMitEndDatum;
}
- else if (BeWoApp.AppSettings.IsOnlyYearMonthVisible)
+ else if (MainSession.AppSettings.IsOnlyYearMonthVisible)
{
dc.ServiceRecordFormat = ServiceRecordFormate.ZeiterfassungMitMonatJahr;
}
diff --git a/BeWo/LockedPage.xaml b/BeWo/LockedPage.xaml
index 678dad83f..c07359352 100644
--- a/BeWo/LockedPage.xaml
+++ b/BeWo/LockedPage.xaml
@@ -15,7 +15,7 @@
-
+
diff --git a/BeWo/LockedPage.xaml.cs b/BeWo/LockedPage.xaml.cs
index 86ef169ef..ba8642aba 100644
--- a/BeWo/LockedPage.xaml.cs
+++ b/BeWo/LockedPage.xaml.cs
@@ -9,8 +9,8 @@ namespace BeWo
InitializeComponent();
Loaded += LockedPage_Loaded;
- LblVersion.Content = BeWoApp.Version;
- lblGesperrt.Content = $"Gesperrt von Benutzer {BeWoApp.LoggedOnUser.Employee.FirstName} {BeWoApp.LoggedOnUser.Employee.LastName}";
+ LblVersion.Content = MainSession.Version;
+ lblGesperrt.Content = $"Gesperrt von Benutzer {MainSession.LoggedOnUser.Employee.FirstName} {MainSession.LoggedOnUser.Employee.LastName}";
}
private void LockedPage_Loaded(object sender, RoutedEventArgs e)
diff --git a/BeWo/MainDictionary.xaml b/BeWo/MainDictionary.xaml
index 714edd1e3..73bd991e9 100644
--- a/BeWo/MainDictionary.xaml
+++ b/BeWo/MainDictionary.xaml
@@ -1,7 +1,6 @@
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
@@ -602,23 +604,23 @@
-
-
-
+
+
+
Drucken
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -627,7 +629,7 @@
-
+
@@ -639,7 +641,7 @@
-
+
@@ -729,7 +731,7 @@
-
+
@@ -747,7 +749,7 @@
-
+
@@ -833,14 +835,14 @@
-
+
-
+
@@ -875,7 +877,7 @@
-
+
@@ -894,27 +896,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs
index 7644e6363..2e6de6856 100644
--- a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs
+++ b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs
@@ -30,7 +30,7 @@ using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.Shared.Translation;
-using BS.SharedLite;
+using BS.SharedLauncher;
using DevExpress.Xpf.Bars;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Scheduler;
@@ -106,13 +106,13 @@ namespace BeWo.Scheduler.View
public bool ZeigeNurMeineTermine
{
- get => BeWoApp.AppSettings.ZeigeNurMeineTermine;
+ get => MainSession.AppSettings.ZeigeNurMeineTermine;
set
{
- if(BeWoApp.AppSettings.ZeigeNurMeineTermine != value)
+ if(MainSession.AppSettings.ZeigeNurMeineTermine != value)
{
- BeWoApp.AppSettings.ZeigeNurMeineTermine = value;
- BeWoApp.SaveAppSettings();
+ MainSession.AppSettings.ZeigeNurMeineTermine = value;
+ MainSession.SaveAppSettings();
OnPropertyChanged(nameof(ZeigeNurMeineTermine));
}
}
@@ -277,7 +277,7 @@ namespace BeWo.Scheduler.View
AlleMitarbeiterCB.IsChecked = ListEquals(value, AllEmployees);
- ZeigeNurMeineTermine = value.Count == 1 && value.Contains(BeWoApp.CompactLoggedOnEmployee);
+ ZeigeNurMeineTermine = value.Count == 1 && value.Contains(MainSession.CompactLoggedOnEmployee);
OnPropertyChanged(nameof(SelectedEmployees));
OnPropertyChanged(nameof(SelectedItems));
@@ -434,13 +434,13 @@ namespace BeWo.Scheduler.View
{
this.Dispatch(() =>
{
- if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen))
+ if(!MainSession.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen))
{
- allEmployees = new List { BeWoApp.CompactLoggedOnEmployee };
+ allEmployees = new List { MainSession.CompactLoggedOnEmployee };
}
- var darfKlientenAnsichtSehen = BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers) && BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View);
- var darfTermineAllerKlientenSehen = BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen);
+ var darfKlientenAnsichtSehen = MainSession.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers) && MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View);
+ var darfTermineAllerKlientenSehen = MainSession.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen);
if(darfKlientenAnsichtSehen)
{
@@ -454,7 +454,7 @@ namespace BeWo.Scheduler.View
allCustomers.Clear();
}
- if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAnsehen))
+ if(!MainSession.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAnsehen))
{
resourceDictionary.Clear();
}
@@ -529,7 +529,7 @@ namespace BeWo.Scheduler.View
if(_IstErsterAufruf)
{
- if(MainView.HatNeueTermine && !_IsComingFromHomeDragPanel)
+ if(MainPage.HatNeueTermine && !_IsComingFromHomeDragPanel)
{
FensterOeffnen();
}
@@ -577,16 +577,16 @@ namespace BeWo.Scheduler.View
private void InitRights()
{
- MitarbeiterTabItem.Visibility = BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen) ? Visibility.Visible : Visibility.Collapsed;
- RessourcenTabItem.Visibility = BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAnsehen) ? Visibility.Visible : Visibility.Collapsed;
- KlientenTabItem.Visibility = BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll) ? Visibility.Visible : Visibility.Collapsed;
+ MitarbeiterTabItem.Visibility = MainSession.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen) ? Visibility.Visible : Visibility.Collapsed;
+ RessourcenTabItem.Visibility = MainSession.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAnsehen) ? Visibility.Visible : Visibility.Collapsed;
+ KlientenTabItem.Visibility = MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View) || MainSession.LoggedOnUser.HasRight(UserRightType.ViewAll) ? Visibility.Visible : Visibility.Collapsed;
MitarbeiterEbenenCheckBox.Visibility = MitarbeiterTabItem.Visibility;
RessourcenEbenenCheckBox.Visibility = RessourcenTabItem.Visibility;
KlientenEbenenCheckBox.Visibility = KlientenTabItem.Visibility;
MitarbeiterfarbenEinAusCheckBox.Visibility = MitarbeiterTabItem.Visibility;
- ButtonDeleteAppointments.Visibility = BeWoApp.LoggedOnUser.HasRight(UserRightType.Termine_IntervalDelete) ? Visibility.Visible : Visibility.Collapsed;
+ ButtonDeleteAppointments.Visibility = MainSession.LoggedOnUser.HasRight(UserRightType.Termine_IntervalDelete) ? Visibility.Visible : Visibility.Collapsed;
}
private void UpdateDataSource(ISchedulerViewModel vm)
@@ -608,14 +608,14 @@ namespace BeWo.Scheduler.View
foreach(var item in Scheduler.Storage.AppointmentStorage.Items)
{
- var bapp = item.GetSourceObject(Scheduler.GetCoreStorage()) as IBeWoAppointment;
+ var bapp = item.GetSourceObject(Scheduler.GetCoreStorage()) as IMainSessionointment;
if(item.IsRecurring)
{
var ausnahmen = item.GetExceptions();
foreach(var exc in ausnahmen)
{
- var b = exc.GetSourceObject(Scheduler.GetCoreStorage()) as IBeWoAppointment;
+ var b = exc.GetSourceObject(Scheduler.GetCoreStorage()) as IMainSessionointment;
if(b?.CustomFields == null)
{
continue;
@@ -823,12 +823,12 @@ namespace BeWo.Scheduler.View
SelectedEmployees.Remove(employee);
OnPropertyChanged(nameof(SelectedEmployees));
- if (employee != null && employee.Equals(BeWoApp.CompactLoggedOnEmployee))
+ if (employee != null && employee.Equals(MainSession.CompactLoggedOnEmployee))
{
ZeigeNurMeineTermine = false;
ReloadVM(true);
}
- else if (SelectedEmployees.Count == 1 && SelectedEmployees.First().Equals(BeWoApp.CompactLoggedOnEmployee))
+ else if (SelectedEmployees.Count == 1 && SelectedEmployees.First().Equals(MainSession.CompactLoggedOnEmployee))
{
ZeigeNurMeineTermine = true;
}
@@ -934,15 +934,15 @@ namespace BeWo.Scheduler.View
public void UpdateRequestString()
{
- ServiceFacade.DoResourceServiceSync(r => _Liste = r.GetAllOpenAppointmentsForEmployee(BeWoApp.LoggedOnEmployee.EmployeeOid.Value));
+ ServiceFacade.DoResourceServiceSync(r => _Liste = r.GetAllOpenAppointmentsForEmployee(MainSession.LoggedOnEmployee.EmployeeOid.Value));
var count = 0;
var oidList = new List();
foreach (var termin in _Liste)
{
- if (termin.Originator.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value)
+ if (termin.Originator.EmployeeOid == MainSession.LoggedOnEmployee.EmployeeOid.Value)
{
- foreach (var status in termin.EmployeeList.Where(w => w.Employee.EmployeeOid != BeWoApp.LoggedOnEmployee.EmployeeOid.Value))
+ foreach (var status in termin.EmployeeList.Where(w => w.Employee.EmployeeOid != MainSession.LoggedOnEmployee.EmployeeOid.Value))
{
if (status.IsPChanged && status.ParticipationAnswer != ParticipationAnswer.Offen && status.ParticipationAnswer != ParticipationAnswer.Verstrichen && !oidList.Contains(status.Employee2SchedulerAppointmentOid.Value))
{
@@ -953,9 +953,9 @@ namespace BeWo.Scheduler.View
}
else
{
- if (termin.EmployeeList.Any(a => a.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value))
+ if (termin.EmployeeList.Any(a => a.Employee.EmployeeOid == MainSession.LoggedOnEmployee.EmployeeOid.Value))
{
- foreach (var status in termin.EmployeeList.Where(w => w.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value))
+ foreach (var status in termin.EmployeeList.Where(w => w.Employee.EmployeeOid == MainSession.LoggedOnEmployee.EmployeeOid.Value))
{
if (!status.IsPChanged && status.ParticipationAnswer == ParticipationAnswer.Offen && status.ParticipationAnswer != ParticipationAnswer.Verstrichen && !oidList.Contains(status.Employee2SchedulerAppointmentOid.Value))
{
@@ -1139,7 +1139,7 @@ namespace BeWo.Scheduler.View
}
}
- if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.Mitarbeiterstundenkonto_ViewAll))
+ if(!MainSession.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen) || !MainSession.LoggedOnUser.HasRight(UserRightType.Mitarbeiterstundenkonto_ViewAll))
{
var verfuegbarkeitMenue = e.Menu.ItemLinks.FirstOrDefault(f => f.GetType() == typeof(BarButtonItemLink) && (((BarButtonItemLink)f).Item?.Name.Contains("MitarbeiterVerfuegbarkeitPruefenButtonItem") ?? false));
@@ -1173,7 +1173,7 @@ namespace BeWo.Scheduler.View
}
}
- if(!BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderInZeiterfassungUebernehmen))
+ if(!MainSession.LoggedOnUser.HasRight(UserRightType.KalenderInZeiterfassungUebernehmen))
{
BarItemLinkBase menuItem = null;
@@ -1205,7 +1205,7 @@ namespace BeWo.Scheduler.View
var seperatorTop = e.Menu.ItemLinks.FirstOrDefault(f => f.GetType() == typeof(BarItemLinkSeparator) && ((BarItemLinkSeparator) f).BarItemName.Equals("ZusagenStackSeperatorTop"));
var seperatorBottom = e.Menu.ItemLinks.FirstOrDefault(f => f.GetType() == typeof(BarItemLinkSeparator) && ((BarItemLinkSeparator) f).BarItemName.Equals("ZusagenStackSeperatorBottom"));
- if(!Scheduler.SelectedAppointments[0].CF_IsTask() && Scheduler.SelectedAppointments[0].CF_EmployeeList().Any(a => a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid)))
+ if(!Scheduler.SelectedAppointments[0].CF_IsTask() && Scheduler.SelectedAppointments[0].CF_EmployeeList().Any(a => a.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid)))
{
return;
}
@@ -1279,9 +1279,9 @@ namespace BeWo.Scheduler.View
var ersteller = appointment.CF_Originator();
var mitarbeiterliste = appointment.CF_EmployeeList();
- var istErsteller = ersteller?.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) ?? false;
+ var istErsteller = ersteller?.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid) ?? false;
- if(!istErsteller && appointment.CF_IsPrivate() && !mitarbeiterliste.Any(a => Equals(a.Employee, BeWoApp.CompactLoggedOnEmployee)))
+ if(!istErsteller && appointment.CF_IsPrivate() && !mitarbeiterliste.Any(a => Equals(a.Employee, MainSession.CompactLoggedOnEmployee)))
{
darfTerminDetailsSehen = false;
}
@@ -1291,7 +1291,7 @@ namespace BeWo.Scheduler.View
private void AllowAppointmentCreateEvent(object sender, AppointmentOperationEventArgs e)
{
- var darfAnlegen = (BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAnlegen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnlegen));
+ var darfAnlegen = (MainSession.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAnlegen) || MainSession.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnlegen));
e.Allow = darfAnlegen;
}
@@ -1350,9 +1350,9 @@ namespace BeWo.Scheduler.View
private void NurEigeneKlientenAnzeigen(object sender, RoutedEventArgs e)
{
- //!BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) && BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers) ? AllCustomers :
+ //!MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View) && MainSession.LoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers) ? AllCustomers :
- var relatedCustomerOids = BeWoApp.LoggedOnEmployee.RelatedCustomers.Select(s => s.Customer.CustomerOid);
+ var relatedCustomerOids = MainSession.LoggedOnEmployee.RelatedCustomers.Select(s => s.Customer.CustomerOid);
if (NurMeineKlientenCB.IsChecked.HasValue && NurMeineKlientenCB.IsChecked.Value)
{
@@ -1390,14 +1390,14 @@ namespace BeWo.Scheduler.View
var originator = customFieldStorage.Originator;
- if(customFieldStorage.EmployeeList == null || originator.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value)
+ if(customFieldStorage.EmployeeList == null || originator.EmployeeOid == MainSession.LoggedOnEmployee.EmployeeOid.Value)
{
return false;
}
var empList = customFieldStorage.EmployeeList;
- return empList.Any(a => a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && a.ParticipationAnswer == ParticipationAnswer.Offen);
+ return empList.Any(a => a.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid) && a.ParticipationAnswer == ParticipationAnswer.Offen);
}).ToList();
var updates = vm.Appointments.Where(app =>
@@ -1412,7 +1412,7 @@ namespace BeWo.Scheduler.View
var empList = customFieldStorage.EmployeeList;
var or = customFieldStorage.Originator;
- return or.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && empList.Any(a => a.IsPChanged && a.ParticipationAnswer != ParticipationAnswer.Offen && a.ParticipationAnswer != ParticipationAnswer.Verstrichen && !a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid));
+ return or.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid) && empList.Any(a => a.IsPChanged && a.ParticipationAnswer != ParticipationAnswer.Offen && a.ParticipationAnswer != ParticipationAnswer.Verstrichen && !a.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid));
}).ToList();
if(!zuBestaetigen.Any() && !updates.Any())
@@ -1552,7 +1552,7 @@ namespace BeWo.Scheduler.View
var el = sa.CF_EmployeeList();
var neu = new ObservableCollection(el.DoForEach(dfe =>
{
- if(!dfe.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid))
+ if(!dfe.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid))
{
return;
}
@@ -1746,7 +1746,7 @@ namespace BeWo.Scheduler.View
public void ReloadAppointmentViewModel(DateTime pIntervalStart, DateTime pIntervalEnd, List pSelectedEmployees, List pSelectedCustomer, List pSelectedResources, bool pEmployeesOnly, bool pCustomersOnly, bool pResourcesOnly, bool pPrivateAppointmentsOnly, bool pOnlyMyAppointments, bool pShouldShowAbsenceTimes)
{
- if (!BeWoApp.LoggedOnEmployee.EmployeeOid.HasValue)
+ if (!MainSession.LoggedOnEmployee.EmployeeOid.HasValue)
{
return;
}
@@ -1756,16 +1756,16 @@ namespace BeWo.Scheduler.View
GetCacheObjects((c, e, r) =>
{
- ServiceFacade.DoResourceServiceAsync(s2 => s2.LoadFilteredAppointmentsMitAufgaben(BeWoApp.HasLoggedOnUserRight(new[] {UserRightType.KalenderMitarbeitertermineAnsehen}), BeWoApp.LoggedOnEmployee.EmployeeOid.Value, start, end, pSelectedEmployees, pSelectedCustomer, pSelectedResources, pEmployeesOnly, pCustomersOnly, pResourcesOnly, pPrivateAppointmentsOnly, pOnlyMyAppointments, IsTasksVisible),
+ ServiceFacade.DoResourceServiceAsync(s2 => s2.LoadFilteredAppointmentsMitAufgaben(MainSession.HasLoggedOnUserRight(new[] {UserRightType.KalenderMitarbeitertermineAnsehen}), MainSession.LoggedOnEmployee.EmployeeOid.Value, start, end, pSelectedEmployees, pSelectedCustomer, pSelectedResources, pEmployeesOnly, pCustomersOnly, pResourcesOnly, pPrivateAppointmentsOnly, pOnlyMyAppointments, IsTasksVisible),
appointments =>
{
- ServiceFacade.DoResourceServiceAsync(s3 => s3.GetAllActiveAbsenceTimesInInterval(start, end, BeWoApp.LoggedOnEmployee.EmployeeOid.Value, BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen)),
+ ServiceFacade.DoResourceServiceAsync(s3 => s3.GetAllActiveAbsenceTimesInInterval(start, end, MainSession.LoggedOnEmployee.EmployeeOid.Value, MainSession.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen)),
absenceTimes =>
{
this.Dispatch(() =>
{
- var prefilteredAppointments = appointments.Where(w => (w.EmployeeList.Count == 0 && w.Originator.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) ||
- w.EmployeeList.Count > 0 && w.EmployeeList.Any(a => a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid)) ||
+ var prefilteredAppointments = appointments.Where(w => (w.EmployeeList.Count == 0 && w.Originator.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid) ||
+ w.EmployeeList.Count > 0 && w.EmployeeList.Any(a => a.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid)) ||
BeWoUtils.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen)) && (!w.EmployeeList.TrueForAll(e2a => e2a.ParticipationAnswer == ParticipationAnswer.Absage) || w.EmployeeList == null || w.EmployeeList.Count == 0)).ToList();
var vm = new SchedulerAppointmentListVM(prefilteredAppointments, c, e, r);
@@ -1861,7 +1861,7 @@ namespace BeWo.Scheduler.View
return;
try
{
- var productIdentifier = string.Format("-//{0}//DXScheduler iCalendarExchange Example//DE", BeWoApp.Mandator);
+ var productIdentifier = string.Format("-//{0}//DXScheduler iCalendarExchange Example//DE", MainSession.Mandator);
var exporter = new iCalendarExporter(Scheduler.GetCoreStorage()) { ProductIdentifier = productIdentifier };
exporter.AppointmentExporting += OnAppointmentExporting;
@@ -2084,7 +2084,7 @@ namespace BeWo.Scheduler.View
{
{ "appointmentOidListe", appointmentOidListe },
{ "datesList", datesList },
- { "employeeOid", BeWoApp.LoggedOnEmployee.EmployeeOid },
+ { "employeeOid", MainSession.LoggedOnEmployee.EmployeeOid },
{ "serienTermine", serienTermine },
{"mehrtaegigeTermine", neueTermine}
};
@@ -2163,16 +2163,16 @@ namespace BeWo.Scheduler.View
{
var cb = (CheckBox) sender;
- if (CheckBoxConverter != null && BeWoApp.CompactLoggedOnEmployee != null)
+ if (CheckBoxConverter != null && MainSession.CompactLoggedOnEmployee != null)
{
if (cb.IsChecked != null && cb.IsChecked.Value)
{
- SelectedEmployees = new List{BeWoApp.CompactLoggedOnEmployee};
- CheckBoxConverter.AktuellerMitarbeiter = BeWoApp.CompactLoggedOnEmployee;
+ SelectedEmployees = new List{MainSession.CompactLoggedOnEmployee};
+ CheckBoxConverter.AktuellerMitarbeiter = MainSession.CompactLoggedOnEmployee;
}
else if (cb.IsChecked != null && !cb.IsChecked.Value && SelectedEmployees.Count == 1)
{
- SelectedEmployees.Remove(BeWoApp.CompactLoggedOnEmployee);
+ SelectedEmployees.Remove(MainSession.CompactLoggedOnEmployee);
CheckBoxConverter.AktuellerMitarbeiter = null;
}
@@ -2252,23 +2252,23 @@ namespace BeWo.Scheduler.View
var onlyPrivateAppointments = ShowPrivateAppointmentsCheckBox.IsChecked != null && ShowPrivateAppointmentsCheckBox.IsChecked.Value;
var showOnlyMyAppointments = ZeigeNurMeineTermine;
- var loggedOnUserHasRightToSeeAllAppointments = BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll);
- var loggedOnEmployeeOid = BeWoApp.LoggedOnEmployee.EmployeeOid.Value;
+ var loggedOnUserHasRightToSeeAllAppointments = MainSession.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen) || MainSession.LoggedOnUser.HasRight(UserRightType.ViewAll);
+ var loggedOnEmployeeOid = MainSession.LoggedOnEmployee.EmployeeOid.Value;
var date = DeleteForGoodIntervalEndDateEdit.DateTime;
var userRights = new Dictionary
{
{
- UserRightType.KalenderKliententermineAendern, BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAendern)
+ UserRightType.KalenderKliententermineAendern, MainSession.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAendern)
},
{
- UserRightType.KalenderMitarbeitertermineAendern, BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAendern)
+ UserRightType.KalenderMitarbeitertermineAendern, MainSession.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAendern)
},
{
- UserRightType.KalenderRessourcentermineAendern, BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAendern)
+ UserRightType.KalenderRessourcentermineAendern, MainSession.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAendern)
},
{
- UserRightType.KalenderRessourcentermineAndererAendern, BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAndererAendern)
+ UserRightType.KalenderRessourcentermineAndererAendern, MainSession.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAndererAendern)
}
};
@@ -2677,7 +2677,7 @@ namespace BeWo.Scheduler.View
var employeeList = customFieldStorage.EmployeeList;
var isTask = customFieldStorage.IsTask;
- return employeeList.Any(e => e.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && e.ParticipationAnswer == ParticipationAnswer.Vorbehalt) ?
+ return employeeList.Any(e => e.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid) && e.ParticipationAnswer == ParticipationAnswer.Vorbehalt) ?
new SolidColorBrush(Color.FromRgb(185, 39, 217)) :
isTask ? new SolidColorBrush(Color.FromRgb(153, 59, 59)) : new SolidColorBrush(Color.FromRgb(192, 255, 208));
}
diff --git a/BeWo/Scheduler/View/RequestAnswerView.xaml b/BeWo/Scheduler/View/RequestAnswerView.xaml
index 76b92e951..2412fdb11 100644
--- a/BeWo/Scheduler/View/RequestAnswerView.xaml
+++ b/BeWo/Scheduler/View/RequestAnswerView.xaml
@@ -33,7 +33,7 @@
-
+
@@ -957,7 +957,7 @@
-
+
@@ -990,8 +990,8 @@
-
-
+
@@ -1025,10 +1025,10 @@
@@ -1683,7 +1683,7 @@
@@ -2004,7 +2004,7 @@
-
+
@@ -2012,7 +2012,7 @@
@@ -2206,7 +2206,7 @@
-
+
@@ -2225,7 +2225,7 @@
-
+
@@ -2325,7 +2325,7 @@
-
+
@@ -2345,7 +2345,7 @@
-
+
@@ -2364,7 +2364,7 @@
-
+
@@ -3019,7 +3019,7 @@
-
+
@@ -3034,7 +3034,7 @@
-
+
@@ -3051,7 +3051,7 @@
-
+
@@ -3067,7 +3067,7 @@
-
+
@@ -3083,7 +3083,7 @@
-
+
@@ -3099,7 +3099,7 @@
-
+
@@ -3116,7 +3116,7 @@
-
+
@@ -3136,7 +3136,7 @@
-
+
@@ -3156,7 +3156,7 @@
-
+
@@ -3172,7 +3172,7 @@
-
+
@@ -3263,7 +3263,7 @@
-
+
@@ -4703,7 +4703,7 @@
-
+
diff --git a/BeWo/Styles/OrangeBlack.xaml.cs b/BeWo/Styles/OrangeBlack.xaml.cs
index 1c18489df..eff0bcfe7 100644
--- a/BeWo/Styles/OrangeBlack.xaml.cs
+++ b/BeWo/Styles/OrangeBlack.xaml.cs
@@ -18,7 +18,7 @@ namespace BeWo.Styles
private void Hyperlink_Organisation_Reaktivieren_Click(object sender, RoutedEventArgs e)
{
- var av = BeWoApp.MainView.ActiveView;
+ var av = MainSession.MainPage.ActiveView;
var orgaNavView = (OrganisationNavigationView) av;
@@ -31,7 +31,7 @@ namespace BeWo.Styles
private void Hyperlink_Person_Reaktivieren_Click(object sender, RoutedEventArgs e)
{
- var av = BeWoApp.MainView.ActiveView;
+ var av = MainSession.MainPage.ActiveView;
var personNavView = (PersonNavigationView) av;
@@ -44,7 +44,7 @@ namespace BeWo.Styles
private void Hyperlink_Person_Delete_For_Good_Click(object sender, RoutedEventArgs e)
{
- var av = BeWoApp.MainView.ActiveView;
+ var av = MainSession.MainPage.ActiveView;
var personNavView = (PersonNavigationView) av;
@@ -57,7 +57,7 @@ namespace BeWo.Styles
private void Hyperlink_Employee_Reaktivieren_Click(object sender, RoutedEventArgs e)
{
- var av = BeWoApp.MainView.ActiveView;
+ var av = MainSession.MainPage.ActiveView;
var employeeNavView = (EmployeeNavigationView) av;
@@ -70,7 +70,7 @@ namespace BeWo.Styles
private void Hyperlink_Employee_Delete_For_Good_Click(object sender, RoutedEventArgs e)
{
- var av = BeWoApp.MainView.ActiveView;
+ var av = MainSession.MainPage.ActiveView;
var employeeNavView = (EmployeeNavigationView) av;
@@ -83,7 +83,7 @@ namespace BeWo.Styles
private void Hyperlink_Employee_Anonymize_Click(object sender, RoutedEventArgs e)
{
- var av = BeWoApp.MainView.ActiveView;
+ var av = MainSession.MainPage.ActiveView;
var employeeNavView = (EmployeeNavigationView) av;
@@ -96,7 +96,7 @@ namespace BeWo.Styles
private void Hyperlink_Employee_Print_Click(object sender, RoutedEventArgs e)
{
- var av = BeWoApp.MainView.ActiveView;
+ var av = MainSession.MainPage.ActiveView;
var employeeNavView = (EmployeeNavigationView)av;
diff --git a/BeWo/UploadDialog.xaml b/BeWo/UploadDialog.xaml
index c658c3f3a..c835cf6ec 100644
--- a/BeWo/UploadDialog.xaml
+++ b/BeWo/UploadDialog.xaml
@@ -7,7 +7,7 @@
AllowsTransparency="True"
Background="Transparent" ResizeMode="NoResize" >
-
+
diff --git a/BeWo/UploadDialog.xaml.cs b/BeWo/UploadDialog.xaml.cs
index 9593dda28..aa1670b92 100644
--- a/BeWo/UploadDialog.xaml.cs
+++ b/BeWo/UploadDialog.xaml.cs
@@ -37,7 +37,7 @@ namespace BeWo
{
InitializeComponent();
InitCommandBindings();
- Owner = GetWindow(BeWoApp.MainView.ActiveView);
+ Owner = GetWindow(MainSession.MainPage.ActiveView);
schalter = iterator;
if (schalter == 1)
{
diff --git a/BeWo/Validation/ValidationAttribute.cs b/BeWo/Validation/ValidationAttribute.cs
index 675b82155..f9be4ec21 100644
--- a/BeWo/Validation/ValidationAttribute.cs
+++ b/BeWo/Validation/ValidationAttribute.cs
@@ -73,7 +73,7 @@ namespace BeWo.Validation
break;
case ValidationRules.EmptyNoticeInNewServiceRecordsAllowed:
- if (BeWoApp.AppSettings.IsServiceRecordNoticeMandatory)
+ if (MainSession.AppSettings.IsServiceRecordNoticeMandatory)
{
if (pValue is string)
{
diff --git a/BeWo/View/BargeldkassenView.xaml b/BeWo/View/BargeldkassenView.xaml
index b3ee19573..205da9825 100644
--- a/BeWo/View/BargeldkassenView.xaml
+++ b/BeWo/View/BargeldkassenView.xaml
@@ -9,47 +9,53 @@
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:controls="clr-namespace:BeWo.View.Controls"
+ xmlns:conv="clr-namespace:BeWo.Converter"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
mc:Ignorable="d" VerticalAlignment="Stretch" Focusable="True">
+
+
+
+
-
-
+
+
+
+
-
+
@@ -256,7 +262,7 @@
SelectedItem="{Binding Path=PreselectedYear, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"/>-->
-
+
@@ -264,7 +270,7 @@
-
+
diff --git a/BeWo/View/BargeldkassenView.xaml.cs b/BeWo/View/BargeldkassenView.xaml.cs
index 6ed21fccb..ab8dcd59a 100644
--- a/BeWo/View/BargeldkassenView.xaml.cs
+++ b/BeWo/View/BargeldkassenView.xaml.cs
@@ -153,19 +153,19 @@ namespace BeWo.View
if (currentObjectTid == TableID.Customer)
{
- editRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll);
- editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten)) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
+ editRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll);
+ editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten)) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
- deleteRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungLoeschen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll);
- createRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnlegen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll);
+ deleteRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungLoeschen) || MainSession.LoggedOnUser.HasRight(UserRightType.DeleteAll);
+ createRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnlegen) || MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll);
}
else
{
- editRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll);
- editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten)) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
+ editRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll);
+ editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten)) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
- deleteRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenLoeschen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll);
- createRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenAnlegen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll);
+ deleteRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenLoeschen) || MainSession.LoggedOnUser.HasRight(UserRightType.DeleteAll);
+ createRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenAnlegen) || MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll);
}
darfBargeldTransaktionenBearbeiten = editRight;
diff --git a/BeWo/View/BeWoFileView.xaml b/BeWo/View/BeWoFileView.xaml
index 78d21de65..a30d8cc14 100644
--- a/BeWo/View/BeWoFileView.xaml
+++ b/BeWo/View/BeWoFileView.xaml
@@ -2,15 +2,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
VerticalAlignment="Stretch" Focusable="True">
-
-
-
+
+
+
-
-
+
\ No newline at end of file
diff --git a/BeWo/View/BeWoFileView.xaml.cs b/BeWo/View/BeWoFileView.xaml.cs
index f0232c36d..a365ceeb6 100644
--- a/BeWo/View/BeWoFileView.xaml.cs
+++ b/BeWo/View/BeWoFileView.xaml.cs
@@ -21,6 +21,7 @@ using BS.Shared;
using BS.Shared.Core;
using DevExpress.Xpf.Grid;
using Microsoft.Win32;
+using BS.SharedLauncher.Information;
namespace BeWo.View
{
@@ -98,7 +99,7 @@ namespace BeWo.View
// vm.SubFolders[i].Files.Add(new FileAttachmentVM(new FileAttachmentDC()) { FileName = "File " + i + " " + j, Folder = vm.SubFolders[i] });
// }
//}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsDownloadAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.DocumentsDownloadAll))
{
ColumnDownload.Visible = false;
ColumnDownload.ShowInColumnChooser = false;
@@ -587,9 +588,9 @@ namespace BeWo.View
var tmp = Path.GetTempPath() + Path.GetFileName(lFA.URL);
- BeWoApp.CurrentBeWo.DocumentWatcher.FileCreated -= DocumentWatcher_FileCreated;
- BeWoApp.CurrentBeWo.DocumentWatcher.FileDeleted -= DocumentWatcher_FileDeleted;
- BeWoApp.CurrentBeWo.DocumentWatcher.StoppeDateiUeberwachung(tmp);
+ MainSession.DocumentWatcher.FileCreated -= DocumentWatcher_FileCreated;
+ MainSession.DocumentWatcher.FileDeleted -= DocumentWatcher_FileDeleted;
+ MainSession.DocumentWatcher.StoppeDateiUeberwachung(tmp);
if (File.Exists(tmp))
File.Delete(tmp);
@@ -603,9 +604,9 @@ namespace BeWo.View
- BeWoApp.CurrentBeWo.DocumentWatcher.StarteDateiUeberwachung(new DocumentWatcherInfo(tmp, cb.Description, cb.BeWoFolderOid, cb.FileAttachmentOid, cb.FileAttachmentVersion, _ObjectOid, _ObjectTid));
- BeWoApp.CurrentBeWo.DocumentWatcher.FileCreated += DocumentWatcher_FileCreated;
- BeWoApp.CurrentBeWo.DocumentWatcher.FileDeleted += DocumentWatcher_FileDeleted;
+ MainSession.DocumentWatcher.StarteDateiUeberwachung(new DocumentWatcherInfo(tmp, cb.Description, cb.BeWoFolderOid, cb.FileAttachmentOid, cb.FileAttachmentVersion, _ObjectOid, _ObjectTid));
+ MainSession.DocumentWatcher.FileCreated += DocumentWatcher_FileCreated;
+ MainSession.DocumentWatcher.FileDeleted += DocumentWatcher_FileDeleted;
return;
@@ -699,7 +700,8 @@ namespace BeWo.View
if (folder != null)
{
var newFileVM = new FileAttachmentVM(fileAttachment);
- BeWoApp.CurrentApplication.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
+
+ Session.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
{
folder.Files.Add(newFileVM);
newFileVM.Folder = folder;
diff --git a/BeWo/View/BeWoView.cs b/BeWo/View/BeWoView.cs
index 33f98f772..727e60834 100644
--- a/BeWo/View/BeWoView.cs
+++ b/BeWo/View/BeWoView.cs
@@ -78,11 +78,11 @@ namespace BeWo.View
}
}
- protected MainView MainView
+ protected MainPage MainPage
{
get
{
- return BeWoApp.MainView;
+ return MainSession.MainPage;
}
}
@@ -131,7 +131,7 @@ namespace BeWo.View
public bool SaveData()
{
- if (!BeWoApp.HasLoggedOnUserRight(this.GetSaveDemands()))
+ if (!MainSession.HasLoggedOnUserRight(this.GetSaveDemands()))
{
MessageBox.Show("Sie besitzen nicht die nötigen Rechte um zu speichern. Bitte wenden Sie sich an den Administrator!", "Autorisierung fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Warning);
return false;
@@ -192,12 +192,12 @@ namespace BeWo.View
protected virtual void popup_Closed(object sender, EventArgs e)
{
- this.MainView.AnimateOpacity(1, 100);
+ this.MainPage.AnimateOpacity(1, 100);
}
protected virtual void popup_Opened(object sender, EventArgs e)
{
- this.MainView.AnimateOpacity(0.5, 200);
+ this.MainPage.AnimateOpacity(0.5, 200);
}
}
}
\ No newline at end of file
diff --git a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml
index e6a0e38b0..4f302597e 100644
--- a/BeWo/View/Controls/ComboBoxTreeViewControl.xaml
+++ b/BeWo/View/Controls/ComboBoxTreeViewControl.xaml
@@ -4,9 +4,14 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:clientPartials="clr-namespace:BS.Shared.DataContracts.ClientPartials;assembly=BS.Shared"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
+
+
+
+
@@ -149,7 +154,7 @@
-
+
diff --git a/BeWo/View/Controls/ComboBoxTreeViewControlV2.xaml b/BeWo/View/Controls/ComboBoxTreeViewControlV2.xaml
index cb678f2ec..654114534 100644
--- a/BeWo/View/Controls/ComboBoxTreeViewControlV2.xaml
+++ b/BeWo/View/Controls/ComboBoxTreeViewControlV2.xaml
@@ -5,8 +5,13 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dx="clr-namespace:DevExpress.Xpf.Core;assembly=DevExpress.Xpf.Core.v17.1"
xmlns:shared="clr-namespace:BeWo.Core"
+ xmlns:conv="clr-namespace:BeWo.Converter"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
+
+
+
+
diff --git a/BeWo/View/Controls/CompactAdditionalServiceGroupControl.xaml.cs b/BeWo/View/Controls/CompactAdditionalServiceGroupControl.xaml.cs
index 750dc931d..c34cb23b5 100644
--- a/BeWo/View/Controls/CompactAdditionalServiceGroupControl.xaml.cs
+++ b/BeWo/View/Controls/CompactAdditionalServiceGroupControl.xaml.cs
@@ -79,7 +79,7 @@ namespace BeWo.View.Controls
var allCustomers = new List();
SelectedCustomers.Clear();
- ServiceFacade.DoCustomerServiceSync(s => allCustomers = s.GetAllActiveCustomersCompact(false, BeWoApp.LoggedOnEmployee.EmployeeOid));
+ ServiceFacade.DoCustomerServiceSync(s => allCustomers = s.GetAllActiveCustomersCompact(false, MainSession.LoggedOnEmployee.EmployeeOid));
foreach (var item in customers)
{
diff --git a/BeWo/View/Controls/GoalRatingControl.xaml b/BeWo/View/Controls/GoalRatingControl.xaml
index 64e8c0331..b8b5e1ed9 100644
--- a/BeWo/View/Controls/GoalRatingControl.xaml
+++ b/BeWo/View/Controls/GoalRatingControl.xaml
@@ -11,7 +11,7 @@
x:Class="BeWo.View.Controls.GoalRatingControl"
d:DesignHeight="200" d:DesignWidth="300"
mc:Ignorable="d">
-
+
diff --git a/BeWo/View/Controls/MultiAddServGroupOfPeopleSelectionControl.xaml.cs b/BeWo/View/Controls/MultiAddServGroupOfPeopleSelectionControl.xaml.cs
index c02517f7f..5ff4ce495 100644
--- a/BeWo/View/Controls/MultiAddServGroupOfPeopleSelectionControl.xaml.cs
+++ b/BeWo/View/Controls/MultiAddServGroupOfPeopleSelectionControl.xaml.cs
@@ -108,7 +108,7 @@ namespace BeWo.View.Controls
private void btnAddCustomer_Click(object sender, RoutedEventArgs e)
{
- ServiceFacade.DoCustomerServiceAsync(s => s.GetAllActiveCustomersCompact(true, BeWoApp.LoggedOnUser.Employee.EmployeeOid),
+ ServiceFacade.DoCustomerServiceAsync(s => s.GetAllActiveCustomersCompact(true, MainSession.LoggedOnUser.Employee.EmployeeOid),
r =>
{
var list = r.ToList();
@@ -178,7 +178,7 @@ namespace BeWo.View.Controls
{ // Doppelklick auf den ToggleButton abfangen
var dc = (((ListBoxItem)sender).Content as AdditionalServiceGroupMember).Customer;
- if (dc == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
+ if (dc == null || !MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
return;
VMFactory.CreateCustomerVMAsync(dc.CustomerOid,
diff --git a/BeWo/View/Controls/MultiEmployeeSelectionControl.xaml.cs b/BeWo/View/Controls/MultiEmployeeSelectionControl.xaml.cs
index 8052d8e48..9464c3fc4 100644
--- a/BeWo/View/Controls/MultiEmployeeSelectionControl.xaml.cs
+++ b/BeWo/View/Controls/MultiEmployeeSelectionControl.xaml.cs
@@ -75,7 +75,7 @@ namespace BeWo.View.Controls
{
var dc = ((ListBoxItem)sender).Content as CompactEmployeeDC;
- if (dc == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (dc == null || !MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
return;
VMFactory.CreateEmployeeVMAsync(dc.EmployeeOid,
diff --git a/BeWo/View/Controls/MultiSupportConceptSelectionControl.xaml.cs b/BeWo/View/Controls/MultiSupportConceptSelectionControl.xaml.cs
index d6b13e9e7..595eddb8c 100644
--- a/BeWo/View/Controls/MultiSupportConceptSelectionControl.xaml.cs
+++ b/BeWo/View/Controls/MultiSupportConceptSelectionControl.xaml.cs
@@ -139,7 +139,7 @@ namespace BeWo.View.Controls
private void btnAddGroup_Click(object sender, RoutedEventArgs e)
{
- ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllGroupsCompact(BeWoApp.LoggedOnEmployee.EmployeeOid),
+ ServiceFacade.DoEmployeeServiceAsync(s => s.GetAllGroupsCompact(MainSession.LoggedOnEmployee.EmployeeOid),
r =>
{
List list =
diff --git a/BeWo/View/Controls/NewsItemEditControl.xaml b/BeWo/View/Controls/NewsItemEditControl.xaml
index 8b171d3e3..1540e4c30 100644
--- a/BeWo/View/Controls/NewsItemEditControl.xaml
+++ b/BeWo/View/Controls/NewsItemEditControl.xaml
@@ -6,7 +6,7 @@
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:search="clr-namespace:BeWo.View.Search">
-
+
diff --git a/BeWo/View/Controls/NewsItemEditControl.xaml.cs b/BeWo/View/Controls/NewsItemEditControl.xaml.cs
index a8cf3b8c4..b47bcd46d 100644
--- a/BeWo/View/Controls/NewsItemEditControl.xaml.cs
+++ b/BeWo/View/Controls/NewsItemEditControl.xaml.cs
@@ -23,7 +23,7 @@ namespace BeWo.View.Controls
public NewsItemEditControl(NewsItemVM newsItem)
{
this.InitializeComponent();
- this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => BeWoApp.MainView.CloseCurrentPopUp()));
+ this.CommandBindings.Add(new CommandBinding(ApplicationCommands.Close, (s, e) => MainSession.MainPage.CloseCurrentPopUp()));
this.DataContext = newsItem;
this.newsItem = newsItem;
TextBoxTitle.Focus();
diff --git a/BeWo/View/Controls/ServiceRecordPopUp.xaml b/BeWo/View/Controls/ServiceRecordPopUp.xaml
index e41b473c0..b8c9b7dcb 100644
--- a/BeWo/View/Controls/ServiceRecordPopUp.xaml
+++ b/BeWo/View/Controls/ServiceRecordPopUp.xaml
@@ -21,7 +21,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/BeWo/View/Detail/Accounting/GeneralInvoiceView.xaml.cs b/BeWo/View/Detail/Accounting/GeneralInvoiceView.xaml.cs
index 1900dc71a..98a8a8eaf 100644
--- a/BeWo/View/Detail/Accounting/GeneralInvoiceView.xaml.cs
+++ b/BeWo/View/Detail/Accounting/GeneralInvoiceView.xaml.cs
@@ -37,7 +37,7 @@ namespace BeWo.View.Detail.Accounting
_EditView = new GeneralInvoiceItemEditView();
_EditView.EditingFinished += (s, e) =>
{
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
ReloadViewModel();
};
}
@@ -100,7 +100,7 @@ namespace BeWo.View.Detail.Accounting
delegate
{
_EditView.ViewModel = ViewModel.NewVM;
- MainView.ShowControlAsModalPopup(_EditView);
+ MainPage.ShowControlAsModalPopup(_EditView);
});
}
@@ -117,17 +117,17 @@ namespace BeWo.View.Detail.Accounting
private void btnEdit_Click(object sender, RoutedEventArgs e)
{
_EditView.ViewModel = BeWoWpfUtils.GetTag(sender);
- MainView.ShowControlAsModalPopup(_EditView);
+ MainPage.ShowControlAsModalPopup(_EditView);
}
private void button_add_Click(object sender, RoutedEventArgs e)
{
ViewModel.NewVM.DataContract.Type = InvoiceType.General;
- ViewModel.NewVM.CreatorFirstName = BeWoApp.LoggedOnEmployee.FirstName;
- ViewModel.NewVM.CreatorLastName = BeWoApp.LoggedOnEmployee.LastName;
- ViewModel.NewVM.SenderFirstName = BeWoApp.LoggedOnEmployee.FirstName;
- ViewModel.NewVM.SenderLastName = BeWoApp.LoggedOnEmployee.LastName;
- ViewModel.NewVM.SenderOrganisation = BeWoApp.Mandator.Name;
+ ViewModel.NewVM.CreatorFirstName = MainSession.LoggedOnEmployee.FirstName;
+ ViewModel.NewVM.CreatorLastName = MainSession.LoggedOnEmployee.LastName;
+ ViewModel.NewVM.SenderFirstName = MainSession.LoggedOnEmployee.FirstName;
+ ViewModel.NewVM.SenderLastName = MainSession.LoggedOnEmployee.LastName;
+ ViewModel.NewVM.SenderOrganisation = MainSession.Mandator.Name;
ViewModel.NewVM.InvoiceDate = DateTime.Now.Date;
ViewModel.NewVM.AccountingPeriodStart = DateTime.Now.Date.AddDays(-DateTime.Now.Day + 1).AddMonths(-1);
ViewModel.NewVM.AccountingPeriodEnd = DateTime.Now.Date.AddDays(-DateTime.Now.Day);
@@ -135,7 +135,7 @@ namespace BeWo.View.Detail.Accounting
ViewModel.NewVM.InvoiceItems.NewVM.ItemPeriodEnd = ViewModel.NewVM.AccountingPeriodEnd;
ViewModel.NewVM.InvoiceItems.AddNewVMToList();
- foreach (ContactDC iContactDC in BeWoApp.LoggedOnEmployee.ContactInformations)
+ foreach (ContactDC iContactDC in MainSession.LoggedOnEmployee.ContactInformations)
{
if (iContactDC.ContactType == ContactType.business_Fax)
{
@@ -232,7 +232,7 @@ namespace BeWo.View.Detail.Accounting
private void Popupedit_Recipient_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit) sender, e) || _SelectedOrganisation == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.OrganisationView_Edit))
+ if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit) sender, e) || _SelectedOrganisation == null || !MainSession.LoggedOnUser.HasRight(UserRightType.OrganisationView_Edit))
return;
VMFactory.CreateOrganisationVMAsync(_SelectedOrganisation.OrganisationOid,
@@ -250,7 +250,7 @@ namespace BeWo.View.Detail.Accounting
{
_SelectedOrganisation = p;
popupedit_Recipient.Focus();
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
}));
}
}
diff --git a/BeWo/View/Detail/Accounting/InvoiceOverview.xaml b/BeWo/View/Detail/Accounting/InvoiceOverview.xaml
index 8072ce729..e0fef4828 100644
--- a/BeWo/View/Detail/Accounting/InvoiceOverview.xaml
+++ b/BeWo/View/Detail/Accounting/InvoiceOverview.xaml
@@ -1,5 +1,11 @@
-
-
+
+
+
+
diff --git a/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs b/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs
index 081eadaf5..f003e29f8 100644
--- a/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs
+++ b/BeWo/View/Detail/Accounting/InvoiceOverview.xaml.cs
@@ -59,31 +59,31 @@ namespace BeWo.View.Detail.Accounting
this._EquityInvoiceItemEditView.EditingFinished += (s, e) =>
{
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
ServiceFacade.DoAccountingServiceAsync(se => se.LoadInvoiceBaseByOid(this._EquityInvoiceItemEditView.ViewModel.DataContract.InvoiceBaseOid.Value), cb => this.RefreshItemInList(cb));
};
this._GeneralInvoiceItemEditView.EditingFinished += (s, e) =>
{
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
ServiceFacade.DoAccountingServiceAsync(se => se.LoadInvoiceBaseByOid(this._GeneralInvoiceItemEditView.ViewModel.DataContract.InvoiceBaseOid.Value), cb => this.RefreshItemInList(cb));
};
this._SettlementInvoiceItemEditView.EditingFinished += (s, e) =>
{
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
ServiceFacade.DoAccountingServiceAsync(se => se.LoadInvoiceBaseByOid(this._SettlementInvoiceItemEditView.ViewModel.DataContract.InvoiceBaseOid.Value), cb => this.RefreshItemInList(cb));
};
this._SettlementInvoiceItemEditView2.EditingFinished += (s, e) =>
{
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
ServiceFacade.DoAccountingServiceAsync(se => se.LoadInvoiceBaseByOid(this._SettlementInvoiceItemEditView2.ViewModel.DataContract.InvoiceBaseOid.Value), cb => this.RefreshItemInList(cb));
};
this._ServiceInvoiceItemEditView.EditingFinished += (s, e) =>
{
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
ServiceFacade.DoAccountingServiceAsync(se => se.LoadInvoiceBaseByOid(this._ServiceInvoiceItemEditView.ViewModel.DataContract.InvoiceBase.InvoiceBaseOid.Value), cb => this.RefreshItemInList(cb));
};
}
@@ -190,12 +190,12 @@ namespace BeWo.View.Detail.Accounting
{
case InvoiceType.CustomerEquity:
this._EquityInvoiceItemEditView.ViewModel = vm;
- this.MainView.ShowControlAsModalPopup(this._EquityInvoiceItemEditView);
+ this.MainPage.ShowControlAsModalPopup(this._EquityInvoiceItemEditView);
break;
case InvoiceType.General:
this._GeneralInvoiceItemEditView.ViewModel = vm;
- this.MainView.ShowControlAsModalPopup(this._GeneralInvoiceItemEditView);
+ this.MainPage.ShowControlAsModalPopup(this._GeneralInvoiceItemEditView);
break;
case InvoiceType.Settlement:
@@ -207,12 +207,12 @@ namespace BeWo.View.Detail.Accounting
if (cb.InvoiceItems == null || cb.InvoiceItems.Count == 0 || cb.DifferentHourlyRateCount > 0)
{
this._SettlementInvoiceItemEditView.ViewModel = new SettlementVM(cb);
- this.MainView.ShowControlAsModalPopup(this._SettlementInvoiceItemEditView);
+ this.MainPage.ShowControlAsModalPopup(this._SettlementInvoiceItemEditView);
}
else
{
this._SettlementInvoiceItemEditView2.ViewModel = new SettlementVM(cb);
- this.MainView.ShowControlAsModalPopup(this._SettlementInvoiceItemEditView2);
+ this.MainPage.ShowControlAsModalPopup(this._SettlementInvoiceItemEditView2);
}
}));
break;
@@ -224,7 +224,7 @@ namespace BeWo.View.Detail.Accounting
delegate
{
this._ServiceInvoiceItemEditView.ViewModel = new ServiceInvoiceVM(cb);
- this.MainView.ShowControlAsModalPopup(this._ServiceInvoiceItemEditView);
+ this.MainPage.ShowControlAsModalPopup(this._ServiceInvoiceItemEditView);
}));
break;
}
@@ -286,7 +286,7 @@ namespace BeWo.View.Detail.Accounting
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";
+ var path = MainSession.GetAndCreateUserAppDataPath() + "\\Rechnungen.xls";
var sf = new SaveFileDialog { FileName = Path.GetFileName(path), Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*" };
if (sf.ShowDialog() != true)
diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml
index ff58df91a..3cd2cead5 100644
--- a/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml
+++ b/BeWo/View/Detail/Accounting/ServiceInvoiceCreatePopUpView.xaml
@@ -9,7 +9,7 @@
HorizontalAlignment="Stretch" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:r="clr-namespace:BeWo.Security"
VerticalAlignment="Stretch" Focusable="True"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
-
+
@@ -18,8 +18,8 @@
Padding="0,0,0,0" />
-
-
+
+
diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml b/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml
index c1ddb917d..bd1f32485 100644
--- a/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml
+++ b/BeWo/View/Detail/Accounting/ServiceInvoiceItemEditView.xaml
@@ -8,7 +8,7 @@
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
-
+
@@ -17,7 +17,7 @@
VerticalAlignment="Stretch" BorderThickness="0,0,0,0" Padding="0,0,0,0" />
-
+
@@ -36,7 +36,7 @@
-
+
@@ -85,7 +85,7 @@
TextWrapping="Wrap" Height="23" Text="{Binding InvoiceBase.Notice}" />
-
+
@@ -130,7 +130,7 @@
Text="{Binding Path=RecipientPostBox}" Height="23" />
-
@@ -171,7 +171,7 @@
Height="23" />
-
@@ -332,7 +332,7 @@
-
+
@@ -344,7 +344,7 @@
-
+
@@ -518,13 +518,13 @@
-
-
+
+
-
-
+
+
diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml b/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml
index c40e44a65..e835559eb 100644
--- a/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml
+++ b/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml
@@ -4,6 +4,7 @@
xmlns:val="clr-namespace:BeWo.Validation" xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:r="clr-namespace:BeWo.Security" xmlns:localsearch="clr-namespace:BeWo.View.Search"
@@ -13,8 +14,14 @@
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
x:Class="BeWo.View.Detail.Accounting.ServiceInvoiceView" Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True" mc:Ignorable="d">
+
+
+
+
+
+
-
+
diff --git a/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml.cs b/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml.cs
index 64d745862..7975e7dcd 100644
--- a/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml.cs
+++ b/BeWo/View/Detail/Accounting/ServiceInvoiceView.xaml.cs
@@ -18,7 +18,7 @@ using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
-using BeWoLauncher.Cache;
+using BS.SharedLauncher.Information;
namespace BeWo.View.Detail.Accounting
{
@@ -50,13 +50,13 @@ namespace BeWo.View.Detail.Accounting
this._EditView.EditingFinished += (s, e) =>
{
this.RefreshViewModel();
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
};
this._CreatePopUpView = new ServiceInvoiceCreatePopUpView();
this._CreatePopUpView.Closed += (s, e) =>
{
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
ServiceFacade.DoAccountingServiceAsync(svc => svc.InsertNewServiceInvoices(e.Data),
this.RefreshViewModel);
};
@@ -229,7 +229,7 @@ namespace BeWo.View.Detail.Accounting
private void btnEdit_Click(object sender, RoutedEventArgs e)
{
this._EditView.ViewModel = BeWoWpfUtils.GetTag(sender);
- this.MainView.ShowControlAsModalPopup(this._EditView);
+ this.MainPage.ShowControlAsModalPopup(this._EditView);
}
private void button_createInvoice_Click(object sender, RoutedEventArgs e)
@@ -240,7 +240,7 @@ namespace BeWo.View.Detail.Accounting
r => this.Dispatch(() =>
{
this._CreatePopUpView.ServiceInvoiceDcs = r;
- this.MainView.ShowControlAsModalPopup(this._CreatePopUpView);
+ this.MainPage.ShowControlAsModalPopup(this._CreatePopUpView);
}));
}
@@ -284,7 +284,7 @@ namespace BeWo.View.Detail.Accounting
private void Popupedit_CostBeaerer_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || ViewModel.SelectedCostBearer == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.OrganisationView_AllowEditCostBearer))
+ if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || ViewModel.SelectedCostBearer == null || !MainSession.LoggedOnUser.HasRight(UserRightType.OrganisationView_AllowEditCostBearer))
return;
VMFactory.CreateOrganisationVMAsync(ViewModel.SelectedCostBearer.OrganisationOid,
@@ -301,13 +301,13 @@ namespace BeWo.View.Detail.Accounting
{
ViewModel.SelectedCostBearer = p;
popupedit_CostBeaerer.Focus();
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
}));
}
private void Popupedit_supportConcept_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || ViewModel.SelectedSupportConcept == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit))
+ if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || ViewModel.SelectedSupportConcept == null || !MainSession.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit))
return;
VMFactory.CreateSupportConceptVMAsync(ViewModel.SelectedSupportConcept.SupportConceptOid,
diff --git a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml
index 5edfe3cb9..d5a5d1ea3 100644
--- a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml
+++ b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView.xaml
@@ -3,10 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:val="clr-namespace:BeWo.Validation"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
+
+
+
-
+
@@ -16,7 +20,7 @@
-
+
@@ -31,7 +35,7 @@
-
+
@@ -70,7 +74,7 @@
Text="{Binding Path=RecipientPostBox}" Height="23" />
-
@@ -109,7 +113,7 @@
Height="23" />
-
+
@@ -172,7 +176,7 @@
-
+
diff --git a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml
index 3fd728184..563a42527 100644
--- a/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml
+++ b/BeWo/View/Detail/Accounting/SettlementInvoiceItemEditView2.xaml
@@ -4,14 +4,18 @@
xmlns:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
xmlns:val="clr-namespace:BeWo.Validation" xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto"
HorizontalAlignment="Stretch" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:r="clr-namespace:BeWo.Security"
VerticalAlignment="Stretch" Focusable="True"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
+
+
+
-
+
@@ -20,7 +24,7 @@
VerticalAlignment="Stretch" BorderThickness="0,0,0,0" Padding="0,0,0,0" />
-
+
@@ -35,7 +39,7 @@
-
+
@@ -74,7 +78,7 @@
Text="{Binding Path=RecipientPostBox}" Height="23" />
-
@@ -113,7 +117,7 @@
Height="23" />
-
+
@@ -176,7 +180,7 @@
-
+
diff --git a/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml b/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml
index 209e62bb9..a08354277 100644
--- a/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml
+++ b/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml
@@ -1,9 +1,15 @@
-
-
+
+
+
+
+
-
+
diff --git a/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml.cs b/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml.cs
index 4da6f09ac..36038b9ab 100644
--- a/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml.cs
+++ b/BeWo/View/Detail/Accounting/SettlementInvoiceView.xaml.cs
@@ -40,7 +40,7 @@ namespace BeWo.View.Detail.Accounting
{
// OpenViewModel(_EditView.ViewModel);
this.ReloadViewModel();
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
};
this._EditView2 = new SettlementInvoiceItemEditView2();
@@ -48,7 +48,7 @@ namespace BeWo.View.Detail.Accounting
{
// OpenViewModel(_EditView.ViewModel);
this.ReloadViewModel();
- this.MainView.CloseCurrentPopUp();
+ this.MainPage.CloseCurrentPopUp();
};
}
@@ -79,9 +79,9 @@ namespace BeWo.View.Detail.Accounting
// String url = ConnectionInformation.CoreServerAddressOrigin.ToString()
// + "/ReportView.aspx?dcid="
// + vm.DataContract.SettlementIvoiceOid.ToString()
- // + "&tenant=" + BeWoLauncher.Cache.ConnectionInformation.Tenant
- // + "&username=" + BeWoLauncher.Cache.ConnectionInformation.Username
- // + "&rc2password=" + BeWoApp.LoggedOnUser.RC2Password
+ // + "&tenant=" + ConnectionInformation.Tenant
+ // + "&username=" + ConnectionInformation.Username
+ // + "&rc2password=" + MainSession.LoggedOnUser.RC2Password
// + "&type=" + Utils.EnumName(ReportTypes.Settlement);
// url = BeWoWpfUtils.GetHTMLEncodedURL(url);
@@ -117,12 +117,12 @@ namespace BeWo.View.Detail.Accounting
if (ShowOldEditView(vm))
{
this._EditView.ViewModel = vm;
- this.MainView.ShowControlAsModalPopup(this._EditView);
+ this.MainPage.ShowControlAsModalPopup(this._EditView);
}
else
{
this._EditView2.ViewModel = vm;
- this.MainView.ShowControlAsModalPopup(this._EditView2);
+ this.MainPage.ShowControlAsModalPopup(this._EditView2);
}
}
}
@@ -141,12 +141,12 @@ namespace BeWo.View.Detail.Accounting
if (ShowOldEditView(vm))
{
this._EditView.ViewModel = new SettlementVM(dc);
- this.MainView.ShowControlAsModalPopup(this._EditView);
+ this.MainPage.ShowControlAsModalPopup(this._EditView);
}
else
{
this._EditView2.ViewModel = new SettlementVM(dc);
- this.MainView.ShowControlAsModalPopup(this._EditView2);
+ this.MainPage.ShowControlAsModalPopup(this._EditView2);
}
});
});
@@ -171,7 +171,7 @@ namespace BeWo.View.Detail.Accounting
private void Popupedit_CostBeaerer_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || _SelectedSupportConcept == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit))
+ if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || _SelectedSupportConcept == null || !MainSession.LoggedOnUser.HasRight(UserRightType.SupportConceptView_Edit))
return;
VMFactory.CreateSupportConceptVMAsync(_SelectedSupportConcept.SupportConceptOid,
diff --git a/BeWo/View/Detail/AccountingTransactionBookingView.xaml b/BeWo/View/Detail/AccountingTransactionBookingView.xaml
index 576d7a89e..771c5507a 100644
--- a/BeWo/View/Detail/AccountingTransactionBookingView.xaml
+++ b/BeWo/View/Detail/AccountingTransactionBookingView.xaml
@@ -5,6 +5,7 @@
xmlns:localViewControls="clr-namespace:BeWo.View.Controls"
xmlns:val="clr-namespace:BeWo.Validation" xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto"
@@ -12,6 +13,7 @@
VerticalAlignment="Stretch" Focusable="True" KeyUp="AccountingTransactionBookingView_OnKeyUp"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic">
+
@@ -21,7 +23,7 @@
@@ -236,7 +240,7 @@
-
+
@@ -256,7 +260,7 @@
-
+
@@ -670,37 +674,37 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
();
//this.Dispatch(() => Cache.GetInstance().GetAllActiveSupportConceptsCompact(x => this.Dispatch(() => { SupportConceptSelectionControl.SupportConceptList = x; })));
- ServiceFacade.DoEmployeeServiceSync(e => MultiEmployeeControlAddServ.SelectedEmployees.Add(e.LoadCompactEmployee(BeWoApp.LoggedOnEmployee.EmployeeOid.Value)));
+ ServiceFacade.DoEmployeeServiceSync(e => MultiEmployeeControlAddServ.SelectedEmployees.Add(e.LoadCompactEmployee(MainSession.LoggedOnEmployee.EmployeeOid.Value)));
_SelectedEmployee = MultiEmployeeControlAddServ.SelectedEmployees.First();
@@ -471,7 +471,7 @@ namespace BeWo.View.Detail
set
{
- _SelectedEmployee = BeWoApp.LoggedOnUser.Employee;
+ _SelectedEmployee = MainSession.LoggedOnUser.Employee;
PopupeditEmployee.Text = _SelectedEmployee.ToString();
DataContext = value;
@@ -480,7 +480,7 @@ namespace BeWo.View.Detail
_ViewModel.ServiceRecordListChanged += _ViewModel_ServiceRecordListChanged;
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ServiceRecordView_Create) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ServiceRecordView_Create) && !MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll))
{
NewObjectInfoGrid.IsEnabled = false;
ButtonAdd.IsEnabled = false;
@@ -924,7 +924,7 @@ namespace BeWo.View.Detail
long scOid = 0;
long cOid = 0;
long cb2scOid = 0;
- var eOid = BeWoApp.LoggedOnUser.Employee.EmployeeOid;
+ var eOid = MainSession.LoggedOnUser.Employee.EmployeeOid;
if (selectedNode != null && selectedNode.SupportConceptTreeNodeDC != null)
{
@@ -1257,7 +1257,7 @@ namespace BeWo.View.Detail
lContent.AddRange(list.Select(vm => new List {String.Format("{0:d}", (vm.StartTime != null && vm.StartTime.Value.Second == 0 ? vm.DateAndTime : vm.Date)), vm.AssistanceDuration.ToString(), vm.RoundedDuration.ToString(), vm.Employee != null ? vm.Employee.ToString() : string.Empty, vm.Customer != null ? vm.Customer.ToString() : string.Empty, vm.SupportConcept != null ? vm.SupportConcept.ToString() : string.Empty, vm.CostBearer != null ? vm.CostBearer.ToString() : string.Empty, vm.Category != null ? vm.Category.ToString() : string.Empty, vm.ServiceDescription != null ? vm.ServiceDescription.ToString() : string.Empty, vm.Notice}));
}
- var path = BeWoApp.GetAndCreateUserAppDataPath() + "\\Dokumentation.xls";
+ var path = MainSession.GetAndCreateUserAppDataPath() + "\\Dokumentation.xls";
var sf = new SaveFileDialog { FileName = Path.GetFileName(path), Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*" };
if (sf.ShowDialog() != true)
return;
@@ -1317,7 +1317,7 @@ namespace BeWo.View.Detail
public override void ModalPopUpCloseInvoked()
{
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
}
public override void ModalPopUpSaveInvoked()
@@ -1342,7 +1342,7 @@ namespace BeWo.View.Detail
};
_AdditionalServiceGroupOfPeoplePopUp.GroupOfPeopleSavedOrUpdated += AdditionalServiceGroupOfPeoplePopUp_AdditionalServiceGroupOfPeopleSavedOrUpdated;
- BeWoApp.MainView.ShowControlAsModalPopup(_AdditionalServiceGroupOfPeoplePopUp);
+ MainSession.MainPage.ShowControlAsModalPopup(_AdditionalServiceGroupOfPeoplePopUp);
_AdditionalServiceGroupOfPeoplePopUp.Focus();
})
);
@@ -1355,7 +1355,7 @@ namespace BeWo.View.Detail
private static void AdditionalServiceGroupOfPeoplePopUp_AdditionalServiceGroupOfPeopleSavedOrUpdated(object sender, EventArgs e)
{
- BeWoApp.MainView.CloseCurrentPopUp();
+ MainSession.MainPage.CloseCurrentPopUp();
}
private void MultiAddServGroupOfPeopleSelectionControl_OnPropertyChanged(object sender, PropertyChangedEventArgs e)
diff --git a/BeWo/View/Detail/AssessmentSheetCategoryView.xaml b/BeWo/View/Detail/AssessmentSheetCategoryView.xaml
index 137b68496..e3f39aa30 100644
--- a/BeWo/View/Detail/AssessmentSheetCategoryView.xaml
+++ b/BeWo/View/Detail/AssessmentSheetCategoryView.xaml
@@ -1,8 +1,19 @@
-
-
+
+
+
+
+
-
+
diff --git a/BeWo/View/Detail/AssessmentSheetEntryView.xaml.cs b/BeWo/View/Detail/AssessmentSheetEntryView.xaml.cs
index d507ff2f3..f0f984f0b 100644
--- a/BeWo/View/Detail/AssessmentSheetEntryView.xaml.cs
+++ b/BeWo/View/Detail/AssessmentSheetEntryView.xaml.cs
@@ -24,7 +24,7 @@ using BS.Shared.Extensions;
using DevExpress.Xpf.Grid;
using DevExpress.Xpf.Docking;
-using BeWoLauncher.Cache;
+using BS.SharedLauncher.Information;
namespace BeWo.View.Detail
{
@@ -56,7 +56,7 @@ namespace BeWo.View.Detail
this.InitDateCombos();
- this.mSaveAllowed = BeWoApp.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Edit) && BeWoApp.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Delete);
+ this.mSaveAllowed = MainSession.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Edit) && MainSession.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Delete);
_AdditionalServices = ServiceFacade.DoOperationsServiceSync(o => o.GetAllAdditionalService());
@@ -149,7 +149,7 @@ namespace BeWo.View.Detail
var list = this._ViewModel.ServiceRecords.Where(i => i.Date.Value.Day.Equals(day)).ToList();
ServiceRecordPopUp popUp = new ServiceRecordPopUp(list);
- BeWoApp.MainView.ShowControlAsModalPopup(popUp);
+ MainSession.MainPage.ShowControlAsModalPopup(popUp);
}
}
}
@@ -714,8 +714,8 @@ namespace BeWo.View.Detail
public void AssessmentSheetValueControl_MouseDown(object sender, MouseButtonEventArgs e)
{
- if (BeWoApp.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Edit)
- && BeWoApp.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Delete))
+ if (MainSession.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Edit)
+ && MainSession.LoggedOnUser.HasRight(UserRightType.AssessmentSheet_Delete))
{
_EditRow = grid.GetRow(grid.View.GetRowHandleByMouseEventArgs(e)) as AssessmentSheetRow;
@@ -894,7 +894,7 @@ namespace BeWo.View.Detail
private void UpdatePrintUrl(long customerOid, DateTime dtStart, DateTime dtEnd)
{
- long eOid = BeWoApp.LoggedOnUser.Employee.EmployeeOid;
+ long eOid = MainSession.LoggedOnUser.Employee.EmployeeOid;
string url = ConnectionInformation.CoreServerAddressOrigin + "/ReportView.aspx" + "?eOid=" + eOid + "&cOid=" + customerOid + "&m=" + dtStart.Month + "&y=" + dtStart.Year + "&type=" + Utils.EnumName(ReportTypes.AssessmentSheetReport);
diff --git a/BeWo/View/Detail/AssessmentSheetValueView.xaml b/BeWo/View/Detail/AssessmentSheetValueView.xaml
index 1a91435d1..77d5a74a9 100644
--- a/BeWo/View/Detail/AssessmentSheetValueView.xaml
+++ b/BeWo/View/Detail/AssessmentSheetValueView.xaml
@@ -1,7 +1,12 @@
-
-
+
+
+
+
+
-
+
diff --git a/BeWo/View/Detail/AuszahlungsartenAddView.xaml b/BeWo/View/Detail/AuszahlungsartenAddView.xaml
index 569fc76f3..d32c3f37b 100644
--- a/BeWo/View/Detail/AuszahlungsartenAddView.xaml
+++ b/BeWo/View/Detail/AuszahlungsartenAddView.xaml
@@ -2,13 +2,17 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:val="clr-namespace:BeWo.Validation"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
-
+
+
+
+
-
+
diff --git a/BeWo/View/Detail/BookingView.xaml b/BeWo/View/Detail/BookingView.xaml
index 7bee36601..7584ca74a 100644
--- a/BeWo/View/Detail/BookingView.xaml
+++ b/BeWo/View/Detail/BookingView.xaml
@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:localDetailView="clr-namespace:BeWo.View.Detail"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
@@ -9,9 +10,16 @@
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:calendar="clr-namespace:BeWo.Controls.Controls.Calendar;assembly=BeWo.Controls"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared">
+
+
+
+
+
+
+
-
+
@@ -27,7 +35,7 @@
-
+
@@ -176,7 +184,7 @@
-
+
@@ -259,7 +267,7 @@
-
+
diff --git a/BeWo/View/Detail/BookingView.xaml.cs b/BeWo/View/Detail/BookingView.xaml.cs
index 54b1855b5..f6db8ac6c 100644
--- a/BeWo/View/Detail/BookingView.xaml.cs
+++ b/BeWo/View/Detail/BookingView.xaml.cs
@@ -74,7 +74,7 @@ namespace BeWo.View.Detail
this.ReloadViewModel();
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Create) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Edit) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Delete) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Create) && !MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Edit) && !MainSession.LoggedOnUser.HasRight(UserRightType.EditAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Delete) && !MainSession.LoggedOnUser.HasRight(UserRightType.DeleteAll))
{
this.groupBoxBookingNewEdit.IsEnabled = false;
this.expander_edit_booking.IsEnabled = false;
@@ -83,26 +83,26 @@ namespace BeWo.View.Detail
}
else
{
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Create) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Create) && !MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll))
{
this.expander_new_booking.IsEnabled = false;
this.expander_new_booking.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Edit) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Delete) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Edit) && !MainSession.LoggedOnUser.HasRight(UserRightType.EditAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Delete) && !MainSession.LoggedOnUser.HasRight(UserRightType.DeleteAll))
{
this.expander_edit_booking.IsEnabled = false;
this.expander_edit_booking.Visibility = Visibility.Collapsed;
}
else
{
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Edit) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Edit) && !MainSession.LoggedOnUser.HasRight(UserRightType.EditAll))
{
this.button_editBooking.IsEnabled = false;
this.button_editBooking.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Delete) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_Delete) && !MainSession.LoggedOnUser.HasRight(UserRightType.DeleteAll))
{
this.button_deleteBooking.IsEnabled = false;
this.button_deleteBooking.Visibility = Visibility.Collapsed;
@@ -232,11 +232,11 @@ namespace BeWo.View.Detail
private void DeleteBooking()
{
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_AllowEditResourcesFromOtherEmployees))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_AllowEditResourcesFromOtherEmployees))
{
if (this.ViewModel.EditVM != null)
{
- if (this.ViewModel.EditVM.Employee != null && !BeWoApp.LoggedOnUser.Employee.Equals(this.ViewModel.EditVM.Employee))
+ if (this.ViewModel.EditVM.Employee != null && !MainSession.LoggedOnUser.Employee.Equals(this.ViewModel.EditVM.Employee))
{
MessageBox.Show("Sie besitzen nicht die erforderlichen Rechte um eine Buchung eines anderen Mitarbeiters zu löschen!", "BeWoPlaner", MessageBoxButton.OK);
return;
@@ -247,7 +247,7 @@ namespace BeWo.View.Detail
var lSequence = this.ViewModel.GetAppointmentsSequence(this.ViewModel.EditAppointment);
if (lSequence != null && lSequence.Employee != null)
{
- if (!BeWoApp.LoggedOnUser.Employee.Equals(lSequence.Employee))
+ if (!MainSession.LoggedOnUser.Employee.Equals(lSequence.Employee))
{
MessageBox.Show("Sie besitzen nicht die erforderlichen Rechte um eine Buchung eines anderen Mitarbeiters zu löschen!", "BeWoPlaner", MessageBoxButton.OK);
return;
@@ -544,11 +544,11 @@ namespace BeWo.View.Detail
private void button_editBooking_Click(object sender, RoutedEventArgs e)
{
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_AllowEditResourcesFromOtherEmployees))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ResourceBookingView_AllowEditResourcesFromOtherEmployees))
{
if (this.ViewModel.EditVM != null)
{
- if (this.ViewModel.EditVM.Employee != null && !BeWoApp.LoggedOnUser.Employee.Equals(this.ViewModel.EditVM.Employee))
+ if (this.ViewModel.EditVM.Employee != null && !MainSession.LoggedOnUser.Employee.Equals(this.ViewModel.EditVM.Employee))
{
MessageBox.Show("Sie besitzen nicht die erforderlichen Rechte um eine Buchung eines anderen Mitarbeiters zu ändern!", "BeWoPlaner", MessageBoxButton.OK);
return;
@@ -559,7 +559,7 @@ namespace BeWo.View.Detail
var lSequence = this.ViewModel.GetAppointmentsSequence(this.ViewModel.EditAppointment);
if (lSequence != null && lSequence.Employee != null)
{
- if (!BeWoApp.LoggedOnUser.Employee.Equals(lSequence.Employee))
+ if (!MainSession.LoggedOnUser.Employee.Equals(lSequence.Employee))
{
MessageBox.Show("Sie besitzen nicht die erforderlichen Rechte um eine Buchung eines anderen Mitarbeiters zu ändern!", "BeWoPlaner", MessageBoxButton.OK);
return;
@@ -759,7 +759,7 @@ namespace BeWo.View.Detail
var combobox = (ComboBox) sender;
var selectedI = combobox.SelectedItem as CompactEmployeeDC;
- if (selectedI == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (selectedI == null || !MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
return;
VMFactory.CreateEmployeeVMAsync(selectedI.EmployeeOid,
diff --git a/BeWo/View/Detail/BudgetView.xaml b/BeWo/View/Detail/BudgetView.xaml
index a431b07e8..1c332695b 100644
--- a/BeWo/View/Detail/BudgetView.xaml
+++ b/BeWo/View/Detail/BudgetView.xaml
@@ -9,7 +9,7 @@
xmlns:dxe2="clr-namespace:DevExpress.XtraEditors;assembly=DevExpress.XtraEditors.v17.1"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
-
+
diff --git a/BeWo/View/Detail/CustomerHistoryView.xaml b/BeWo/View/Detail/CustomerHistoryView.xaml
index fb70782ef..b19580bf5 100644
--- a/BeWo/View/Detail/CustomerHistoryView.xaml
+++ b/BeWo/View/Detail/CustomerHistoryView.xaml
@@ -14,7 +14,7 @@
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup">
-
+
@@ -30,7 +30,7 @@
-
+
@@ -54,7 +54,7 @@
-
+
diff --git a/BeWo/View/Detail/CustomerView.xaml b/BeWo/View/Detail/CustomerView.xaml
index b27621116..dfba884f4 100644
--- a/BeWo/View/Detail/CustomerView.xaml
+++ b/BeWo/View/Detail/CustomerView.xaml
@@ -8,7 +8,7 @@
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:r="clr-namespace:BeWo.Security"
- xmlns:converter="clr-namespace:BeWo.Converter"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:detail="clr-namespace:BeWo.View.Detail"
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
xmlns:controls="clr-namespace:BeWo.View.Controls"
@@ -17,8 +17,15 @@
x:Name="CustomerBeWoView"
VerticalAlignment="Stretch" Focusable="True" GotFocus="UserControl_GotFocus">
-
-
+
+
+
+
+
+
+
+
+
@@ -311,7 +318,7 @@
-
+
@@ -327,13 +334,13 @@
-
+
-
+
@@ -466,7 +473,7 @@
-
+
@@ -500,7 +507,7 @@
+ Style="{DynamicResource ObjectEditGroupBox}">
@@ -531,7 +538,7 @@
+ Style="{DynamicResource ObjectEditGroupBox}" Margin="8,8,0,0">
@@ -580,7 +587,7 @@
-
+
@@ -686,7 +693,7 @@
-
+
@@ -767,7 +774,7 @@
-
+
@@ -800,7 +807,7 @@
-
+
@@ -888,7 +895,7 @@
-
+
@@ -995,7 +1002,7 @@
-
+
@@ -1038,7 +1045,7 @@
+ Style="{DynamicResource ObjectEditGroupBox}" Margin="0 20 0 0" MinHeight="120">
@@ -1051,7 +1058,7 @@
-
+
@@ -1078,7 +1085,7 @@
+ Style="{DynamicResource ObjectEditGroupBox}" Margin="0 20 0 0">
@@ -1357,7 +1364,7 @@
-
+
-
@@ -1551,7 +1558,7 @@
-
+
@@ -1593,7 +1600,7 @@
-
+
@@ -1635,7 +1642,7 @@
-
+
@@ -1690,7 +1697,7 @@
-
+
@@ -1735,7 +1742,7 @@
-
+
diff --git a/BeWo/View/Detail/CustomerView.xaml.cs b/BeWo/View/Detail/CustomerView.xaml.cs
index 1313a3ad9..8bc8e40b4 100644
--- a/BeWo/View/Detail/CustomerView.xaml.cs
+++ b/BeWo/View/Detail/CustomerView.xaml.cs
@@ -49,7 +49,7 @@ using HorizontalAlignment = System.Windows.HorizontalAlignment;
using Hyperlink = System.Windows.Documents.Hyperlink;
using MessageBox = System.Windows.MessageBox;
using VerticalAlignment = System.Windows.VerticalAlignment;
-using BeWoLauncher.Cache;
+using BS.SharedLauncher.Information;
namespace BeWo.View.Detail
{
@@ -83,12 +83,12 @@ namespace BeWo.View.Detail
public static bool DarfBargeldtransaktionenBearbeiten
{
- get { return BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten); }
+ get { return MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten); }
}
public static DefaultBoolean BargeldtransaktionenBearbeitenAlsDefaultBooelan
{
- get { return (DefaultBoolean)(Convert.ToInt32(BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten)) + 1); }
+ get { return (DefaultBoolean)(Convert.ToInt32(MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten)) + 1); }
}
public static readonly string[] GradDerBehinderungComboBoxQuelle = { "20", "30", "40", "50", "60", "70", "80", "90", "100" };
@@ -106,13 +106,13 @@ namespace BeWo.View.Detail
AdditionalServiceAssessmentSheetCategories = new List();
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungNurEigeneAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnsehen))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungNurEigeneAnsehen) && !MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnsehen))
{
tabitem_Bargeldverwaltung.Visibility = Visibility.Collapsed;
}
- else if (BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungNurEigeneAnsehen) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnsehen))
+ else if (MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungNurEigeneAnsehen) && !MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnsehen))
{
- tabitem_Bargeldverwaltung.Visibility = pCustomerVM.IsNew || BeWoApp.LoggedOnEmployee.RelatedCustomers.Any(a => a.Customer.CustomerOid.Equals(pCustomerVM.CommitToDataContract().CustomerOid.Value)) ? Visibility.Visible : Visibility.Collapsed;
+ tabitem_Bargeldverwaltung.Visibility = pCustomerVM.IsNew || MainSession.LoggedOnEmployee.RelatedCustomers.Any(a => a.Customer.CustomerOid.Equals(pCustomerVM.CommitToDataContract().CustomerOid.Value)) ? Visibility.Visible : Visibility.Collapsed;
}
if (ShouldLog)
@@ -131,16 +131,16 @@ namespace BeWo.View.Detail
{
tabitem_varFields.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.AppSettings.ShowLargeCustomerNotice)
+ if (!MainSession.AppSettings.ShowLargeCustomerNotice)
{
tabitem_notice.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DokumenteKlienten))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.DokumenteKlienten))
{
tabitem_documents.Visibility = Visibility.Collapsed;
}
- if (BeWoApp.Mandator != null && BeWoApp.Mandator.AllowSbd)
+ if (MainSession.Mandator != null && MainSession.Mandator.AllowSbd)
{
tabitem_schuldienst.Visibility = Visibility.Visible;
tabitem_stundenplan.Visibility = Visibility.Visible;
@@ -151,7 +151,7 @@ namespace BeWo.View.Detail
tabitem_stundenplan.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ChatSettings) || !BeWoApp.AppSettings.IsChatAllowed)
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ChatSettings) || !MainSession.AppSettings.IsChatAllowed)
{
tabitem_chatservice.Visibility = Visibility.Collapsed;
}
@@ -182,24 +182,24 @@ namespace BeWo.View.Detail
}
};
- txtDistance.Visibility = BeWoApp.AppSettings.ShowCustomerDistanceFields ? Visibility.Visible : Visibility.Collapsed;
- lblDistance.Visibility = BeWoApp.AppSettings.ShowCustomerDistanceFields ? Visibility.Visible : Visibility.Collapsed;
+ txtDistance.Visibility = MainSession.AppSettings.ShowCustomerDistanceFields ? Visibility.Visible : Visibility.Collapsed;
+ lblDistance.Visibility = MainSession.AppSettings.ShowCustomerDistanceFields ? Visibility.Visible : Visibility.Collapsed;
InitCustomerCareTypeList();
- panelDebitor.Visibility = BeWoApp.AppSettings.ShowDatevFields ? Visibility.Visible : Visibility.Collapsed;
- ctrlAdvisedAttended.Visibility = BeWoApp.AppSettings.ShowAdvisedAttendedFlag ? Visibility.Visible : Visibility.Collapsed;
+ panelDebitor.Visibility = MainSession.AppSettings.ShowDatevFields ? Visibility.Visible : Visibility.Collapsed;
+ ctrlAdvisedAttended.Visibility = MainSession.AppSettings.ShowAdvisedAttendedFlag ? Visibility.Visible : Visibility.Collapsed;
txtDebitorNumber.Visibility = lblDebitorNumber.Visibility;
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving))
{
lblArchiviert.Visibility = Visibility.Hidden;
chkArchiviert.Visibility = Visibility.Hidden;
}
- groupbox_Environment.Visibility = BeWoApp.Mandator.BeWoClientType == 8 ? Visibility.Visible : Visibility.Collapsed;
+ groupbox_Environment.Visibility = MainSession.Mandator.BeWoClientType == 8 ? Visibility.Visible : Visibility.Collapsed;
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewDiagnosis))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.Customer_ViewDiagnosis))
{
tabitem_diagnosis.Visibility = Visibility.Collapsed;
}
@@ -207,7 +207,7 @@ namespace BeWo.View.Detail
{
InitDiagnosisLists();
}
- if (!BeWoApp.AppSettings.IsMedicationAllowed || !BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_ViewMedication))
+ if (!MainSession.AppSettings.IsMedicationAllowed || !MainSession.LoggedOnUser.HasRight(UserRightType.Customer_ViewMedication))
{
tabitem_Medikamentenverordnungen.Visibility = Visibility.Collapsed;
}
@@ -309,8 +309,8 @@ namespace BeWo.View.Detail
public static bool ShouldLog
{
- get { return false; } // BeWoLauncher.Cache.ConnectionInformation.Tenant == "1549622397" && BeWoLauncher.Cache.ConnectionInformation.Username.ToLower() == "h.krause"; }
- //get { return BeWoLauncher.Cache.ConnectionInformation.Tenant == "demo" && BeWoLauncher.Cache.ConnectionInformation.Username == "demo"; }
+ get { return false; } // ConnectionInformation.Tenant == "1549622397" && ConnectionInformation.Username.ToLower() == "h.krause"; }
+ //get { return ConnectionInformation.Tenant == "demo" && ConnectionInformation.Username == "demo"; }
}
private void Log(string log)
@@ -333,7 +333,7 @@ namespace BeWo.View.Detail
public override void ModalPopUpCloseInvoked()
{
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
}
public override void ModalPopUpSaveInvoked()
@@ -396,7 +396,7 @@ namespace BeWo.View.Detail
{
_saveInProgress = true;
- if (BeWoApp.AppSettings.IsChatAllowed)
+ if (MainSession.AppSettings.IsChatAllowed)
{
if (ViewModel.DataContract.FirstName != ViewModel.FirstName ||
ViewModel.DataContract.LastName != ViewModel.LastName ||
@@ -480,14 +480,14 @@ namespace BeWo.View.Detail
var gb = tabitem_diagnosis.Resources["gb_possible"] as GroupBox;
var c = (gb.Content as Grid).FindFirstVisualChild();
- _PossibleDiagnosis = new BindingList>(new List>(BeWoApp.ICD10Diagnosis));
+ _PossibleDiagnosis = new BindingList>(new List>(MainSession.ICD10Diagnosis));
_ChosenDiagnosis = new BindingList>();
var ch = new List>();
foreach (var code in ViewModel.ICD10Codes)
{
- ch.Add(BeWoApp.ICD10Diagnosis.ContainsKey(code) ? new KeyValuePair(code, BeWoApp.ICD10Diagnosis[code]) : new KeyValuePair(code, string.Empty));
+ ch.Add(MainSession.ICD10Diagnosis.ContainsKey(code) ? new KeyValuePair(code, MainSession.ICD10Diagnosis[code]) : new KeyValuePair(code, string.Empty));
}
_ChosenDiagnosis.AddRange(ch);
@@ -507,16 +507,16 @@ namespace BeWo.View.Detail
Cache.GetInstance().ClearCustomers();
- if (BeWoApp.LoggedOnUser == null)
+ if (MainSession.LoggedOnUser == null)
{
return;
}
- BeWoApp.MainView.ResetView(UIContext.Customer);
+ MainSession.MainPage.ResetView(UIContext.Customer);
ReloadViewModel(oid);
- if (DoOwnChatSync && BeWoApp.AppSettings.IsChatAllowed)
+ if (DoOwnChatSync && MainSession.AppSettings.IsChatAllowed)
{
//BeWoUtils.OwnChatSynchronisationVeranlassen();
}
@@ -565,7 +565,7 @@ namespace BeWo.View.Detail
grid_EmployeeRelation.Columns["Role"].EditSettings = new ComboBoxEditSettings { ItemsSource = ViewModel.EmployeeRelations.PossibleRoles };
}
- //if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ChatSettings))
+ //if (!MainSession.LoggedOnUser.HasRight(UserRightType.ChatSettings))
//{
// grid_EmployeeRelation.Columns["Chatpartner"].Visible = false;
//}
@@ -642,7 +642,7 @@ namespace BeWo.View.Detail
p => this.Dispatch(
delegate
{
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
BeWoUtils.UpdateAllViews(p);
ViewModel.EnvironmentPersons.NewVM.Person = p;
popup_newEnvironmentPerson.IsOpen = true;
@@ -657,7 +657,7 @@ namespace BeWo.View.Detail
p => this.Dispatch(
delegate
{
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
BeWoUtils.UpdateAllViews(p);
ViewModel.EnvironmentPersonsWithFamily.NewVM.Person = p;
popup_newEnvironmentFamily.IsOpen = true;
@@ -672,7 +672,7 @@ namespace BeWo.View.Detail
p => this.Dispatch(
delegate
{
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
BeWoUtils.UpdateAllViews(p);
ViewModel.EnvironmentOrganisations.NewVM.Organisation = p;
popup_newEnvironmentOrganisation.IsOpen = true;
@@ -702,7 +702,7 @@ namespace BeWo.View.Detail
(c.View as TableView).FocusedColumn = c.Columns[1];
// var t = c.View.GetCellElementByRowHandleAndColumn(GridControl.AutoFilterRowHandle, c.Columns[1]);
- MainView.ShowControlAsModalPopup(gb, HorizontalAlignment.Center, VerticalAlignment.Top);
+ MainPage.ShowControlAsModalPopup(gb, HorizontalAlignment.Center, VerticalAlignment.Top);
}
private void button_addDisability_Click(object sender, RoutedEventArgs e)
@@ -891,7 +891,7 @@ namespace BeWo.View.Detail
_PossibleDiagnosis.Remove(item);
_ChosenDiagnosis.Add(item);
ViewModel.ICD10Codes.Add(item.Key);
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
}
}
@@ -1161,7 +1161,7 @@ namespace BeWo.View.Detail
private void Popupedit_environmentPersonSearch_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (ViewModel.EnvironmentPersons.NewVM.Person == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.PersonView_View))
+ if (ViewModel.EnvironmentPersons.NewVM.Person == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !MainSession.LoggedOnUser.HasRight(UserRightType.PersonView_View))
{
return;
}
@@ -1171,7 +1171,7 @@ namespace BeWo.View.Detail
private void Popupedit_familyPersonSearch_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (ViewModel.EnvironmentPersonsWithFamily.NewVM.Person == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.PersonView_View))
+ if (ViewModel.EnvironmentPersonsWithFamily.NewVM.Person == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !MainSession.LoggedOnUser.HasRight(UserRightType.PersonView_View))
{
return;
}
@@ -1181,7 +1181,7 @@ namespace BeWo.View.Detail
private void Popupedit_environmentOrganisationSearch_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (ViewModel.EnvironmentOrganisations.NewVM.Organisation == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.OrganisationView_View))
+ if (ViewModel.EnvironmentOrganisations.NewVM.Organisation == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !MainSession.LoggedOnUser.HasRight(UserRightType.OrganisationView_View))
{
return;
}
@@ -1191,7 +1191,7 @@ namespace BeWo.View.Detail
private void Popupedit_costBearer_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (ViewModel.CostBearers.NewVM.CostBearer == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.OrganisationView_View))
+ if (ViewModel.CostBearers.NewVM.CostBearer == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !MainSession.LoggedOnUser.HasRight(UserRightType.OrganisationView_View))
{
return;
}
@@ -1201,7 +1201,7 @@ namespace BeWo.View.Detail
private void Popupedit_employeeRelations_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (ViewModel.EmployeeRelations.NewVM.Employee == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (ViewModel.EmployeeRelations.NewVM.Employee == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
return;
}
@@ -1221,7 +1221,7 @@ namespace BeWo.View.Detail
var typeOfSelectedVM = selectedVM.GetType();
- if ((typeOfSelectedVM == typeof(CustomerCostBearerRealtionVM)) || (typeOfSelectedVM == typeof(CustomerOrganisationRelationVM)) && BeWoApp.LoggedOnUser.HasRight(UserRightType.OrganisationView_View))
+ if ((typeOfSelectedVM == typeof(CustomerCostBearerRealtionVM)) || (typeOfSelectedVM == typeof(CustomerOrganisationRelationVM)) && MainSession.LoggedOnUser.HasRight(UserRightType.OrganisationView_View))
{
var newOrganisation = typeOfSelectedVM == typeof (CustomerCostBearerRealtionVM)
? ((CustomerCostBearerRealtionVM) selectedVM).CostBearer
@@ -1230,17 +1230,17 @@ namespace BeWo.View.Detail
CreateModalViewWindow(newOrganisation, typeOfSelectedVM == typeof(CustomerCostBearerRealtionVM));
}
- if (typeOfSelectedVM == typeof(CustomerPersonRelationVM) && BeWoApp.LoggedOnUser.HasRight(UserRightType.PersonView_View))
+ if (typeOfSelectedVM == typeof(CustomerPersonRelationVM) && MainSession.LoggedOnUser.HasRight(UserRightType.PersonView_View))
{
CreateModalViewWindow(((CustomerPersonRelationVM)selectedVM).Person);
}
- if (typeOfSelectedVM == typeof(CustomerEmployeeRelationVM) && BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (typeOfSelectedVM == typeof(CustomerEmployeeRelationVM) && MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
CreateModalViewWindow(((CustomerEmployeeRelationVM)selectedVM).Employee);
}
- if (typeOfSelectedVM == typeof(CustomerTeamRelationVM) && BeWoApp.LoggedOnUser.HasRight(UserRightType.TeamView_ViewAll))
+ if (typeOfSelectedVM == typeof(CustomerTeamRelationVM) && MainSession.LoggedOnUser.HasRight(UserRightType.TeamView_ViewAll))
{
CreateModalViewWindow(((CustomerTeamRelationVM)selectedVM).Team);
}
@@ -1289,7 +1289,7 @@ namespace BeWo.View.Detail
private void Popupedit_teamRelations_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (ViewModel.TeamRelations.NewVM.Team == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.TeamView_ViewAll))
+ if (ViewModel.TeamRelations.NewVM.Team == null || !BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || !MainSession.LoggedOnUser.HasRight(UserRightType.TeamView_ViewAll))
return;
CreateModalViewWindow(ViewModel.TeamRelations.NewVM.Team);
@@ -1600,7 +1600,7 @@ namespace BeWo.View.Detail
// if (!mWaitDialogShown) return;
// mWaitDialogShown = false;
- // BeWoApp.MainView.EndWaiting();
+ // MainSession.MainPage.EndWaiting();
//}
//private void SelektierenBtn_OnClick(object sender, RoutedEventArgs e)
diff --git a/BeWo/View/Detail/CustomerView2.xaml b/BeWo/View/Detail/CustomerView2.xaml
index c7f279336..8715ac931 100644
--- a/BeWo/View/Detail/CustomerView2.xaml
+++ b/BeWo/View/Detail/CustomerView2.xaml
@@ -163,7 +163,7 @@
-
+
@@ -180,7 +180,7 @@
-
+
@@ -242,7 +242,7 @@
-
+
@@ -264,7 +264,7 @@
-
+
@@ -289,7 +289,7 @@
-
+
@@ -351,7 +351,7 @@
-
+
@@ -366,7 +366,7 @@
-
+
@@ -389,7 +389,7 @@
-
+
@@ -426,7 +426,7 @@
-
+
@@ -465,12 +465,12 @@
-
+
-
+
diff --git a/BeWo/View/Detail/CustomerView2.xaml.cs b/BeWo/View/Detail/CustomerView2.xaml.cs
index ae42533af..28c273f95 100644
--- a/BeWo/View/Detail/CustomerView2.xaml.cs
+++ b/BeWo/View/Detail/CustomerView2.xaml.cs
@@ -56,7 +56,7 @@ namespace BeWo.View.Detail
if (pCustomerVM.VarFields == null || pCustomerVM.VarFields.VMList.Count == 0)
tabitem_varFields.Visibility = Visibility.Collapsed;
- if (!BeWoApp.AppSettings.ShowLargeCustomerNotice)
+ if (!MainSession.AppSettings.ShowLargeCustomerNotice)
tabitem_notice.Visibility = Visibility.Collapsed;
// HACK: Force the devexpress grid to end editing when the mouse is over savebutton
// by setting the focus to another element.
@@ -86,13 +86,13 @@ namespace BeWo.View.Detail
txtDebitorNumber.Visibility = lblDebitorNumber.Visibility;
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.Customer_AllowArchiving))
{
lblArchiviert.Visibility = Visibility.Hidden;
chkArchiviert.Visibility = Visibility.Hidden;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DokumenteKlienten))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.DokumenteKlienten))
{
tabitem_documents.Visibility = Visibility.Collapsed;
}
@@ -158,7 +158,7 @@ namespace BeWo.View.Detail
public override void ModalPopUpCloseInvoked()
{
- MainView.CloseCurrentPopUp();
+ MainPage.CloseCurrentPopUp();
}
public override void ModalPopUpSaveInvoked()
@@ -198,7 +198,7 @@ namespace BeWo.View.Detail
Cache.GetInstance().ClearSupportConceptTree();
Cache.GetInstance().ClearCustomers();
- BeWoApp.MainView.ResetView(UIContext.Customer);
+ MainSession.MainPage.ResetView(UIContext.Customer);
}
catch (FaultException)
{
@@ -422,8 +422,8 @@ namespace BeWo.View.Detail
public bool ShouldLog
{
get { return false; }
- //BeWoLauncher.Cache.ConnectionInformation.Tenant == "1549622397" && BeWoLauncher.Cache.ConnectionInformation.Username.ToLower() == "h.krause"; }
- //get { return BeWoLauncher.Cache.ConnectionInformation.Tenant == "demo" && BeWoLauncher.Cache.ConnectionInformation.Username == "demo"; }
+ //ConnectionInformation.Tenant == "1549622397" && ConnectionInformation.Username.ToLower() == "h.krause"; }
+ //get { return ConnectionInformation.Tenant == "demo" && ConnectionInformation.Username == "demo"; }
}
}
}
\ No newline at end of file
diff --git a/BeWo/View/Detail/DienstView.xaml b/BeWo/View/Detail/DienstView.xaml
index 64e88adf5..ced462aa6 100644
--- a/BeWo/View/Detail/DienstView.xaml
+++ b/BeWo/View/Detail/DienstView.xaml
@@ -4,13 +4,17 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
-
+
+
+
+
diff --git a/BeWo/View/Detail/DokumentationstypView.xaml b/BeWo/View/Detail/DokumentationstypView.xaml
index d8e647965..75e2db44b 100644
--- a/BeWo/View/Detail/DokumentationstypView.xaml
+++ b/BeWo/View/Detail/DokumentationstypView.xaml
@@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BeWo.Core"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:val="clr-namespace:BeWo.Validation"
@@ -9,8 +10,10 @@
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
-
-
+
+
+
+
diff --git a/BeWo/View/Detail/EmployeeView.xaml b/BeWo/View/Detail/EmployeeView.xaml
index c4fbf68fc..6a178ac2e 100644
--- a/BeWo/View/Detail/EmployeeView.xaml
+++ b/BeWo/View/Detail/EmployeeView.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
@@ -16,6 +17,11 @@
VerticalAlignment="Stretch" Focusable="True" GotFocus="UserControl_GotFocus">
+
+
+
+
+
-
+
@@ -638,7 +644,7 @@
-
+
diff --git a/BeWo/View/Detail/EmployeeView.xaml.cs b/BeWo/View/Detail/EmployeeView.xaml.cs
index ebaef4a8c..015dd7573 100644
--- a/BeWo/View/Detail/EmployeeView.xaml.cs
+++ b/BeWo/View/Detail/EmployeeView.xaml.cs
@@ -16,13 +16,12 @@ using BeWo.SchulbegleitenderDienst;
using BeWo.ServiceProxy;
using BeWo.Validation;
using BeWo.ViewModel;
-using BeWoLauncher.Cache;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
-
+using BS.SharedLauncher.Information;
using DevExpress.Xpf.Editors.Settings;
using DevExpress.Xpf.Grid;
using Button = System.Windows.Controls.Button;
@@ -53,15 +52,15 @@ namespace BeWo.View.Detail
var noticeVisible = false;
var extendedPropsVisible = false;
- if (BeWoApp.Mandator.BeWoClientType == 3)
+ if (MainSession.Mandator.BeWoClientType == 3)
{
//Köln Ring
extendedPropsVisible = true;
}
- else if (BeWoApp.Mandator.BeWoClientType == 4)
+ else if (MainSession.Mandator.BeWoClientType == 4)
{
//Betreuwo
- if (BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowEditExtendedProperties))
+ if (MainSession.LoggedOnUser.HasRight(UserRightType.Employee_AllowEditExtendedProperties))
{
noticeVisible = true;
}
@@ -77,20 +76,20 @@ namespace BeWo.View.Detail
extendedPropertyGroup.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ChatSettings) || !BeWoApp.AppSettings.IsChatAllowed)
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.ChatSettings) || !MainSession.AppSettings.IsChatAllowed)
{
tabitem_chatservice.Visibility = Visibility.Collapsed;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowEditContracts))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.Employee_AllowEditContracts))
{
tabitem_contract.Visibility = Visibility.Collapsed;
}
- OvertimeTabItem.Visibility = BeWoApp.LoggedOnUser.HasRight(UserRightType.OvertimeView) ? Visibility.Visible : Visibility.Collapsed;
+ OvertimeTabItem.Visibility = MainSession.LoggedOnUser.HasRight(UserRightType.OvertimeView) ? Visibility.Visible : Visibility.Collapsed;
- if (BeWoApp.Mandator != null && BeWoApp.Mandator.AllowSbd || BeWoApp.AppSettings.ShowArbeitszeiten)
+ if (MainSession.Mandator != null && MainSession.Mandator.AllowSbd || MainSession.AppSettings.ShowArbeitszeiten)
{
tabitem_arbeitszeit.Visibility = Visibility.Visible;
}
@@ -104,7 +103,7 @@ namespace BeWo.View.Detail
tabitem_varFields.Visibility = Visibility.Collapsed;
}
- if (BeWoApp.Mandator != null && BeWoApp.Mandator.AllowSbd)
+ if (MainSession.Mandator != null && MainSession.Mandator.AllowSbd)
{
tabitem_schuldienst.Visibility = Visibility.Visible;
}
@@ -140,7 +139,7 @@ namespace BeWo.View.Detail
chkArchiviert.IsChecked = ViewModel.IsArchived;
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Employee_AllowArchiving))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.Employee_AllowArchiving))
{
lblArchiviert.Visibility = Visibility.Hidden;
chkArchiviert.Visibility = Visibility.Hidden;
@@ -148,7 +147,7 @@ namespace BeWo.View.Detail
tabitem_documents.Visibility = Visibility.Collapsed;
- if (BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) || BeWoApp.LoggedOnUser.HasRight(UserRightType.DokumenteMitarbeiter) && BeWoApp.LoggedOnEmployee.EmployeeOid == pEmployeeDC.DataContract.EmployeeOid)
+ if (MainSession.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) || MainSession.LoggedOnUser.HasRight(UserRightType.DokumenteMitarbeiter) && MainSession.LoggedOnEmployee.EmployeeOid == pEmployeeDC.DataContract.EmployeeOid)
{
tabitem_documents.Visibility = Visibility.Visible;
}
@@ -239,7 +238,7 @@ namespace BeWo.View.Detail
return new[] {UserRightType.CreateAll, UserRightType.EmployeeView_Create};
}
- return ViewModel.DataContract.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid ?
+ return ViewModel.DataContract.EmployeeOid == MainSession.LoggedOnEmployee.EmployeeOid ?
new[] {UserRightType.EditAll, UserRightType.EmployeeView_Edit, UserRightType.Employee_AllowEditOwnEmployees} :
new[] {UserRightType.EditAll, UserRightType.EmployeeView_Edit};
}
@@ -251,7 +250,7 @@ namespace BeWo.View.Detail
return;
}
- if(BeWoApp.AppSettings.IsChatAllowed)
+ if(MainSession.AppSettings.IsChatAllowed)
{
if (ViewModel.DataContract.FirstName != ViewModel.FirstName || ViewModel.DataContract.LastName != ViewModel.LastName)
{
@@ -278,7 +277,7 @@ namespace BeWo.View.Detail
}
Cache.GetInstance().ClearEmployees();
- BeWoApp.MainView.ResetView(UIContext.Employee);
+ MainSession.MainPage.ResetView(UIContext.Employee);
}
catch(FaultException)
{
@@ -344,7 +343,7 @@ namespace BeWo.View.Detail
PreselectEmployeeBrush();
- if (_DoOwnChatSync && BeWoApp.AppSettings.IsChatAllowed)
+ if (_DoOwnChatSync && MainSession.AppSettings.IsChatAllowed)
{
//BeWoUtils.OwnChatSynchronisationVeranlassen();
}
@@ -522,7 +521,7 @@ namespace BeWo.View.Detail
var selectedCustomerEmployeeRelationVM =
grid_CustomerRelation.GetRow(e.HitInfo.RowHandle) as CustomerEmployeeRelationVM;
- if (selectedCustomerEmployeeRelationVM == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
+ if (selectedCustomerEmployeeRelationVM == null || !MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
return;
VMFactory.CreateCustomerVMAsync(selectedCustomerEmployeeRelationVM.Customer.CustomerOid,
diff --git a/BeWo/View/Detail/EmploymentTypeView.xaml b/BeWo/View/Detail/EmploymentTypeView.xaml
index 8371c8b1b..e4a9a1f62 100644
--- a/BeWo/View/Detail/EmploymentTypeView.xaml
+++ b/BeWo/View/Detail/EmploymentTypeView.xaml
@@ -4,13 +4,16 @@
xmlns:local="clr-namespace:BeWo.Core"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
-
-
+
+
+
+
diff --git a/BeWo/View/Detail/GoalImportControl.xaml b/BeWo/View/Detail/GoalImportControl.xaml
index 8e6a41ba6..61e58d797 100644
--- a/BeWo/View/Detail/GoalImportControl.xaml
+++ b/BeWo/View/Detail/GoalImportControl.xaml
@@ -3,6 +3,7 @@
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -12,7 +13,10 @@
x:Class="BeWo.View.Detail.GoalImportControl"
d:DesignHeight="500" d:DesignWidth="550"
mc:Ignorable="d">
-
+
+
+
+
diff --git a/BeWo/View/Detail/GroupOfPeopleView.xaml b/BeWo/View/Detail/GroupOfPeopleView.xaml
index 3343ad003..8e53bdd44 100644
--- a/BeWo/View/Detail/GroupOfPeopleView.xaml
+++ b/BeWo/View/Detail/GroupOfPeopleView.xaml
@@ -2,14 +2,18 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:localSearchView="clr-namespace:BeWo.View.Search"
xmlns:val="clr-namespace:BeWo.Validation"
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">
+
+
+
-
+
@@ -41,7 +45,7 @@
-
+
@@ -70,7 +74,7 @@
-
+
-
+
diff --git a/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs b/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs
index 017651069..75121b120 100644
--- a/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs
+++ b/BeWo/View/Detail/Report/SupportConceptsAnalysisView.xaml.cs
@@ -9,13 +9,13 @@ using BeWo.Core;
using BeWo.MultiLanguage;
using BeWo.ServiceProxy;
using BeWo.View.Search;
-using BeWoLauncher.Cache;
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 BS.SharedLauncher.Information;
namespace BeWo.View.Detail.Report
{
@@ -32,7 +32,7 @@ namespace BeWo.View.Detail.Report
this.datepicker_appointeddate.AllowNullInput = true;
this.datepicker_appointeddate.EditValue = null;
- _SelectedEmployee = BeWoApp.LoggedOnUser.Employee;
+ _SelectedEmployee = MainSession.LoggedOnUser.Employee;
if (_SelectedEmployee != null)
{
popupedit_employee.Text = _SelectedEmployee.ToString();
@@ -49,8 +49,8 @@ namespace BeWo.View.Detail.Report
checkbox_allEmployees.IsEnabled = false;
checkbox_allEmployees.IsChecked = false;
- popupedit_employee.Text = String.Format("{0}, {1}", BeWoApp.LoggedOnEmployee.LastName,
- BeWoApp.LoggedOnEmployee.FirstName);
+ popupedit_employee.Text = String.Format("{0}, {1}", MainSession.LoggedOnEmployee.LastName,
+ MainSession.LoggedOnEmployee.FirstName);
}
@@ -60,8 +60,8 @@ namespace BeWo.View.Detail.Report
ChangeReportType();
- ChkHpDieAuslaufen.Content = Translator.Translate("Nur Hilfepläne anzeigen, die innerhalb der nächsten {0} Monate auslaufen", BeWoApp.AppSettings.HilfeplanAuslaufAuswahl);
- // if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_SupportConceptOverview_View))
+ ChkHpDieAuslaufen.Content = Translator.Translate("Nur Hilfepläne anzeigen, die innerhalb der nächsten {0} Monate auslaufen", MainSession.AppSettings.HilfeplanAuslaufAuswahl);
+ // if (!MainSession.LoggedOnUser.HasRight(UserRightType.Analysis_SupportConceptOverview_View))
// {
// Dictionary> filteredList = new Dictionary>();
@@ -85,7 +85,7 @@ namespace BeWo.View.Detail.Report
{
get
{
- return BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_EmployeeOverviewAll_View) && BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View) && BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_ViewAllSupportConcepts);
+ return MainSession.LoggedOnUser.HasRight(UserRightType.Analysis_EmployeeOverviewAll_View) && MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View) && MainSession.LoggedOnUser.HasRight(UserRightType.SupportConcept_ViewAllSupportConcepts);
}
}
@@ -94,7 +94,7 @@ namespace BeWo.View.Detail.Report
{
get
{
- return BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForAllTeams) || BeWoApp.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForTeam);
+ return MainSession.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForAllTeams) || MainSession.LoggedOnUser.HasRight(UserRightType.Analysis_AllowFLSOverviewForTeam);
}
}
@@ -109,7 +109,7 @@ namespace BeWo.View.Detail.Report
{
string url;
- int months = this.ChkHpDieAuslaufen.IsChecked.Value ? BeWoApp.AppSettings.HilfeplanAuslaufAuswahl : 0;
+ int months = this.ChkHpDieAuslaufen.IsChecked.Value ? MainSession.AppSettings.HilfeplanAuslaufAuswahl : 0;
long showArchived = this.chkShowArchived.IsChecked.Value ? 1 : 0;
long eOid = 0;
@@ -155,9 +155,9 @@ namespace BeWo.View.Detail.Report
}
url = ConnectionInformation.CoreServerAddressOrigin + "/ReportView.aspx"
- //+ "?tenant=" + BeWoLauncher.Cache.ConnectionInformation.Tenant
- //+ "&username=" + BeWoLauncher.Cache.ConnectionInformation.Username
- //+ "&token=" + BeWoApp.LoggedOnUser.RC2Password
+ //+ "?tenant=" + ConnectionInformation.Tenant
+ //+ "&username=" + ConnectionInformation.Username
+ //+ "&token=" + MainSession.LoggedOnUser.RC2Password
+ "?c2slist=" + oidString.ToString()
+ "&type=" + Utils.EnumName(ReportTypes.SupportConceptReport);
}
@@ -166,9 +166,9 @@ namespace BeWo.View.Detail.Report
// if (ViewModel != null && ViewModel.ServiceRecordsForSelectedCustomer != null && ViewModel.ServiceRecordsForSelectedCustomer.Count > 0)
// {
url = ConnectionInformation.CoreServerAddressOrigin + "/ReportView.aspx"
- //+ "?tenant=" + BeWoLauncher.Cache.ConnectionInformation.Tenant
- //+ "&username=" + BeWoLauncher.Cache.ConnectionInformation.Username
- //+ "&token=" + BeWoApp.LoggedOnUser.RC2Password
+ //+ "?tenant=" + ConnectionInformation.Tenant
+ //+ "&username=" + ConnectionInformation.Username
+ //+ "&token=" + MainSession.LoggedOnUser.RC2Password
+ "?eOid=" + eOid
+ "&tOid=" + tOid
+ "&exp=" + months
@@ -197,7 +197,7 @@ namespace BeWo.View.Detail.Report
if (this.ChkHpDieAuslaufen.IsChecked.Value)
{
- months = BeWoApp.AppSettings.HilfeplanAuslaufAuswahl;
+ months = MainSession.AppSettings.HilfeplanAuslaufAuswahl;
}
bool showArchived = this.chkShowArchived.IsChecked.Value;
@@ -359,7 +359,7 @@ namespace BeWo.View.Detail.Report
if (ol != null)
{
List teams = new List();
- var emp = BeWoApp.LoggedOnUser.Employee;
+ var emp = MainSession.LoggedOnUser.Employee;
if (emp.LeadingTeamOids != null && emp.LeadingTeamOids.Count > 0)
{
foreach (var t in ol)
@@ -383,7 +383,7 @@ namespace BeWo.View.Detail.Report
}
}
- //if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.SupportConcept_ViewAllSupportConcepts) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll))
+ //if (!MainSession.LoggedOnUser.HasRight(UserRightType.SupportConcept_ViewAllSupportConcepts) && !MainSession.LoggedOnUser.HasRight(UserRightType.ViewAll))
//{
// checkbox_allEmployees.IsEnabled = false;
//}
diff --git a/BeWo/View/Detail/Report/TestEMailControl.xaml b/BeWo/View/Detail/Report/TestEMailControl.xaml
index b6f7451ed..9e8bad70b 100644
--- a/BeWo/View/Detail/Report/TestEMailControl.xaml
+++ b/BeWo/View/Detail/Report/TestEMailControl.xaml
@@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="200" d:DesignWidth="300">
-
+
diff --git a/BeWo/View/Detail/Report/TimeSheetMailView.xaml b/BeWo/View/Detail/Report/TimeSheetMailView.xaml
index e8e89a5a7..a85321a65 100644
--- a/BeWo/View/Detail/Report/TimeSheetMailView.xaml
+++ b/BeWo/View/Detail/Report/TimeSheetMailView.xaml
@@ -60,7 +60,7 @@
-
+
diff --git a/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs b/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs
index e2a30cc5c..fccc52e40 100644
--- a/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs
+++ b/BeWo/View/Detail/Report/TimeSheetMailView.xaml.cs
@@ -16,13 +16,13 @@ using BeWo.Controls;
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.ViewModel;
-using BeWoLauncher.Cache;
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 BS.SharedLauncher.Information;
using DevExpress.Xpf.Core;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Printing;
@@ -46,7 +46,7 @@ namespace BeWo.View.Detail.Report
InitializeComponent();
InitDateCombos();
- //if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
+ //if (!MainSession.LoggedOnUser.HasRight(UserRightType.ViewAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
//{
// checkbox_all.IsEnabled = false;
// checkbox_all.IsChecked = false;
@@ -63,7 +63,7 @@ namespace BeWo.View.Detail.Report
combobox_month.SelectionChanged += combobox_month_SelectionChanged;
combobox_year.SelectionChanged += combobox_year_SelectionChanged;
- ThemeManager.SetTheme(BeWoApp.CurrentBeWo.MainWindow, Theme.Office2010Black);
+ ThemeManager.SetTheme(Session.GetWindow(), Theme.Office2010Black);
}
@@ -217,9 +217,9 @@ namespace BeWo.View.Detail.Report
ctrl.Subject = vm.TimeSheetStatusItem.MailSubjectTemplate;
ctrl.Message = vm.TimeSheetStatusItem.MailMessageTemplate;
- if (BeWoApp.LoggedOnEmployee.ContactInformations != null)
+ if (MainSession.LoggedOnEmployee.ContactInformations != null)
{
- foreach (var contact in BeWoApp.LoggedOnEmployee.ContactInformations)
+ foreach (var contact in MainSession.LoggedOnEmployee.ContactInformations)
{
if (contact.ContactType == ContactType.business_Mail)
{
@@ -241,7 +241,7 @@ namespace BeWo.View.Detail.Report
bewoWindow.GroupBoxContent = ctrl;
bewoWindow.rootGroupBox.Header = "E-Mail versenden";
- bewoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
+ bewoWindow.Owner = Session.GetWindow();
bewoWindow.ShowDialog();
}
@@ -379,7 +379,7 @@ namespace BeWo.View.Detail.Report
bewoWindow.GroupBoxContent = ctrl;
bewoWindow.rootGroupBox.Header = "E-Mail versenden";
- bewoWindow.Owner = BeWoApp.CurrentBeWo.MainWindow;
+ bewoWindow.Owner = Session.GetWindow();
bewoWindow.Show();
}
diff --git a/BeWo/View/Detail/RessourceView.xaml b/BeWo/View/Detail/RessourceView.xaml
index 18c2a81fc..893547edd 100644
--- a/BeWo/View/Detail/RessourceView.xaml
+++ b/BeWo/View/Detail/RessourceView.xaml
@@ -3,12 +3,16 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase" xmlns:localView="clr-namespace:BeWo.View" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
-
+
+
+
+
diff --git a/BeWo/View/Detail/SchedulerSettingsView.xaml b/BeWo/View/Detail/SchedulerSettingsView.xaml
index ea7fc7a8e..83b94529f 100644
--- a/BeWo/View/Detail/SchedulerSettingsView.xaml
+++ b/BeWo/View/Detail/SchedulerSettingsView.xaml
@@ -2,13 +2,17 @@
x:Class="BeWo.View.Detail.SchedulerSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
+ xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase" xmlns:localView="clr-namespace:BeWo.View" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
-
+
+
+
+
diff --git a/BeWo/View/Detail/SendMailView.xaml b/BeWo/View/Detail/SendMailView.xaml
index 9b869833f..081b69ecd 100644
--- a/BeWo/View/Detail/SendMailView.xaml
+++ b/BeWo/View/Detail/SendMailView.xaml
@@ -10,9 +10,9 @@
-
+
@@ -117,7 +117,7 @@
-
+
@@ -171,7 +171,7 @@
-
+
diff --git a/BeWo/View/Detail/TeamView.xaml.cs b/BeWo/View/Detail/TeamView.xaml.cs
index 34da71661..478eee9af 100644
--- a/BeWo/View/Detail/TeamView.xaml.cs
+++ b/BeWo/View/Detail/TeamView.xaml.cs
@@ -36,7 +36,7 @@ namespace BeWo.View.Detail
ViewModel = pViewModel;
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.DokumenteTeams))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.DokumenteTeams))
{
tabitem_documents.Visibility = Visibility.Collapsed;
}
@@ -84,13 +84,13 @@ namespace BeWo.View.Detail
ServiceFacade.DoEmployeeServiceAsync(s => s.UpdateTeam(lDC), ReloadViewModel);
}
- if (BeWoApp.AppSettings.IsChatAllowed)
+ if (MainSession.AppSettings.IsChatAllowed)
{
//BeWoUtils.OwnChatSynchronisationVeranlassen();
}
Cache.GetInstance().ClearEmployees();
- BeWoApp.MainView.ResetView(UIContext.Team);
+ MainSession.MainPage.ResetView(UIContext.Team);
}
catch (FaultException)
{
@@ -153,7 +153,7 @@ namespace BeWo.View.Detail
private void Popupedit_leader_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || ViewModel.Leader == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit)sender, e) || ViewModel.Leader == null || !MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
return;
}
@@ -166,7 +166,7 @@ namespace BeWo.View.Detail
private void DoubleClickHandler(object sender, MouseButtonEventArgs e)
{
- if (!(((ListBoxItem) sender).Content is CompactEmployeeDC selectedEmployee) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (!(((ListBoxItem) sender).Content is CompactEmployeeDC selectedEmployee) || !MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
return;
}
@@ -179,7 +179,7 @@ namespace BeWo.View.Detail
private void ListBox_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (!(((ListBoxItem)sender).Content is CompactEmployeeDC employee) || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (!(((ListBoxItem)sender).Content is CompactEmployeeDC employee) || !MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
{
return;
}
diff --git a/BeWo/View/Detail/TextModuleView.xaml b/BeWo/View/Detail/TextModuleView.xaml
index ec9a352cb..84ed67ba8 100644
--- a/BeWo/View/Detail/TextModuleView.xaml
+++ b/BeWo/View/Detail/TextModuleView.xaml
@@ -2,6 +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"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:detail="clr-namespace:BeWo.View.Detail"
@@ -12,8 +13,12 @@
+
+
+
+
-
+
diff --git a/BeWo/View/Detail/TextModuleView.xaml.cs b/BeWo/View/Detail/TextModuleView.xaml.cs
index 528cee8cc..6d1bc9c87 100644
--- a/BeWo/View/Detail/TextModuleView.xaml.cs
+++ b/BeWo/View/Detail/TextModuleView.xaml.cs
@@ -38,7 +38,7 @@ namespace BeWo.View.Detail
public bool IsInAdministrationView { get; }
- public bool AreUserControlsEnabled => IsInAdministrationView ? BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten) : BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
+ public bool AreUserControlsEnabled => IsInAdministrationView ? MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten) : MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
public TextModuleView(TextModuleListVM pViewModel, bool pIsInAdministrationView = false)
{
@@ -139,11 +139,11 @@ namespace BeWo.View.Detail
{
if (textModuleVM != null)
{
- var isOwn = textModuleVM.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid);
+ var isOwn = textModuleVM.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid);
- var hasRight2EditAll = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
- var hasRight2EditOwn = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
- var hasRight2Create4All = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
+ var hasRight2EditAll = MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
+ var hasRight2EditOwn = MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
+ var hasRight2Create4All = MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
if(parameter != null && parameter.ToString().Equals("IsOnlyForEmployeeCheckBox"))
{
diff --git a/BeWo/View/Detail/TextbausteinView.xaml b/BeWo/View/Detail/TextbausteinView.xaml
index a98a1d52e..c64714f51 100644
--- a/BeWo/View/Detail/TextbausteinView.xaml
+++ b/BeWo/View/Detail/TextbausteinView.xaml
@@ -2,16 +2,20 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:view="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:detail="clr-namespace:BeWo.View.Detail"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
+
+
+
-
+
diff --git a/BeWo/View/Detail/TextbausteinView.xaml.cs b/BeWo/View/Detail/TextbausteinView.xaml.cs
index 92a4146f8..c921e34db 100644
--- a/BeWo/View/Detail/TextbausteinView.xaml.cs
+++ b/BeWo/View/Detail/TextbausteinView.xaml.cs
@@ -140,11 +140,11 @@ namespace BeWo.View.Detail
{
if (textbausteinVM != null)
{
- var isOwn = textbausteinVM.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid);
+ var isOwn = textbausteinVM.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid);
- var hasRight2EditAll = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
- var hasRight2EditOwn = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
- var hasRight2Create4All = BeWoApp.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
+ var hasRight2EditAll = MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
+ var hasRight2EditOwn = MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineNurEigeneBearbeiten);
+ var hasRight2Create4All = MainSession.LoggedOnUser.HasRight(UserRightType.TextbausteineAlleBearbeiten);
if (parameter != null && parameter.ToString().Equals("IsOnlyForEmployeeCheckBox"))
{
diff --git a/BeWo/View/Detail/UserGroupView.xaml b/BeWo/View/Detail/UserGroupView.xaml
index 179f3c5ce..4a4b68d5e 100644
--- a/BeWo/View/Detail/UserGroupView.xaml
+++ b/BeWo/View/Detail/UserGroupView.xaml
@@ -1,7 +1,16 @@
-
-
+
+
+
+
+
+
-
+
@@ -24,7 +33,7 @@
-
+
diff --git a/BeWo/View/Detail/UserGroupView.xaml.cs b/BeWo/View/Detail/UserGroupView.xaml.cs
index d64b2fb02..c35dafcba 100644
--- a/BeWo/View/Detail/UserGroupView.xaml.cs
+++ b/BeWo/View/Detail/UserGroupView.xaml.cs
@@ -64,7 +64,7 @@ namespace BeWo.View.Detail
ServiceFacade.DoUserServiceAsync(s => s.UpdateUserGroup(lDataContract), ReloadViewModel, true);
}
- BeWoApp.MainView.ResetView(UIContext.UserGroup);
+ MainSession.MainPage.ResetView(UIContext.UserGroup);
}
catch (FaultException)
{
@@ -82,9 +82,9 @@ namespace BeWo.View.Detail
{
ViewModel = cb;
- if (BeWoApp.LoggedOnUser.UserGroups.Contains(cb.DataContract))
+ if (MainSession.LoggedOnUser.UserGroups.Contains(cb.DataContract))
{
- ServiceFacade.DoUserServiceAsync(s => s.LoadUser(BeWoApp.LoggedOnUser.UserOid.Value), cb2 => BeWoApp.LoggedOnUser = cb2, true);
+ ServiceFacade.DoUserServiceAsync(s => s.LoadUser(MainSession.LoggedOnUser.UserOid.Value), cb2 => MainSession.LoggedOnUser = cb2, true);
}
}));
}
diff --git a/BeWo/View/Detail/UserView.xaml b/BeWo/View/Detail/UserView.xaml
index dc4cd267a..e445a7c29 100644
--- a/BeWo/View/Detail/UserView.xaml
+++ b/BeWo/View/Detail/UserView.xaml
@@ -1,7 +1,14 @@
-
-
+
+
+
+
+
+
+
-
+
@@ -24,7 +31,7 @@
-
+
@@ -176,7 +183,7 @@
-
+
diff --git a/BeWo/View/Detail/UserView.xaml.cs b/BeWo/View/Detail/UserView.xaml.cs
index 4d2f934f9..21231e658 100644
--- a/BeWo/View/Detail/UserView.xaml.cs
+++ b/BeWo/View/Detail/UserView.xaml.cs
@@ -14,6 +14,7 @@ using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
+using BS.SharedLauncher.Information;
namespace BeWo.View.Detail
{
@@ -29,7 +30,7 @@ namespace BeWo.View.Detail
InitializeComponent();
ViewModel = pViewModel;
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.DocumentsAllowViewAll))
{
tabitem_documents.Visibility = Visibility.Collapsed;
}
@@ -100,7 +101,7 @@ namespace BeWo.View.Detail
{
ServiceFacade.DoUserServiceAsync(s => s.UpdateUser(lUser), UserUpdated, true);
}
- BeWoApp.MainView.ResetView(UIContext.User);
+ MainSession.MainPage.ResetView(UIContext.User);
}
catch (FaultException ex)
{
@@ -143,9 +144,9 @@ namespace BeWo.View.Detail
delegate
{
ViewModel = cb;
- if (BeWoApp.LoggedOnUser.Equals(cb.DataContract))
+ if (MainSession.LoggedOnUser.Equals(cb.DataContract))
{
- BeWoApp.LoggedOnUser = cb.DataContract;
+ MainSession.LoggedOnUser = cb.DataContract;
}
}));
}
@@ -153,9 +154,9 @@ namespace BeWo.View.Detail
private void UserUpdated(long pOid)
{
- if (pOid == BeWoApp.LoggedOnUser.UserOid)
+ if (pOid == MainSession.LoggedOnUser.UserOid)
{
- BeWoLauncher.Cache.ConnectionInformation.Username = ViewModel.DataContract.LoginName;
+ ConnectionInformation.Username = ViewModel.DataContract.LoginName;
}
ReloadViewModel(pOid);
@@ -174,7 +175,7 @@ namespace BeWo.View.Detail
private void button_changePassword_Click(object sender, RoutedEventArgs e)
{
- if (BeWoApp.LoggedOnUser.HasRight(UserRightType.UserView_AllowChangePassword))
+ if (MainSession.LoggedOnUser.HasRight(UserRightType.UserView_AllowChangePassword))
{
lblOldPassword.Visibility = Visibility.Collapsed;
passwordbox_editOldPassword.Visibility = Visibility.Collapsed;
@@ -209,14 +210,14 @@ namespace BeWo.View.Detail
//neu
var pwStaerke = BeWoUtils.CheckPasswordSecurity(newPw);
- if (BeWoApp.AppSettings.IsPasswordSecurityActiv && (pwStaerke == PasswortSecurityStrength.SehrSchwach || pwStaerke == PasswortSecurityStrength.Schwach))
+ if (MainSession.AppSettings.IsPasswordSecurityActiv && (pwStaerke == PasswortSecurityStrength.SehrSchwach || pwStaerke == PasswortSecurityStrength.Schwach))
{
textblock_editFailures.Text = "Das Passwort ist zu schwach!";
MessageBox.Show(textblock_editFailures.Text, "Ändern des Passworts fehlgeschlagen", MessageBoxButton.OK, MessageBoxImage.Information);
return;
}
- if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.UserView_AllowChangePassword))
+ if (!MainSession.LoggedOnUser.HasRight(UserRightType.UserView_AllowChangePassword))
{
var result = ServiceFacade.DoUserServiceSync(s => s.CheckPassword(ViewModel.DataContract.UserOid.Value, oldPw, newPw));
@@ -239,9 +240,9 @@ namespace BeWo.View.Detail
s1 => s1.ChangePassword(ViewModel.DataContract.LoginName, ViewModel.DataContract.UserVersion.Value, oldPw, newPw),
r1 =>
{
- if (ViewModel.DataContract.UserOid == BeWoApp.LoggedOnUser.UserOid)
+ if (ViewModel.DataContract.UserOid == MainSession.LoggedOnUser.UserOid)
{
- BeWoLauncher.Cache.ConnectionInformation.Userpassword = newPw;
+ ConnectionInformation.Password = newPw;
}
ServiceFacade.DoUserServiceAsync(
@@ -255,7 +256,7 @@ namespace BeWo.View.Detail
popup_changePassword.IsOpen = false;
ClearEditPasswordPopUp();
- if (BeWoApp.AppSettings.IsChatAllowed)
+ if (MainSession.AppSettings.IsChatAllowed)
{
//BeWoUtils.OwnChatSynchronisationVeranlassen();
}
@@ -291,7 +292,7 @@ namespace BeWo.View.Detail
private void Popupedit_employee_OnPreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
- if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit) sender, e) || ViewModel.Employee == null || !BeWoApp.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
+ if (!BeWoUtils.CheckPopupEditClickableSpace((PopUpEdit) sender, e) || ViewModel.Employee == null || !MainSession.LoggedOnUser.HasRight(UserRightType.EmployeeView_View))
return;
VMFactory.CreateEmployeeVMAsync(ViewModel.Employee.EmployeeOid,
diff --git a/BeWo/View/Detail/ValueListView.xaml b/BeWo/View/Detail/ValueListView.xaml
index 764d1590a..949f3fa7d 100644
--- a/BeWo/View/Detail/ValueListView.xaml
+++ b/BeWo/View/Detail/ValueListView.xaml
@@ -4,13 +4,16 @@
xmlns:local="clr-namespace:BeWo.Core"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:localView="clr-namespace:BeWo.View"
+ xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
-
-
+
+
+
+
diff --git a/BeWo/View/Detail/ViewMailView.xaml b/BeWo/View/Detail/ViewMailView.xaml
index afc41f95d..be2420d02 100644
--- a/BeWo/View/Detail/ViewMailView.xaml
+++ b/BeWo/View/Detail/ViewMailView.xaml
@@ -10,9 +10,9 @@
-
+
@@ -221,7 +226,7 @@
SelectedItem="{Binding Path=PreselectedYear, RelativeSource={RelativeSource AncestorType={x:Type view:NotizenKategorienView}}, Mode=OneWay}"/>-->
-
+
@@ -229,7 +234,7 @@
-
+
diff --git a/BeWo/View/NotizenView.xaml.cs b/BeWo/View/NotizenView.xaml.cs
index 53d7689d8..77ef410f3 100644
--- a/BeWo/View/NotizenView.xaml.cs
+++ b/BeWo/View/NotizenView.xaml.cs
@@ -13,12 +13,11 @@ using BeWo.Validation;
using BeWo.View.Controls;
using BeWo.ViewModel;
using BeWo.ViewModel.ListViewModel;
-using BeWoLauncher.Cache;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
-
+using BS.SharedLauncher.Information;
using DevExpress.Utils;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Grid;
@@ -163,19 +162,19 @@ namespace BeWo.View
//if (currentObjectTid == TableID.Customer)
//{
- // editRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll);
- // editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten)) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
+ // editRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll);
+ // editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungBearbeiten)) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
- // deleteRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungLoeschen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll);
- // createRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnlegen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll);
+ // deleteRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungLoeschen) || MainSession.LoggedOnUser.HasRight(UserRightType.DeleteAll);
+ // createRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungAnlegen) || MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll);
//}
//else
//{
- // editRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll);
- // editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten)) || BeWoApp.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
+ // editRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll);
+ // editRightAsDefaultBoolean = (DefaultBoolean)(Convert.ToInt32((MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenBearbeiten)) || MainSession.LoggedOnUser.HasRight(UserRightType.EditAll)) + 1);
- // deleteRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenLoeschen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.DeleteAll);
- // createRight = BeWoApp.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenAnlegen) || BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll);
+ // deleteRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenLoeschen) || MainSession.LoggedOnUser.HasRight(UserRightType.DeleteAll);
+ // createRight = MainSession.LoggedOnUser.HasRight(UserRightType.BargeldverwaltungFinanzenAnlegen) || MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll);
//}
//darfBargeldTransaktionenBearbeiten = editRight;
@@ -275,7 +274,7 @@ namespace BeWo.View
BeWoUtils.NavigateToReportUri(url, "Druckvorschau");
- //ServiceFacade.DoReportServiceAsync(strom => strom.CreateKassenbuchReportImZeitraum(zeitraum, endzeitraum, kasse, objectOid, objectTid), ms => BeWoApp.MainView.Dispatch(() => ShowReportWindow(ms, title)));
+ //ServiceFacade.DoReportServiceAsync(strom => strom.CreateKassenbuchReportImZeitraum(zeitraum, endzeitraum, kasse, objectOid, objectTid), ms => MainSession.MainPage.Dispatch(() => ShowReportWindow(ms, title)));
//BeWoUtils.ShowReport("Kassenbuch", new Dictionary { { "bargeldkasse", kategorie }, { "zeitraum", startzeitraum.DateTime }, { "endzeitraum", endzeitraum.DateTime }, { "objectoid", kategorie.ObjectOid }, { "objecttid", kategorie.ObjectTid } }, ReportEnum.KassenbuchReportEnum);
}
diff --git a/BeWo/View/PasswortAenderungsView.xaml b/BeWo/View/PasswortAenderungsView.xaml
index cd6154acb..19b63cf28 100644
--- a/BeWo/View/PasswortAenderungsView.xaml
+++ b/BeWo/View/PasswortAenderungsView.xaml
@@ -7,7 +7,7 @@
ResizeMode="NoResize">
-
+
diff --git a/BeWo/View/PasswortAenderungsView.xaml.cs b/BeWo/View/PasswortAenderungsView.xaml.cs
index 40cf7a0cb..76a22310d 100644
--- a/BeWo/View/PasswortAenderungsView.xaml.cs
+++ b/BeWo/View/PasswortAenderungsView.xaml.cs
@@ -11,6 +11,7 @@ using BeWo.ServiceProxy;
using BeWo.ViewModel;
using BS.Shared.Extensions;
+using BS.SharedLauncher.Information;
namespace BeWo.View
{
@@ -28,7 +29,7 @@ namespace BeWo.View
Close();
}));
- VMFactory.CreateUserVMAsync(BeWoApp.LoggedOnUser.UserOid.Value, vm => ViewModel = vm);
+ VMFactory.CreateUserVMAsync(MainSession.LoggedOnUser.UserOid.Value, vm => ViewModel = vm);
}
private void RootGroupBox_OnMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
@@ -66,7 +67,7 @@ namespace BeWo.View
var lOld = AltesPwBox.Password;
var lNew = NeuesPwBox.Password;
- ServiceFacade.DoUserServiceAsync(s => s.CheckPassword(BeWoApp.LoggedOnUser.UserOid.Value, lOld, lNew),
+ ServiceFacade.DoUserServiceAsync(s => s.CheckPassword(MainSession.LoggedOnUser.UserOid.Value, lOld, lNew),
result => CheckPasswordResult(result, lOld, lNew), true);
}
@@ -83,18 +84,18 @@ namespace BeWo.View
},
obj =>
{
- if (ViewModel.DataContract.UserOid == BeWoApp.LoggedOnUser.UserOid)
+ if (ViewModel.DataContract.UserOid == MainSession.LoggedOnUser.UserOid)
{
- BeWoLauncher.Cache.ConnectionInformation.Userpassword = newPassword;
- ServiceFacade.DoUserServiceAsync(s => s.LoadUser(BeWoApp.LoggedOnUser.UserOid.Value), obj2 =>
+ ConnectionInformation.Password = newPassword;
+ ServiceFacade.DoUserServiceAsync(s => s.LoadUser(MainSession.LoggedOnUser.UserOid.Value), obj2 =>
{
- BeWoApp.LoggedOnUser = obj2;
- BeWoApp.LoggedOnUser.ResetPasswordInfos.ForEach(f => f.HasToChangePW = false);
- ServiceFacade.DoUserServiceAsync(s3 => s3.UpdateUser(BeWoApp.LoggedOnUser), true);
+ MainSession.LoggedOnUser = obj2;
+ MainSession.LoggedOnUser.ResetPasswordInfos.ForEach(f => f.HasToChangePW = false);
+ ServiceFacade.DoUserServiceAsync(s3 => s3.UpdateUser(MainSession.LoggedOnUser), true);
}, true);
}
- if (BeWoApp.AppSettings.IsChatAllowed)
+ if (MainSession.AppSettings.IsChatAllowed)
{
//BeWoUtils.OwnChatSynchronisationVeranlassen();
}
@@ -125,9 +126,8 @@ namespace BeWo.View
{
passwortprüfer = pwS.ErmittleUndZeigePasswortStaerke(NeuesPwBox.Password, passwortprüfer);
-
var fehlermeldung = string.Empty;
-
+
//textblock_editFailures.Foreground = new SolidColorBrush(Color.FromRgb(255, 72, 0));
//if (!(NeuesPwBox.Password.Any(x => sonderzeichen.Contains(x)) && NeuesPwBox.Password.Any(x => zahlen.Contains(x)) && NeuesPwBox.Password.Any(x => grossBuchstaben.Contains(x)) && NeuesPwBox.Password.Any(x => kleinBuchstaben.Contains(x))))
diff --git a/BeWo/View/PercentageDisplay.xaml b/BeWo/View/PercentageDisplay.xaml
index 734d60bc3..b7310046a 100644
--- a/BeWo/View/PercentageDisplay.xaml
+++ b/BeWo/View/PercentageDisplay.xaml
@@ -51,16 +51,16 @@
-
-
-
diff --git a/BeWoLauncher/BeWoLaApp.xaml.cs b/BeWoLauncher/BeWoLaApp.xaml.cs
deleted file mode 100644
index a41b732ee..000000000
--- a/BeWoLauncher/BeWoLaApp.xaml.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-using BeWoLauncher.ServiceProxy;
-using BeWoLauncher.Views;
-using BS.SharedLite;
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Globalization;
-using System.IO;
-using System.Linq;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Input;
-using System.Windows.Markup;
-using System.Windows.Threading;
-
-namespace BeWoLauncher
-{
- ///
- /// Interaktionslogik für "App.xaml"
- ///
- public partial class BeWoLaApp : Application
- {
- public static MainWindow Window { get; set; }
-
- public static string ShortVersion => "3";
- public static string Version => "Version 3.0";
-
- public static void ShowError(string message, Exception ex, bool showDetails)
- {
- if (Window != null)
- {
- Window.Dispatcher.BeginInvoke((Action)(() =>
- {
- Window.ShowError(message, ex, showDetails);
- }));
- }
- else
- {
- MessageBox.Show(message + "\n\n" + ex);
- }
- }
-
- protected override void OnStartup(StartupEventArgs e)
- {
- //Licenser.LicenseKey = "DGF20-AUTJ7-3K8MD-DNNA";
-
- //Timeline.DesiredFrameRateProperty.OverrideMetadata(typeof(Timeline),
- // new FrameworkPropertyMetadata { DefaultValue = 30 });
-
- base.OnStartup(e);
- //AppDomain.CurrentDomain.UnhandledException += (s, ex) => ShowError(null, ex.ExceptionObject as Exception, true);
-
- //Dispatcher.UnhandledException += (s, ex)
- // =>
- //{
- // if (ex.Exception == null || String.IsNullOrEmpty(ex.Exception.Message) || !ex.Exception.ToString().Contains("DevExpress.Xpf.Bars.Customization.CustomizationControl.OnLoaded") || !ex.Exception.ToString().Contains("DevExpress.Xpf.Grid.Native.SelectionStrategyCellBase.IsCellSelected"))
-
- // {
- // ShowError(null, ex.Exception, true);
- // }
- // ex.Handled = true;
- //};
-
- FrameworkElement.LanguageProperty.OverrideMetadata(typeof(FrameworkElement), new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
- }
- }
-}
diff --git a/BeWoLauncher/BeWoLaProfile.cs b/BeWoLauncher/BeWoLaProfile.cs
deleted file mode 100644
index 268aae909..000000000
--- a/BeWoLauncher/BeWoLaProfile.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BeWoLauncher
-{
- public class BeWoLaProfile
- {
- public string Name { get; set; }
- public string Server { get; set; }
- public string Tenant { get; set; }
-
- public BeWoLaProfile(string pname, string pserver, string ptenant)
- {
- Name = pname;
- Server = pserver;
- Tenant = ptenant;
- if (Name == null)
- Name = String.Empty;
- }
-
- public override string ToString()
- {
- return Name;
- }
-
- public override int GetHashCode()
- {
- String key = String.Format("{0}_{1}_{2}", Name, Server, Tenant);
- return key.GetHashCode();
- }
-
- public override bool Equals(object obj)
- {
- var profile = obj as BeWoLaProfile;
- if (profile == null)
- {
- return false;
- }
- String key1 = String.Format("{0}_{1}_{2}", Name, Server, Tenant);
- String key2 = String.Format("{0}_{1}_{2}", profile.Name, profile.Server, profile.Tenant);
- return key1.Equals(key2);
- }
- }
-}
diff --git a/BeWoLauncher/BeWoLaUtils.cs b/BeWoLauncher/BeWoLaUtils.cs
deleted file mode 100644
index d1a8cbdc2..000000000
--- a/BeWoLauncher/BeWoLaUtils.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace BeWoLauncher
-{
- internal static class BeWoLaUtils
- {
- public static Dictionary ParseQuery(string query)
- {
- try
- {
- if (query.IndexOf('?') >= 0)
- {
- query = query.Split('?')[1];
-
- var valueArray = Regex.Split(query, @"[\&]{0,1}[A-Za-z0-9]+[\=]{1}");
- var paramArray = Regex.Split(query, @"[\=][A-Za-z0-9;]+");
-
- valueArray = valueArray.Where(t => !string.IsNullOrWhiteSpace(t)).ToArray();
- paramArray = paramArray.Where(t => !string.IsNullOrWhiteSpace(t)).ToArray();
-
- var queryDictionary = new Dictionary();
-
- int ixg = 0;
- foreach (var item in paramArray)
- {
- queryDictionary.Add(item.Contains("&") ? Regex.Split(item, @"[\?]|[\&]")[1] : item,
- valueArray[ixg]);
- ixg++;
- if (ixg >= valueArray.Length)
- break;
- }
-
- return queryDictionary;
- }
- return new Dictionary();
- }
- catch (Exception ex)
- {
- throw new Exception(String.Format("Error while parsing query '{0}'\n{1}", query, ex.Message), ex);
- }
- }
- public static string GetAndCreateUserAppDataPath()
- {
- try
- {
- string localAppData = Environment.GetFolderPath(
- Environment.SpecialFolder.LocalApplicationData);
- string companyFilePath
- = Path.Combine(localAppData, "beyondSoft");
-
- if (!Directory.Exists(companyFilePath))
- Directory.CreateDirectory(companyFilePath);
-
- string bewoFilePath
- = Path.Combine(companyFilePath, "BeWoPlaner");
-
- if (!Directory.Exists(bewoFilePath))
- Directory.CreateDirectory(bewoFilePath);
-
- return bewoFilePath;
- }
- catch (Exception ex)
- {
- MessageBox.Show(
- "Fehler beim Anlegen des Anwendungsordners. Sie besitzen nicht die erforderlichen Rechte, bitte wenden Sie sich an Ihren Systemadministrator.\n" +
- ex.Message, "BeWoPlaner", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- }
- return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
- }
- }
-}
diff --git a/BeWoLauncher/BeWoLauncher.csproj b/BeWoLauncher/BeWoLauncher.csproj
index 710ea6c36..0095326ea 100644
--- a/BeWoLauncher/BeWoLauncher.csproj
+++ b/BeWoLauncher/BeWoLauncher.csproj
@@ -75,6 +75,7 @@
+
@@ -89,15 +90,18 @@
-
+
MSBuild:Compile
Designer
-
-
-
-
- 02 UpdateView.xaml
+
+ PasswortAenderungsView.xaml
+
+
+ 02 UpdatePage.xaml
+
+
+ PopUpWindow.xaml
Designer
@@ -111,7 +115,11 @@
MSBuild:Compile
Designer
-
+
+ Designer
+ MSBuild:Compile
+
+
MSBuild:Compile
Designer
@@ -131,16 +139,15 @@
Designer
MSBuild:Compile
-
+
MSBuild:Compile
Designer
-
- BeWoLaApp.xaml
+
+ LauncherApp.xaml
Code
-
-
+
EnterTenantDialog.xaml
@@ -155,15 +162,11 @@
-
-
-
-
ExceptionMessageBox.xaml
-
- 01 LoginView.xaml
+
+ 01 LoginPage.xaml
ProxyLoginView.xaml
@@ -174,11 +177,15 @@
WaitLayer2.xaml
-
+
MainWindow.xaml
Code
-
+
+ Designer
+ MSBuild:Compile
+
+
Designer
MSBuild:Compile
@@ -210,7 +217,9 @@
-
+
+ Designer
+
@@ -346,9 +355,18 @@
-
+
+
+
+
+ {3febb560-9275-413a-9767-bb68c44eebc3}
+ BeWo
+ False
+
+
{efe05c79-e0dd-4311-8b90-a8da7ebdf36f}
- SharedLite
+ SharedLauncher
+ True
diff --git a/BeWoLauncher/Cache/ConnectionInformation.cs b/BeWoLauncher/Cache/ConnectionInformation.cs
deleted file mode 100644
index fb8a55d77..000000000
--- a/BeWoLauncher/Cache/ConnectionInformation.cs
+++ /dev/null
@@ -1,132 +0,0 @@
-using BeWoLauncher.ServiceProxy;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BeWoLauncher.Cache
-{
- public static class ConnectionInformation
- {
- private static string _CoreServerAddress;
- private static string _LauncherServerAddress;
- private static string _ChatServerAddress;
-
- public static string IpAddress { get; set; }
- public static string ServerName { get; set; }
- public static string Tenant { get; set; }
- public static string Username { get; set; }
- public static string Userpassword { get; set; }
-
- public static string ChatServerAddress
- {
- get
- {
- return _ChatServerAddress;
- }
- set
- {
- _ChatServerAddress = value;
- }
- }
-
- public static string CoreServerAddress
- {
- get { return _CoreServerAddress; }
-
- set
- {
- _CoreServerAddress = value;
- BeWoLaApp.Window.UpdateCoreServerAddress(value);
- }
- }
-
- public static string LauncherServerAddress
- {
- get { return _LauncherServerAddress; }
-
- set
- {
- _LauncherServerAddress = value;
- LauncherServiceFacade.UpdateServerAddresses(LauncherServerAddressOrigin.ToString());
- }
- }
-
- public static Uri LauncherServerAddressOrigin
- {
- get
- {
- String url = _LauncherServerAddress.ToLower();
-
-#if DEBUG
- url = String.Format("http://localhost:3778");
- //return new Uri("https://app4.bewoplaner.de/servicesbd");
- //url = String.Format("app1.bewoplaner.de/service");
-#endif
-
- if (url.IndexOf("localhost") < 0)
- {
- int i;
-
-
- if (Int32.TryParse(url, out i))
- url = "app" + url;
-
- if (url.IndexOf('.') < 0)
- {
- url += ".bewoplaner.de";
- }
-
- if (url.IndexOf("/servicesbd") < 0)
- {
- url += "/servicesbd";
- }
-
- return new Uri(String.Format("https://{0}", url));
- }
- return new Uri(url);
- }
- }
-
- public static Uri CoreServerAddressOrigin
- {
- get
- {
- String url = _CoreServerAddress.ToLower();
-
-#if DEBUG
- url = String.Format("http://localhost:3777/Host");
- //return new Uri("https://app4.bewoplaner.de/servicesbd");
- //url = String.Format("app1.bewoplaner.de/service");
-#endif
-
- if (url.IndexOf("localhost") < 0)
- {
- int i;
-
-
- if (Int32.TryParse(url, out i))
- url = "app" + url;
-
- if (url.IndexOf('.') < 0)
- {
- url += ".bewoplaner.de";
- }
-
- //if (url.IndexOf("/service45") < 0)
- //{
- // url += "/service45";
- //}
- if (url.IndexOf("/servicesbd") < 0)
- {
- url += "/servicesbd";
- }
-
- return new Uri(String.Format("https://{0}", url));
- }
- return new Uri(url);
- }
- }
- }
-}
diff --git a/BeWoLauncher/Components/BeWoPopUp.cs b/BeWoLauncher/Components/BeWoPopUp.cs
deleted file mode 100644
index 46b73da9e..000000000
--- a/BeWoLauncher/Components/BeWoPopUp.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media.Animation;
-
-
-namespace BeWoLauncher.Components
-{
- public class BeWoPopUp : UserControl
- {
-
- }
-}
\ No newline at end of file
diff --git a/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs b/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs
index bd4300a93..71a2f32af 100644
--- a/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs
+++ b/BeWoLauncher/Components/ExceptionMessageBox.xaml.cs
@@ -6,7 +6,9 @@ namespace BeWoLauncher.Components
{
public partial class ExceptionMessageBox
{
- public ExceptionMessageBox(string message, Exception ex, bool showDetails)
+ public ExceptionMessageBox(string message, Exception ex, bool showDetails) : this(message, ex?.ToString(), showDetails) { }
+
+ public ExceptionMessageBox(string message, string submessage, bool showDetails)
{
InitializeComponent();
@@ -17,32 +19,30 @@ namespace BeWoLauncher.Components
tb_message.Text =
"Es ist leider ein unbekannter Fehler aufgetreten. Prüfen Sie Ihre Internetverbindung oder versuchen Sie es später erneut. Wir sind stets bemüht das Programm zu verbessern, daher freuen wir uns auch, wenn Sie die Fehlerdetails unten in einer Mail an support@bewoplaner.de senden.";
}
-
+
if (!showDetails)
{
lblError.Visibility = Visibility.Collapsed;
contentError.Visibility = Visibility.Collapsed;
- } else
+ }
+ else
{
- tb_stack.Text = String.Empty;
- if (!String.IsNullOrEmpty(message))
- {
- tb_stack.Text = message + System.Environment.NewLine + System.Environment.NewLine + tb_stack.Text;
- }
- if (ex != null)
- {
- tb_stack.Text += ex.ToString();
- }
- lblError.Visibility = Visibility.Visible;
+ tb_stack.Text = String.Empty;
+ if (!String.IsNullOrEmpty(message))
+ {
+ tb_stack.Text = message + System.Environment.NewLine + System.Environment.NewLine + tb_stack.Text;
+ }
+ tb_stack.Text += submessage ?? string.Empty;
+ lblError.Visibility = Visibility.Visible;
contentError.Visibility = Visibility.Visible;
}
}
private void Button_Click(object sender, RoutedEventArgs e)
{
- if(BeWoLaApp.Window != null)
+ if(LauncherApp.Window != null)
{
- BeWoLaApp.Window.CloseCurrentPopUp();
+ LauncherApp.Window.CloseCurrentPopUp();
}
}
}
diff --git a/BeWoLauncher/Components/ProfileEditView.xaml b/BeWoLauncher/Components/ProfileEditView.xaml
index 06e7e5ed0..4c79c6991 100644
--- a/BeWoLauncher/Components/ProfileEditView.xaml
+++ b/BeWoLauncher/Components/ProfileEditView.xaml
@@ -1,4 +1,4 @@
-
-
+
diff --git a/BeWoLauncher/Components/ProfileEditView.xaml.cs b/BeWoLauncher/Components/ProfileEditView.xaml.cs
index 0dea943ef..23c7b29af 100644
--- a/BeWoLauncher/Components/ProfileEditView.xaml.cs
+++ b/BeWoLauncher/Components/ProfileEditView.xaml.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using BS.SharedLauncher;
+using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Controls;
@@ -8,11 +9,11 @@ namespace BeWoLauncher.Components
///
/// Interaktionslogik für ProfileEditView.xaml
///
- public partial class ProfileEditView : BeWoPopUp
+ public partial class ProfileEditView : UserControl
{
- private ObservableCollection _Profiles;
+ private ObservableCollection _Profiles;
- public ObservableCollection Profiles
+ public ObservableCollection Profiles
{
get { return _Profiles; }
set
@@ -25,13 +26,13 @@ namespace BeWoLauncher.Components
public ProfileEditView()
{
InitializeComponent();
- Profiles = new ObservableCollection();
+ Profiles = new ObservableCollection();
}
private void ProfileAddClick(object sender, RoutedEventArgs e)
{
//var bp = new BeWoProfile(profileNameTextBox.Text, profileServerTextBox.Text, profileTenantBox.Text);
- var bp = new BeWoLaProfile("", "", "");
+ var bp = new ConnectionProfile("", "", "");
if (Profiles.Contains(bp))
return;
diff --git a/BeWoLauncher/Components/ProxyLoginView.xaml.cs b/BeWoLauncher/Components/ProxyLoginView.xaml.cs
index 5ee7f6be6..38ecc145e 100644
--- a/BeWoLauncher/Components/ProxyLoginView.xaml.cs
+++ b/BeWoLauncher/Components/ProxyLoginView.xaml.cs
@@ -44,7 +44,7 @@ namespace BeWoLauncher.Components
var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
if (!File.Exists(filePath))
{
- filePath = System.IO.Path.Combine(BeWoLaUtils.GetAndCreateUserAppDataPath(), "proxy.dat");
+ filePath = System.IO.Path.Combine(LauncherUtils.GetAndCreateUserAppDataPath(), "proxy.dat");
}
var file = new System.IO.StreamReader(filePath);
@@ -63,7 +63,7 @@ namespace BeWoLauncher.Components
proxynametxt.Text = datai[0];
proxybenutzer.Text = datai[1];
proxypasswort.Password = datai[2];
- }catch(IOException i){
+ }catch(IOException){
//Fehlermeldung
}
}
@@ -83,7 +83,7 @@ namespace BeWoLauncher.Components
var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
if (!File.Exists(filePath))
{
- filePath = System.IO.Path.Combine(BeWoLaUtils.GetAndCreateUserAppDataPath(), "proxy.dat");
+ filePath = System.IO.Path.Combine(LauncherUtils.GetAndCreateUserAppDataPath(), "proxy.dat");
}
using (System.IO.StreamWriter file =
@@ -105,7 +105,7 @@ namespace BeWoLauncher.Components
this.Close();
- }catch(IOException i){
+ }catch(IOException){
//Fehlermeldung
}
}
diff --git a/BeWoLauncher/LauncherServiceReferences.bat b/BeWoLauncher/LauncherServiceReferences.bat
index 527f29f0e..87a331360 100644
--- a/BeWoLauncher/LauncherServiceReferences.bat
+++ b/BeWoLauncher/LauncherServiceReferences.bat
@@ -1 +1 @@
-svcutil.exe /noConfig /edb /n:*,BeWoLauncher.ServiceProxy /out:ServiceProxy\LauncherGenerated.cs /ct:System.Collections.Generic.List`1 /r:..\SharedLite\bin\Debug\BS.SharedLite.dll http://localhost:3778/LauncherService.svc?wsdl
\ No newline at end of file
+svcutil.exe /noConfig /edb /n:*,BeWoLauncher.ServiceProxy /out:ServiceProxy\LauncherGenerated.cs /ct:System.Collections.Generic.List`1 /r:..\SharedLauncher\bin\Debug\BS.SharedLauncher.dll http://localhost:3778/LauncherService.svc?wsdl http://localhost:3778/EnumTranslationService.svc?wsdl
\ No newline at end of file
diff --git a/BeWoLauncher/MainWindow.xaml b/BeWoLauncher/MainWindow.xaml
deleted file mode 100644
index 287059fdf..000000000
--- a/BeWoLauncher/MainWindow.xaml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
diff --git a/BeWoLauncher/MainWindow.xaml.cs b/BeWoLauncher/MainWindow.xaml.cs
deleted file mode 100644
index 5d54376b4..000000000
--- a/BeWoLauncher/MainWindow.xaml.cs
+++ /dev/null
@@ -1,251 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Configuration;
-using System.IO;
-using System.Reflection;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Media;
-using System.Windows.Threading;
-using BeWoLauncher.Components;
-using BeWoLauncher.Views;
-using BeWoLauncher.Views.Interface;
-using BS.SharedLite;
-
-namespace BeWoLauncher
-{
- ///
- /// Interaktionslogik für MainWindow.xaml
- ///
- public partial class MainWindow : Window
- {
- private readonly Stack _ModalPopUpControls;
- private Control _CurrentModalPopUp;
- private Grid _ModalPopUpBackGround;
- private UserControl _CurrentRootControl;
- private WaitLayer2 _WaitLayer;
-
- public DirectoryInfo DirectoryRoot { get; set; }
- public string DirectoryRootString { get; set; }
- public BeWoProgramPackageDC Update { get; set; }
-
- private ILoginView LoginView { get; set; }
- private IUpdateView UpdateView { get; set; }
- public IMainView MainView { get; set; }
-
- public MainWindow()
- {
- InitializeComponent();
-
- _ModalPopUpControls = new Stack();
-
- ShowLoginView();
-
- BeWoLaApp.Window = this;
-
- DirectoryRootString = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "local");
- DirectoryRoot = new DirectoryInfo(BeWoLaApp.Window.DirectoryRootString);
- }
-
- private void LoginSuccessful(object s, EventArgs e)
- {
-#if DEBUG
- //if (BeWoLauncher.Cache.ConnectionInformation.Tenant == "demo")
- //{
- // var dlg = new ConfirmDemoDialog();
- // dlg.ShowDialog();
- //}
-#else
- if (BeWoLauncher.Cache.ConnectionInformation.Tenant == "demo")
- {
- var dlg = new ConfirmDemoDialog();
- dlg.ShowDialog();
- }
-#endif
-
- ShowUpdateView();
- }
- private void UpdateSuccessful(object s, EventArgs e)
- {
- ShowMainView();
- }
- private void MainLogout(object s, EventArgs e)
- {
- ShowLoginView();
- }
- private void MainWindow_OnClosing(object s, CancelEventArgs e)
- {
- if (MainView is object)
- {
- if (!MainView.DoSaveCheck())
- {
- e.Cancel = true;
- return;
- }
-
- MainView.DoMoreSaveStuff();
- }
-
- Application.Current.Shutdown();
- }
-
- private void loadLocal()
- {
- Assembly dll;
- foreach (var file in BeWoLaApp.Window.DirectoryRoot.GetFiles())
- {
- if (file.Extension != ".dll")
- continue;
-
- dll = Assembly.LoadFrom(Path.Combine(BeWoLaApp.Window.DirectoryRootString, file.Name));
-
- if (file.Name == BeWoLaApp.Window.Update.toLoad)
- {
- foreach (Type type in dll.GetExportedTypes())
- {
- if (typeof(IMainView).IsAssignableFrom(type))
- {
- var c = Activator.CreateInstance(type) as IMainView;
-
- //c.init(this, BeWoLaApp.Current);
-
- MainView = c;
- }
- }
- }
- }
- }
-
- private void ShowBeWoView(IBeWoView beWo)
- {
- rootGrid.Children.Clear();
- rootGrid.Children.Add(beWo.GetView());
- }
- private void ShowLoginView()
- {
- LoginView = new LoginView();
- LoginView.LoginSuccessful += LoginSuccessful;
-
- ShowBeWoView(LoginView);
-
- if (Boolean.TryParse(ConfigurationManager.AppSettings.Get("AutoLogin"), out bool b) && b)
- LoginView.Login();
- }
- private void ShowUpdateView()
- {
- UpdateView = new UpdateView(Boolean.TryParse(ConfigurationManager.AppSettings.Get("ShowUpdateDelay"), out bool b) && b);
- UpdateView.UpdateSuccessful += UpdateSuccessful;
-
- ShowBeWoView(UpdateView);
- }
- private void ShowMainView()
- {
- loadLocal();
-
- ShowBeWoView(MainView);
- }
- public void ShowError(string message, Exception ex, bool showDetails)
- {
- ShowControlAsModalPopUp(new ExceptionMessageBox(message, ex, showDetails));
- }
- private void ShowModalBackground()
- {
- _ModalPopUpBackGround = new Grid();
- _ModalPopUpBackGround.IsHitTestVisible = true;
- _ModalPopUpBackGround.Background = Brushes.White;
- _ModalPopUpBackGround.Opacity = .5;
- Grid.SetColumnSpan(_ModalPopUpBackGround, 3);
- Grid.SetRowSpan(_ModalPopUpBackGround, 3);
- rootGrid.Children.Add(_ModalPopUpBackGround);
- Panel.SetZIndex(_ModalPopUpBackGround, int.MaxValue - 1);
- }
- public void ShowControlAsModalPopUp(Control control)
- {
- this.ShowControlAsModalPopUp(control, HorizontalAlignment.Center, VerticalAlignment.Center);
- }
- public void ShowControlAsModalPopUp(Control control, HorizontalAlignment ha, VerticalAlignment va)
- {
- Dispatcher.BeginInvoke(
- DispatcherPriority.Normal,
- (Action)delegate
- {
- if (_CurrentModalPopUp != null)
- {
- rootGrid.Children.Remove(_CurrentModalPopUp);
- _ModalPopUpControls.Push(_CurrentModalPopUp);
- }
- else
- {
- this.ShowModalBackground();
- }
-
- this._CurrentModalPopUp = control;
- control.HorizontalAlignment = ha;
- control.VerticalAlignment = va;
- Grid.SetColumnSpan(control, 3);
- Grid.SetRowSpan(control, 3);
- this.rootGrid.Children.Add(control);
- Panel.SetZIndex(control, int.MaxValue);
- });
- }
- public void CloseCurrentPopUp()
- {
- if (_ModalPopUpBackGround != null)
- {
- Dispatcher.BeginInvoke(
- DispatcherPriority.Normal,
- (Action)delegate
- {
- rootGrid.Children.Remove(_CurrentModalPopUp);
- _CurrentModalPopUp = null;
- if (_ModalPopUpControls.Count == 0)
- {
- rootGrid.Children.Remove(_ModalPopUpBackGround);
- _ModalPopUpBackGround = null;
- }
- else
- {
- var control = this._ModalPopUpControls.Pop();
- _CurrentModalPopUp = control;
- rootGrid.Children.Add(control);
- Panel.SetZIndex(control, int.MaxValue);
- }
- });
- }
- }
- public void StartWaiting()
- {
- Dispatcher.BeginInvoke(DispatcherPriority.Normal,
- (Action)delegate
- {
- if (_WaitLayer == null)
- {
- _WaitLayer = new WaitLayer2();
- _WaitLayer.HorizontalAlignment = HorizontalAlignment.Center;
- _WaitLayer.VerticalAlignment = VerticalAlignment.Center;
- rootGrid.Children.Add(_WaitLayer);
- Panel.SetZIndex(_WaitLayer, int.MaxValue);
- _WaitLayer.Dispatcher.Invoke(DispatcherPriority.Render, (Action)delegate () { });
- }
- });
- }
- public void EndWaiting()
- {
- Dispatcher.BeginInvoke(
- DispatcherPriority.Normal,
- (Action)delegate
- {
- if (_WaitLayer != null)
- {
- rootGrid.Children.Remove(_WaitLayer);
- _WaitLayer = null;
- }
- });
- }
- public void UpdateCoreServerAddress(string site)
- {
- MainView.UpdateServerAddresses(site);
- }
- }
-}
diff --git a/BeWoLauncher/Multitenancy/MultitenancyInterceptor.cs b/BeWoLauncher/Multitenancy/MultitenancyInterceptor.cs
index aaf8b4053..075b61c14 100644
--- a/BeWoLauncher/Multitenancy/MultitenancyInterceptor.cs
+++ b/BeWoLauncher/Multitenancy/MultitenancyInterceptor.cs
@@ -1,4 +1,5 @@
-using BeWoLauncher.Cache;
+using BS.SharedLauncher;
+using BS.SharedLauncher.Information;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
diff --git a/BeWoLauncher/Security/LauncherSecurityHeaderInterceptor.cs b/BeWoLauncher/Security/LauncherSecurityHeaderInterceptor.cs
index 5e8c36dde..9629a7419 100644
--- a/BeWoLauncher/Security/LauncherSecurityHeaderInterceptor.cs
+++ b/BeWoLauncher/Security/LauncherSecurityHeaderInterceptor.cs
@@ -1,5 +1,6 @@
using BeWoLauncher;
-using BeWoLauncher.Cache;
+using BS.SharedLauncher;
+using BS.SharedLauncher.Information;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
@@ -14,7 +15,7 @@ namespace BeWoLauncher.Security
public object BeforeSendRequest(ref Message request, IClientChannel channel)
{
- request.Headers.Add(new LauncherSecurityHeader { Username = ConnectionInformation.Username, Password = ConnectionInformation.Userpassword });
+ request.Headers.Add(new LauncherSecurityHeader { Username = ConnectionInformation.Username, Password = ConnectionInformation.Password });
return null;
}
}
diff --git a/BeWoLauncher/ServiceProxy/LauncherGenerated.cs b/BeWoLauncher/ServiceProxy/LauncherGenerated.cs
index 97d420e22..e12d69fc4 100644
--- a/BeWoLauncher/ServiceProxy/LauncherGenerated.cs
+++ b/BeWoLauncher/ServiceProxy/LauncherGenerated.cs
@@ -168,7 +168,7 @@ namespace BeWoLauncher.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILauncherService/IsUserValid", ReplyAction="http://tempuri.org/ILauncherService/IsUserValidResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/ILauncherService/IsUserValidBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
- BS.SharedLite.UserValidationResult IsUserValid(string pUserName, string pPassword, string pPIN, string clientId, bool checkTenant);
+ BS.SharedLauncher.UserValidationResult IsUserValid(string pUserName, string pPassword, string pPIN, string clientId, bool checkTenant);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILauncherService/ResetTenant", ReplyAction="http://tempuri.org/ILauncherService/ResetTenantResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/ILauncherService/ResetTenantBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
@@ -184,7 +184,23 @@ namespace BeWoLauncher.ServiceProxy
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILauncherService/Update", ReplyAction="http://tempuri.org/ILauncherService/UpdateResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/ILauncherService/UpdateBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
- BS.SharedLite.BeWoProgramPackageDC Update(BS.SharedLite.BeWoProgramPackageDC t);
+ BS.SharedLauncher.DataContract.BeWoProgramPackageDC Update(BS.SharedLauncher.DataContract.BeWoProgramPackageDC t);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILauncherService/CheckPassword", ReplyAction="http://tempuri.org/ILauncherService/CheckPasswordResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/ILauncherService/CheckPasswordBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ BS.SharedLauncher.PasswordValidationResult CheckPassword(long userOid, string pOldPassword, string pNewPassword);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILauncherService/CheckPassword2", ReplyAction="http://tempuri.org/ILauncherService/CheckPassword2Response")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/ILauncherService/CheckPassword2BeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ BS.SharedLauncher.PasswordValidationResult CheckPassword2(string username, string pOldPassword, string pNewPassword);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILauncherService/ChangePassword", ReplyAction="http://tempuri.org/ILauncherService/ChangePasswordResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/ILauncherService/ChangePasswordBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ long ChangePassword(string pUserName, string pOldPassword, string pNewPassword);
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ILauncherService/ResetPasswordInfo", ReplyAction="http://tempuri.org/ILauncherService/ResetPasswordInfoResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/ILauncherService/ResetPasswordInfoBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ void ResetPasswordInfo(string pUserName, string pPassword);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
@@ -221,7 +237,7 @@ namespace BeWoLauncher.ServiceProxy
{
}
- public BS.SharedLite.UserValidationResult IsUserValid(string pUserName, string pPassword, string pPIN, string clientId, bool checkTenant)
+ public BS.SharedLauncher.UserValidationResult IsUserValid(string pUserName, string pPassword, string pPIN, string clientId, bool checkTenant)
{
return base.Channel.IsUserValid(pUserName, pPassword, pPIN, clientId, checkTenant);
}
@@ -241,9 +257,79 @@ namespace BeWoLauncher.ServiceProxy
return base.Channel.GetEmailForUserName(out email, pUserName, serverName);
}
- public BS.SharedLite.BeWoProgramPackageDC Update(BS.SharedLite.BeWoProgramPackageDC t)
+ public BS.SharedLauncher.DataContract.BeWoProgramPackageDC Update(BS.SharedLauncher.DataContract.BeWoProgramPackageDC t)
{
return base.Channel.Update(t);
}
+
+ public BS.SharedLauncher.PasswordValidationResult CheckPassword(long userOid, string pOldPassword, string pNewPassword)
+ {
+ return base.Channel.CheckPassword(userOid, pOldPassword, pNewPassword);
+ }
+
+ public BS.SharedLauncher.PasswordValidationResult CheckPassword2(string username, string pOldPassword, string pNewPassword)
+ {
+ return base.Channel.CheckPassword2(username, pOldPassword, pNewPassword);
+ }
+
+ public long ChangePassword(string pUserName, string pOldPassword, string pNewPassword)
+ {
+ return base.Channel.ChangePassword(pUserName, pOldPassword, pNewPassword);
+ }
+
+ public void ResetPasswordInfo(string pUserName, string pPassword)
+ {
+ base.Channel.ResetPasswordInfo(pUserName, pPassword);
+ }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ [System.ServiceModel.ServiceContractAttribute(ConfigurationName="BeWoLauncher.ServiceProxy.IEnumTranslationService")]
+ public interface IEnumTranslationService
+ {
+
+ [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IEnumTranslationService/GetTranslation", ReplyAction="http://tempuri.org/IEnumTranslationService/GetTranslationResponse")]
+ [System.ServiceModel.FaultContractAttribute(typeof(BeWoLauncher.ServiceProxy.BeWoFault), Action="http://tempuri.org/IEnumTranslationService/GetTranslationBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
+ string GetTranslation(string e, short value);
+ }
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public interface IEnumTranslationServiceChannel : BeWoLauncher.ServiceProxy.IEnumTranslationService, System.ServiceModel.IClientChannel
+ {
+ }
+
+ [System.Diagnostics.DebuggerStepThroughAttribute()]
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
+ public partial class EnumTranslationServiceClient : System.ServiceModel.ClientBase, BeWoLauncher.ServiceProxy.IEnumTranslationService
+ {
+
+ public EnumTranslationServiceClient()
+ {
+ }
+
+ public EnumTranslationServiceClient(string endpointConfigurationName) :
+ base(endpointConfigurationName)
+ {
+ }
+
+ public EnumTranslationServiceClient(string endpointConfigurationName, string remoteAddress) :
+ base(endpointConfigurationName, remoteAddress)
+ {
+ }
+
+ public EnumTranslationServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(endpointConfigurationName, remoteAddress)
+ {
+ }
+
+ public EnumTranslationServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
+ base(binding, remoteAddress)
+ {
+ }
+
+ public string GetTranslation(string e, short value)
+ {
+ return base.Channel.GetTranslation(e, value);
+ }
}
}
diff --git a/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs b/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs
index 2fa9bc360..9c3f0627b 100644
--- a/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs
+++ b/BeWoLauncher/ServiceProxy/LauncherServiceFacade.cs
@@ -9,6 +9,7 @@ using System.Windows;
using BeWoLauncher.Multitenancy;
using BeWoLauncher.Security;
+using BS.SharedLauncher.Information;
namespace BeWoLauncher.ServiceProxy
{
@@ -29,7 +30,8 @@ namespace BeWoLauncher.ServiceProxy
_EndpointAddresses = new Dictionary
{
- { typeof(ILauncherService), new EndpointAddress(serverName + "LauncherService.svc") }
+ { typeof(ILauncherService), new EndpointAddress(serverName + "LauncherService.svc") },
+ { typeof(IEnumTranslationService), new EndpointAddress(serverName + "EnumTranslationService.svc") }
};
}
@@ -38,6 +40,7 @@ namespace BeWoLauncher.ServiceProxy
_ProxyCache = new Dictionary();
}
+ #region Launcher
public static void DoLauncherServiceSync(Action pAction)
{
try
@@ -87,6 +90,61 @@ namespace BeWoLauncher.ServiceProxy
{
DoMulitpleSync(pActions, true);
}
+ #endregion
+
+ #region EnumTranslation
+
+ public static void DoEnumTranslationServiceSync(Action pAction)
+ {
+ try
+ {
+ pAction.Invoke(GetInstance());
+ }
+ catch (Exception e)
+ {
+ // if (HandleServiceProxyException(e))
+ // throw e;
+ ShowErrorMessage(e);
+ }
+ }
+ public static T DoEnumTranslationServiceSync(Func pFunc)
+ {
+ try
+ {
+ return pFunc.Invoke(GetInstance());
+ }
+ catch (Exception e)
+ {
+ ShowErrorMessage(e);
+ }
+ return default(T);
+ }
+ public static void DoEnumTranslationServiceAsync(Func pFunc, Action pCallBack)
+ {
+ DoAsync(pFunc, pCallBack, true);
+ }
+ public static void DoEnumTranslationServiceAsync(Func pFunc, Action pCallBack, bool showWaitDialog)
+ {
+ DoAsync(pFunc, pCallBack, showWaitDialog);
+ }
+ public static void DoEnumTranslationServiceAsync(Action pAction)
+ {
+ DoAsync(pAction, true);
+ }
+ public static void DoEnumTranslationServiceAsync(Action pAction, Action pCallBack)
+ {
+ DoAsync(pAction, pCallBack, true);
+ }
+ public static void DoMultipleEnumTranslationServicesAsync(List> pActions, Action pAllDoneCallBack)
+ {
+ DoMulitpleAsync(pActions, pAllDoneCallBack, true);
+ }
+ public static void DoMultipleEnumTranslationServicesSync(List> pActions)
+ {
+ DoMulitpleSync(pActions, true);
+ }
+
+ #endregion
private static void DoAsync(Func pFunc, Action pCallback, bool showWaitDialog)
where TClient : ClientBase, TInterface, new()
@@ -328,7 +386,7 @@ namespace BeWoLauncher.ServiceProxy
switch (lBeWoFault.FaultType)
{
case BeWoFaultType.Concurrency:
- BeWoLaApp.ShowError(rowUpdated, e, false);
+ Session.ShowError(rowUpdated, e, false);
break;
case BeWoFaultType.DeleteNotPossible:
MessageBox.Show(lBeWoFault.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);
@@ -337,22 +395,22 @@ namespace BeWoLauncher.ServiceProxy
MessageBox.Show(lBeWoFault.Message, "Warnung", MessageBoxButton.OK, MessageBoxImage.Asterisk);
return;
case BeWoFaultType.CustomWithoutDetails:
- BeWoLaApp.ShowError(lBeWoFault.Message, e, false);
+ Session.ShowError(lBeWoFault.Message, e, false);
break;
default:
if (!string.IsNullOrEmpty(e.Message) && e.Message.IndexOf("Row was updated or deleted by another transaction") >= 0)
{
- BeWoLaApp.ShowError(rowUpdated, e, false);
+ Session.ShowError(rowUpdated, e, false);
}
else
{
if (!string.IsNullOrEmpty(lBeWoFault.Message))
{
- BeWoLaApp.ShowError(lBeWoFault.Message, e, true);
+ Session.ShowError(lBeWoFault.Message, e, true);
}
else
{
- BeWoLaApp.ShowError(null, e, true);
+ Session.ShowError(null, e, true);
}
}
break;
@@ -360,7 +418,7 @@ namespace BeWoLauncher.ServiceProxy
}
else
{
- BeWoLaApp.ShowError(null, e, true);
+ Session.ShowError(null, e, true);
}
}
private static void StartWaiting()
@@ -368,7 +426,7 @@ namespace BeWoLauncher.ServiceProxy
//Monitor.Enter(_Lock);
//if ((++_RunningAsyncs) == 1)
//{
- // BeWoLaApp.Window.StartWaiting();
+ // LauncherApp.Window.StartWaiting();
//}
//Monitor.Exit(_Lock);
@@ -378,7 +436,7 @@ namespace BeWoLauncher.ServiceProxy
//Monitor.Enter(_Lock);
//if ((--_RunningAsyncs) == 0)
//{
- // BeWoLaApp.Window.EndWaiting();
+ // LauncherApp.Window.EndWaiting();
//}
//Monitor.Exit(_Lock);
diff --git a/BeWoLauncher/StartRoutine/IStartRoutine.cs b/BeWoLauncher/StartRoutine/IStartRoutine.cs
deleted file mode 100644
index 445f896e6..000000000
--- a/BeWoLauncher/StartRoutine/IStartRoutine.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace BeWoLauncher.StartRoutine
-{
- public interface IStartRoutine
- {
- void init(MainWindow main, Application app);
- }
-}
diff --git a/BeWoLauncher/Views/Implementations/01 LoginView.xaml b/BeWoLauncher/Views/Implementations/01 LoginView.xaml
deleted file mode 100644
index aac3bee8f..000000000
--- a/BeWoLauncher/Views/Implementations/01 LoginView.xaml
+++ /dev/null
@@ -1,201 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- www.beyondsoft.de
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/BeWoLauncher/Views/Implementations/01 LoginView.xaml.cs b/BeWoLauncher/Views/Implementations/01 LoginView.xaml.cs
deleted file mode 100644
index d17612c3f..000000000
--- a/BeWoLauncher/Views/Implementations/01 LoginView.xaml.cs
+++ /dev/null
@@ -1,1232 +0,0 @@
-using BeWoLauncher;
-using BeWoLauncher.Cache;
-using BeWoLauncher.Components;
-using BeWoLauncher.ServiceProxy;
-using BeWoLauncher.Views.Interface;
-using BS.SharedLite;
-using System;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.Deployment.Application;
-using System.IO;
-using System.Linq;
-using System.Net;
-using System.Net.Security;
-using System.Reflection;
-using System.Security.Cryptography.X509Certificates;
-using System.ServiceModel;
-using System.Text;
-using System.Threading;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Threading;
-
-namespace BeWoLauncher.Views
-{
- ///
- /// Interaktionslogik für LoginView.xaml
- ///
- internal partial class LoginView : UserControl, INotifyPropertyChanged, ILoginView
- {
- public event EventHandler LoginSuccessful;
- public event PropertyChangedEventHandler PropertyChanged;
-
- private static String PUB_KEY = "3082010A02820101009CD30CF05AE52E47B7725D3783B3686330EAD735261925E1BDBE35F170922FB7B84B4105ABA99E350858ECB12AC468870BA3E375E4E6F3A76271BA7981601FD7919A9FF3D0786771C8690E9591CFFEE699E9603C48CC7ECA4D7712249D471B5AEBB9EC1E37001C9CAC7BA705EACE4AEBBD41E53698B9CBFD6D3C9668DF232A42900C867467C87FA59AB8526114133F65E98287CBDBFA0E56F68689F3853F9786AFB0DC1AEF6B0D95167DC42BA065B299043675806BAC4AF31B9049782FA2964F2A20252904C674C0D031CD8F31389516BAA833B843F1B11FC3307FA27931133D2D36F8E3FCF2336AB93931C5AFC48D0D1D641633AAFA8429B6D40BC0D87DC3930203010001";
-
- private readonly Stack _ModalPopUpControls;
- private readonly string _ProfilesFilePath;
- private readonly string _ConfigFilePath;
-
- private string _Proxyname;
- private string _ProxyUsername;
- private string _Proxypasswd;
-
- private bool isNet45OrNewer = false;
- private bool pwvViewOffen;
-
- private double lineYCoordTo;
- private double lineYCoordFrom;
- private double heightFrom;
- private double heightTo;
-
- private string GETSERVER_URL = "https://support.bewoplaner.de/api/getserver.php?k={0}&t=1";
- private string GETSTATUSMESSAGE_URL = "https://support.bewoplaner.de/api/getstate.php?k={0}&t=1&v={1}";
- private string GETNETMESSAGE_URL = "https://support.bewoplaner.de/api/getxmlstate.php?k={0}&t=1";
-
- public LoginView()
- {
- InitializeComponent();
-
- BeWoLaProfile selectedProfile = null;
-
- _ModalPopUpControls = new Stack();
- ProfileList = new List();
-
- HeightFrom = gridLogin.Height;
- HeightTo = gridLogin.Height + 64;
- LineYCoordFrom = linkLine.Y1;
- LineYCoordTo = linkLine.Y1 + 64;
-
- DataContext = this;
-
- DateTime dt = new DateTime(2017, 1, 1);
- if (DateTime.Now > dt)
- dt = DateTime.Now;
-
- txtCopyright.Text = String.Format("Copyright {0:yyyy} | beyondSoft GmbH", dt);
-
- var checkPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\profiles.txt";
- if (File.Exists(checkPath))
- //Nimm lokalen Profilpfad wenn er existiert. Wird z.B. bei Kunden mit Citrix Server genutzt, die keine Clickonce Installation vornehmen
- _ProfilesFilePath = checkPath;
- else
- _ProfilesFilePath = Path.Combine(BeWoLaUtils.GetAndCreateUserAppDataPath(), "profiles.txt");
- _ConfigFilePath = Path.Combine(BeWoLaUtils.GetAndCreateUserAppDataPath(), "bwp.config");
-
- ReadProxyName();
-
- try
- {
- ReadProfileList();
-
-#if DEBUG
- var uri = new Uri("https://localhost/Host/?k=demo&s=localhost/service");
-
- var paramDic = BeWoLaUtils.ParseQuery(uri.Query);
- string v1, v2;
- paramDic.TryGetValue("k", out v1);
- paramDic.TryGetValue("s", out v2);
- ConnectionInformation.Tenant = v1;
- ConnectionInformation.ServerName = v2;
- if (ProfileList.Count > 0)
- ProfileList.Insert(0, new BeWoLaProfile(v1, v2, ConnectionInformation.Tenant));
- else
- ProfileList.Add(new BeWoLaProfile(v1, v2, ConnectionInformation.Tenant));
- SaveProfileListToFile();
-#else
- if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.ActivationUri != null)
- {
- //Start über IE
- //MessageBox.Show(String.Format("Start über IE.\nActivationUri: {0}\nUpdateLocation: {1}", ApplicationDeployment.CurrentDeployment.ActivationUri, ApplicationDeployment.CurrentDeployment.UpdateLocation));
- BeWoLaProfile p = GenerateProfileFromUri(ApplicationDeployment.CurrentDeployment.ActivationUri);
- if (!String.IsNullOrEmpty(p.Tenant) && !String.IsNullOrEmpty(p.Server))
- {
- BeWoLaApp.Tenant = p.Tenant;
-
- if (ProfileList.Count > 0)
- {
- selectedProfile = ProfileList.Find(ip => ip.Tenant == p.Tenant);
- }
- if (selectedProfile == null)
- {
- if (ProfileList.Count > 0)
- ProfileList.Insert(0, p);
- else
- ProfileList.Add(p);
- }
- else
- {
- ProfileList.Remove(selectedProfile);
- selectedProfile.Server = p.Server;
- ProfileList.Insert(0, selectedProfile);
- }
- SaveProfileListToFile();
- }
- else if (!String.IsNullOrEmpty(p.Tenant) && p.Tenant.ToLower() == "demo")
- {
- p.Server = "1";
- ProfileList.Add(p);
- }
-
- }
- else
- {
- //MessageBox.Show(String.Format("Start über Firefox oder über installiertes Desktop Icon.\nActivationUri: {0}\nUpdateLocation: {1}", ApplicationDeployment.CurrentDeployment.ActivationUri, ApplicationDeployment.CurrentDeployment.UpdateLocation));
-
- }
-#endif
- }
- catch (Exception ex)
- {
-
- }
-
- UpdateIpAddress();
-
- if (ProfileList.Count == 0 || String.IsNullOrEmpty(ProfileList[0].Tenant))
- ShowEnterTenantDialog();
-
- BeWoLaProfile firstProfile = null;
- if (ProfileList.Count > 0)
- firstProfile = ProfileList[0];
- ProfileList.Sort((a, b) => a.Name.CompareTo(b.Name));
- profileSelectionComboBox.ItemsSource = ProfileList;
-
-
- if (ProfileList.Count > 0)
- {
-#if DEBUG
- //selectedProfile = ReadSelectedProfile();
-#else
- selectedProfile = ReadSelectedProfile();
-#endif
- if (selectedProfile == null || !ProfileList.Contains(selectedProfile))
- {
- //selectedProfile = profileSelectionComboBox.SelectedItem as BeWoProfile;
- selectedProfile = firstProfile;
- }
- }
-
-
- //if (profileSelectionComboBox.SelectedItem == null)
- profileSelectionComboBox.SelectedItem = selectedProfile;
-
- TextBox_Username.Focus();
-
- if (selectedProfile != null && selectedProfile.Tenant == "demo")
- {
- TextBox_Username.Text = "demo";
- PasswordBox_Password.Password = "demo";
- }
-
- //this.lblTenant.Content = BeWoLauncher.Cache.ConnectionInformation.Tenant;
- lblVersion.Content = BeWoLaApp.Version;
-
- Loaded += UserControl_Loaded;
-
- ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
-
- PinCertificate();
-
- ChangeServerAndTenant(profileSelectionComboBox.SelectedItem as BeWoLaProfile);
-
- if (!String.IsNullOrEmpty(_Proxyname))
- {
- var webProxy = WebProxy.GetDefaultProxy();
- webProxy.UseDefaultCredentials = true;
- System.Net.WebRequest.DefaultWebProxy = new WebProxy(_Proxyname, true);
-
- if (String.IsNullOrEmpty(_ProxyUsername))
- {
- WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;
- }
- else
- {
- WebRequest.DefaultWebProxy.Credentials = new NetworkCredential(_ProxyUsername, _Proxypasswd);
- }
- }
- }
-
- public List ProfileList { get; set; }
-
- public double HeightFrom
- {
- get { return heightFrom; }
- set
- {
- heightFrom = value;
- OnPropertyChanged("HeightFrom");
- }
- }
- internal double HeightTo
- {
- get { return heightTo; }
- set
- {
- heightTo = value;
- OnPropertyChanged("HeightTo");
- }
- }
- internal double LineYCoordFrom
- {
- get { return lineYCoordFrom; }
- set
- {
- lineYCoordFrom = value;
- OnPropertyChanged("LineYCoordFrom");
- }
- }
- internal double LineYCoordTo
- {
- get { return lineYCoordTo; }
- set
- {
- lineYCoordTo = value;
- OnPropertyChanged("LineYCoordTo");
- }
- }
-
- private void button_login_Click(object sender, RoutedEventArgs e)
- {
-
- if (!String.IsNullOrEmpty(_Proxyname))
- {
- var webProxy = WebProxy.GetDefaultProxy();
- webProxy.UseDefaultCredentials = true;
- System.Net.WebRequest.DefaultWebProxy = new WebProxy(_Proxyname, true);
-
- if (String.IsNullOrEmpty(_ProxyUsername))
- {
- WebRequest.DefaultWebProxy.Credentials = CredentialCache.DefaultNetworkCredentials;
- }
- else
- {
- WebRequest.DefaultWebProxy.Credentials = new NetworkCredential(_ProxyUsername, _Proxypasswd);
- }
- }
-
- if (ProfileList.Count == 0 || profileSelectionComboBox.SelectedItem == null)
- {
- MessageBox.Show(
- "Es wurde kein gültiges Profil gefunden. Bitte erstellen Sie zunächst ein Profil. Klicken Sie dazu auf 'Erweitert' und anschließend auf den Button 'Profile bearbeiten'",
- "Ungültiges Profil", MessageBoxButton.OK, MessageBoxImage.Warning);
- }
- else
- {
- var profile = profileSelectionComboBox.SelectedItem as BeWoLaProfile;
-
- isNet45OrNewer = IsNet45OrNewer();
-
- if (!isNet45OrNewer)
- {
- if (!CheckStatusMessage(profile, String.Format(GETNETMESSAGE_URL, profile.Tenant, BeWoLaApp.Version)))
- {
- return;
- }
- }
-
-#if DEBUG
- if (!CheckStatusMessage(profile, String.Format(GETSTATUSMESSAGE_URL, profile.Tenant, BeWoLaApp.ShortVersion)))
- {
- return;
- }
-#else
- if (!CheckStatusMessage(profile, String.Format(GETSTATUSMESSAGE_URL, profile.Tenant, BeWoApp.Version)))
- {
- return;
- }
-#endif
-
-
- ChangeServerAndTenant(profile);
- var lWaitLayer = new WaitLayer2();
- grid_root.Children.Add(lWaitLayer);
-
- string lUserName = TextBox_Username.Text;
- string lPassword = PasswordBox_Password.Password;
- string lPIN = PINTextBox.Text;
- string lTenant = ConnectionInformation.Tenant;
-
-
- if (!String.IsNullOrEmpty(lPIN))
- {
- lPIN += "_" + System.Environment.MachineName;
- }
- Action action = Login;
- action.BeginInvoke(lWaitLayer, lUserName, lPassword, lTenant, lPIN, cb => { }, null);
- }
- }
- private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
- {
- System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo((sender as Hyperlink).NavigateUri.ToString()));
- }
- private void TextBox_Username_OnGotFocus(object sender, RoutedEventArgs e)
- {
- TextBox_Username.SelectAll();
- }
- private void PasswordBox_Password_OnGotFocus(object sender, RoutedEventArgs e)
- {
- PasswordBox_Password.SelectAll();
- }
- private void button_addProfile_Click(object sender, RoutedEventArgs rea)
- {
- var newProfileList = new ObservableCollection(ProfileList);
-
- try
- {
- Mouse.OverrideCursor = Cursors.Wait;
-
- var p = new ProfileEditView();
-
-
-
- profileEditPopUp.Child = p;
-
- if (p.CommandBindings.Count != 0)
- return;
-
- p.CommandBindings.Add(
- new CommandBinding(
- ApplicationCommands.Close,
- (s, e) =>
- {
- profileEditPopUp.Child = null;
- }));
- p.CommandBindings.Add(
- new CommandBinding(
- ApplicationCommands.Save,
- (s, e) =>
- {
- ProfileList = p.Profiles.ToList();
- SaveProfileListToFile();
- profileEditPopUp.Child = null;
-
- //BeWoProfile profile = profileSelectionComboBox.SelectedItem as BeWoProfile;
- //ChangeServerAndTenant(profile);
- }));
- }
- finally
- {
- Mouse.OverrideCursor = null;
- }
-
- }
- private void button_configureProxy_Click(object sender, RoutedEventArgs rea)
- {
- ProxyLoginView proxyLogin = new ProxyLoginView();
- proxyLogin.WindowStartupLocation = WindowStartupLocation.CenterScreen;
-
- proxyLogin.ShowDialog();
- ReadProxyName();
- }
- private void PasswortVergessenLinkOnRequestNavigate(object sender, RequestNavigateEventArgs e)
- {
- if (pwvViewOffen) return;
-
- var p = new PwVergessenView();
- p.Closed += (s, ex) => { pwvViewOffen = false; };
- p.Show();
-
- pwvViewOffen = true;
- }
- private void UIElement_OnKeyDown(object sender, KeyEventArgs e)
- {
- if (e.Key == Key.P)
- {
- if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl) && Keyboard.IsKeyDown(Key.LeftAlt))
- {
- PinEinblenden();
- }
-
- }
- }
- private void AnimationComplete(object sender, EventArgs e)
- {
- double tmp = HeightFrom;
- HeightFrom = HeightTo;
- HeightTo = tmp;
- if (HeightFrom > HeightTo)
- {
- showProfileSelectionBtn.Content = "Ausblenden";
- profileLabel.Visibility = Visibility.Visible;
- profileStackPanel.Visibility = Visibility.Visible;
- proxyLabel.Visibility = Visibility.Visible;
- proxyStackPanel.Visibility = Visibility.Visible;
- }
- else
- {
- showProfileSelectionBtn.Content = "Erweitert";
- }
- }
- private void Animation2Complete(object sender, EventArgs e)
- {
- double tmp2 = LineYCoordFrom;
- LineYCoordFrom = LineYCoordTo;
- LineYCoordTo = tmp2;
- }
- private void ShowProfileStackPanel(object sender, RoutedEventArgs e)
- {
- if (profileLabel.Visibility == Visibility.Visible)
- {
- profileLabel.Visibility = Visibility.Collapsed;
- profileStackPanel.Visibility = Visibility.Collapsed;
- proxyLabel.Visibility = Visibility.Collapsed;
- proxyStackPanel.Visibility = Visibility.Collapsed;
- }
- }
- private void UserControl_Loaded(object sender, RoutedEventArgs e)
- {
- double top = (this.ActualHeight - 400) / 3;
- this.gridLogin.Margin = new Thickness(0, top, 0, 0);
-
- if (TextBox_Username != null && String.IsNullOrEmpty(TextBox_Username.Text))
- {
- TextBox_Username.Focus();
- }
- }
-
- private void PinCertificate()
- {
- ServicePointManager.ServerCertificateValidationCallback = PinPublicKey;
- }
- private bool PinPublicKey(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors)
- {
- try
- {
- if (null == certificate || chain == null)
- return false;
- ;
- bool chainContainsPk = false;
-
- foreach (var element in chain.ChainElements)
- {
- String pk = element.Certificate.GetPublicKeyString();
- if (pk == PUB_KEY)
- {
- chainContainsPk = true;
- }
- }
-
- //bool subjectAccepted = Regex.IsMatch(certificate.Subject, @"app[\d]*.bewoplaner.de");
- bool subjectAccepted = certificate.Subject.Trim().ToLower().EndsWith(".bewoplaner.de") ||
- certificate.Subject.Trim().ToLower().EndsWith(".ownchat.de");
- return chainContainsPk && subjectAccepted;
- }
- catch (Exception e)
- {
- return false;
- }
-
- }
- protected virtual void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
- private void ShowEnterTenantDialog()
- {
- BeWoLaProfile p = null;
-
- var cancel = false;
- var tenant = String.Empty;
- while (p == null && !cancel)
- {
- var dlg = new EnterTenantDialog { Tenant = tenant };
- var result = dlg.ShowDialog();
- if (result.HasValue && result.Value)
- {
- tenant = dlg.Tenant;
- if (!String.IsNullOrWhiteSpace(tenant))
- {
- tenant = tenant.Trim();
- }
- var server = GetServerFromTenant(tenant);
- if (!String.IsNullOrEmpty(server))
- {
- p = new BeWoLaProfile(tenant, server, tenant);
- if (ProfileList.Count > 0)
- ProfileList.Insert(0, p);
- else
- ProfileList.Add(p);
- SaveProfileListToFile();
- }
- else
- {
- MessageBox.Show("Unbekannte Kundennummer '" + tenant + "'", "BeWoPlaner");
- }
- }
- else
- {
- cancel = true;
- }
- }
- }
- private void UpdateIpAddress()
- {
- try
- {
- var adminUrl = GetAdminUrl();
- if (!String.IsNullOrEmpty(adminUrl))
- {
- using (var wc = new WebClient())
- {
- Uri path = new Uri(adminUrl);
-
- ConnectionInformation.IpAddress = Encoding.UTF8.GetString(wc.DownloadData(path));
- }
- }
- }
- catch (Exception e)
- {
-
- ConnectionInformation.IpAddress = String.Empty;
- }
- }
- private string GetAdminUrl()
- {
- String address = String.Empty;
-
-#if DEBUG
- if (true)
- {
- address = "http://localhost/Host";
-
- //Uri uri = new Uri("http://app.beyondsoft.de/bewo.application");
- //hostAddress = String.Format("{0}://{1}", uri.Scheme, uri.Host);
-#else
- if (ApplicationDeployment.IsNetworkDeployed && ApplicationDeployment.CurrentDeployment.UpdateLocation != null)
- {
- Uri uri = ApplicationDeployment.CurrentDeployment.UpdateLocation;
- address = String.Format("{0}://{1}", uri.Scheme, uri.Host);
-#endif
-
- }
- if (String.IsNullOrEmpty(address))
- {
- return null;
- }
-
- return String.Format("{0}/{1}", address, "Admin.aspx");
- }
- private void PinEinblenden()
- {
- PINTextBox.Visibility = Visibility.Visible;
- lblPin.Visibility = Visibility.Visible;
-
- linkLine.Margin = new Thickness(linkLine.Margin.Left, linkLine.Margin.Top + 25, linkLine.Margin.Right, linkLine.Margin.Bottom);
- gridLogin.Height += 25;
-
- PINTextBox.Focus();
- }
- private bool IsNet45OrNewer()
- {
- // Class "ReflectionContext" exists from .NET 4.5 onwards.
- return Type.GetType("System.Reflection.ReflectionContext", false) != null;
- }
- private void ReadProxyName()
- {
- int counter = 0;
- string line;
- string[] datai = new string[3];
-
- try
- {
- var filePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
- if (!File.Exists(filePath))
- {
- filePath = Path.Combine(BeWoLaUtils.GetAndCreateUserAppDataPath(), "proxy.dat");
- }
-
- var file = new System.IO.StreamReader(filePath);
- while ((line = file.ReadLine()) != null)
- {
- byte[] decbuff = Convert.FromBase64String(line);
- var x = System.Text.Encoding.UTF8.GetString(decbuff);
-
- datai[counter] = x;
- counter++;
- }
-
- file.Close();
-
- _Proxyname = datai[0];
- _ProxyUsername = datai[1];
- _Proxypasswd = datai[2];
-
- proxyTextBox.Text = _Proxyname;
-
- }
- catch (IOException)
- {
- //Fehlermeldung
- }
- }
- private void ReadProfileList()
- {
- try
- {
- if (File.Exists(_ProfilesFilePath))
- {
- var myFile = new StreamReader(_ProfilesFilePath, Encoding.Default);
-
- while (!myFile.EndOfStream)
- {
- var data = myFile.ReadLine().Split('|');
-
- if (data.Length >= 3)
- {
- if (!String.IsNullOrEmpty(data[1]) && !String.IsNullOrEmpty(data[2]))
- ProfileList.Add(new BeWoLaProfile(data[0], data[1], data[2]));
- }
- }
- myFile.Close();
- }
- }
- catch (Exception)
- {
- }
- }
- private void SaveSelectedProfile(BeWoLaProfile profile)
- {
- try
- {
- using (var sw = new StreamWriter(new FileStream(_ConfigFilePath, FileMode.Create), Encoding.UTF8))
- {
-#if DEBUG
- sw.WriteLine("selected={0}|{1}|{2}", profile.Name, profile.Server, profile.Tenant);
-
-#else
- if (profile.Tenant != "demo")
- {
- sw.WriteLine("selected={0}|{1}|{2}", profile.Name, profile.Server, profile.Tenant);
- }
-#endif
- }
- }
- catch (Exception ex)
- {
- //ignore read/write errors
- }
- }
- private void SaveProfileListToFile()
- {
- try
- {
- var sw = new StreamWriter(new FileStream(_ProfilesFilePath, FileMode.Create), Encoding.UTF8);
-
- foreach (var profile in ProfileList)
- {
- if (profile.Tenant != "demo")
- {
- if (!String.IsNullOrWhiteSpace(profile.Tenant))
- {
- profile.Tenant = profile.Tenant.Trim();
- }
- sw.WriteLine("{0}|{1}|{2}", profile.Name, profile.Server, profile.Tenant);
- }
- }
- sw.Flush();
- sw.Close();
-
- profileSelectionComboBox.ItemsSource = ProfileList;
- profileSelectionComboBox.Items.Refresh();
-
- // Workaround, um profileSelectionComboBox.SelectedItem zu aktualisieren
- if (profileSelectionComboBox.ItemsSource == null)
- return;
-
- //ChangeServerAndTenant(profileSelectionComboBox.SelectedItem as BeWoProfile);
- //int itemssourcecount = ((List) profileSelectionComboBox.ItemsSource).Count;
- //int si = profileSelectionComboBox.SelectedIndex;
-
- //profileSelectionComboBox.SelectedIndex = (si + 1) % itemssourcecount;
- //profileSelectionComboBox.SelectedIndex = itemssourcecount == 1 || si == -1 ? 0 : si;
- }
- catch (Exception ex)
- {
- //ignore read/write errors
- }
- }
- private void ChangeServerAndTenant(BeWoLaProfile profile)
- {
- try
- {
- //button_login.IsEnabled = false;
-
- if (profile != null)
- {
- if (String.IsNullOrEmpty(profile.Server))
- {
- MessageBox.Show(
- String.Format("Das gewählte Profil '{0}' enthält einen ungültigen Servernamen.",
- profile.Name),
- "Ungültiges Profil", MessageBoxButton.OK, MessageBoxImage.Warning);
- return;
- }
- if (String.IsNullOrEmpty(profile.Tenant))
- {
- MessageBox.Show(
- String.Format("Das gewählte Profil '{0}' enthält eine ungültige Kundennummer.", profile.Name),
- "Ungültiges Profil", MessageBoxButton.OK, MessageBoxImage.Warning);
- return;
- }
-
- profile.Tenant = profile.Tenant.Trim();
-
- //if (BeWoLauncher.Cache.ConnectionInformation.Tenant == "7635986435")
- //{
- // if (profile.Server != "3")
- // {
- // profile.Server = "3";
- // SaveProfileListToFile();
- // }
-
- //}
-
- var server = GetServerFromTenant(profile.Tenant);
- if (!String.IsNullOrEmpty(server) && server != profile.Server)
- {
- profile.Server = server;
- SaveProfileListToFile();
- }
-
- ConnectionInformation.Tenant = profile.Tenant;
- ConnectionInformation.ServerName = GetNumericServerName(profile.Server);
- ConnectionInformation.LauncherServerAddress = profile.Server;
-
-#if DEBUG
- //CB ZUM TESTEN
- //BeWoLauncher.Cache.ConnectionInformation.Tenant = "9876543210";
- //BeWoLauncher.Cache.ConnectionInformation.ServerName = "4";
- //BeWoApp.ServerAddress = "app4.bewoplaner.de";
-#endif
- SaveSelectedProfile(profile);
- //button_login.IsEnabled = true;
- }
- }
-
- catch (UriFormatException ex)
- {
- MessageBox.Show(
- "Die angegebene Serveradresse ist nicht korrekt. Bitte bearbeiten Sie das verwendete Profil. Klicken Sie dazu auf 'Erweitert' und anschließend auf den Button 'Profile bearbeiten'",
- "Ungültiges Profil", MessageBoxButton.OK, MessageBoxImage.Warning);
- }
- }
- private string GetServerFromTenant(string tenant)
- {
- try
- {
- if (tenant == "demo")
- {
- return "app1.bewoplaner.de";
- }
- //Server URL über Kundennummer:
- //https://bewoplaner.beyondsoft.de/getserver.php?CustomerID=1234567890
-
- //Lizenzstatus über Kundennummer (Lizenzzahlen und aktivierte Module)
- //Nur Testdaten. Weiß gar nicht mehr so genau wofür das gut war…
- //https://bewoplaner.beyondsoft.de/getcontractstate.php?CustomerID=1234567890
-
- var url = string.Format(GETSERVER_URL, tenant);
- using (WebClient client = new WebClient())
- {
- //MessageBox.Show(hostAddress);
- byte[] response = client.UploadValues(url, "POST", new NameValueCollection());
-
- String server = System.Text.Encoding.ASCII.GetString(response);
-
- return server;
- }
- }
- catch (Exception ex)
- {
- //MessageBox.Show(String.Format("Fehler beim Prüfen der Kundennummer: {0}\n\n{1}", ex.Message, ex.StackTrace));
- return null;
- }
- }
- private string GetNumericServerName(string serverName)
- {
- if (!String.IsNullOrEmpty(serverName))
- {
- int snOut = 0;
- if (!Int32.TryParse(serverName, out snOut))
- {
- String nname = serverName.Replace("app", "");
- if (nname.IndexOf('.') > 0)
- {
- return nname.Substring(0, nname.IndexOf('.'));
- }
- }
- }
- return serverName;
- }
- private bool CheckStatusMessage(BeWoLaProfile 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;
- // }
-
- // dlg.Visibility = Visibility.Visible;
-
- // dlg.ShowDialog();
- // if (ende.EndsWith(";0"))
- // {
- // return false;
- // }
-
- //}
- return true;
-#else
- try
- {
- using (WebClient client = new WebClient())
- {
- //MessageBox.Show(hostAddress);
- byte[] response = client.UploadValues(url, "POST", new NameValueCollection());
-
- String message = System.Text.Encoding.UTF8.GetString(response);
-
- //zum testen:
- //using (var myFile = new StreamReader("C:\\temp\\testxaml.txt", Encoding.Default))
- //{
- // message = myFile.ReadToEnd();
- // myFile.Close();
- //}
-
- 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;
- }
-
-
-
- dlg.ShowDialog();
- if (ende.EndsWith(";0"))
- {
- return false;
- }
-
- }
-
- }
- }
- catch (Exception ex)
- {
- //MessageBox.Show(String.Format("Fehler beim Prüfen der Kundennummer: {0}\n\n{1}", ex.Message, ex.StackTrace));
-
- }
-
- return true;
-#endif
- }
- private void Login(WaitLayer2 lWaitLayer, String lUserName, String lPassword, String lTenant, String lPIN)
- {
-
- try
- {
- //1. Versuch
- UserValidationResult result = TryLogin(lWaitLayer, lUserName, lPassword, lPIN);
-
- //2. Versuch
- if (result == UserValidationResult.UnkownError)
- {
- LauncherServiceFacade.DoLauncherServiceAsync(op => op.ResetTenant(lTenant),
- delegate
- {
- result = TryLogin(lWaitLayer, lUserName, lPassword, lPIN);
-
- if (result == UserValidationResult.UnkownError)
- {
- //3. Versuch
- LauncherServiceFacade.DoLauncherServiceAsync(op => op.ResetAllTenant(),
- delegate
- {
- result = TryLogin(lWaitLayer, lUserName, lPassword, lPIN);
-
- if (result == UserValidationResult.UnkownError)
- {
- this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
- {
- grid_root.Children.Remove(lWaitLayer);
- MessageBox.Show("Fehler beim Verbinden mit dem Server. Bitte überprüfen Sie Ihre Internetverbindung oder schreiben Sie eine E-Mail an den Support support@bewoplaner.de.", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- });
- }
- });
- }
- });
- }
-
- if (result == UserValidationResult.UserUnknown)
- {
- this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
- {
- grid_root.Children.Remove(lWaitLayer);
- MessageBox.Show("Anmeldeinformationen nicht bekannt. Bitte überprüfen Sie den Benutzernamen und das Passwort!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- });
- }
- if (result == UserValidationResult.TenantUnknown)
- {
- this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
- {
- grid_root.Children.Remove(lWaitLayer);
- MessageBox.Show("Die Kundennummer '" + lTenant + "' ist ungültig.", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- });
- }
- String pin = lPIN;
-
- if (!String.IsNullOrEmpty(lPIN) && lPIN.IndexOf('_') >= 0)
- {
- pin = lPIN.Substring(0, lPIN.IndexOf('_'));
- }
-
- if (result == UserValidationResult.IncorrectPin)
- {
- this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
- {
- grid_root.Children.Remove(lWaitLayer);
- MessageBox.Show("Die Pin '" + pin + "' ist unbekannt!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- });
- }
- if (result == UserValidationResult.PinAlreadyUsed)
- {
- this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
- {
- grid_root.Children.Remove(lWaitLayer);
- MessageBox.Show("Die Pin '" + pin + "' wurde bereits verwendet!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- });
- }
- if (result == UserValidationResult.PinExpired)
- {
- this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate
- {
- grid_root.Children.Remove(lWaitLayer);
- MessageBox.Show("Die Pin '" + pin + "' ist bereits abgelaufen!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- });
- }
- if (result == UserValidationResult.PasswordExpired)
- {
- //this.Dispatch(delegate
- //{
- // grid_root.Children.Remove(lWaitLayer);
- // //MessageBox.Show("Das Passwort ist abgelaufen!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
- // //var pav = new PasswortAenderungsView();
- // //pav.ShowDialog();
- //});
- }
- // Wegen fehlerhaftem Profil, sonst wird lWaitLayer nicht entfernt und eine Korrektur des Profils ist unmöglich ohne den BeWoPlaner neuzustarten.
- if (result == UserValidationResult.UnkownError)
- {
- Thread.Sleep(2000);
- this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate { grid_root.Children.Remove(lWaitLayer); });
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- }
- private UserValidationResult TryLogin(WaitLayer2 lWaitLayer, string lUserName, string lPassword, string lPIN = "")
- {
- UserValidationResult? result = null;
-
- if (!string.IsNullOrEmpty(lUserName) && !string.IsNullOrEmpty(lPassword))
- {
- String tempUsername = lUserName;
- String version = "unbekannt";
- String clr = "unbekannt";
- var bewoVersion = BeWoLaApp.Version;
-
- try
- {
- version = Environment.OSVersion.VersionString;
- }
- catch (Exception e)
- {
- version = e.Message;
- }
-
- try
- {
- clr = Environment.Version.ToString();
- }
- catch (Exception e)
- {
- clr = e.Message;
- }
-
-
- tempUsername = String.Format("{0}//Version={1};CLRVersion={2};BeWoVersion={3};IsNet45OrNewer={4}", lUserName, version, clr, bewoVersion, isNet45OrNewer);
- try
- {
- LauncherServiceFacade.DoLauncherServiceAsync(s =>
- {
- try
- {
- var t = s.IsUserValid(tempUsername, lPassword, lPIN, "BeWoClient", true);
- return t;
- }
- catch (Exception)
- {
- return UserValidationResult.UnkownError;
- }
- },
- r =>
- {
- result = r;
- Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action)delegate { LoginResult(lWaitLayer, r, lUserName, lPassword, lPIN); });
- }, true);
- }
- catch (Exception)
- {
- result = UserValidationResult.UnkownError;
- }
- }
- else
- {
- if (result == null)
- result = UserValidationResult.UserUnknown;
- }
-
- while (!result.HasValue)
- {
- Thread.Sleep(100);
- }
-
- return result.Value;
- }
- private void LoginResult(WaitLayer2 lWaitLayer, UserValidationResult result, String lUserName, String lPassword, String lPIN = "")
- {
- if (result == UserValidationResult.UserValid)
- {
- LoginSuccessful.Invoke(this, new EventArgs());
-
- //var fileLoc = @"d:\Test\lib1_DOWNLOAD.dll";
- //var bytes = LauncherServiceFacade.DoLauncherServiceSync(x => x.GetUpdateZip());
-
- //using (var fs = new FileStream(fileLoc, FileMode.Create, FileAccess.Write))
- //{
- // fs.Write(bytes, 0, bytes.Length);
- //}
-
- //var dll = Assembly.LoadFrom(@"D:\Test\Lib1.dll");
-
- //foreach (Type type in dll.GetExportedTypes())
- //{
- // var c = Activator.CreateInstance(type) as IBeWoDynamicView;
-
- // c.SetData("Geschafft", "Mit Bestätigung");
- //}
-
- //
-
-
- //FtpWebRequest request =
- // (FtpWebRequest)WebRequest.Create("ftp://ftp.example.com/remote/path/file.zip");
- //request.Method = WebRequestMethods.Ftp.DownloadFile;
-
- //using (Stream ftpStream = request.GetResponse().GetResponseStream())
- //using (Stream fileStream = File.Create(@"C:\local\path\file.zip"))
- //{
- // byte[] buffer = new byte[10240];
- // int read;
- // while ((read = ftpStream.Read(buffer, 0, buffer.Length)) > 0)
- // {
- // fileStream.Write(buffer, 0, read);
- // Console.WriteLine("Downloaded {0} bytes", fileStream.Position);
- // }
- //}
-
-
- //this.Dispatch(delegate
- //{
- // if (BeWoLauncher.Cache.ConnectionInformation.Tenant == "demo")
- // {
- // var dlg = new ConfirmDemoDialog();
- // dlg.Topmost = true;
- // dlg.Show();
- // }
- //});
-
- //BeWoLaApp.Username = lUserName;
- //BeWoLaApp.Userpassword = lPassword;
-
- //BeWoLaApp.PasswortStrength = LauncherPasswortSecurityStrength.Stark;
-
- //LauncherServiceFacade.DoUserServiceAsync(s2 => s2.LoadUserByNameAndPassword(lUserName, lPassword),
- // r2 =>
- // {
- // BeWoApp.LoggedOnUser = r2;
-
- // ServiceFacade.DoOperationsServiceAsync(s => s.GetMandator(),
- // m =>
- // {
- // BeWoApp.Mandator = m;
- // this.Dispatch(delegate
- // {
- // LoginSuccessful?.Invoke(this, new EventArgs());
- // });
- // });
- // }, true);
- }
- //else if (result == UserValidationResult.PasswordExpired)
- //{
- // BeWoLauncher.Cache.ConnectionInformation.Username = lUserName;
- // BeWoLauncher.Cache.ConnectionInformation.Userpassword = lPassword;
-
- // ServiceFacade.DoUserServiceAsync(s2 => s2.LoadUserByLoginName(lUserName),
- // r2 =>
- // {
- // BeWoApp.LoggedOnUser = r2;
-
- // ServiceFacade.DoOperationsServiceAsync(s => s.GetMandator(),
- // m =>
- // {
- // BeWoApp.Mandator = m;
- // this.Dispatch(delegate
- // {
- // grid_root.Children.Remove(lWaitLayer);
- // MessageBox.Show("Das Passwort ist abgelaufen!", "Fehler bei der Anmeldung", MessageBoxButton.OK, MessageBoxImage.Exclamation);
-
- // var pav = new PasswortAenderungsView();
- // pav.ShowDialog();
-
- // if (pav.abr == 1)
- // {
-
- // }
- // else
- // {
- // LoginSuccessful?.Invoke(this, new EventArgs());
- // }
- // });
- // });
- // }, true);
- //}
- }
-
- public UserControl GetView()
- {
- return this;
- }
- public MainWindow GetParent()
- {
- throw new NotImplementedException();
- }
-
- public void Login()
- {
- button_login_Click(this, new RoutedEventArgs());
- }
- }
-}
diff --git a/BeWoLauncher/Views/Implementations/02 UpdateView.xaml b/BeWoLauncher/Views/Implementations/02 UpdateView.xaml
deleted file mode 100644
index 4f94b564a..000000000
--- a/BeWoLauncher/Views/Implementations/02 UpdateView.xaml
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- www.beyondsoft.de
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/BeWoLauncher/Views/Implementations/02 UpdateView.xaml.cs b/BeWoLauncher/Views/Implementations/02 UpdateView.xaml.cs
deleted file mode 100644
index e2583930f..000000000
--- a/BeWoLauncher/Views/Implementations/02 UpdateView.xaml.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Deployment.Application;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using BeWoLauncher.ServiceProxy;
-using BeWoLauncher.Views.Interface;
-using BS.SharedLite;
-using Path = System.IO.Path;
-
-namespace BeWoLauncher.Views
-{
- ///
- /// Interaktionslogik für UpdateView.xaml
- ///
- public partial class UpdateView : UserControl, IUpdateView
- {
- public event EventHandler UpdateSuccessful;
- private bool _showDelay;
-
- public UpdateView(bool showDelay)
- {
- InitializeComponent();
-
- _showDelay = showDelay;
- }
-
- public string Message
- {
- get
- {
- return lblMessage.Content as string;
- }
- set
- {
- lblMessage.Content = value;
- }
- }
- public string SubMessage
- {
- get
- {
- return lblSubmessage.Content as string;
- }
- set
- {
- lblSubmessage.Content = value;
- }
- }
-
- private void Hyperlink_OnRequestNavigate(object sender, RequestNavigateEventArgs e)
- {
- System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo((sender as Hyperlink).NavigateUri.ToString()));
- }
-
- public UserControl GetView()
- {
- return this;
- }
-
- private async void startUpdateAsync()
- {
- Message = "Update wird heruntergeladen...";
- SubMessage = "";
- await ShowDelay(1000);
-
- getUpdate();
-
- Message = "Update wird installiert...";
- await ShowDelay(1000);
-
- await applyUpdate();
-
- Message = "Update wurde installiert!";
- SubMessage = "Starte BeWoPlaner...";
- await ShowDelay(1000);
-
- UpdateSuccessful(this, new EventArgs());
- }
-
- private void getUpdate()
- {
- var current = new BeWoProgramPackageDC();
-
- if (!Directory.Exists(BeWoLaApp.Window.DirectoryRootString))
- Directory.CreateDirectory(BeWoLaApp.Window.DirectoryRootString);
-
- current.Files.AddRange(BeWoLaApp.Window.DirectoryRoot.GetFiles().Select(file => new BeWoProgramFileDC(file)));
-
- BeWoLaApp.Window.Update = LauncherServiceFacade.DoLauncherServiceSync(x => x.Update(current));
- }
-
- private async Task applyUpdate()
- {
- proBar1.IsIndeterminate = false;
- proBar1.Minimum = 0;
- proBar1.Maximum = BeWoLaApp.Window.Update.Files.Count;
-
- foreach (var file in BeWoLaApp.Window.Update.Files)
- {
- SubMessage = file.ToDo.ToString()[0] + ":" + file.FileName;
- ++proBar1.Value;
-
- switch (file.ToDo)
- {
- case FileToDo.Update:
- case FileToDo.Add:
- using (var fs = new FileStream(Path.Combine(BeWoLaApp.Window.DirectoryRootString, file.FileName), FileMode.Create, FileAccess.Write))
- {
- fs.Write(file.FileData, 0, file.FileData.Length);
- }
- break;
- case FileToDo.Remove:
- File.Delete(Path.Combine(BeWoLaApp.Window.DirectoryRootString, file.FileName));
- break;
- case FileToDo.Nuthing:
- break;
- }
-
- await ShowDelay(50);
- }
- }
-
- private async Task ShowDelay(int millisec)
- {
- if (_showDelay)
- await Task.Delay(millisec);
- }
-
- private void UserControl_Loaded(object sender, RoutedEventArgs e)
- {
- double top = (this.ActualHeight - 400) / 3;
- this.gridUpdate.Margin = new Thickness(0, top, 0, 0);
-
- //startUpdate();
- Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Background, (Action)startUpdateAsync);
- }
- }
-}
diff --git a/BeWoLauncher/Views/Interface/00 IBeWoView.cs b/BeWoLauncher/Views/Interface/00 IBeWoView.cs
deleted file mode 100644
index 01196d785..000000000
--- a/BeWoLauncher/Views/Interface/00 IBeWoView.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows.Controls;
-
-namespace BeWoLauncher.Views.Interface
-{
- public interface IBeWoView
- {
- UserControl GetView();
- }
-}
diff --git a/BeWoLauncher/Views/Interface/01 ILoginView.cs b/BeWoLauncher/Views/Interface/01 ILoginView.cs
deleted file mode 100644
index ba76c167f..000000000
--- a/BeWoLauncher/Views/Interface/01 ILoginView.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace BeWoLauncher.Views.Interface
-{
- public interface ILoginView : IBeWoView
- {
- event EventHandler LoginSuccessful;
-
- void Login();
- }
-}
diff --git a/BeWoLauncher/Views/Interface/02 IUpdateView.cs b/BeWoLauncher/Views/Interface/02 IUpdateView.cs
deleted file mode 100644
index 8ccbdfa21..000000000
--- a/BeWoLauncher/Views/Interface/02 IUpdateView.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System;
-
-namespace BeWoLauncher.Views.Interface
-{
- public interface IUpdateView : IBeWoView
- {
- event EventHandler UpdateSuccessful;
- }
-}
diff --git a/BeWoLauncher/Views/Interface/03 IMainView.cs b/BeWoLauncher/Views/Interface/03 IMainView.cs
deleted file mode 100644
index caadee7f6..000000000
--- a/BeWoLauncher/Views/Interface/03 IMainView.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace BeWoLauncher.Views.Interface
-{
- public interface IMainView : IBeWoView
- {
- event EventHandler Logout;
-
- bool DoSaveCheck();
-
- void DoMoreSaveStuff();
-
- void UpdateServerAddresses(string url);
- MainWindow GetParent();
-
- void init(MainWindow main);
- }
-}
diff --git a/BeWoOhneReports.sln b/BeWoOhneReports.sln
index 221341522..d89855aee 100644
--- a/BeWoOhneReports.sln
+++ b/BeWoOhneReports.sln
@@ -35,7 +35,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Launcher", "Launcher", "{E0
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LauncherHost", "LauncherHost\LauncherHost.csproj", "{18019E8C-C6DA-4B1B-9C2B-908BC14911AB}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedLite", "SharedLite\SharedLite.csproj", "{EFE05C79-E0DD-4311-8B90-A8DA7EBDF36F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharedLauncher", "SharedLauncher\SharedLauncher.csproj", "{EFE05C79-E0DD-4311-8B90-A8DA7EBDF36F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Host/Web.config b/Host/Web.config
index fdd6dc0f9..9fefa8e15 100644
--- a/Host/Web.config
+++ b/Host/Web.config
@@ -162,9 +162,6 @@
-
-
-
diff --git a/LauncherHost/LauncherHost.csproj b/LauncherHost/LauncherHost.csproj
index e446a4241..305e6617b 100644
--- a/LauncherHost/LauncherHost.csproj
+++ b/LauncherHost/LauncherHost.csproj
@@ -74,6 +74,7 @@
+
diff --git a/LauncherHost/Web.config b/LauncherHost/Web.config
index 0be612e6d..a141a9cc3 100644
--- a/LauncherHost/Web.config
+++ b/LauncherHost/Web.config
@@ -79,11 +79,15 @@
+
+
+
-
+
+
diff --git a/Service/Core/Utils.cs b/Service/Core/Utils.cs
index d08e4a79a..421932204 100644
--- a/Service/Core/Utils.cs
+++ b/Service/Core/Utils.cs
@@ -97,7 +97,7 @@ namespace BeWo.Service.Core
to = "support@bewoplaner.de";
if (senderEMail == null)
- senderEMail = "bewoapp@bewoplaner.de";
+ senderEMail = "MainSession@bewoplaner.de";
bool sendAsync = true;
if (to.Equals("support@bewoplaner.de"))
diff --git a/Service/Plugins/FlexibleReportService.cs b/Service/Plugins/FlexibleReportService.cs
index e03f776a8..e2a513803 100644
--- a/Service/Plugins/FlexibleReportService.cs
+++ b/Service/Plugins/FlexibleReportService.cs
@@ -7,7 +7,7 @@ using BeWo.Data.Entities;
using BeWo.Service.Core;
using BeWo.Service.DCEntityMapper;
using BeWo.Service.MessageContracts;
-using BS.SharedLite;
+using BS.SharedLauncher;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
diff --git a/Service/SBD/VertretungsAlgorithmus.cs b/Service/SBD/VertretungsAlgorithmus.cs
index c4dfcd963..94b9f384f 100644
--- a/Service/SBD/VertretungsAlgorithmus.cs
+++ b/Service/SBD/VertretungsAlgorithmus.cs
@@ -159,9 +159,9 @@
// //long? oid = null;
-// //if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.ViewAll) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
+// //if (!MainSession.LoggedOnUser.HasRight(UserRightType.ViewAll) && !MainSession.LoggedOnUser.HasRight(UserRightType.CustomerView_View))
// //{
-// // oid = BeWoApp.LoggedOnUser.Employee.EmployeeOid;
+// // oid = MainSession.LoggedOnUser.Employee.EmployeeOid;
// //}
// //ServiceFacade.DoCustomerServiceAsync(
diff --git a/Service/Security/SecurityContextInitializer.cs b/Service/Security/SecurityContextInitializer.cs
index 74110e588..b80a6f642 100644
--- a/Service/Security/SecurityContextInitializer.cs
+++ b/Service/Security/SecurityContextInitializer.cs
@@ -37,7 +37,7 @@ namespace BeWo.Service.Security
string lServiceInterface = lTemp[lTemp.Count - 2];
// TODO Hier kann man jetzt etwas bauen wer sich für welchen service autorisieren muss...
- if (lMethodName == "IsUserValid" || lMethodName == "ResetTenant" || lMethodName == "ResetAllTenants" || lMethodName == "GetEmailForUserName" || lMethodName == "Update")
+ if (lMethodName == "IsUserValid" || lMethodName == "ResetTenant" || lMethodName == "ResetAllTenants" || lMethodName == "GetEmailForUserName" || lMethodName == "Update" || lMethodName == "LoadUserByNameAndPassword")
{
return null;
}
diff --git a/Service/Service.csproj b/Service/Service.csproj
index c9c26e571..229ae762a 100644
--- a/Service/Service.csproj
+++ b/Service/Service.csproj
@@ -372,6 +372,7 @@
+
@@ -384,6 +385,7 @@
+
@@ -410,9 +412,9 @@
{b0d73e3d-4ae7-4024-93a6-db1f46d7ccee}
Data
-
+
{efe05c79-e0dd-4311-8b90-a8da7ebdf36f}
- SharedLite
+ SharedLauncher
{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}
diff --git a/Service/ServiceContracts/ILauncherService.cs b/Service/ServiceContracts/ILauncherService.cs
index 0967976d8..2c4b19ea7 100644
--- a/Service/ServiceContracts/ILauncherService.cs
+++ b/Service/ServiceContracts/ILauncherService.cs
@@ -6,7 +6,8 @@ using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Reports;
-using BS.SharedLite;
+using BS.SharedLauncher;
+using BS.SharedLauncher.DataContract;
namespace BeWo.Service.ServiceContracts
{
@@ -16,17 +17,37 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
UserValidationResult IsUserValid(string pUserName, string pPassword, string pPIN, string clientId, bool checkTenant);
+
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void ResetTenant(String tenant);
+
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void ResetAllTenant();
+
[FaultContract(typeof(BeWoFault))]
[OperationContract]
bool GetEmailForUserName(string pUserName, Uri serverName, out string email);
+
[FaultContract(typeof(BeWoFault))]
[OperationContract]
BeWoProgramPackageDC Update(BeWoProgramPackageDC t);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ PasswordValidationResult CheckPassword(long userOid, string pOldPassword, string pNewPassword);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ PasswordValidationResult CheckPassword2(string username, string pOldPassword, string pNewPassword);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ long ChangePassword(string pUserName, string pOldPassword, string pNewPassword);
+
+ [FaultContract(typeof(BeWoFault))]
+ [OperationContract]
+ void ResetPasswordInfo(string pUserName, string pPassword);
}
}
\ No newline at end of file
diff --git a/Service/ServiceContracts/IUserService.cs b/Service/ServiceContracts/IUserService.cs
index 510f9d18c..8fc74398f 100644
--- a/Service/ServiceContracts/IUserService.cs
+++ b/Service/ServiceContracts/IUserService.cs
@@ -5,7 +5,7 @@ using BeWo.Data.Entities;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared;
-using BS.SharedLite;
+using BS.SharedLauncher;
namespace BeWo.Service.ServiceContracts
{
diff --git a/Service/ServiceImplementations/LauncherServiceImp.cs b/Service/ServiceImplementations/LauncherServiceImp.cs
index b02b1f310..dac3d263f 100644
--- a/Service/ServiceImplementations/LauncherServiceImp.cs
+++ b/Service/ServiceImplementations/LauncherServiceImp.cs
@@ -14,59 +14,166 @@ using BeWo.Service.ServiceContracts;
using BS.Shared;
using BS.Shared.Core;
using BS.Shared.DataContracts;
-using BS.SharedLite;
+using BS.SharedLauncher;
using BeWo.Service.Invoicing;
using System.IO;
using System.Configuration;
using System.Diagnostics;
+using BeWo.Service.Configuration;
+using BS.SharedLauncher.DataContract;
+using BS.SharedLauncher.Information;
+using Castle.Core;
namespace BeWo.Service.ServiceImplementations
{
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
public class LauncherServiceImp : ILauncherService
{
- string testLoc = @"d:\Test\lib1.dll";
+ private const string sonderzeichen = "\\\"\'µ@€!§$%&/()=?+#*',.-;:_><|{[]}´`^°~²³";
+ private const string zahlen = "0123456789";
+ private const string grossBuchstaben = "ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ";
+ private const string kleinBuchstaben = "abcdefghijklmnopqrstuvwxyzäöüß";
- public UserValidationResult IsUserValid(string pUserName, string pPassword, string pPIN, string clientId, bool checkTenant)
+ public PasswordValidationResult CheckPassword(long userOid, string pOldPassword, string pNewPassword)
{
- //Update(new BeWoProgramPackageDC());
- return (new UserServiceImp()).IsUserValid(pUserName, pPassword, pPIN, clientId, checkTenant);
- }
+ try
+ {
+ var user = DAOFactory.GenericDAO.LoadByID(userOid);
- public void ResetTenant(string tenant)
+ if (pNewPassword.Equals(pOldPassword))
+ {
+ return PasswordValidationResult.AreTheSame;
+ }
+
+ if (!DAOFactory.UserDAO.CheckPassword(user, pOldPassword))
+ {
+ return PasswordValidationResult.NotCorrect;
+ }
+
+ var settings = AppSettings.CreateSettings();
+ if (settings.IsPasswordSecurityActiv)
+ {
+ if (pNewPassword.Length < 8)
+ {
+ return PasswordValidationResult.NotLongEnough;
+ }
+
+ if (pNewPassword.Equals("bewo"))
+ {
+ return PasswordValidationResult.ImFunnyAndUsingBewoAsPasswordSmile;
+ }
+
+ if (!CheckPasswordStrongEnough(pNewPassword))
+ {
+ return PasswordValidationResult.NotSpecialEnough;
+ }
+ }
+
+ return PasswordValidationResult.Succesful;
+ }
+ catch (Exception e)
+ {
+ throw Core.Utils.CreateBeWoFaultException(e);
+ }
+ }
+ public PasswordValidationResult CheckPassword2(string userName, string pOldPassword, string pNewPassword)
{
- (new OperationsServiceImp()).ResetTenant(tenant);
- }
+ try
+ {
+ var allAppUser = DAOFactory.GenericDAO.GetAllActive();
+
+ var id = allAppUser.ToList().Find(x => x.LoginName == userName).Oid.Value;
- public void ResetAllTenant()
+ return CheckPassword(id, pOldPassword, pNewPassword);
+ }
+ catch (Exception e)
+ {
+ throw Core.Utils.CreateBeWoFaultException(e);
+ }
+ }
+ private bool CheckPasswordStrongEnough(string password)
{
- (new OperationsServiceImp()).ResetAllTenants();
- }
+ return true;
- public bool GetEmailForUserName(string pUserName, Uri serverName, out string email)
+ //int richtlinienCount = 0;
+
+ //if (pNewPassword.Any(x => zahlen.Contains(x)))
+ //{
+ // richtlinienCount++;
+ //}
+ //if (pNewPassword.Any(x => grossBuchstaben.Contains(x)))
+ //{
+ // richtlinienCount++;
+ //}
+ //if (pNewPassword.Any(x => kleinBuchstaben.Contains(x)))
+ //{
+ // richtlinienCount++;
+ //}
+ //if (pNewPassword.Any(x => sonderzeichen.Contains(x)))
+ //{
+ // richtlinienCount++;
+ //}
+
+ ////if (!(pNewPassword.Any(x => sonderzeichen.Contains(x)) && pNewPassword.Any(x => zahlen.Contains(x)) && pNewPassword.Any(x => grossBuchstaben.Contains(x)) && pNewPassword.Any(x => kleinBuchstaben.Contains(x))))
+ //if (richtlinienCount < 3)
+ //{
+ // return PasswordValidationResult.NotSpecialEnough;
+ //}
+ }
+ public long ChangePassword(string pUserName, string pOldPassword, string pNewPassword)
{
- return (new UserServiceImp()).GetEmailForUserName(pUserName, serverName, out email);
- }
+ try
+ {
+ var user = DAOFactory.UserDAO.FindUserByLoginName(ConnectionInformation.Username);
- //public byte[] GetUpdateZip()
- //{
- // return File.ReadAllBytes(testLoc);
- //}
+ var version = (new UserServiceImp()).ChangePassword(pUserName, user.Version.Value, pOldPassword, pNewPassword);
+
+ ResetPasswordInfo(pUserName, pOldPassword);
+
+ return 0;
+ }
+ catch (Exception e)
+ {
+ throw Core.Utils.CreateBeWoFaultException(e);
+ }
+ }
+ public void ResetPasswordInfo(string pUserName, string pPassword)
+ {
+ try
+ {
+ var user = DAOFactory.UserDAO.FindUserByLoginName(ConnectionInformation.Username);
+
+ user.ResetPasswordInfos.ForEach(f => f.HasToChangePW = false);
+
+ DAOFactory.GenericDAO.Update(user);
+ }
+ catch (Exception e)
+ {
+ throw Core.Utils.CreateBeWoFaultException(e);
+ }
+
+ }
public BeWoProgramPackageDC Update(BeWoProgramPackageDC current)
{
- DirectoryInfo dirUpdateRoot = new DirectoryInfo(ConfigurationManager.AppSettings.Get("UpdateRootPath"));
+ try
+ {
+ DirectoryInfo dirUpdateRoot = new DirectoryInfo(ConfigurationManager.AppSettings.Get("UpdateRootPath"));
- var newest = GetNewestVersionSet(dirUpdateRoot, MultitenancyOperationContextExt.Current.Tenant);
+ var newest = GetNewestVersionSet(dirUpdateRoot, MultitenancyOperationContextExt.Current.Tenant);
- var res = CreateUpdatePackage(current, newest);
+ var res = CreateUpdatePackage(current, newest);
- res.toLoad = "BeWoPlaner.dll";
+ res.toLoad = "BeWoPlaner.dll";
- return res;
+ return res;
+ }
+ catch (Exception e)
+ {
+ throw Core.Utils.CreateBeWoFaultException(e);
+ }
}
-
private BeWoProgramPackageDC GetNewestVersionSet(DirectoryInfo dirUpdateRoot, string tenant)
{
var res = new BeWoProgramPackageDC();
@@ -99,7 +206,6 @@ namespace BeWo.Service.ServiceImplementations
return res;
}
-
private BeWoProgramPackageDC CreateUpdatePackage(BeWoProgramPackageDC oldSet, BeWoProgramPackageDC newSet)
{
var res = new BeWoProgramPackageDC();
@@ -121,7 +227,7 @@ namespace BeWo.Service.ServiceImplementations
}
else
{
- if (oldFile.FileVersion is null | newFile.FileVersion is null)
+ if (oldFile.FileVersion is null || newFile.FileVersion is null)
{
oldFile.FileVersion = newFile.FileVersion;
oldFile.FileData = File.ReadAllBytes(newFile.FullPath);
@@ -131,7 +237,15 @@ namespace BeWo.Service.ServiceImplementations
{
if (oldFile.FileVersion == newFile.FileVersion)
{
- oldFile.ToDo = FileToDo.Nuthing;
+ if (oldFile.Checksum != newFile.Checksum)
+ {
+ oldFile.FileData = File.ReadAllBytes(newFile.FullPath);
+ oldFile.ToDo = FileToDo.Update;
+ }
+ else
+ {
+ oldFile.ToDo = FileToDo.Nuthing;
+ }
}
else
{
@@ -155,5 +269,19 @@ namespace BeWo.Service.ServiceImplementations
return res;
}
+
+ public UserValidationResult IsUserValid(string pUserName, string pPassword, string pPIN, string clientId, bool checkTenant)
+ => (new UserServiceImp()).IsUserValid(pUserName, pPassword, pPIN, clientId, checkTenant);
+
+ public void ResetTenant(string tenant)
+ => (new OperationsServiceImp()).ResetTenant(tenant);
+
+ public void ResetAllTenant()
+ => (new OperationsServiceImp()).ResetAllTenants();
+
+ public bool GetEmailForUserName(string pUserName, Uri serverName, out string email)
+ => (new UserServiceImp()).GetEmailForUserName(pUserName, serverName, out email);
+
+
}
}
\ No newline at end of file
diff --git a/Service/ServiceImplementations/UserServiceImp.cs b/Service/ServiceImplementations/UserServiceImp.cs
index 8671185e2..022bc1ffa 100644
--- a/Service/ServiceImplementations/UserServiceImp.cs
+++ b/Service/ServiceImplementations/UserServiceImp.cs
@@ -20,7 +20,7 @@ using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
-using BS.SharedLite;
+using BS.SharedLauncher;
using MySql.Data.MySqlClient;
using BeWo.Service.Configuration;
diff --git a/Shared/DataContracts/AbsenceReasonDC.cs b/Shared/DataContracts/AbsenceReasonDC.cs
index 8c98d8075..5a5f4bc01 100644
--- a/Shared/DataContracts/AbsenceReasonDC.cs
+++ b/Shared/DataContracts/AbsenceReasonDC.cs
@@ -1,4 +1,4 @@
-using BS.SharedLite;
+using BS.SharedLauncher;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
diff --git a/Shared/DataContracts/BeWoFileDC2.cs b/Shared/DataContracts/BeWoFileDC2.cs
index d7a0403b6..e67c1be14 100644
--- a/Shared/DataContracts/BeWoFileDC2.cs
+++ b/Shared/DataContracts/BeWoFileDC2.cs
@@ -1,4 +1,4 @@
-using BS.SharedLite;
+using BS.SharedLauncher;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
diff --git a/Shared/DataContracts/BeWoFolderDC.cs b/Shared/DataContracts/BeWoFolderDC.cs
index de6435ce1..843ea45ad 100644
--- a/Shared/DataContracts/BeWoFolderDC.cs
+++ b/Shared/DataContracts/BeWoFolderDC.cs
@@ -1,4 +1,4 @@
-using BS.SharedLite;
+using BS.SharedLauncher;
using System.Collections.Generic;
using System.Runtime.Serialization;
diff --git a/Shared/DataContracts/UrlaubskontoDC.cs b/Shared/DataContracts/UrlaubskontoDC.cs
index 3aa94ecd9..32cccd13c 100644
--- a/Shared/DataContracts/UrlaubskontoDC.cs
+++ b/Shared/DataContracts/UrlaubskontoDC.cs
@@ -1,4 +1,4 @@
-using BS.SharedLite;
+using BS.SharedLauncher;
using System;
using System.Collections.Generic;
using System.Diagnostics;
diff --git a/Shared/DataContracts/VertretungsListeDC.cs b/Shared/DataContracts/VertretungsListeDC.cs
index bf677daa4..9d6b3032d 100644
--- a/Shared/DataContracts/VertretungsListeDC.cs
+++ b/Shared/DataContracts/VertretungsListeDC.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Runtime.Serialization;
using BS.Shared.DataContracts.Compact;
-using BS.SharedLite;
+using BS.SharedLauncher;
namespace BS.Shared.DataContracts
{
diff --git a/Shared/Shared.csproj b/Shared/Shared.csproj
index 1f4aa7c57..fc886ce8e 100644
--- a/Shared/Shared.csproj
+++ b/Shared/Shared.csproj
@@ -443,9 +443,9 @@
-
+
{efe05c79-e0dd-4311-8b90-a8da7ebdf36f}
- SharedLite
+ SharedLauncher
diff --git a/SharedLite/BeWoLiteEnums.cs b/SharedLite/BeWoLiteEnums.cs
deleted file mode 100644
index a9fd0cd8a..000000000
--- a/SharedLite/BeWoLiteEnums.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BS.SharedLite
-{
- public enum UserValidationResult
- {
- UserUnknown = 0,
- UserValid = 1,
- UnkownError = 2,
- TenantUnknown = 3,
- IncorrectPin = 4,
- PinExpired = 5,
- PinAlreadyUsed = 6,
- PasswordExpired = 7
- }
-
- public enum LauncherPasswortSecurityStrength
- {
- SehrSchwach,
- Schwach,
- Mittelmass,
- Stark,
- SehrStark
- }
-
- public enum FileToDo
- {
- Add,
- Remove,
- Update,
- Nuthing
- }
-}
diff --git a/SharedLite/BeWoProgramFileDC.cs b/SharedLite/BeWoProgramFileDC.cs
deleted file mode 100644
index 7b2ceedd8..000000000
--- a/SharedLite/BeWoProgramFileDC.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BS.SharedLite
-{
- [DebuggerDisplay("{FileName} ({FileVersion})")]
- [DataContract]
- public class BeWoProgramFileDC
- {
- public BeWoProgramFileDC() : this(null, null, null, FileToDo.Nuthing) { }
-
- public BeWoProgramFileDC(string filename, Version version) : this(filename, version, null, FileToDo.Nuthing) { }
-
- public BeWoProgramFileDC(string filename, Version version, byte[] data, FileToDo todo)
- {
- FileName = filename;
- FileVersion = version;
- FileData = data;
- ToDo = todo;
- }
-
- public BeWoProgramFileDC(FileInfo fi)
- {
- FileName = fi.Name;
- FileExtension = fi.Extension;
- FullPath = fi.FullName;
- FileVersion = new Version(FileVersionInfo.GetVersionInfo(fi.FullName).FileVersion ?? "0.0.0.0");
- ToDo = FileToDo.Nuthing;
- }
-
- [DataMember]
- public string FileName { get; set; }
-
- [DataMember]
- public string FileExtension { get; set; }
-
- [DataMember]
- public Version FileVersion { get; set; }
-
- [DataMember]
- public string FullPath { get; set; }
-
- [DataMember]
- public byte[] FileData { get; set; }
-
- [DataMember]
- public FileToDo ToDo { get; set; }
- }
-}
diff --git a/SharedLite/BeWoProgramPackageDC.cs b/SharedLite/BeWoProgramPackageDC.cs
deleted file mode 100644
index 9b465d6cc..000000000
--- a/SharedLite/BeWoProgramPackageDC.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace BS.SharedLite
-{
- //[DebuggerDisplay("{InternalName} ({FileVersion})")]
- [DataContract]
- public class BeWoProgramPackageDC
- {
- public BeWoProgramPackageDC()
- {
- Files = new List();
- }
-
- [DataMember]
- public List Files { get; set; }
-
- [DataMember]
- public string toLoad { get; set; }
- }
-}
diff --git a/SharedLite/Properties/AssemblyInfo.cs b/SharedLite/Properties/AssemblyInfo.cs
deleted file mode 100644
index 7939afd4b..000000000
--- a/SharedLite/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Allgemeine Informationen über eine Assembly werden über die folgenden
-// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
-// die einer Assembly zugeordnet sind.
-[assembly: AssemblyTitle("SharedLite")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("SharedLite")]
-[assembly: AssemblyCopyright("Copyright © 2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly
-// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von
-// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen.
-[assembly: ComVisible(false)]
-
-// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
-[assembly: Guid("efe05c79-e0dd-4311-8b90-a8da7ebdf36f")]
-
-// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
-//
-// Hauptversion
-// Nebenversion
-// Buildnummer
-// Revision
-//
-// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
-// indem Sie "*" wie unten gezeigt eingeben:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/SharedLite/SharedLite.csproj b/SharedLite/SharedLite.csproj
deleted file mode 100644
index 7f0eb1249..000000000
--- a/SharedLite/SharedLite.csproj
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {EFE05C79-E0DD-4311-8B90-A8DA7EBDF36F}
- Library
- Properties
- BS.SharedLite
- BS.SharedLite
- v4.5
- 512
- true
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file