Zwischenstand: SharedLauncher wird in BeWoLauncher kopiert, BeWoCore verwendet SharedLauncher aus BeWoLauncher

This commit is contained in:
rene
2021-09-30 12:21:32 +02:00
parent 569d477572
commit e26113d24b
367 changed files with 5440 additions and 10672 deletions

View File

@@ -153,6 +153,7 @@
<HintPath>..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
@@ -246,7 +247,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="MainView.xaml">
<Page Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
@@ -690,7 +691,7 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="BeWoApp.cs" />
<Compile Include="MainSession.cs" />
<Compile Include="BSLogoControl.xaml.cs">
<DependentUpon>BSLogoControl.xaml</DependentUpon>
</Compile>
@@ -736,6 +737,7 @@
<Compile Include="MainDictionary.xaml.cs">
<DependentUpon>MainDictionary.xaml</DependentUpon>
</Compile>
<Compile Include="MainSessionSingleton.cs" />
<Compile Include="MultiLanguage\Markup\TranslateExtension.cs" />
<Compile Include="MultiLanguage\ServiceTranslator.cs" />
<Compile Include="ownChat\OwnChatHelper.cs" />
@@ -780,6 +782,7 @@
</Compile>
<Compile Include="SchulbegleitenderDienst\WochenansichtVM.cs" />
<Compile Include="SchulbegleitenderDienst\WochenVertretung.cs" />
<Compile Include="ServiceProxy\ServiceConfig.cs" />
<Compile Include="StartRoutine.cs" />
<Compile Include="UploadDialog.xaml.cs">
<DependentUpon>UploadDialog.xaml</DependentUpon>
@@ -787,8 +790,8 @@
<Compile Include="LockedPage.xaml.cs">
<DependentUpon>LockedPage.xaml</DependentUpon>
</Compile>
<Compile Include="MainView.xaml.cs">
<DependentUpon>MainView.xaml</DependentUpon>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Office\OfficeManager.cs" />
<Compile Include="Office\TableModels\AbstractTableModel.cs" />
@@ -2296,20 +2299,17 @@
<Project>{8a83c4dc-a0b1-4a51-ae1d-366d7a05b298}</Project>
<Name>ChatController</Name>
</ProjectReference>
<ProjectReference Include="..\BeWoLauncher\BeWoLauncher.csproj">
<Project>{e3ba193a-a64f-4ce6-91be-f54e551797be}</Project>
<Name>BeWoLauncher</Name>
</ProjectReference>
<ProjectReference Include="..\Controls\Controls.csproj">
<Project>{D5E53B0F-BF5A-41E8-93E2-0F32845FC729}</Project>
<Name>Controls</Name>
</ProjectReference>
<ProjectReference Include="..\SharedLite\SharedLite.csproj">
<ProjectReference Include="..\SharedLauncher\SharedLauncher.csproj">
<Project>{efe05c79-e0dd-4311-8b90-a8da7ebdf36f}</Project>
<Name>SharedLite</Name>
<Name>SharedLauncher</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Shared\Shared.csproj">
<Project>{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}</Project>
<Project>{2f50b83d-a3f0-4ec4-979a-3f9b7e3d8ed4}</Project>
<Name>Shared</Name>
</ProjectReference>
</ItemGroup>

View File

@@ -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
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
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<Window> OpenDevExpressEditForms = new List<Window>();
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<string, string> 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<UserRightType> 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<SettingsDC> 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<string>();
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<string> 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)
);
}
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -3,7 +3,7 @@ using System.Globalization;
using System.Windows.Data;
using BeWo.Core;
using BeWoLauncher.Cache;
using BS.SharedLauncher.Information;
namespace BeWo.Converter
{

View File

@@ -4,7 +4,7 @@ using System.Windows.Data;
using BeWo.Core;
using BeWo.ViewModel;
using BeWoLauncher.Cache;
using BS.SharedLauncher.Information;
namespace BeWo.Converter
{

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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
{

View File

@@ -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>(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<ServiceRecordValidationResultDC>();
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<ServiceRecordValidationResultDC>();
@@ -1956,7 +1956,7 @@ namespace BeWo.Core
var serienTermine = (List<SchedulerAppointmentDC>)variablen["serienTermine"];
var mehrtaegigeTermine = (List<SchedulerAppointmentDC>)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<UserRightType> 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);
}
}
}

View File

@@ -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);

View File

@@ -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)
{

View File

@@ -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));
}

View File

@@ -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;
}

View File

@@ -15,7 +15,7 @@
</Page.Resources>
<Page.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded" SourceName="GridLogin">
<BeginStoryboard Storyboard="{StaticResource OnLoaded1}" />
<BeginStoryboard Storyboard="{DynamicResource OnLoaded1}" />
</EventTrigger>
</Page.Triggers>
<Grid>

View File

@@ -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)

View File

@@ -1,7 +1,6 @@
<ResourceDictionary x:Class="BeWo.MainDictionary"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:bewo="clr-namespace:BeWo"
xmlns:shared="clr-namespace:BS.Shared.DataContracts;assembly=BS.Shared"
@@ -64,7 +63,6 @@
<conv:DeleteForGoodRight2VisibilityConverter x:Key="DeleteForGoodRight2VisibilityConverter" />
<conv:AnonymizationRight2VisibilityConverter x:Key="AnonymizationRight2VisibilityConverter" />
<Style x:Key="SupportConceptDetailStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />
@@ -302,7 +300,7 @@
VerticalAlignment="Center" HorizontalAlignment="Right"
Style="{DynamicResource MaximizeButtonStyle}"
Grid.ColumnSpan="1" Grid.RowSpan="2"
IsChecked="{Binding Source={x:Static bewo:BeWoApp.MainView}, Path=IsMaximized}" />
IsChecked="{Binding Source={x:Static bewo:MainSession.MainPage}, Path=IsMaximized}" />
<!-- ToggleButton Checked="togglebutton_maximise_Checked" Unchecked="togglebutton_maximise_Unchecked" Margin="3,6,3,0" x:Name="togglebutton_maximise" Grid.Column="0" Grid.Row="0" Width="25" Height="25" VerticalAlignment="Center" HorizontalAlignment="Right" Style="{DynamicResource MaximizeButtonStyle}" Grid.ColumnSpan="1" Grid.RowSpan="2"/ -->
</Grid>
</ControlTemplate>
@@ -581,10 +579,10 @@
</Grid>
</HierarchicalDataTemplate>
<Style x:Key="ObjectComboBoxStyle" TargetType="{x:Type ComboBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ComboBoxFocusVisual}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="1" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
@@ -672,9 +670,9 @@
</Setter>
</Style>
<Style x:Key="WarningButton" TargetType="{x:Type Button}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}" />
<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ButtonFocusVisual}" />
<Setter Property="Background" Value="{DynamicResource ButtonNormalBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource ButtonNormalBorder}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />

View File

@@ -1,5 +1,4 @@
using BeWo.View.Navigation;
using BeWoLauncher;
using BS.Shared.DataContracts.Compact;
using System;
using System.Collections.Generic;
@@ -15,9 +14,14 @@ namespace BeWo
{
partial class MainDictionary
{
public MainDictionary()
{
InitializeComponent();
}
private void Hyperlink_Hilfeplan_Reaktivieren_Click(object sender, RoutedEventArgs e)
{
var scNavView = (SupportConceptNavigationView)BeWoApp.MainView.ActiveView;
var scNavView = (SupportConceptNavigationView)MainSession.MainPage.ActiveView;
if (scNavView != null)
{
@@ -35,38 +39,38 @@ namespace BeWo
if (dc == null) return;
if (BeWoApp.MainView != null)
BeWoApp.MainView.NavigateToServiceRecordView(dc.SupportConceptOid);
if (MainSession.MainPage != null)
MainSession.MainPage.NavigateToServiceRecordView(dc.SupportConceptOid);
}
private void Togglebutton_maximise_Checked(object sender, RoutedEventArgs e)
{
if (BeWoApp.MainView != null)
BeWoApp.MainView.Maximize();
if (MainSession.MainPage != null)
MainSession.MainPage.Maximize();
}
private void Togglebutton_maximise_Unchecked(object sender, RoutedEventArgs e)
{
if (BeWoApp.MainView != null)
BeWoApp.MainView.Minimize();
if (MainSession.MainPage != null)
MainSession.MainPage.Minimize();
}
private void TogglebuttonChat_maximise_Unchecked(object sender, RoutedEventArgs e)
{
if (BeWoApp.MainView.HomeView.ServiceChatView != null)
BeWoApp.MainView.HomeView.ServiceChatView.Normal();
if (MainSession.MainPage.HomeView.ServiceChatView != null)
MainSession.MainPage.HomeView.ServiceChatView.Normal();
}
private void TogglebuttonChat_maximise_Checked(object sender, RoutedEventArgs e)
{
if (BeWoApp.MainView.HomeView.ServiceChatView != null)
BeWoApp.MainView.HomeView.ServiceChatView.Maximize();
if (MainSession.MainPage.HomeView.ServiceChatView != null)
MainSession.MainPage.HomeView.ServiceChatView.Maximize();
}
private void TogglebuttonChat_Minimize_Checked(object sender, RoutedEventArgs e)
{
if (BeWoApp.MainView.HomeView.ServiceChatView != null)
BeWoApp.MainView.HomeView.ServiceChatView.Minimize();
if (MainSession.MainPage.HomeView.ServiceChatView != null)
MainSession.MainPage.HomeView.ServiceChatView.Minimize();
}
private void FrameLeftMouseDown(object sender, MouseButtonEventArgs e)

View File

@@ -1,573 +0,0 @@
<UserControl x:Class="BeWo.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:r="clr-namespace:BeWo.Security"
xmlns:BeWo="clr-namespace:BeWo"
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
Background="{DynamicResource ApplicationBackground}"
SnapsToDevicePixels="True"
RenderTransformOrigin="0.5,0.5"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<ResourceDictionary>
<!--<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="MainDictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>-->
<Storyboard x:Key="OnLoadedStoryboard" Completed="OnLoadedStoryboard_Completed">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="toolbarRoot"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="-5" KeySpline="0,1,1,1" />
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="0" KeySpline="0.35,0.5,0.5,0.9" />
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image"
Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0" KeySpline="0,1,1,1" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</ResourceDictionary>
</UserControl.Resources>
<UserControl.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</UserControl.RenderTransform>
<UserControl.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource OnLoadedStoryboard}" x:Name="OnLoaded1_BeginStoryboard" />
</EventTrigger>
</UserControl.Triggers>
<Grid x:Name="grid_main" Width="Auto" Height="Auto" Margin="0,0,0,0" HorizontalAlignment="Stretch"
Grid.IsSharedSizeScope="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!--<Frame x:Name="chatFrame" Grid.Column="2" Grid.Row="0" />-->
<TextBlock HorizontalAlignment="Center" Width="Auto" Margin="5,2,0,0">
<Hyperlink NavigateUri="http://www.bewoplaner.de" TargetName="newWindow" Foreground="Transparent" RequestNavigate="Hyperlink_OnRequestNavigate">
<InlineUIContainer>
<Image HorizontalAlignment="Left" Source="Ressources\Icons\bewoplaner_logo_small.png"
Style="{DynamicResource toolbarImageStyle}" RenderTransformOrigin="0.5,0.5" x:Name="image">
<Image.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="-200" Y="0" />
</TransformGroup>
</Image.RenderTransform>
</Image>
</InlineUIContainer>
</Hyperlink>
</TextBlock>
<!--<TextBlock HorizontalAlignment="Right" Width="Auto" Margin="0,2,5,0" Grid.Column="2">
<Hyperlink NavigateUri="http://www.bewoplaner.de" TargetName="newWindow" Foreground="Transparent" RequestNavigate="Hyperlink_OnRequestNavigate">
<InlineUIContainer>
<Image HorizontalAlignment="Left" Source="Ressources\Icons\bewoplaner_logo_small.png"
Style="{StaticResource toolbarImageStyle}" RenderTransformOrigin="0.5,0.5" x:Name="image2">
</Image>
</InlineUIContainer>
</Hyperlink>
</TextBlock>-->
<BeWo:BSLogoControl Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Grid.RowSpan="2" Width="1000" Height="1000"
VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="0,0,-300,-250" x:Name="bSLogoControl"
RenderTransformOrigin="0.5,0.5">
<BeWo:BSLogoControl.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#29000000" Offset="0" />
<GradientStop Color="#29000000" Offset="1" />
</LinearGradientBrush>
</BeWo:BSLogoControl.OpacityMask>
</BeWo:BSLogoControl>
<Grid x:Name="DetailFrame" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" Grid.RowSpan="2"
RenderTransformOrigin="0.5,0.5" Margin="140,35,140,85">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Grid.RenderTransform>
<Grid.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FF000000" Offset="0" />
<GradientStop Color="#D8FFFFFF" Offset="1" />
</LinearGradientBrush>
</Grid.OpacityMask>
<!-- Border x:Name="detailPlaceHolder" Background="#FFB55252" CornerRadius="5,5,5,5"></Border-->
</Grid>
<Grid x:Name="toolbarRoot" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" HorizontalAlignment="Stretch"
VerticalAlignment="Bottom" Width="Auto" RenderTransformOrigin="0.5,0.5" MouseEnter="toolbarRoot_MouseEnter"
MouseLeave="toolbarRoot_MouseLeave">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="100" />
</TransformGroup>
</Grid.RenderTransform>
<Border Name="toolbarBord" Height="80" RenderTransformOrigin="0.5,0.5">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="20" />
</TransformGroup>
</Border.RenderTransform>
<Viewbox Stretch="Fill">
<Canvas Width="100" Height="100">
<Path Data="M0,100 L5,0 L95,0 L100,100 Z" StrokeThickness="1">
<Path.Fill>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#66000000" Offset="0" />
<GradientStop Color="#CC080808" Offset="1" />
</LinearGradientBrush>
</Path.Fill>
</Path>
<Rectangle Width="100" Height="132" Fill="#FF98C1FF" Canvas.Top="8">
<Rectangle.OpacityMask>
<RadialGradientBrush>
<GradientStop Color="#3FFFFFFF" Offset="0.29" />
<GradientStop Color="#00FFFFFF" Offset="0.875" />
</RadialGradientBrush>
</Rectangle.OpacityMask>
</Rectangle>
</Canvas>
</Viewbox>
</Border>
<Grid x:Name="toolbarContent" RenderTransformOrigin="0.5,0.5" MouseEnter="UIElement_OnMouseEnter" Loaded="ToolbarContent_OnLoaded">
<Grid.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Grid.RenderTransform>
<StackPanel x:Name="HomeButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Left"
VerticalAlignment="Top" Margin="10,0,0,0">
<Button Margin="0,9,0,0" Name="btn_home" Click="btn_home_Click" Width="40" Height="40">
<Image Source="Ressources\Icons\Home.png" Stretch="Fill" StretchDirection="Both"></Image>
</Button>
<Label Content="{t:Translate Home}" FontSize="12" Foreground="#FFDBDBDB"></Label>
</StackPanel>
<!--<StackPanel x:Name="HomeButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,0,0,0" >
<Button Margin="0,10,0,0" Click="button_Home" Width="40" Height="40">
<Image Source="Ressources\Icons\HomeDisabled.png" Stretch="Fill" StretchDirection="Both"></Image>
</Button>
<Label Content="Startseite" FontSize="12" Foreground="#FFDBDBDB"></Label>
</StackPanel>
<StackPanel x:Name="LogoutButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="90,0,0,0" >
<Button Margin="0,10,0,0" Click="button_Logout" Width="40" Height="40">
<Image Source="Ressources\Icons\LogoutDisabled.png" Stretch="Fill" StretchDirection="Both"></Image>
</Button>
<Label Content="Abmelden" FontSize="12" Foreground="#FFDBDBDB"></Label>
</StackPanel>-->
<ScrollViewer x:Name="toolbarScrollViewer" ScrollChanged="toolbarScrollViewer_ScrollChanged"
HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"
HorizontalAlignment="Stretch" VerticalAlignment="Center" Margin="80,0,80,0" Height="80">
<ScrollViewer.Template>
<ControlTemplate TargetType="{x:Type ScrollViewer}">
<Grid Margin="3 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="17" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="17" />
</Grid.ColumnDefinitions>
<Button Content="3" FontFamily="Webdings" Command="ScrollBar.PageLeftCommand"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
<ScrollContentPresenter VerticalAlignment="Bottom" Margin="20 0" Grid.Column="1"
Content="{TemplateBinding Content}" />
<Button Content="4" FontFamily="Webdings" Grid.Column="2"
Command="ScrollBar.PageRightCommand"
Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" />
</Grid>
</ControlTemplate>
</ScrollViewer.Template>
<Grid Margin="0,0,0,0" VerticalAlignment="Stretch" Height="80">
<StackPanel x:Name="toolbarMainButtonPanel" VerticalAlignment="Center" HorizontalAlignment="Center"
Width="Auto" Margin="0,0,0,0" Orientation="Horizontal">
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, ServiceRecordView_View"
ImageSource="Ressources\Icons\HistoryDisabled.png" x:Name="button_serviceRecord"
Click="button_serviceRecord_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate ZeiterfassungMenuItem}" Background="{StaticResource ServiceRecordContentBrush}"
RenderTransformOrigin="0.5,0.5"
Tag="" Width="90" Height="Auto">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="AdditionalService_View"
ImageSource="Ressources\Icons\HistoryDisabled.png" x:Name="button_additionalService"
Click="button_additionalService_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate Ergänzende DiensteMenuItem}" Background="{StaticResource AdditionalServiceContentBrush}"
RenderTransformOrigin="0.5,0.5"
Tag="" Width="120" Height="Auto">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="VertretungenView_View"
ImageSource="Ressources\Icons\CalendarDisabled.png" x:Name="button_SchulbegleitenderDienst"
Click="Button_Vertretungen_OnClick" Style="{StaticResource NavBarButton}"
Content="{t:Translate VertretungenMenuItem}" Background="{StaticResource SchulbegleitenderDienstContentBrush}"
RenderTransformOrigin="0.5,0.5"
Width="90" >
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, AccountingTransactionView_View"
ImageSource="Ressources\Icons\CoinsDisabled.png" x:Name="button_AccountingTransacation"
Click="button_AccountingTransacation_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate FinanzenMenuItem}" Background="{StaticResource AccountingContentBrush}"
RenderTransformOrigin="0.5,0.5"
Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<Grid>
<localView:ImageButton r:DemandUserRight.VisibleDemands="KalenderAnsehen"
ImageSource="Ressources\Icons\CalendarDisabled.png" x:Name="button_Scheduler"
Click="button_Scheduler_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate KalenderMenuItem}" Background="{StaticResource ResourceContentBrush}"
RenderTransformOrigin="0.5,0.5"
Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<BeWo:OutlinedTextBlock Visibility="Collapsed" x:Name="NewAppointmentsOutlinedTextBlock" Margin="25,0,0,0" FontFamily="Verdana" FontSize="25" FontWeight="ExtraBold" TextWrapping="Wrap" StrokeThickness="1" Stroke="White" Fill="OrangeRed" SnapsToDevicePixels="True" Text="!" HorizontalAlignment="Left" VerticalAlignment="Top">
<BeWo:OutlinedTextBlock.Triggers>
<EventTrigger RoutedEvent="BeWo:OutlinedTextBlock.Loaded">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="NewAppointmentsOutlinedTextBlock"
Storyboard.TargetProperty="(BeWo:OutlinedTextBlock.FontSize)"
To="30.0" Duration="0:0:0.3"
AutoReverse="True" RepeatBehavior="Forever" />
</Storyboard>
</BeginStoryboard>
</EventTrigger>
</BeWo:OutlinedTextBlock.Triggers>
</BeWo:OutlinedTextBlock>
</Grid>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, ResourceBookingView_View"
ImageSource="Ressources\Icons\CalendarDisabled.png" x:Name="button_ResourceBooking"
Click="button_ResourceBooking_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate RessourcenMenuItem}" Background="{StaticResource ResourceContentBrush}"
RenderTransformOrigin="0.5,0.5"
Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, QueryView_View"
x:Name="button_Reports" Click="button_Reports_Click"
Style="{StaticResource NavBarButton}"
Content="{t:Translate AuswertungenMenuItem}"
Background="{StaticResource ReportContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\ChartBarDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, SupportConceptView_View, SupportConcept_ViewAllSupportConcepts, SupportConcept_ViewMyTeams"
x:Name="button_SupportConcept" Click="button_SupportConcept_Click"
Style="{StaticResource NavBarButton}"
Content="{t:Translate HilfepläneMenuItem}"
Background="{StaticResource SupportConceptContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\IDBadgeDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, CustomerView_View, Customer_ViewMyCustomers, Customer_ViewMyTeams"
x:Name="button_Customer" Click="button_Customer_Click"
Style="{StaticResource NavBarButton}"
Content="{t:Translate KlientenMenuItem}"
Background="{StaticResource CustomerContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\UserHomeMaleDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<!-- r:DemandUserRight.VisibleDemands="ViewAll, CustomerTeam_View" -->
<localView:ImageButton Visibility="Collapsed"
Click="button_CustomerTeam_Click"
x:Name="button_CustomerTeam"
Style="{StaticResource NavBarButton}"
Content="{t:Translate KliententeamsMenuItem}"
Background="{StaticResource CustomerTeamContentBrush}" RenderTransformOrigin="0.5, 0.5"
ImageSource="Ressources/Icons/UserGroupBusinessDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="WohnheimView_View"
x:Name="button_Wohnheim" Click="button_Wohnheim_Click"
Style="{DynamicResource NavBarButton}"
Content="{t:Translate WohnheimeMenuItem}"
Background="{StaticResource WohnheimContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\OfficeBulidingBlackDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, OrganisationView_View"
x:Name="button_Organisation" Click="button_Organisation_Click"
Style="{StaticResource NavBarButton}"
Content="{t:Translate OrganisationenMenuItem}"
Background="{StaticResource OrganisationContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\OfficeBulidingBlackDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, PersonView_View"
x:Name="button_Person" Click="button_Person_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate PersonenMenuItem}" Background="{StaticResource PersonContentBrush}"
RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\AnonymousUserDisabled.png"
Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, EmployeeView_View, Employee_AllowViewOwnEmployees, Employee_AllowViewOwnTeam"
x:Name="button_Employee" Click="button_Employee_Click"
Style="{StaticResource NavBarButton}"
Content="{t:Translate MitarbeiterMenuItem}"
Background="{StaticResource EmployeeContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\UserBusinessMaleDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, TeamView_ViewAll, TeamView_ViewMyTeams"
x:Name="button_Team" Click="button_Team_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate TeamsMenuItem}" Background="{StaticResource TeamContentBrush}"
RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\UserGroupBusinessDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, UserView_View"
x:Name="button_User" Click="button_User_Click" Style="{StaticResource NavBarButton}"
Content="{t:Translate BenutzerMenuItem}" Background="{StaticResource UserContentBrush}"
RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\UserBusinessMaleDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, UserGroupView_View"
x:Name="button_UserGroup" Click="button_UserGroup_Click"
Style="{StaticResource NavBarButton}"
Content="{t:Translate BenutzergruppenMenuItem}"
Background="{StaticResource UserGroupContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\UserGroupBusinessDisabled.png" Width="Auto">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<!--<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, AdministrationView_View"
x:Name="button_Template" Click="button_Template_Click"
HorizontalAlignment="Stretch" Style="{StaticResource NavBarButton}"
Content="{t:Translate Vorlagen}"
Background="#FF0045e0" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\MenuDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>-->
<localView:ImageButton r:DemandUserRight.VisibleDemands="ViewAll, AdministrationView_View"
x:Name="button_Administration" Click="button_Administration_Click"
HorizontalAlignment="Stretch" Style="{StaticResource NavBarButton}"
Content="{t:Translate VerwaltungMenuItem}"
Background="{StaticResource AdministrationContentBrush}" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\ConfigurationDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
<localView:ImageButton r:DemandUserRight.VisibleDemands="Support_View"
x:Name="button_Support" Click="button_Support_Click"
HorizontalAlignment="Stretch" Style="{StaticResource NavBarButton}"
Content="{t:Translate SupportMenuItem}"
Background="#FFD4FFCF" RenderTransformOrigin="0.5,0.5"
ImageSource="Ressources\Icons\TechSupportWhiteDisabled.png" Width="90">
<Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1" />
<SkewTransform AngleX="0" AngleY="0" />
<RotateTransform Angle="0" />
<TranslateTransform X="0" Y="0" />
</TransformGroup>
</Button.RenderTransform>
</localView:ImageButton>
</StackPanel>
</Grid>
</ScrollViewer>
<StackPanel x:Name="LogoutButtonPanel" Orientation="Vertical" Grid.Row="1" HorizontalAlignment="Right"
VerticalAlignment="Top" Margin="0,0,0,0">
<Button Margin="0,9,0,0" Click="button_Logout" Width="40" Height="40">
<Image Source="Ressources\Icons\LogoutDisabled.png" Stretch="Fill" StretchDirection="Both"></Image>
</Button>
<Label Content="Abmelden" FontSize="12" Foreground="#FFDBDBDB"></Label>
</StackPanel>
<!--<Rectangle Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="1" RenderTransformOrigin="0.5,0.5" Height="55" Width="1175" StrokeThickness="0" VerticalAlignment="Top">
<Rectangle.OpacityMask>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#0C000000" Offset="0"/>
<GradientStop Color="#4CFFFFFF" Offset="1"/>
</LinearGradientBrush>
</Rectangle.OpacityMask>
<Rectangle.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="-1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="0"/>
<TranslateTransform X="-3" Y="49"/>
</TransformGroup>
</Rectangle.RenderTransform>
<Rectangle.Fill>
<VisualBrush Visual="{Binding ElementName=toolbar}"/>
</Rectangle.Fill>
</Rectangle>-->
</Grid>
</Grid>
<!--<GroupBox Visibility="Hidden" Header="Home" Grid.Column="1" Grid.Row="1" Grid.RowSpan="1" Margin="10,0,10,10" Style="{DynamicResource MainContentGroupBoxStyle}" >
<Border>
<Border.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#FFFFFFFF" Offset="0"/>
<GradientStop Color="#FFFFF2CF" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
</Border>
</GroupBox>-->
</Grid>
</UserControl>

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,5 @@
using System.ServiceModel;
using BS.SharedLauncher.Information;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
@@ -12,7 +13,7 @@ namespace BeWo.Multitenancy
public object BeforeSendRequest(ref Message request, IClientChannel channel)
{
request.Headers.Add(new MultitenancyHeader { Tenant = BeWoLauncher.Cache.ConnectionInformation.Tenant});
request.Headers.Add(new MultitenancyHeader { Tenant = ConnectionInformation.Tenant});
return null;
}
}

View File

@@ -7,7 +7,7 @@
AllowsTransparency="True"
Background="Transparent" ResizeMode="NoResize" >
<Grid>
<GroupBox Style="{StaticResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Header="Download" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<GroupBox Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Header="Download" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />

View File

@@ -21,7 +21,7 @@ namespace BeWo
{
InitializeComponent();
InitCommandBindings();
Owner = GetWindow(BeWoApp.MainView.ActiveView);
Owner = GetWindow(MainSession.MainPage.ActiveView);
Question = fileName;
DataContext = this;
}

View File

@@ -44,7 +44,7 @@ namespace BeWo
var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
if (!File.Exists(filePath))
{
filePath = System.IO.Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
filePath = System.IO.Path.Combine(MainSession.GetAndCreateUserAppDataPath(), "proxy.dat");
}
var file = new System.IO.StreamReader(filePath);
@@ -83,7 +83,7 @@ namespace BeWo
var filePath = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\proxy.dat";
if (!File.Exists(filePath))
{
filePath = System.IO.Path.Combine(BeWoApp.GetAndCreateUserAppDataPath(), "proxy.dat");
filePath = System.IO.Path.Combine(MainSession.GetAndCreateUserAppDataPath(), "proxy.dat");
}
using (System.IO.StreamWriter file =

View File

@@ -7,7 +7,7 @@
ResizeMode="NoResize">
<Grid>
<GroupBox Header="Passwort anfordern" Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" MouseLeftButtonDown="RootGroupBox_OnMouseLeftButtonDown">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />

View File

@@ -3,8 +3,8 @@ using System.Windows;
using System.Windows.Input;
using BeWo.ServiceProxy;
using BeWoLauncher.Cache;
using BS.Shared.Extensions;
using BS.SharedLauncher.Information;
namespace BeWo
{

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
namespace BeWo.Scheduler
{
public interface IBeWoAppointment
public interface IMainSessionointment
{
object Id { get; set; }

View File

@@ -23,7 +23,7 @@ namespace BeWo.Scheduler
Dictionary<ValueListEntryDC, List<ResourceDC>> Categories2Resources { get; }
BindingList<IBeWoAppointment> Appointments { get; }
BindingList<IMainSessionointment> Appointments { get; }
Dictionary<Guid, Dictionary<string, Dictionary<string, object>>> ChangedOccurenceCustomFields { get; }

View File

@@ -10,8 +10,8 @@
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
<Grid Width="Auto" Height="Auto" x:Name="root">
<GroupBox x:Name="rootGroupBox" Style="{StaticResource PopUpWindowStyle}" Header="Mitarbeiterverfügbarkeit">
<Grid Margin="0,3,0,0" Background="{StaticResource ObjectEditBackgroundBrush}">
<GroupBox x:Name="rootGroupBox" Style="{DynamicResource PopUpWindowStyle}" Header="Mitarbeiterverfügbarkeit">
<Grid Margin="0,3,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />

File diff suppressed because it is too large Load Diff

View File

@@ -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<CompactEmployeeDC> { BeWoApp.CompactLoggedOnEmployee };
allEmployees = new List<CompactEmployeeDC> { 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<long>();
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<Employee2SchedulerAppointmentDC>(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<long> pSelectedEmployees, List<long> pSelectedCustomer, List<long> 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<CompactEmployeeDC>{BeWoApp.CompactLoggedOnEmployee};
CheckBoxConverter.AktuellerMitarbeiter = BeWoApp.CompactLoggedOnEmployee;
SelectedEmployees = new List<CompactEmployeeDC>{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, bool>
{
{
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));
}

View File

@@ -33,7 +33,7 @@
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ListView x:Name="OTListView" Grid.Column="0" MinWidth="120" SelectionMode="Single" Margin="3" ItemsSource="{Binding Path=OffeneTermine, UpdateSourceTrigger=PropertyChanged}" MaxWidth="300" SelectionChanged="Selector_OnSelected" Background="{StaticResource NavigationContentBrush}" SelectedIndex="0">
<ListView x:Name="OTListView" Grid.Column="0" MinWidth="120" SelectionMode="Single" Margin="3" ItemsSource="{Binding Path=OffeneTermine, UpdateSourceTrigger=PropertyChanged}" MaxWidth="300" SelectionChanged="Selector_OnSelected" Background="{DynamicResource NavigationContentBrush}" SelectedIndex="0">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, AncestorType={x:Type ItemsControl}, Mode=FindAncestor}}" />

View File

@@ -46,10 +46,10 @@ namespace BeWo.Scheduler.View
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public ObservableCollection<IBeWoAppointment> OffeneTermine { get; set; }
public ObservableCollection<IMainSessionointment> OffeneTermine { get; set; }
private IBeWoAppointment _selektierterTermin;
public IBeWoAppointment SelektierterTermin
private IMainSessionointment _selektierterTermin;
public IMainSessionointment SelektierterTermin
{
get => _selektierterTermin;
set
@@ -59,14 +59,14 @@ namespace BeWo.Scheduler.View
}
}
public RequestAnswerView(IEnumerable<IBeWoAppointment> appointments, IEnumerable<IBeWoAppointment> statusUpdates)
public RequestAnswerView(IEnumerable<IMainSessionointment> appointments, IEnumerable<IMainSessionointment> statusUpdates)
{
var statusUpdatesAsAppointments = new List<IBeWoAppointment>();
var statusUpdatesAsAppointments = new List<IMainSessionointment>();
foreach(var beWoAppointment in statusUpdates)
foreach(var MainSessionointment in statusUpdates)
{
var item = (SchedulerAppointmentVM) beWoAppointment;
foreach(var relation in item.EmployeeList.Where(emp => emp.IsPChanged && emp.ParticipationAnswer != ParticipationAnswer.Offen && emp.ParticipationAnswer != ParticipationAnswer.Verstrichen && !emp.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid)))
var item = (SchedulerAppointmentVM) MainSessionointment;
foreach(var relation in item.EmployeeList.Where(emp => emp.IsPChanged && emp.ParticipationAnswer != ParticipationAnswer.Offen && emp.ParticipationAnswer != ParticipationAnswer.Verstrichen && !emp.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid)))
{
if(statusUpdatesAsAppointments.All(a => a.LabelId != relation.Employee2SchedulerAppointmentOid))
{
@@ -79,7 +79,7 @@ namespace BeWo.Scheduler.View
}
OffeneTermine = appointments.ToObservableCollection();
OffeneTermine.AddRange(new List<IBeWoAppointment>(statusUpdatesAsAppointments));
OffeneTermine.AddRange(new List<IMainSessionointment>(statusUpdatesAsAppointments));
DataContext = this;
InitializeComponent();
@@ -121,7 +121,7 @@ namespace BeWo.Scheduler.View
private void Selector_OnSelected(object sender, RoutedEventArgs e)
{
var lv = (ListView) sender;
SelektierterTermin = (IBeWoAppointment) lv.SelectedItem;
SelektierterTermin = (IMainSessionointment) lv.SelectedItem;
}
private void Zusagen_OnClick(object sender, RoutedEventArgs e)
@@ -146,7 +146,7 @@ namespace BeWo.Scheduler.View
{
termin.EmployeeList.DoForEach(e =>
{
if (e.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid))
if (e.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid))
{
e.ParticipationAnswer = antwort;
}
@@ -218,17 +218,17 @@ namespace BeWo.Scheduler.View
private void OK_OnClick(object sender, RoutedEventArgs e)
{
SelektierterTermin = OTListView.SelectedItem as IBeWoAppointment;
SelektierterTermin = OTListView.SelectedItem as IMainSessionointment;
if(_selektierterTermin != null && _selektierterTermin.Start < DateTime.Now && _selektierterTermin.End < DateTime.Now)
{
if(SelektierterTermin != null && BeWoApp.LoggedOnEmployee.EmployeeOid.HasValue)
if(SelektierterTermin != null && MainSession.LoggedOnEmployee.EmployeeOid.HasValue)
{
var customFieldStorage = (CustomFieldStorage) SelektierterTermin.CustomFields[nameof(CustomFieldStorage)];
var emp2App = customFieldStorage.EmployeeList.ToList().Find(f => f.Employee2SchedulerAppointmentOid == SelektierterTermin.LabelId) ??
customFieldStorage.EmployeeList.ToList().Find(f => f.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value);
customFieldStorage.EmployeeList.ToList().Find(f => f.Employee.EmployeeOid == MainSession.LoggedOnEmployee.EmployeeOid.Value);
if(emp2App.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid.Value)
if(emp2App.Employee.EmployeeOid == MainSession.LoggedOnEmployee.EmployeeOid.Value)
{
emp2App.ParticipationAnswer = ParticipationAnswer.Verstrichen;
}
@@ -277,7 +277,7 @@ namespace BeWo.Scheduler.View
private void RequestAnswerView_OnClosing(object sender, CancelEventArgs e)
{
BeWoApp.MainView.AufOffeneTerminePruefen();
MainSession.MainPage.AufOffeneTerminePruefen();
}
}
@@ -285,7 +285,7 @@ namespace BeWo.Scheduler.View
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var app = (IBeWoAppointment) value;
var app = (IMainSessionointment) value;
if(app == null)
{
@@ -334,7 +334,7 @@ namespace BeWo.Scheduler.View
return null;
}
var app = (IBeWoAppointment)value;
var app = (IMainSessionointment)value;
var customFieldStorage = (CustomFieldStorage) app.CustomFields[nameof(CustomFieldStorage)];
var originator = customFieldStorage.Originator;

View File

@@ -39,7 +39,7 @@
</Border>
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="25" Background="{StaticResource SupportConceptContentBrush}">
<Border x:Name="ItemContent" CornerRadius="5" MinHeight="25" Background="{DynamicResource SupportConceptContentBrush}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="5,3,5,3" OpacityMask="{x:Null}" SnapsToDevicePixels="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
@@ -316,10 +316,10 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox IsReadOnly="True" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding CountSelectedEmployees, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" Margin="0" />
<ToggleButton Grid.Column="1" x:Name="MitarbeiterToggleButton" IsThreeState="False" Margin="0,0,2,0" Height="19" Width="19" ToolTip="Ausgewählte Mitarbeiter anzeigen" Style="{StaticResource ExpanderLookAlikeToggleBotton}"/>
<ToggleButton Grid.Column="1" x:Name="MitarbeiterToggleButton" IsThreeState="False" Margin="0,0,2,0" Height="19" Width="19" ToolTip="Ausgewählte Mitarbeiter anzeigen" Style="{DynamicResource ExpanderLookAlikeToggleBotton}"/>
</Grid>
<Popup Grid.Column="1" Grid.Row="5" Margin="10" Name="PopupEmployee" StaysOpen="False" Placement="MousePoint" Width="450" Height="300" >
<search:MultiEmployeeSearch x:Name="MultiEmployeeSearch" ResultListBackground="{StaticResource EmployeeListBrush}" SelectionChanged="MultiEmployeeSearch_OnSelectionChanged" SelectedEmployees="{Binding Controller.EmployeeList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<search:MultiEmployeeSearch x:Name="MultiEmployeeSearch" ResultListBackground="{DynamicResource EmployeeListBrush}" SelectionChanged="MultiEmployeeSearch_OnSelectionChanged" SelectedEmployees="{Binding Controller.EmployeeList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
</Popup>
<Button x:Name="MitarbeiterPopUpOeffnenBtn" Grid.Column="4" Grid.Row="5" Width="20" Height="20" Margin="3,0,3,0" VerticalAlignment="Center" Click="EmployeePopupClick">
<Grid Width="18" HorizontalAlignment="Center" VerticalAlignment="Center">
@@ -327,7 +327,7 @@
<Line X1="8" X2="8" Y1="4" Y2="12" Fill="{x:Null}" Stroke="#FFFFFFFF" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" />
</Grid>
</Button>
<ListBox Grid.Column="1" Grid.Row="6" Background="{StaticResource ObjectEditBackgroundBrush}" Margin="4,0,1,4" ItemsSource="{Binding Path=SelectedEmployees, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True"
<ListBox Grid.Column="1" Grid.Row="6" Background="{DynamicResource ObjectEditBackgroundBrush}" Margin="4,0,1,4" ItemsSource="{Binding Path=SelectedEmployees, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Grid.ColumnSpan="3" x:Name="SelectedMitarbeiter"
ItemContainerStyle="{DynamicResource MultiElementSelectionControlStyle}" MaxHeight="70" Height="70"
Visibility="{Binding IsChecked, ElementName=MitarbeiterToggleButton, Converter={StaticResource BoolVisibilityConverter}}">
@@ -351,7 +351,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox IsReadOnly="True" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding CountSelectedCustomers, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
<ToggleButton Grid.Column="1" x:Name="KlientenToggleButton" IsThreeState="False" Margin="0,0,2,0" Height="19" Width="19" ToolTip="Ausgewählte Klienten anzeigen" Style="{StaticResource ExpanderLookAlikeToggleBotton}"/>
<ToggleButton Grid.Column="1" x:Name="KlientenToggleButton" IsThreeState="False" Margin="0,0,2,0" Height="19" Width="19" ToolTip="Ausgewählte Klienten anzeigen" Style="{DynamicResource ExpanderLookAlikeToggleBotton}"/>
</Grid>
<Button x:Name="KlientenPopUpOeffnenBtn" Grid.Column="4" Grid.Row="7" Width="20" Height="20" Margin="3,0,3,0" VerticalAlignment="Center" Click="CustomerPopUpEditClick">
<Grid Width="18" HorizontalAlignment="Center" VerticalAlignment="Center">
@@ -360,9 +360,9 @@
</Grid>
</Button>
<Popup Grid.Column="1" Grid.Row="7" Margin="10" Name="CustomerSearchViewPopup" StaysOpen="False" Placement="MousePoint" Width="450" Height="300" >
<search:MultiCustomerSearchView x:Name="MultiCustomerSearch" ResultListBackground="{StaticResource CustomerListBrush}" SelectionChanged="MultiCustomerSearch_OnSelectionChanged" SelectedCustomers="{Binding Controller.CustomerList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
<search:MultiCustomerSearchView x:Name="MultiCustomerSearch" ResultListBackground="{DynamicResource CustomerListBrush}" SelectionChanged="MultiCustomerSearch_OnSelectionChanged" SelectedCustomers="{Binding Controller.CustomerList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
</Popup>
<ListBox Grid.Column="1" Grid.Row="8" Background="{StaticResource ObjectEditBackgroundBrush}" Margin="4,0,1,4" ItemsSource="{Binding Path=SelectedCustomers, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True"
<ListBox Grid.Column="1" Grid.Row="8" Background="{DynamicResource ObjectEditBackgroundBrush}" Margin="4,0,1,4" ItemsSource="{Binding Path=SelectedCustomers, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Grid.ColumnSpan="3"
ItemContainerStyle="{DynamicResource MultiElementSelectionControlStyle}" MaxHeight="70" Height="70" x:Name="SelectedCustomersListBox"
Visibility="{Binding IsChecked, ElementName=KlientenToggleButton, Converter={StaticResource BoolVisibilityConverter}}">
@@ -386,7 +386,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox IsReadOnly="True" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding CountSelectedResources, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" />
<ToggleButton Grid.Column="1" x:Name="RessourcenToggleButton" IsThreeState="False" Margin="0,0,2,0" Height="19" Width="19" ToolTip="Ausgewählte Ressourcen anzeigen" Style="{StaticResource ExpanderLookAlikeToggleBotton}"/>
<ToggleButton Grid.Column="1" x:Name="RessourcenToggleButton" IsThreeState="False" Margin="0,0,2,0" Height="19" Width="19" ToolTip="Ausgewählte Ressourcen anzeigen" Style="{DynamicResource ExpanderLookAlikeToggleBotton}"/>
</Grid>
<Button x:Name="RessourcenPopUpOeffnenBtn" Grid.Column="4" Grid.Row="9" Width="20" Height="20" Margin="3,0,3,0" VerticalAlignment="Center" Click="ResourcePopUpClick">
<Grid Width="18" HorizontalAlignment="Center" VerticalAlignment="Center">
@@ -395,11 +395,11 @@
</Grid>
</Button>
<Popup Grid.Column="1" Grid.Row="9" Margin="10" Name="PopupResource" StaysOpen="False" Placement="MousePoint" Width="450" Height="300">
<search:ResourcesTreeSearchView x:Name="ResourcesTreeSearchView" ResultListBackground="{StaticResource ResourceContentBrush}" SelectionChanged="ResourcesTreeSearchView_OnSelectionChanged" SelectedResources="{Binding Controller.ResourceList}" />
<search:ResourcesTreeSearchView x:Name="ResourcesTreeSearchView" ResultListBackground="{DynamicResource ResourceContentBrush}" SelectionChanged="ResourcesTreeSearchView_OnSelectionChanged" SelectedResources="{Binding Controller.ResourceList}" />
</Popup>
<ListBox Grid.Column="1" Grid.Row="10" Background="{StaticResource ObjectEditBackgroundBrush}" Margin="4,0,1,4" ItemsSource="{Binding Path=SelectedResources}" IsSynchronizedWithCurrentItem="True"
<ListBox Grid.Column="1" Grid.Row="10" Background="{DynamicResource ObjectEditBackgroundBrush}" Margin="4,0,1,4" ItemsSource="{Binding Path=SelectedResources}" IsSynchronizedWithCurrentItem="True"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Grid.ColumnSpan="3"
ItemContainerStyle="{StaticResource MultiResourceSelectionControlStyle}" MaxHeight="70" Height="70"
ItemContainerStyle="{DynamicResource MultiResourceSelectionControlStyle}" MaxHeight="70" Height="70"
Visibility="{Binding IsChecked, ElementName=RessourcenToggleButton, Converter={StaticResource BoolVisibilityConverter}}">
<ListBox.Template>
<ControlTemplate TargetType="{x:Type ListBox}">
@@ -426,7 +426,7 @@
</Popup>
<ListBox Grid.Column="1" Grid.Row="11" Background="White" Margin="4,0,1,4" ItemsSource="{Binding Path=SelectedSupportConcepts, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsSynchronizedWithCurrentItem="True"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Stretch" Grid.ColumnSpan="3" Name="SelectedSupportConceptsListBox"
ItemContainerStyle="{StaticResource MultiSupportConceptSelectionControlStyle}" MaxHeight="35" Height="35" Visibility="Collapsed">
ItemContainerStyle="{DynamicResource MultiSupportConceptSelectionControlStyle}" MaxHeight="35" Height="35" Visibility="Collapsed">
<ListBox.Template>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">

View File

@@ -142,7 +142,7 @@ namespace BeWo.Scheduler.View
CurrentAppointment = appointment;
IsNew = Controller.IsNewAppointment;
IsOwnAppointment = Equals(BeWoApp.CompactLoggedOnEmployee, NewSchedulerAppointmentFormController.Originator) && (NewSchedulerAppointmentFormController.EmployeeList?.Count == 0 || NewSchedulerAppointmentFormController.EmployeeList.Any(a => Equals(a.Employee, BeWoApp.CompactLoggedOnEmployee)));
IsOwnAppointment = Equals(MainSession.CompactLoggedOnEmployee, NewSchedulerAppointmentFormController.Originator) && (NewSchedulerAppointmentFormController.EmployeeList?.Count == 0 || NewSchedulerAppointmentFormController.EmployeeList.Any(a => Equals(a.Employee, MainSession.CompactLoggedOnEmployee)));
IsInTaskViewMode = pIsInTaskViewMode;
@@ -181,9 +181,9 @@ namespace BeWo.Scheduler.View
EdtRecurrenceType.CustomDisplayText += EdtRecurrenceType_CustomDisplayText;
if(IsInTaskViewMode && !SelectedEmployees.Any(a => a.Employee.Equals(BeWoApp.CompactLoggedOnEmployee)))
if(IsInTaskViewMode && !SelectedEmployees.Any(a => a.Employee.Equals(MainSession.CompactLoggedOnEmployee)))
{
SelectedEmployees.Add(new Employee2SchedulerAppointmentDC { Employee = BeWoApp.CompactLoggedOnEmployee });
SelectedEmployees.Add(new Employee2SchedulerAppointmentDC { Employee = MainSession.CompactLoggedOnEmployee });
MitarbeiterToggleButton.IsChecked = true;
}
@@ -242,7 +242,7 @@ namespace BeWo.Scheduler.View
// --------------------------------------------------------------------
var checkType = IsNew ? SchedulerRightsCheckType.Create : SchedulerRightsCheckType.Edit;
var allowedToChange = BS.Shared.Core.Utils.CheckSchedulerRights(SelectedCustomers.ToList(), SelectedResources.ToList(), SelectedEmployees.ToList(), NewSchedulerAppointmentFormController.Originator, IsNew, checkType, BeWoApp.LoggedOnUser);
var allowedToChange = BS.Shared.Core.Utils.CheckSchedulerRights(SelectedCustomers.ToList(), SelectedResources.ToList(), SelectedEmployees.ToList(), NewSchedulerAppointmentFormController.Originator, IsNew, checkType, MainSession.LoggedOnUser);
if(IsInTaskViewMode)
{

View File

@@ -35,8 +35,8 @@ namespace BeWo.Scheduler.ViewModel
return settings;
}
private BindingList<IBeWoAppointment> _AppointmentList;
public BindingList<IBeWoAppointment> Appointments
private BindingList<IMainSessionointment> _AppointmentList;
public BindingList<IMainSessionointment> Appointments
{
get
{
@@ -45,7 +45,7 @@ namespace BeWo.Scheduler.ViewModel
return _AppointmentList;
}
_AppointmentList = new BindingList<IBeWoAppointment>();
_AppointmentList = new BindingList<IMainSessionointment>();
_AppointmentList.AddingNew += AppointmentListAddingNew;
foreach (var item in VMList)
@@ -108,7 +108,7 @@ namespace BeWo.Scheduler.ViewModel
item.Id = item.DataContract.SchedulerAppointmentOid;
if (!item.IsPrivate || item.Originator.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) || item.EmployeeList.Select(s => s.Employee).Contains(BeWoApp.CompactLoggedOnEmployee))
if (!item.IsPrivate || item.Originator.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid) || item.EmployeeList.Select(s => s.Employee).Contains(MainSession.CompactLoggedOnEmployee))
{
continue;
}
@@ -426,14 +426,14 @@ namespace BeWo.Scheduler.ViewModel
{
appointment.StatusId = 0;
appointment.CustomFields[nameof(CustomFieldStorage)] = new CustomFieldStorage { Originator = BeWoApp.CompactLoggedOnEmployee };
appointment.CustomFields[nameof(CustomFieldStorage)] = new CustomFieldStorage { Originator = MainSession.CompactLoggedOnEmployee };
}
public void InitNewTask(Appointment pAppointment, DateTime? pDueDate, IEnumerable<Employee2SchedulerAppointmentDC> pSelectedEmployees, List<CompactCustomerDC> pSelectedCustomers, List<ResourceDC> pSelectedResources, List<CompactSupportConceptDC> pSelectedSupportConcepts)
{
pAppointment.CustomFields[nameof(CustomFieldStorage)] = new CustomFieldStorage
{
Originator = BeWoApp.CompactLoggedOnEmployee,
Originator = MainSession.CompactLoggedOnEmployee,
EmployeeList = new ObservableCollection<Employee2SchedulerAppointmentDC>(pSelectedEmployees ?? new List<Employee2SchedulerAppointmentDC>()),
CustomerList = pSelectedCustomers ?? new List<CompactCustomerDC>(),
ResourceList = pSelectedResources ?? new List<ResourceDC>(),
@@ -483,7 +483,7 @@ namespace BeWo.Scheduler.ViewModel
if (isPrivate)
{
if (ersteller == null || !ersteller.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid))
if (ersteller == null || !ersteller.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid))
{
return true;
}
@@ -492,8 +492,8 @@ namespace BeWo.Scheduler.ViewModel
switch (filterCategory)
{
case "NurEigene":
var istEigenerTermin = ersteller != null && ersteller.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid) && employeeList != null && employeeList.Count == 0 ||
employeeList != null && employeeList.Any(a => a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid));
var istEigenerTermin = ersteller != null && ersteller.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid) && employeeList != null && employeeList.Count == 0 ||
employeeList != null && employeeList.Any(a => a.Employee.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid));
wirdAngezeigt = istEigenerTermin;
@@ -522,7 +522,7 @@ namespace BeWo.Scheduler.ViewModel
// Ersteller und Rechte beachten
var istEigen = ersteller.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid);
var istEigen = ersteller.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid);
var mVorhanden = appEList.Any(a2app => _AllEmployees.Contains(a2app.Employee));
var kVorhanden = customerList.Any(_AllCustomers.Contains);
@@ -530,17 +530,17 @@ namespace BeWo.Scheduler.ViewModel
wirdAngezeigt = liste[0] && mVorhanden || liste[1] && resourceList.Any() || liste[2] && kVorhanden;
// Nur Ansehen
if (!istEigen && !BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen) && liste[0] && mVorhanden && !appEList.Select(e2sa => e2sa.Employee).Any(a => a.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid)))
if (!istEigen && !MainSession.LoggedOnUser.HasRight(UserRightType.KalenderMitarbeitertermineAnsehen) && liste[0] && mVorhanden && !appEList.Select(e2sa => e2sa.Employee).Any(a => a.EmployeeOid.Equals(MainSession.LoggedOnEmployee.EmployeeOid)))
{
wirdAngezeigt = false;
}
if (!istEigen && !BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen) && liste[2] && kVorhanden)
if (!istEigen && !MainSession.LoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen) && liste[2] && kVorhanden)
{
wirdAngezeigt = false;
}
if (!istEigen && !BeWoApp.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAnsehen) && liste[1] && resourceList.Any())
if (!istEigen && !MainSession.LoggedOnUser.HasRight(UserRightType.KalenderRessourcentermineAnsehen) && liste[1] && resourceList.Any())
{
wirdAngezeigt = false;
}

View File

@@ -12,7 +12,7 @@ using BS.Shared.Extensions;
namespace BeWo.Scheduler.ViewModel
{
public class SchedulerAppointmentVM : AbstractDCMapperVM<SchedulerAppointmentDC>, IBeWoAppointment
public class SchedulerAppointmentVM : AbstractDCMapperVM<SchedulerAppointmentDC>, IMainSessionointment
{
public static string PropertyName_Type = "Type";
public static string PropertyName_Start = "Start";

View File

@@ -22,7 +22,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Grid.ColumnSpan="1" Padding="5" Style="{StaticResource ObjectEditGroupBox}" Header="Schulbegleitender Dienst">
<GroupBox Grid.ColumnSpan="1" Padding="5" Style="{DynamicResource ObjectEditGroupBox}" Header="Schulbegleitender Dienst">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -48,7 +48,7 @@
<TextBox Grid.Row="4" Grid.Column="1" Margin="3" Height="23" Text="{Binding Path=Schutzstufe, UpdateSourceTrigger=PropertyChanged}" />
</Grid>
</GroupBox>
<GroupBox Header="Vertretungs-Einstellungen" Style="{StaticResource ObjectEditGroupBox}" Grid.Column="0" Grid.Row="1" Visibility="Visible" x:Name="VertretungsEinstellungen" Margin="0,10,0,0">
<GroupBox Header="Vertretungs-Einstellungen" Style="{DynamicResource ObjectEditGroupBox}" Grid.Column="0" Grid.Row="1" Visibility="Visible" x:Name="VertretungsEinstellungen" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -73,7 +73,7 @@
EditValue="{Binding Path=AbWelchemKrankheitsTag, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource Int2DecimalConverter}}" />
</Grid>
</GroupBox>
<GroupBox Header="Wunschkriterien" Grid.Column="0" Grid.Row="2" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Header="Wunschkriterien" Grid.Column="0" Grid.Row="2" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -97,7 +97,7 @@
</dxe:ComboBoxEdit>
</Grid>
</GroupBox>
<GroupBox Header="Ausschlusskriterien" Grid.Column="1" Grid.Row="2" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Header="Ausschlusskriterien" Grid.Column="1" Grid.Row="2" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />

View File

@@ -27,7 +27,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<GroupBox Grid.ColumnSpan="1" Padding="5" Style="{StaticResource ObjectEditGroupBox}" Header="Schulbegleitender Dienst">
<GroupBox Grid.ColumnSpan="1" Padding="5" Style="{DynamicResource ObjectEditGroupBox}" Header="Schulbegleitender Dienst">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -60,7 +60,7 @@
</GroupBox>
<GroupBox Header="Wunschkriterien" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Header="Wunschkriterien" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="1" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -86,7 +86,7 @@
</Grid>
</GroupBox>
<GroupBox Header="Ausschlusskriterien" Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Header="Ausschlusskriterien" Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="1" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />

View File

@@ -38,7 +38,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Header="Mitarbeiter Wunsch Kriterien" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<GroupBox Header="Mitarbeiter Wunsch Kriterien" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Style="{DynamicResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<!-- Ready machen für teilweise funktion / Combobox zur auswahl der tokens und TextBox zur anzeige der ausgewählten tokens -->
<Grid>
@@ -62,7 +62,7 @@
</GroupBox>
<GroupBox Header="Mitarbeiter Ausschluss Kriterien" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3">
<GroupBox Header="Mitarbeiter Ausschluss Kriterien" Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Style="{DynamicResource ObjectEditGroupBox}" Margin="3,3,3,3">
<!-- Ready machen für teilweise funktion <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/> <RowDefinition Height="Auto"/>-->
@@ -87,7 +87,7 @@
</GroupBox>
<GroupBox Header="Klient Wunsch Kriterien" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<GroupBox Header="Klient Wunsch Kriterien" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Style="{DynamicResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<!-- ############### wird durch Token Combobox mit devexpress vers. 17 ersetzt ################################## -->
<Grid>
@@ -110,7 +110,7 @@
<!-- ############################################################################################################## -->
</GroupBox>
<GroupBox Header="Klient Ausschluss Kriterien" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<GroupBox Header="Klient Ausschluss Kriterien" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Style="{DynamicResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<!-- ############### wird durch Token Combobox mit devexpress vers. 17 ersetzt ################################## -->
<Grid>
@@ -132,7 +132,7 @@
</GroupBox>
<GroupBox Header="Geschlecht" Grid.Row="0" Grid.Column="4" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3">
<GroupBox Header="Geschlecht" Grid.Row="0" Grid.Column="4" Style="{DynamicResource ObjectEditGroupBox}" Margin="3,3,3,3">
<WrapPanel Orientation="Horizontal">
<CheckBox Content="männlich" Margin="3,3,3,3" Click="RBMaennlich_OnClick" x:Name="RBMaennlich" IsChecked="True"/>
<CheckBox Content="weiblich" Margin="3,3,3,3" Click="RBWeiblich_OnClick" x:Name="RBWeiblich" IsChecked="True" />
@@ -150,7 +150,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<GroupBox Grid.Row="0" Margin="1" Style="{StaticResource ObjectEditGroupBox}" Header="Klienten PLZ">
<GroupBox Grid.Row="0" Margin="1" Style="{DynamicResource ObjectEditGroupBox}" Header="Klienten PLZ">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
@@ -169,7 +169,7 @@
</Grid>
</GroupBox>
<GroupBox Grid.Row="1" Margin="1" Style="{StaticResource ObjectEditGroupBox}" Header="Suche nach">
<GroupBox Grid.Row="1" Margin="1" Style="{DynamicResource ObjectEditGroupBox}" Header="Suche nach">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
@@ -196,7 +196,7 @@
<!--Bereich einfügen um auszuwählen ob ganzen tag oder nur teilweise -->
<GroupBox Header="Vertretungs Zeitraum" Grid.Row="1" Grid.Column="0" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<GroupBox Header="Vertretungs Zeitraum" Grid.Row="1" Grid.Column="0" Style="{DynamicResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />

View File

@@ -13,7 +13,7 @@
Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True" x:Name="View">
<Grid Width="Auto" Height="Auto">
<uc:ShadowChrome>
<GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
<GroupBox Style="{DynamicResource MainContentGroupBoxStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0,11,0,0">
<Image Source="..\..\Ressources\Icons\CalendarDisabled.png" RenderTransformOrigin="0.5,0.5" Width="32">
@@ -30,7 +30,7 @@
<TextBox Text="Vertretungen" Margin="10,0,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" FontSize="22" BorderBrush="{x:Null}" VerticalAlignment="Stretch" Padding="0,0,0,0" BorderThickness="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,3,0,0" Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Margin="0,3,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -292,7 +292,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{StaticResource ObjectEditGroupBox}" >
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{DynamicResource ObjectEditGroupBox}" >
<dxg:GridControl x:Name="GridDataControlTagesansichtMitarbeiter" Visibility="Visible" Grid.Row="0" Margin="5,5,5,5" >
<dxg:GridControl.Columns >
<dxg:GridColumn FieldName="Employee" Width="125" ReadOnly="True" Header="Mitarbeiter/in">
@@ -347,7 +347,7 @@
</dxg:GridControl>
</GroupBox>
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<dxg:GridControl x:Name="GridDataControlTagesansichtKlient" Visibility="Visible" Margin="5,5,5,5" >
<dxg:GridControl.Columns >
@@ -417,7 +417,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{StaticResource ObjectEditGroupBox}" >
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{DynamicResource ObjectEditGroupBox}" >
<dxg:GridControl x:Name="GridDataControlWochenansichtMitarbeiter" Grid.Row="1" Grid.ColumnSpan="3" AllowDrop="true" Margin="5,5,5,5" VerticalContentAlignment="Center" BorderBrush="Black" >
<dxg:GridControl.Columns >
@@ -570,7 +570,7 @@
</dxg:GridControl>
</GroupBox>
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<dxg:GridControl x:Name="GridDataControlWochenansichtKlient" Grid.Row="2" Grid.ColumnSpan="3" AllowDrop="true" Margin="5,5,5,5" VerticalContentAlignment="Center" BorderBrush="Black" >
<dxg:GridControl.Columns >

View File

@@ -47,7 +47,7 @@
</localView:BeWoView.Resources>
<Grid Width="Auto" Height="Auto">
<uc:ShadowChrome>
<GroupBox Style="{StaticResource MainContentGroupBoxStyle}">
<GroupBox Style="{DynamicResource MainContentGroupBoxStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Margin="0,11,0,0">
<Image Source="..\Ressources\Icons\CalendarDisabled.png" RenderTransformOrigin="0.5,0.5" Width="32">
@@ -63,7 +63,7 @@
<TextBox Text="Vertretungen" Margin="10,0,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" FontSize="22" BorderBrush="{x:Null}" VerticalAlignment="Stretch" Padding="0,0,0,0" BorderThickness="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,3,0,0" Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Margin="0,3,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -259,7 +259,7 @@
</Grid.RowDefinitions>
<!-- Abwesende Mitarbeiter -->
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{StaticResource ObjectEditGroupBox}" >
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{DynamicResource ObjectEditGroupBox}" >
<dxg:GridControl x:Name="GridDataControlTagesansichtMitarbeiter" Visibility="Visible" Margin="5" VerticalContentAlignment="Stretch" ItemsSource="{Binding Path=AbsentEmployeesDayViewList, UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns >
<dxg:GridColumn FieldName="EmployeeName" ReadOnly="True" Header="Mitarbeiter/in" SortOrder="Ascending">
@@ -403,7 +403,7 @@
</GroupBox>
<!-- Abwesende Klienten -->
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<dxg:GridControl x:Name="GridDataControlTagesansichtKlient" Visibility="Visible" Margin="5" VerticalContentAlignment="Stretch" ItemsSource="{Binding Path=AbsentCustomersDayViewList, UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="EmployeeName" ReadOnly="True" Header="Mitarbeiter/in" SortOrder="Ascending">
@@ -533,7 +533,7 @@
</GroupBox>
<!-- Kein Vertretungsbedarf -->
<GroupBox Grid.Row="2" Header="{markup:Translate Kein Vertretungsbedarf}" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox Grid.Row="2" Header="{markup:Translate Kein Vertretungsbedarf}" Style="{DynamicResource ObjectEditGroupBox}">
<dxg:GridControl x:Name="SubstitutionUnwantedDayViewGridControl" AllowDrop="True" Margin="5" BorderBrush="Black" VerticalContentAlignment="Stretch" ItemsSource="{Binding Path=SubstitutionUnwantedDayViewList, UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="EmployeeName" ReadOnly="True" Header="Mitarbeiter/in abwesend" SortOrder="Ascending">
@@ -658,7 +658,7 @@
</Grid.RowDefinitions>
<!-- Wochenansicht Abwesende Mitarbeiter -->
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox Header="{markup:Translate Abwesenheiten Mitarbeiter}" Style="{DynamicResource ObjectEditGroupBox}">
<dxg:GridControl x:Name="GridDataControlWochenansichtMitarbeiter" AllowDrop="true" Margin="5" VerticalContentAlignment="Stretch" BorderBrush="Black" ItemsSource="{Binding AbsentEmployeesWeekViewList, UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="EmployeeName" Header="Mitarbeiter/in" ReadOnly="True" SortOrder="Ascending" AllowBestFit="True">
@@ -962,7 +962,7 @@
</GroupBox>
<!-- Wochenansicht Abwesende Klienten -->
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Grid.Row="1" Header="{markup:Translate Abwesenheiten Klienten}" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<dxg:GridControl x:Name="GridDataControlWochenansichtKlient" AllowDrop="true" Margin="5" VerticalContentAlignment="Stretch" BorderBrush="Black" ItemsSource="{Binding AbsentCustomersWeekViewList, UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns >
<dxg:GridColumn FieldName="EmployeeName" Header="Mitarbeiter/in" ReadOnly="True" SortOrder="Ascending" AllowBestFit="True">
@@ -1158,7 +1158,7 @@
</GroupBox>
<!-- Wochenansicht Kein Vertretungsbedarf -->
<GroupBox Grid.Row="2" Header="{markup:Translate Kein Vertretungsbedarf}" Style="{StaticResource ObjectEditGroupBox}" Margin="0,10,0,0">
<GroupBox Grid.Row="2" Header="{markup:Translate Kein Vertretungsbedarf}" Style="{DynamicResource ObjectEditGroupBox}" Margin="0,10,0,0">
<dxg:GridControl AllowDrop="True" Margin="5" VerticalContentAlignment="Stretch" BorderBrush="Black"
x:Name="SubstitutionUnwantedWeekViewGridControl" ItemsSource="{Binding SubstitutionUnwantedWeekViewList, UpdateSourceTrigger=PropertyChanged}">
<dxg:GridControl.Columns>

View File

@@ -9,11 +9,11 @@ using System.Windows.Navigation;
using BeWo.Core;
using BeWo.ServiceProxy;
using BeWo.ViewModel;
using BeWoLauncher.Cache;
using BS.Shared.Core;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Extensions;
using BS.SharedLauncher.Information;
using DevExpress.Xpf.Bars;
using DevExpress.Xpf.Editors;
using DevExpress.Xpf.Grid;

View File

@@ -103,7 +103,7 @@
<ListBox Grid.Row="0" Grid.Column="6" Width="200" Grid.RowSpan="2" Margin="3" x:Name="ListBoxLetzteVertreter" LostFocus="LetzteVertreter_OnLostFocus" SelectionChanged="LetzteVertreter_OnSelectionChanged" />
</Grid>
</GroupBox>
<GroupBox Header="Filter" Grid.Row="2" Grid.Column="0" Style="{StaticResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<GroupBox Header="Filter" Grid.Row="2" Grid.Column="0" Style="{DynamicResource ObjectEditGroupBox}" Margin="3,3,3,3" >
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />

View File

@@ -15,7 +15,7 @@
</Grid.RowDefinitions>
<WrapPanel Orientation="Horizontal">
<GroupBox Header="Stundensätze" Style="{StaticResource ObjectEditGroupBox}" MaxWidth="400">
<GroupBox Header="Stundensätze" Style="{DynamicResource ObjectEditGroupBox}" MaxWidth="400">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -55,7 +55,7 @@
</Grid>
</GroupBox>
<GroupBox Header="Feiertage" Style="{StaticResource ObjectEditGroupBox}" MaxWidth="400">
<GroupBox Header="Feiertage" Style="{DynamicResource ObjectEditGroupBox}" MaxWidth="400">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />

View File

@@ -7,6 +7,7 @@ using System.Windows.Data;
using BeWo.Converter;
using BS.Shared;
using BS.SharedLauncher.Information;
namespace BeWo.Security
{
@@ -31,13 +32,13 @@ namespace BeWo.Security
[TypeConverter(typeof(UserRightTypeArrayConverter))]
public static void SetEnabledDemands(FrameworkElement element, UserRightType[] value)
{
element.SetBinding(UIElement.IsEnabledProperty, new Binding("LoggedOnUsersRights") { Source = BeWoApp.CurrentBeWo, Converter = new Right2IsEnabledConverter(), ConverterParameter = value });
element.SetBinding(UIElement.IsEnabledProperty, new Binding("LoggedOnUsersRights") { Source = MainSessionSingleton.Instance, Converter = new Right2IsEnabledConverter(), ConverterParameter = value });
}
[TypeConverter(typeof(UserRightTypeArrayConverter))]
public static void SetVisibleDemands(FrameworkElement element, UserRightType[] value)
{
element.SetBinding(UIElement.VisibilityProperty, new Binding("LoggedOnUsersRights") { Source = BeWoApp.CurrentBeWo, Converter = new Right2VisibilityConverter(), ConverterParameter = value });
element.SetBinding(UIElement.VisibilityProperty, new Binding("LoggedOnUsersRights") { Source = MainSessionSingleton.Instance, Converter = new Right2VisibilityConverter(), ConverterParameter = value });
}
}
@@ -45,7 +46,7 @@ namespace BeWo.Security
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return BeWoApp.HasLoggedOnUserRight((UserRightType[])parameter) ? Visibility.Visible : Visibility.Collapsed;
return MainSession.HasLoggedOnUserRight((UserRightType[])parameter) ? Visibility.Visible : Visibility.Collapsed;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
@@ -58,7 +59,7 @@ namespace BeWo.Security
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return BeWoApp.HasLoggedOnUserRight((UserRightType[])parameter);
return MainSession.HasLoggedOnUserRight((UserRightType[])parameter);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

View File

@@ -1,4 +1,5 @@
using System.ServiceModel;
using BS.SharedLauncher.Information;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
@@ -12,7 +13,7 @@ namespace BeWo.Security
public object BeforeSendRequest(ref Message request, IClientChannel channel)
{
request.Headers.Add(new SecurityHeader { Username = BeWoLauncher.Cache.ConnectionInformation.Username, Password = BeWoLauncher.Cache.ConnectionInformation.Userpassword });
request.Headers.Add(new SecurityHeader { Username = ConnectionInformation.Username, Password = ConnectionInformation.Password });
return null;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -12,6 +12,7 @@ using BeWo.Security;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.DataContracts.Compact;
using BS.SharedLauncher.Information;
namespace BeWo.ServiceProxy
{
@@ -38,7 +39,6 @@ namespace BeWo.ServiceProxy
public static void UpdateServerAddresses(String siteOfOrigin)
{
String serverName = siteOfOrigin;
var test = serverName.Substring(serverName.Length - 1, 1);
if (serverName.Substring(serverName.Length - 1, 1) != "/")
@@ -59,7 +59,6 @@ namespace BeWo.ServiceProxy
{ typeof(IAccountingService), new EndpointAddress(serverName + "AccountingService.svc") },
{ typeof(IReportService), new EndpointAddress(serverName + "ReportService.svc") }
};
}
static ServiceFacade()
@@ -545,9 +544,9 @@ namespace BeWo.ServiceProxy
{
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;
}
DoCustomerServiceAsync(
@@ -828,14 +827,14 @@ namespace BeWo.ServiceProxy
if (lClient == null)
{
lClient = new TClient();
//lClient = new TClient();
lClient = ServiceConfig.GetClient<TClient, TInterface>();
if(!_ProxyCache.ContainsKey(lClient.GetType()))
if (!_ProxyCache.ContainsKey(lClient.GetType()))
{
_ProxyCache.Add(typeof(TClient), lClient);
}
lClient.Endpoint.Behaviors.Add(new SecurityHeaderEndpointBehavior());
lClient.Endpoint.Behaviors.Add(new MultitenancyEndpointBehavior());
@@ -858,7 +857,7 @@ namespace BeWo.ServiceProxy
switch (lBeWoFault.FaultType)
{
case BeWoFaultType.Concurrency:
BeWoApp.ShowError(rowUpdated, e, false);
Session.ShowError(rowUpdated, e, false);
break;
case BeWoFaultType.DeleteNotPossible:
MessageBox.Show(lBeWoFault.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Asterisk);
@@ -867,22 +866,22 @@ namespace BeWo.ServiceProxy
MessageBox.Show(lBeWoFault.Message, "Warnung", MessageBoxButton.OK, MessageBoxImage.Asterisk);
return;
case BeWoFaultType.CustomWithoutDetails:
BeWoApp.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)
{
BeWoApp.ShowError(rowUpdated, e, false);
Session.ShowError(rowUpdated, e, false);
}
else
{
if (!String.IsNullOrEmpty(lBeWoFault.Message))
{
BeWoApp.ShowError(lBeWoFault.Message, e, true);
Session.ShowError(lBeWoFault.Message, e, true);
}
else
{
BeWoApp.ShowError(null, e, true);
Session.ShowError(null, e, true);
}
}
break;
@@ -890,16 +889,16 @@ namespace BeWo.ServiceProxy
}
else
{
BeWoApp.ShowError(null, e, true);
Session.ShowError(null, e, true);
}
}
private static void StartWaiting()
{
Monitor.Enter(_Lock);
if ((++_RunningAsyncs) == 1 && BeWoApp.MainView != null)
if ((++_RunningAsyncs) == 1 && MainSession.MainPage != null)
{
BeWoApp.MainView.StartWaiting();
MainSession.MainPage.StartWaiting();
}
Monitor.Exit(_Lock);
@@ -908,9 +907,9 @@ namespace BeWo.ServiceProxy
private static void EndWaiting()
{
Monitor.Enter(_Lock);
if ((--_RunningAsyncs) == 0 && BeWoApp.MainView != null)
if ((--_RunningAsyncs) == 0 && MainSession.MainPage != null)
{
BeWoApp.MainView.EndWaiting();
MainSession.MainPage.EndWaiting();
}
Monitor.Exit(_Lock);

View File

@@ -1,15 +1,33 @@
using BeWoLauncher;
using BeWoLauncher.StartRoutine;
using BeWo.ServiceProxy;
using BS.SharedLauncher.Information;
using BS.SharedLauncher.Interfaces;
using BS.SharedLauncher.Windows;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace BeWo
{
public class StartRoutine : IStartRoutine
{
public void init(MainWindow main, Application app)
public void OnStartup(IBeWoWindow main, Application app)
{
new BeWoApp(main, app);
//new MainSession(app);
ConnectionInformation.CoreServerAddress = ConnectionInformation.CoreServerAddressOrigin.ToString();
ServiceFacade.UpdateServerAddresses(ConnectionInformation.CoreServerAddress);
MainSession.LoggedOnUser = ServiceFacade.DoUserServiceSync(x => x.LoadUserByNameAndPassword(ConnectionInformation.Username, ConnectionInformation.Password));
MainSession.Mandator = ServiceFacade.DoOperationsServiceSync(x => x.GetMandator());
var dict = new MainDictionary();
app.Resources.MergedDictionaries.Add(dict);
}
}
}
}

View File

@@ -212,7 +212,7 @@
<ControlTemplate TargetType="{x:Type Expander}">
<Border SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
<DockPanel>
<ToggleButton localcore:BeWoWpfUtils.IsExpanderButtonVisible="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}" Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{DynamicResource AnalysisExpanderToggleButton}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top" />
<ToggleButton localcore:BeWoWpfUtils.IsExpanderButtonVisible="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" FocusVisualStyle="{DynamicResource ExpanderHeaderFocusVisual}" Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{DynamicResource AnalysisExpanderToggleButton}" Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" DockPanel.Dock="Top" />
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" x:Name="ExpandSite" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Focusable="false" Visibility="Collapsed" DockPanel.Dock="Bottom" />
</DockPanel>
</Border>
@@ -301,7 +301,7 @@
<DockPanel>
<Border SnapsToDevicePixels="true" Background="Transparent" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,1" DockPanel.Dock="Top">
<ToggleButton localcore:BeWoWpfUtils.IsExpanderButtonVisible="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}"
IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" FocusVisualStyle="{StaticResource ExpanderHeaderFocusVisual}"
IsEnabled="{TemplateBinding localcore:BeWoWpfUtils.IsExpanderButtonVisible}" FocusVisualStyle="{DynamicResource ExpanderHeaderFocusVisual}"
Margin="1" MinHeight="0" MinWidth="0" x:Name="HeaderSite" Style="{DynamicResource TriangleToggleButton}" Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}" ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}"

View File

@@ -111,7 +111,7 @@
<Style TargetType="{x:Type TextBox}">
<Setter Property="BorderThickness" Value="1,1,1,1" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="TextOptions.TextFormattingMode" Value="Display" />
<Style.Triggers>
@@ -132,13 +132,13 @@
<Style TargetType="{x:Type PasswordBox}">
<Setter Property="Padding" Value="3,2,3,0" />
<Setter Property="BorderThickness" Value="1,1,1,1" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
<Style TargetType="{x:Type uc:MaskedTextBox}">
<Setter Property="BorderThickness" Value="1,1,1,1" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="SnapsToDevicePixels" Value="True" />
</Style>
@@ -957,7 +957,7 @@
</Grid>
</Border>
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{DynamicResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
</Grid>
<ControlTemplate.Triggers>
@@ -990,8 +990,8 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="ComboBoxButton" />
</Grid.ColumnDefinitions>
<TextBox Margin="{TemplateBinding Padding}" x:Name="PART_EditableTextBox" Style="{StaticResource ComboBoxEditableTextBox}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" IsReadOnly="{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" />
<ToggleButton Style="{StaticResource ComboBoxTransparentButtonStyle}" Background="{x:Null}" Grid.ColumnSpan="3"
<TextBox Margin="{TemplateBinding Padding}" x:Name="PART_EditableTextBox" Style="{DynamicResource ComboBoxEditableTextBox}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Grid.Column="1" IsReadOnly="{Binding Path=IsReadOnly, RelativeSource={RelativeSource TemplatedParent}}" />
<ToggleButton Style="{DynamicResource ComboBoxTransparentButtonStyle}" Background="{x:Null}" Grid.ColumnSpan="3"
Grid.Column="0"
IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
</Grid>
@@ -1025,10 +1025,10 @@
</ControlTemplate>
<Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ComboBoxFocusVisual}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="1" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
@@ -1095,7 +1095,7 @@
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="0,1" />
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
<Setter Property="Template" Value="{DynamicResource ComboBoxEditableTemplate}" />
</Trigger>
</Style.Triggers>
</Style>
@@ -1683,7 +1683,7 @@
<Style TargetType="{x:Type uc:PopUpEdit}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="3,3,0,0" />
<Setter Property="AllowDrop" Value="true" />
@@ -1731,10 +1731,10 @@
<Style x:Key="{x:Type uc:NullItemComboBox}" TargetType="{x:Type uc:NullItemComboBox}">
<Setter Property="FocusVisualStyle" Value="{StaticResource ComboBoxFocusVisual}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource ComboBoxFocusVisual}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" />
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" />
<Setter Property="BorderBrush" Value="{StaticResource TextBoxBorderBrush}" />
<Setter Property="BorderBrush" Value="{DynamicResource TextBoxBorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="1" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
@@ -1807,7 +1807,7 @@
<Trigger Property="IsEditable" Value="true">
<Setter Property="IsTabStop" Value="false" />
<Setter Property="Padding" Value="0,1" />
<Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}" />
<Setter Property="Template" Value="{DynamicResource ComboBoxEditableTemplate}" />
</Trigger>
</Style.Triggers>
</Style>
@@ -2004,7 +2004,7 @@
<ControlTemplate x:Key="NavigationListBoxTemplate" TargetType="{x:Type ListBox}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
<ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}" Style="{StaticResource MainNavigationScrollViewer}">
<ScrollViewer Focusable="False" Padding="{TemplateBinding Padding}" Style="{DynamicResource MainNavigationScrollViewer}">
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</ScrollViewer>
</Border>
@@ -2012,7 +2012,7 @@
<Style x:Key="NavigationListStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template" Value="{StaticResource NavigationListBoxTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationListBoxTemplate}" />
<Setter Property="Padding" Value="2,0,2,2" />
</Style>
@@ -2206,7 +2206,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -2225,7 +2225,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -2325,7 +2325,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -2345,7 +2345,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -2364,7 +2364,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<Style x:Key="OrganisationDetailStyle" TargetType="{x:Type ListBoxItem}">
@@ -2585,7 +2585,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<Style x:Key="PersonDetailStyle" TargetType="{x:Type ListBoxItem}">
@@ -2919,7 +2919,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
@@ -3019,7 +3019,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3034,7 +3034,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3051,7 +3051,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3067,7 +3067,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3083,7 +3083,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3099,7 +3099,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3116,7 +3116,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3136,7 +3136,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3156,7 +3156,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3172,7 +3172,7 @@
</LinearGradientBrush>
</Style.Resources>
<Setter Property="Template" Value="{StaticResource NavigationGroupTemplate}" />
<Setter Property="Template" Value="{DynamicResource NavigationGroupTemplate}" />
</Style>
<!-- EndRegion -->
@@ -3263,7 +3263,7 @@
<SolidColorBrush x:Key="TabItemHotTextBrush" Color="#FFAB4A07" />
<Style x:Key="ObjectEditTabItemStyle" TargetType="{x:Type TabItem}">
<Setter Property="Foreground" Value="{StaticResource TabItemTextBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TabItemTextBrush}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
@@ -3283,10 +3283,10 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Control.Foreground" TargetName="TabItemText" Value="{StaticResource TabItemHotTextBrush}" />
<Setter Property="Control.Foreground" TargetName="TabItemText" Value="{DynamicResource TabItemHotTextBrush}" />
</Trigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Control.Foreground" TargetName="TabItemText" Value="{StaticResource TabItemSelectedTextBrush}" />
<Setter Property="Control.Foreground" TargetName="TabItemText" Value="{DynamicResource TabItemSelectedTextBrush}" />
<Setter Property="Visibility" TargetName="SelectionMarker" Value="Visible" />
</Trigger>
</ControlTemplate.Triggers>
@@ -3296,12 +3296,12 @@
</Style>
<Style x:Key="ObjectEditTabControl" TargetType="{x:Type TabControl}">
<Setter Property="Foreground" Value="{StaticResource TabItemSelectedTextBrush}" />
<Setter Property="Foreground" Value="{DynamicResource TabItemSelectedTextBrush}" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="ItemContainerStyle" Value="{StaticResource ObjectEditTabItemStyle}" />
<Setter Property="ItemContainerStyle" Value="{DynamicResource ObjectEditTabItemStyle}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
@@ -3370,7 +3370,7 @@
<Style x:Key="ObjectEditGroupBoxHeaderBorderStyle" TargetType="{x:Type Border}">
<Setter Property="TextElement.FontSize" Value="16" />
<Setter Property="TextElement.Foreground" Value="{StaticResource TabItemHotTextBrush}" />
<Setter Property="TextElement.Foreground" Value="{DynamicResource TabItemHotTextBrush}" />
<Setter Property="TextElement.FontFamily" Value="Microsoft Sans Serif" />
<Setter Property="Padding" Value="3,0,3,0" />
<Setter Property="MinHeight" Value="20" />
@@ -3414,7 +3414,7 @@
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Padding" Value="1,0,0,0" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="FocusVisualStyle" Value="{StaticResource TreeViewItemFocusVisual}" />
<Setter Property="FocusVisualStyle" Value="{DynamicResource TreeViewItemFocusVisual}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TreeViewItem}">
@@ -3430,7 +3430,7 @@
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<ToggleButton x:Name="Expander" Style="{StaticResource ExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" />
<ToggleButton x:Name="Expander" Style="{DynamicResource ExpandCollapseToggleStyle}" ClickMode="Press" IsChecked="{Binding Path=IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" />
<Border x:Name="Bd" Margin="0 2" SnapsToDevicePixels="true" Grid.Row="0" Grid.Column="1" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" CornerRadius="5,5,5,5" Background="#FF000000">
<Border.OpacityMask>
@@ -3565,7 +3565,7 @@
</Grid>
</Border>
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{DynamicResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
</Grid>
<ControlTemplate.Triggers>
@@ -3994,7 +3994,7 @@
</Grid>
</Border>
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{DynamicResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
</Grid>
<ControlTemplate.Triggers>
@@ -4080,7 +4080,7 @@
</Grid>
</Border>
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{DynamicResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
</Grid>
<ControlTemplate.Triggers>
@@ -4162,7 +4162,7 @@
</Grid>
</Border>
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{DynamicResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
</Grid>
<ControlTemplate.Triggers>
@@ -4195,7 +4195,7 @@
</Style>
</Setter.Value>
</Setter>
<Setter Property="Foreground" Value="{StaticResource LightOrangeBrush}" />
<Setter Property="Foreground" Value="{DynamicResource LightOrangeBrush}" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Padding" Value="0,0,0,0" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
@@ -4703,7 +4703,7 @@
</Grid>
</Border>
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
<!-- <ToggleButton x:Name="Chrome" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Style="{DynamicResource ComboBoxReadonlyToggleButton}" Grid.ColumnSpan="2" IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>-->
</Grid>
<ControlTemplate.Triggers>

View File

@@ -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;

View File

@@ -7,7 +7,7 @@
AllowsTransparency="True"
Background="Transparent" ResizeMode="NoResize" >
<Grid>
<GroupBox Style="{StaticResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Header="Download" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<GroupBox Style="{DynamicResource MainContentGroupBoxWithoutMaximizeBtnStyle}" Header="Download" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="*" />

View File

@@ -37,7 +37,7 @@ namespace BeWo
{
InitializeComponent();
InitCommandBindings();
Owner = GetWindow(BeWoApp.MainView.ActiveView);
Owner = GetWindow(MainSession.MainPage.ActiveView);
schalter = iterator;
if (schalter == 1)
{

View File

@@ -73,7 +73,7 @@ namespace BeWo.Validation
break;
case ValidationRules.EmptyNoticeInNewServiceRecordsAllowed:
if (BeWoApp.AppSettings.IsServiceRecordNoticeMandatory)
if (MainSession.AppSettings.IsServiceRecordNoticeMandatory)
{
if (pValue is string)
{

View File

@@ -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">
<view:BeWoView.Resources>
<conv:CollectionCountToBoolConverter x:Key="CollectionCountToBoolConverter" />
<conv:CollectionCountToVisibilityConverter x:Key="CollectionCountToVisibilityConverter" />
<conv:BoolVisibilityMultiConverter x:Key="BoolVisibilityMultiConverter" />
<Style x:Key="bargeldkassenListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="Background" Value="#00FFFFFF" />
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
<Setter Property="Background" Value="#00FFFFFF" />
<Setter Property="HorizontalContentAlignment" Value="{Binding Path=HorizontalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="VerticalContentAlignment" Value="{Binding Path=VerticalContentAlignment, RelativeSource={RelativeSource FindAncestor, AncestorLevel=1, AncestorType={x:Type ItemsControl}}}" />
<Setter Property="Padding" Value="2,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBoxItem}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HyperlinkStyle" TargetType="{x:Type Hyperlink}">
<Setter Property="Foreground" Value="#FF2B508B" />
<!--<Style.Triggers>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="HyperlinkStyle" TargetType="{x:Type Hyperlink}">
<Setter Property="Foreground" Value="#FF2B508B" />
<!--<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="#FFAFAFAF" />
</Trigger>
</Style.Triggers>-->
</Style>
</Style>
</view:BeWoView.Resources>
<GroupBox Header="Bargeldkassen" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox Header="Bargeldkassen" Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -256,7 +262,7 @@
SelectedItem="{Binding Path=PreselectedYear, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}, Mode=OneWay}"/>-->
<TextBlock Grid.Row="0" Grid.Column="7" Margin="3" FontSize="14" VerticalAlignment="Center" PreviewMouseLeftButtonDown="KlassenbuchLinkOnPreviewMouseLeftButtonDown" Tag="{Binding}" IsEnabled="{Binding Path=Bargeldtransaktionen.VMList.Count, Converter={StaticResource CollectionCountToBoolConverter}, UpdateSourceTrigger=PropertyChanged}">
<Hyperlink x:Name="LinkKassenbuchDrucken" TargetName="_NewWindow" Style="{StaticResource HyperlinkStyle}">
<Hyperlink x:Name="LinkKassenbuchDrucken" TargetName="_NewWindow" Style="{DynamicResource HyperlinkStyle}">
<Run Text="Kassenbuch drucken" />
</Hyperlink>
</TextBlock>
@@ -264,7 +270,7 @@
<GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="10" x:Name="BlubbTest" Style="{StaticResource ObjectEditGroupBox}" Header="Ein- und Auszahlungen">
<GroupBox Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="10" x:Name="BlubbTest" Style="{DynamicResource ObjectEditGroupBox}" Header="Ein- und Auszahlungen">
<dxg:GridControl Name="grid_bargeldtransaktionen" Tag="{Binding}" MaxWidth="{Binding ElementName=BlubbTest, Path=ActualWidth}" ItemsSource="{Binding Path=Bargeldtransaktionen.VMList}" CustomColumnSort="GridBargeldtransaktionenOnCustomColumnSort">
<dxg:GridControl.Columns>
<dxg:GridColumn Header="" FixedWidth="True" Width="24" ReadOnly="True" Visible="{Binding Path=DarfBargeldtransaktionenBearbeiten, RelativeSource={RelativeSource AncestorType={x:Type view:BargeldkassenView}}}">

View File

@@ -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;

View File

@@ -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">
<localView:BeWoView.Resources>
<ContextMenu x:Key="cm" MenuItem.Click="ContextMenu_Click" Opened="ContextMenu_Opened">
<localView:BeWoView.Resources>
<conv:DownloadURLConverter x:Key="DownloadURLConverter" />
<ContextMenu x:Key="cm" MenuItem.Click="ContextMenu_Click" Opened="ContextMenu_Opened">
<MenuItem Header="Neu" >
<MenuItem.Icon>
<Image Source="..\Ressources\Icons\Add24.png"/>
@@ -49,7 +50,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Grid.ColumnSpan="2" Padding="5" Style="{StaticResource ObjectEditGroupBox}" Header="Neue Datei hochladen">
<GroupBox Grid.ColumnSpan="2" Padding="5" Style="{DynamicResource ObjectEditGroupBox}" Header="Neue Datei hochladen">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -123,14 +124,13 @@
</Grid.ColumnDefinitions>
<Image x:Name="imageFolder" Source="..\Ressources\Icons\Folder.png"/>
<Image x:Name="imageFile" Source="..\Ressources\Icons\Document48.png"/>
<TextBlock x:Name="labelFrom" Grid.Column="1" Text="Datei xyz.txt" Margin="3" />
</Grid>
</Border>
<TextBlock x:Name="labelTo" Grid.Row="1" Grid.ColumnSpan="2" Text="-> Nach verschieben" Margin="3" Foreground="Blue" Opacity="1"/>
</Grid>
</Canvas>
</Canvas>
</Grid>
</localView:BeWoView>

View File

@@ -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;

View File

@@ -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);
}
}
}

View File

@@ -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">
<UserControl.Resources>
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<conv:FilterDCConverter x:Key="FilterDCConverter" />
</UserControl.Resources>
<Grid>
<StackPanel x:Name="ComboBox_TreeView_Imitation" Orientation="Horizontal" Margin="3,0,3,3" Visibility="{Binding Path=PrototypeVM.IsGoalTreeVisible, Converter={StaticResource BoolVisibilityConverter}}">
<TextBox x:Name="Imitationheader" Width="180" HorizontalAlignment="Left" Padding="3" Cursor="Arrow" VerticalContentAlignment="Center" Height="23" IsReadOnly="True" Visibility="{Binding Path=PrototypeVM.IsGoalTreeVisible, Converter={StaticResource BoolVisibilityConverter}}" />
@@ -149,7 +154,7 @@
</Border>
</Popup>
<Popup x:Name="RatingPopup" StaysOpen="False" Placement="MousePoint" Width="400" Height="200" >
<Border Background="{StaticResource ObjectEditBackgroundBrush}">
<Border Background="{DynamicResource ObjectEditBackgroundBrush}">
<StackPanel x:Name="ratingPanel" Orientation="Vertical" Margin="5">
<RadioButton x:Name="RadioButtonNone" Margin="3" FontSize="12" Click="RatingButton_OnClick" Content="Keine Bewertung" IsChecked="True"></RadioButton>

View File

@@ -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">
<UserControl.Resources>
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<conv:FilterDCConverter x:Key="FilterDCConverter" />
</UserControl.Resources>
<Grid>
<StackPanel x:Name="ComboBox_TreeView_Imitation" Orientation="Horizontal" Margin="3,0,3,3"
Visibility="{Binding Path=PrototypeVM.IsGoalTreeVisible, Converter={StaticResource BoolVisibilityConverter}}">

View File

@@ -79,7 +79,7 @@ namespace BeWo.View.Controls
var allCustomers = new List<CompactCustomerDC>();
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)
{

View File

@@ -11,7 +11,7 @@
x:Class="BeWo.View.Controls.GoalRatingControl"
d:DesignHeight="200" d:DesignWidth="300"
mc:Ignorable="d">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />

View File

@@ -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,

View File

@@ -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,

View File

@@ -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<CompactGroupOfPeopleDC> list =

View File

@@ -6,7 +6,7 @@
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:search="clr-namespace:BeWo.View.Search">
<Grid x:Name="RootGrid" Background="{StaticResource ObjectEditBackgroundBrush}" >
<Grid x:Name="RootGrid" Background="{DynamicResource ObjectEditBackgroundBrush}" >
<Grid Margin="5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />

View File

@@ -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();

View File

@@ -21,7 +21,7 @@
</Border>
</ControlTemplate>
<Style x:Key="ServiceRecordListStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template" Value="{StaticResource ServiceRecordListBoxTemplate}" />
<Setter Property="Template" Value="{DynamicResource ServiceRecordListBoxTemplate}" />
<Setter Property="Padding" Value="2,0,2,2" />
</Style>
<Style x:Key="serviceRecordListBoxItemStyle" TargetType="{x:Type ListBoxItem}">

View File

@@ -15,7 +15,7 @@ namespace BeWo.View.Controls
public ServiceRecordPopUp(List<ServiceRecordVM> serviceRecords)
{
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 = serviceRecords;
if (serviceRecords == null || serviceRecords.Count == 0)

View File

@@ -16,7 +16,7 @@
</StackPanel>
<Popup Grid.Row="0" x:Name="TreeViewPopup" AllowsTransparency="True" Width="400"
IsOpen="False" StaysOpen="False" PopupAnimation="Slide">
<Border BorderBrush="Black" BorderThickness="2" Background="{StaticResource TextModuleBrush}">
<Border BorderBrush="Black" BorderThickness="2" Background="{DynamicResource TextModuleBrush}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

View File

@@ -6,7 +6,7 @@
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
mc:Ignorable="d"
Height="Auto" Width="Auto">
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>

View File

@@ -13,6 +13,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using BeWo.ViewModel;
using BS.SharedLauncher.Information;
namespace BeWo.View.Controls
{
@@ -28,7 +29,7 @@ namespace BeWo.View.Controls
{
InitializeComponent();
DataContext = valueListEntry;
ThemeManager.SetTheme(BeWoApp.CurrentBeWo.MainWindow, Theme.Office2010Black);
ThemeManager.SetTheme(Session.GetWindow(), Theme.Office2010Black);
if (valueListEntry == null) return;

View File

@@ -3,11 +3,16 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View"
xmlns:val="clr-namespace:BeWo.Validation" xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:s="clr-namespace:System;assembly=mscorlib" Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
<GroupBox Name="root" Header="Aktuell definierte Abwesenheitskategorien" Style="{StaticResource ObjectEditGroupBox}">
<localView:BeWoView.Resources>
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<conv:Int2DecimalConverter x:Key="Int2DecimalConverter" />
</localView:BeWoView.Resources>
<GroupBox Name="root" Header="Aktuell definierte Abwesenheitskategorien" Style="{DynamicResource ObjectEditGroupBox}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.Resources>
<DataTemplate x:Key="DropDownItemTemplate">

View File

@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:validation="clr-namespace:BeWo.Validation"
xmlns:controls="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
@@ -11,7 +12,7 @@
x:Name="AbsenceTimeViewUserControl"
d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignData Type=AbsenceTimesView}">
<UserControl.Resources>
<conv:BoolVisibilityHiddenConverter x:Key="BoolVisibilityHiddenConverter" />
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
@@ -25,7 +26,7 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Grid.Row="1" Grid.Column="0" x:Name="GroupBoxNewAbsenceTime" Grid.ColumnSpan="2" Header="Abwesenheit hinzufügen" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox Grid.Row="1" Grid.Column="0" x:Name="GroupBoxNewAbsenceTime" Grid.ColumnSpan="2" Header="Abwesenheit hinzufügen" Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -78,7 +79,7 @@
<Button Grid.Row="2" Grid.ColumnSpan="7" Grid.Column="0" Command="{Binding AddAbsenceTimesCommand}" HorizontalAlignment="Right" Margin="1,10,0,3" Style="{DynamicResource {x:Type Button}}" Content="Abwesenheit hinzufügen" />
</Grid>
</GroupBox>
<GroupBox x:Name="GroupBoxAbsenceTimes" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Header="Erfasste Abwesenheiten" Style="{StaticResource ObjectEditGroupBox}">
<GroupBox x:Name="GroupBoxAbsenceTimes" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Header="Erfasste Abwesenheiten" Style="{DynamicResource ObjectEditGroupBox}">
<dxg:GridControl VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="1" ItemsSource="{Binding Path=AbsenceTimes.VMList}" HorizontalAlignment="Stretch" x:Name="DataGridAbsenceTimes">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Notice" Header="" FixedWidth="True" Width="24" ReadOnly="True">

View File

@@ -5,12 +5,15 @@
xmlns:localViewModel="clr-namespace:BeWo.ViewModel"
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:proxy="clr-namespace:BeWo.ServiceProxy"
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: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">
<GroupBox MinHeight="200" Width="800" Style="{StaticResource PopUpWindowStyle}">
<localView:BeWoView.Resources>
<conv:Int2DecimalConverter x:Key="Int2DecimalConverter" />
</localView:BeWoView.Resources>
<GroupBox MinHeight="200" Width="800" Style="{DynamicResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
@@ -19,7 +22,7 @@
</StackPanel>
</GroupBox.Header>
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@@ -43,7 +46,7 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Margin="3 6 3 6" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Header="Rechnungsdetails">
<GroupBox Margin="3 6 3 6" Style="{DynamicResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Header="Rechnungsdetails">
<Grid>
@@ -94,7 +97,7 @@
</GroupBox>
<GroupBox Margin="3 6 6 3" Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}" Header="Empfänger">
<GroupBox Margin="3 6 6 3" Grid.Row="1" Style="{DynamicResource ObjectEditGroupBox}" Header="Empfänger">
<Grid>
@@ -133,7 +136,7 @@
</Grid>
</GroupBox>
<GroupBox Margin="6 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="1" Grid.Column="2" Header="Absender">
<GroupBox Margin="6 6 3 3" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="1" Grid.Column="2" Header="Absender">
<Grid>
<Grid.ColumnDefinitions>
@@ -172,7 +175,7 @@
</GroupBox>
<GroupBox Margin="3 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Grid.Row="2" Header="Rechnungsposten">
<GroupBox Margin="3 6 3 3" Style="{DynamicResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Grid.Row="2" Header="Rechnungsposten">
<dxg:GridControl MaxHeight="200" SnapsToDevicePixels="True" Margin="3" x:Name="datagrid_invoiceItems" DataSource="{Binding InvoiceItems.VMList}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<dxg:GridControl.Columns>

View File

@@ -3,12 +3,17 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:localsearch="clr-namespace:BeWo.View.Search"
xmlns:conv="clr-namespace:BeWo.Converter"
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" >
<localView:BeWoView.Resources>
<conv:ObjectVisibilityConverter x:Key="ObjectVisibilityConverter" />
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
</localView:BeWoView.Resources>
<Grid>
<GroupBox Style="{StaticResource ObjectEditGroupBox}" Header="Rechnungen für Eigenanteil">
<GroupBox Style="{DynamicResource ObjectEditGroupBox}" Header="Rechnungen für Eigenanteil">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

View File

@@ -39,7 +39,7 @@ namespace BeWo.View.Detail.Accounting
this._EditView.EditingFinished += (s, e) =>
{
// hyperlinkPrint.
this.MainView.CloseCurrentPopUp();
this.MainPage.CloseCurrentPopUp();
this.ReloadViewModel();
};
}
@@ -92,13 +92,13 @@ namespace BeWo.View.Detail.Accounting
this.ViewModel.NewVM.RecipientTown = r.InvoiceAddressTown ?? r.Town;
this.ViewModel.NewVM.RecipientPostCode = r.InvoiceAddressPostalCode ?? r.PostalCode;
this.ViewModel.NewVM.CustomerReferenceNumber = r.ReferenceNumber;
this.ViewModel.NewVM.CreatorFirstName = BeWoApp.LoggedOnEmployee.FirstName;
this.ViewModel.NewVM.CreatorLastName = BeWoApp.LoggedOnEmployee.LastName;
this.ViewModel.NewVM.SenderFirstName = BeWoApp.LoggedOnEmployee.FirstName;
this.ViewModel.NewVM.SenderLastName = BeWoApp.LoggedOnEmployee.LastName;
this.ViewModel.NewVM.SenderOrganisation = BeWoApp.Mandator.Name;
this.ViewModel.NewVM.CreatorFirstName = MainSession.LoggedOnEmployee.FirstName;
this.ViewModel.NewVM.CreatorLastName = MainSession.LoggedOnEmployee.LastName;
this.ViewModel.NewVM.SenderFirstName = MainSession.LoggedOnEmployee.FirstName;
this.ViewModel.NewVM.SenderLastName = MainSession.LoggedOnEmployee.LastName;
this.ViewModel.NewVM.SenderOrganisation = MainSession.Mandator.Name;
foreach (ContactDC iContactDC in BeWoApp.LoggedOnEmployee.ContactInformations)
foreach (ContactDC iContactDC in MainSession.LoggedOnEmployee.ContactInformations)
{
if (iContactDC.ContactType == ContactType.business_Fax)
{
@@ -127,7 +127,7 @@ namespace BeWo.View.Detail.Accounting
delegate
{
this._EditView.ViewModel = this.ViewModel.NewVM;
this.MainView.ShowControlAsModalPopup(this._EditView);
this.MainPage.ShowControlAsModalPopup(this._EditView);
});
});
}
@@ -146,7 +146,7 @@ namespace BeWo.View.Detail.Accounting
{
var vm = BeWoWpfUtils.GetTag<InvoiceBaseVM>(sender);
this._EditView.ViewModel = vm;
this.MainView.ShowControlAsModalPopup(this._EditView);
this.MainPage.ShowControlAsModalPopup(this._EditView);
}
private void popupedit_CostBeaerer_PopUpClick(object sender, RoutedEventArgs ev)
@@ -161,7 +161,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,

View File

@@ -3,18 +3,22 @@
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:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
<GroupBox MinHeight="200" Width="800" Style="{StaticResource PopUpWindowStyle}">
<localView:BeWoView.Resources>
<conv:Int2DecimalConverter x:Key="Int2DecimalConverter" />
</localView:BeWoView.Resources>
<GroupBox MinHeight="200" Width="800" Style="{DynamicResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
<TextBox Text="Rechnung bearbeiten" Margin="10,4,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" FontSize="20" BorderBrush="{x:Null}" VerticalAlignment="Stretch" BorderThickness="0,0,0,0" Padding="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -32,7 +36,7 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Margin="3 6 3 6" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Header="Rechnungsdetails">
<GroupBox Margin="3 6 3 6" Style="{DynamicResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Header="Rechnungsdetails">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -76,7 +80,7 @@
<TextBox Grid.Row="2" Grid.Column="3" Grid.ColumnSpan="3" Margin="3" AcceptsReturn="True" TextWrapping="Wrap" Height="23" Text="{Binding Notice}" />
</Grid>
</GroupBox>
<GroupBox Margin="3 6 6 3" Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}" Header="Empfänger">
<GroupBox Margin="3 6 6 3" Grid.Row="1" Style="{DynamicResource ObjectEditGroupBox}" Header="Empfänger">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />
@@ -120,7 +124,7 @@
<TextBox Margin="3" Grid.Row="4" Grid.Column="3" Text="{val:ValidationBinding Path=RecipientPostBox}" Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="6 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="1" Grid.Column="1" Header="Absender">
<GroupBox Margin="6 6 3 3" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="1" Grid.Column="1" Header="Absender">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />
@@ -154,7 +158,7 @@
<TextBox Margin="3" Grid.Row="2" Grid.Column="3" Text="{Binding SenderPhone}" Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="3 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Grid.Row="2" Header="Rechnungsposten">
<GroupBox Margin="3 6 3 3" Style="{DynamicResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Grid.Row="2" Header="Rechnungsposten">
<dxg:GridControl Margin="3" x:Name="datagrid_invoiceItems" DataSource="{Binding InvoiceItems.VMList}" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Notice" Header="" FixedWidth="True" Width="24" ReadOnly="True">

View File

@@ -1,134 +1,148 @@
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.GeneralInvoiceView" 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:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting" xmlns:val="clr-namespace:BeWo.Validation" xmlns:localsearch="clr-namespace:BeWo.View.Search" xmlns:proxy="clr-namespace:BeWo.ServiceProxy" 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: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">
<localView:BeWoView
x:Class="BeWo.View.Detail.Accounting.GeneralInvoiceView"
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:localViewModel="clr-namespace:BeWo.ViewModel"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:localsearch="clr-namespace:BeWo.View.Search" xmlns:proxy="clr-namespace:BeWo.ServiceProxy" 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: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">
<localView:BeWoView.Resources>
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<conv:ObjectVisibilityConverter x:Key="ObjectVisibilityConverter" />
<conv:StringFormatMulitConverter x:Key="StringFormatMulitConverter" />
<conv:InvoiceBaseDCPrintURLConverter x:Key="InvoiceBaseDCPrintURLConverter" />
</localView:BeWoView.Resources>
<Grid>
<Grid>
<GroupBox Style="{DynamicResource ObjectEditGroupBox}" Header="Rechnungen">
<GroupBox Style="{StaticResource ObjectEditGroupBox}" Header="Rechnungen">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
</Grid.RowDefinitions>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Foreground="Black" FontSize="12" Grid.Column="0" VerticalAlignment="Center" Text="Empfänger:" />
<TextBlock Foreground="Black" FontSize="12" Grid.Column="0" VerticalAlignment="Center" Text="Empfänger:" />
<uc:PopUpEdit x:Name="popupedit_Recipient" Width="250" Height="23" Margin="3" Grid.Column="1" IsReadOnly="True" DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_Recipient_PopUpClick" MaxWidth="300" Cursor="Arrow" PreviewMouseDoubleClick="Popupedit_Recipient_OnPreviewMouseDoubleClick" />
<uc:PopUpEdit x:Name="popupedit_Recipient" Width="250" Height="23" Margin="3" Grid.Column="1" IsReadOnly="True" DeleteButtonVisibility="Collapsed" PopUpClick="popupedit_Recipient_PopUpClick" MaxWidth="300" Cursor="Arrow" PreviewMouseDoubleClick="Popupedit_Recipient_OnPreviewMouseDoubleClick" />
<Popup Margin="10" x:Name="popup_Recipient" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="2" Height="400" Closed="popup_Closed" Opened="popup_Opened">
<Popup Margin="10" x:Name="popup_Recipient" StaysOpen="False" Placement="MousePoint" Width="400" Grid.Row="2" Height="400" Closed="popup_Closed" Opened="popup_Opened">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel Margin="5 5 5 10" HorizontalAlignment="Right" Orientation="Horizontal">
<RadioButton Margin="3 0 3 0" IsChecked="True" Foreground="White" Name="rb_organisation" Content="Organisation" />
<RadioButton Margin="3 0 3 0" Foreground="White" Name="rb_customer" Content="Klient" />
<RadioButton Margin="3 0 3 0" Foreground="White" Name="rb_person" Content="Person" />
</StackPanel>
<StackPanel Margin="5 5 5 10" HorizontalAlignment="Right" Orientation="Horizontal">
<RadioButton Margin="3 0 3 0" IsChecked="True" Foreground="White" Name="rb_organisation" Content="Organisation" />
<RadioButton Margin="3 0 3 0" Foreground="White" Name="rb_customer" Content="Klient" />
<RadioButton Margin="3 0 3 0" Foreground="White" Name="rb_person" Content="Person" />
</StackPanel>
<localsearch:CustomerSearchView ItemSelected="CustomerSearchView_ItemSelected" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rb_customer, Converter={StaticResource BoolVisibilityConverter}}" />
<localsearch:OrganisationSearchView x:Name="recipientsearchview" ItemSelected="OrganisationSearchView_ItemSelected" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rb_organisation, Converter={StaticResource BoolVisibilityConverter}}" />
<localsearch:PersonSearchView ItemSelected="PersonSearchView_ItemSelected" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rb_person, Converter={StaticResource BoolVisibilityConverter}}" />
<localsearch:CustomerSearchView ItemSelected="CustomerSearchView_ItemSelected" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rb_customer, Converter={StaticResource BoolVisibilityConverter}}" />
<localsearch:OrganisationSearchView x:Name="recipientsearchview" ItemSelected="OrganisationSearchView_ItemSelected" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rb_organisation, Converter={StaticResource BoolVisibilityConverter}}" />
<localsearch:PersonSearchView ItemSelected="PersonSearchView_ItemSelected" Grid.Row="1" Visibility="{Binding IsChecked, ElementName=rb_person, Converter={StaticResource BoolVisibilityConverter}}" />
</Grid>
</Grid>
</Popup>
</Popup>
<Button Height="23" VerticalAlignment="Center" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" Margin="5 0 0 0" Grid.Column="2" Visibility="{Binding Text, ElementName=popupedit_Recipient, Converter={StaticResource ObjectVisibilityConverter}}" ToolTip="Hinzufügen" Name="button_add" Click="button_add_Click" Content="Neue Rechnung erstellen"></Button>
<Button Height="23" VerticalAlignment="Center" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" Margin="5 0 0 0" Grid.Column="2" Visibility="{Binding Text, ElementName=popupedit_Recipient, Converter={StaticResource ObjectVisibilityConverter}}" ToolTip="Hinzufügen" Name="button_add" Click="button_add_Click" Content="Neue Rechnung erstellen"></Button>
</Grid>
</Grid>
<ListView HorizontalContentAlignment="Stretch" Name="lb_invoivces" Background="{x:Null}" BorderBrush="{x:Null}" ItemsSource="{Binding VMList, Mode=OneWay}" Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Focusable" Value="false" />
</Style>
</ListView.ItemContainerStyle>
<ListView.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
</ListView.Resources>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Border Height="85" CornerRadius="5" Background="White" Margin="3" BorderThickness="1" BorderBrush="Black">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Margin="5 5 5 3" FontWeight="Bold">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource StringFormatMulitConverter}" ConverterParameter="{}{0} vom {1:dd.MM.yyyy} an {2} {3} {4}">
<MultiBinding.Bindings>
<Binding Path="InvoiceNumber" />
<Binding Path="InvoiceDate" />
<Binding Path="RecipientOrganisation" />
<Binding Path="RecipientPersonFirstName" />
<Binding Path="RecipientPersonLastName" />
</MultiBinding.Bindings>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Margin="5 0 0 0" Grid.Row="1" Grid.ColumnSpan="2">
<TextBlock.Text>
<MultiBinding StringFormat="Abrechnungszeitraum: {0:dd.MM.yyyy} - {1:dd.MM.yyyy}">
<MultiBinding.Bindings>
<Binding Path="AccountingPeriodStart" />
<Binding Path="AccountingPeriodEnd" />
</MultiBinding.Bindings>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<ListView HorizontalContentAlignment="Stretch" Name="lb_invoivces" Background="{x:Null}" BorderBrush="{x:Null}" ItemsSource="{Binding VMList, Mode=OneWay}" Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Auto">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Focusable" Value="false" />
</Style>
</ListView.ItemContainerStyle>
<ListView.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent" />
</ListView.Resources>
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Border Height="85" CornerRadius="5" Background="White" Margin="3" BorderThickness="1" BorderBrush="Black">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Margin="5 5 5 3" FontWeight="Bold">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource StringFormatMulitConverter}" ConverterParameter="{}{0} vom {1:dd.MM.yyyy} an {2} {3} {4}">
<MultiBinding.Bindings>
<Binding Path="InvoiceNumber" />
<Binding Path="InvoiceDate" />
<Binding Path="RecipientOrganisation" />
<Binding Path="RecipientPersonFirstName" />
<Binding Path="RecipientPersonLastName" />
</MultiBinding.Bindings>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Margin="5 0 0 0" Grid.Row="1" Grid.ColumnSpan="2">
<TextBlock.Text>
<MultiBinding StringFormat="Abrechnungszeitraum: {0:dd.MM.yyyy} - {1:dd.MM.yyyy}">
<MultiBinding.Bindings>
<Binding Path="AccountingPeriodStart" />
<Binding Path="AccountingPeriodEnd" />
</MultiBinding.Bindings>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" FontWeight="Bold" Margin="0 5 5 0" Height="50" FontSize="14" Text="{Binding TotalAmount, Mode=OneWay, StringFormat=\{0:0.00\} €}" Grid.Column="2" Grid.RowSpan="2"></TextBlock>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Center" FontWeight="Bold" Margin="0 5 5 0" Height="50" FontSize="14" Text="{Binding TotalAmount, Mode=OneWay, StringFormat=\{0:0.00\} €}" Grid.Column="2" Grid.RowSpan="2"></TextBlock>
<Button Grid.Column="2" Grid.Row="2" Width="32" Height="22" HorizontalAlignment="Right" Margin="0,0,75,5" Style="{DynamicResource GlassButton}">
<TextBlock>
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" NavigateUri="{Binding Converter={StaticResource InvoiceBaseDCPrintURLConverter}}" RequestNavigate="Hyperlink_OnRequestNavigate">
<Grid Width="32" Margin="-3 0" Height="22">
<Rectangle Fill="White" Opacity=".01" />
<TextBlock Text="¥" Foreground="#2d4d82" Margin="6 1 0 0" FontSize="18" FontFamily="Webdings" />
</Grid>
<Button Grid.Column="2" Grid.Row="2" Width="32" Height="22" HorizontalAlignment="Right" Margin="0,0,75,5" Style="{DynamicResource GlassButton}">
<TextBlock>
<Hyperlink TargetName="_NewWindow" Foreground="#FFFFFFFF" NavigateUri="{Binding Converter={StaticResource InvoiceBaseDCPrintURLConverter}}" RequestNavigate="Hyperlink_OnRequestNavigate">
<Grid Width="32" Margin="-3 0" Height="22">
<Rectangle Fill="White" Opacity=".01" />
<TextBlock Text="¥" Foreground="#2d4d82" Margin="6 1 0 0" FontSize="18" FontFamily="Webdings" />
</Grid>
</Hyperlink>
</TextBlock>
</Button>
</Hyperlink>
</TextBlock>
</Button>
<Button x:Name="btnEdit" Click="btnEdit_Click" Grid.Column="2" Grid.Row="2" Width="32" Height="22" HorizontalAlignment="Right" Margin="0,0,40,5" BorderThickness="1,1,1,1" Padding="1,1,1,1" Style="{DynamicResource GlassButton}" Tag="{Binding}" Visibility="{Binding EditAllowed, Converter={StaticResource BoolVisibilityConverter}}">
<Image Source="..\..\..\Ressources\Icons\Symbol Edit.png" Stretch="Uniform" Margin="1,1,1,1" />
</Button>
<Button x:Name="btnDelete" Grid.Column="2" Grid.Row="2" Click="btnDelete_Click" Width="32" Height="22" HorizontalAlignment="Right" Margin="0,0,5,5" Padding="1,1,1,1" BorderThickness="1,1,1,1" Style="{DynamicResource GlassButton}" Tag="{Binding}" Visibility="{Binding EditAllowed, Converter={StaticResource BoolVisibilityConverter}}">
<Image Source="..\..\..\Ressources\Icons\Symbol Delete.png" Stretch="Uniform" Margin="1,1,1,1" />
</Button>
</Grid>
</Border>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</GroupBox>
</Grid>
<Button x:Name="btnEdit" Click="btnEdit_Click" Grid.Column="2" Grid.Row="2" Width="32" Height="22" HorizontalAlignment="Right" Margin="0,0,40,5" BorderThickness="1,1,1,1" Padding="1,1,1,1" Style="{DynamicResource GlassButton}" Tag="{Binding}" Visibility="{Binding EditAllowed, Converter={StaticResource BoolVisibilityConverter}}">
<Image Source="..\..\..\Ressources\Icons\Symbol Edit.png" Stretch="Uniform" Margin="1,1,1,1" />
</Button>
<Button x:Name="btnDelete" Grid.Column="2" Grid.Row="2" Click="btnDelete_Click" Width="32" Height="22" HorizontalAlignment="Right" Margin="0,0,5,5" Padding="1,1,1,1" BorderThickness="1,1,1,1" Style="{DynamicResource GlassButton}" Tag="{Binding}" Visibility="{Binding EditAllowed, Converter={StaticResource BoolVisibilityConverter}}">
<Image Source="..\..\..\Ressources\Icons\Symbol Delete.png" Stretch="Uniform" Margin="1,1,1,1" />
</Button>
</Grid>
</Border>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Grid>
</GroupBox>
</Grid>
</localView:BeWoView>

View File

@@ -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<InvoiceBaseVM>(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();
}));
}
}

View File

@@ -1,5 +1,11 @@
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.InvoiceOverview" 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: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: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">
<localView:BeWoView
x:Class="BeWo.View.Detail.Accounting.InvoiceOverview"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:conv="clr-namespace:BeWo.Converter"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:localView="clr-namespace:BeWo.View" 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: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">
<localView:BeWoView.Resources>
<conv:StringFormatConverter x:Key="StringFormatConverter" />
</localView:BeWoView.Resources>
<Grid>
<GroupBox x:Name="groupbox_editArea" Grid.Row="0" Header="Rechnungsübersicht" Style="{DynamicResource ObjectEditGroupBox}">

View File

@@ -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)

View File

@@ -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">
<GroupBox Width="850" Style="{StaticResource PopUpWindowStyle}">
<GroupBox Width="850" Style="{DynamicResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
@@ -18,8 +18,8 @@
Padding="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<GroupBox Margin="10" Header="Rechnung(en) erstellen" Style="{StaticResource ObjectEditGroupBox}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<GroupBox Margin="10" Header="Rechnung(en) erstellen" Style="{DynamicResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

View File

@@ -8,7 +8,7 @@
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" Height="Auto" Width="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
<GroupBox MinHeight="500" Width="900" Style="{StaticResource PopUpWindowStyle}">
<GroupBox MinHeight="500" Width="900" Style="{DynamicResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
@@ -17,7 +17,7 @@
VerticalAlignment="Stretch" BorderThickness="0,0,0,0" Padding="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -36,7 +36,7 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Margin="3 6 3 6" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Header="Rechnungsdetails">
<GroupBox Margin="3 6 3 6" Style="{DynamicResource ObjectEditGroupBox}" Grid.ColumnSpan="2" Header="Rechnungsdetails">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
@@ -85,7 +85,7 @@
TextWrapping="Wrap" Height="23" Text="{Binding InvoiceBase.Notice}" />
</Grid>
</GroupBox>
<GroupBox Margin="3 6 6 3" Grid.Row="1" Style="{StaticResource ObjectEditGroupBox}" Header="Empfänger">
<GroupBox Margin="3 6 6 3" Grid.Row="1" Style="{DynamicResource ObjectEditGroupBox}" Header="Empfänger">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />
@@ -130,7 +130,7 @@
Text="{Binding Path=RecipientPostBox}" Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="6 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="1" Grid.Column="2"
<GroupBox Margin="6 6 3 3" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="1" Grid.Column="2"
Header="Absender">
<Grid>
<Grid.ColumnDefinitions>
@@ -171,7 +171,7 @@
Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="3 6 3 3" Style="{StaticResource ObjectEditGroupBox}" Grid.ColumnSpan="2"
<GroupBox Margin="3 6 3 3" Style="{DynamicResource ObjectEditGroupBox}" Grid.ColumnSpan="2"
Grid.Row="3"
Header="Leistungen in Bewilligungszeiträumen - Details">
<Grid>
@@ -332,7 +332,7 @@
</StackPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type dx:DXTabItem}, Mode=FindAncestor}}" Value="False">
<Setter Property="Foreground" TargetName="ItemHeaderLabel" Value="{StaticResource GridPrintMenuLightBrush}"/>
<Setter Property="Foreground" TargetName="ItemHeaderLabel" Value="{DynamicResource GridPrintMenuLightBrush}"/>
</DataTrigger>
</DataTemplate.Triggers>
@@ -344,7 +344,7 @@
</StackPanel>
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding Path=IsSelected, RelativeSource={RelativeSource AncestorType={x:Type dx:DXTabItem}, Mode=FindAncestor}}" Value="False">
<Setter Property="Foreground" TargetName="SummaryHeaderLabel" Value="{StaticResource GridPrintMenuLightBrush}"/>
<Setter Property="Foreground" TargetName="SummaryHeaderLabel" Value="{DynamicResource GridPrintMenuLightBrush}"/>
</DataTrigger>
</DataTemplate.Triggers>
@@ -518,13 +518,13 @@
<Style.Triggers>
<DataTrigger Binding="{Binding Type}"
Value="{x:Type Type={x:Type localViewModel:ServiceInvoicePeriodVM}}">
<Setter Property="HeaderTemplate" Value="{StaticResource item_header}" />
<Setter Property="ContentTemplate" Value="{StaticResource item_content}" />
<Setter Property="HeaderTemplate" Value="{DynamicResource item_header}" />
<Setter Property="ContentTemplate" Value="{DynamicResource item_content}" />
</DataTrigger>
<DataTrigger Binding="{Binding Type}"
Value="{x:Type Type={x:Type localViewModel:ServiceInvoiceVM}}">
<Setter Property="HeaderTemplate" Value="{StaticResource summary_header}" />
<Setter Property="ContentTemplate" Value="{StaticResource summary_content}" />
<Setter Property="HeaderTemplate" Value="{DynamicResource summary_header}" />
<Setter Property="ContentTemplate" Value="{DynamicResource summary_content}" />
</DataTrigger>
</Style.Triggers>
</Style>

View File

@@ -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">
<localView:BeWoView.Resources>
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<conv:ObjectVisibilityConverter x:Key="ObjectVisibilityConverter" />
<conv:StringFormatMulitConverter x:Key="StringFormatMulitConverter" />
<conv:SettlementDCPrintURLConverter x:Key="SettlementDCPrintURLConverter" />
</localView:BeWoView.Resources>
<Grid>
<GroupBox Style="{StaticResource ObjectEditGroupBox}" Header="{markup:Translate Sammelrechnung an Kostenträger}">
<GroupBox Style="{DynamicResource ObjectEditGroupBox}" Header="{markup:Translate Sammelrechnung an Kostenträger}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

View File

@@ -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<ServiceInvoiceVM>(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,

View File

@@ -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">
<localView:BeWoView.Resources>
<conv:Int2DecimalConverter x:Key="Int2DecimalConverter" />
</localView:BeWoView.Resources>
<Grid>
<GroupBox MinHeight="300" Width="800" Style="{StaticResource PopUpWindowStyle}">
<GroupBox MinHeight="300" Width="800" Style="{DynamicResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
@@ -16,7 +20,7 @@
</StackPanel>
</GroupBox.Header>
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -31,7 +35,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Margin="0,0,0,0" Style="{StaticResource ObjectEditGroupBox}" Header="Empfänger Adresse">
<GroupBox Margin="0,0,0,0" Style="{DynamicResource ObjectEditGroupBox}" Header="Empfänger Adresse">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />
@@ -70,7 +74,7 @@
Text="{Binding Path=RecipientPostBox}" Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="0 0 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="1"
<GroupBox Margin="0 0 0 0" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="1"
Header="Absender Ansprechpartner">
<Grid>
<Grid.ColumnDefinitions>
@@ -109,7 +113,7 @@
Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="0 0 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="2" Header="Details">
<GroupBox Margin="0 0 0 0" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="2" Header="Details">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />
@@ -172,7 +176,7 @@
</Grid>
</GroupBox>
<GroupBox Margin="0 0 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="3" Header="Bilanz">
<GroupBox Margin="0 0 0 0" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="3" Header="Bilanz">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />

View File

@@ -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">
<localView:BeWoView.Resources>
<conv:Int2DecimalConverter x:Key="Int2DecimalConverter" />
</localView:BeWoView.Resources>
<Grid>
<GroupBox MinHeight="300" Width="800" Style="{StaticResource PopUpWindowStyle}">
<GroupBox MinHeight="300" Width="800" Style="{DynamicResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\Ressources\Icons\CoinsDisabled.png" Height="28" />
@@ -20,7 +24,7 @@
VerticalAlignment="Stretch" BorderThickness="0,0,0,0" Padding="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
@@ -35,7 +39,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<GroupBox Margin="0,0,0,0" Style="{StaticResource ObjectEditGroupBox}" Header="Empfänger Adresse">
<GroupBox Margin="0,0,0,0" Style="{DynamicResource ObjectEditGroupBox}" Header="Empfänger Adresse">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />
@@ -74,7 +78,7 @@
Text="{Binding Path=RecipientPostBox}" Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="0 0 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="1"
<GroupBox Margin="0 0 0 0" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="1"
Header="Absender Ansprechpartner">
<Grid>
<Grid.ColumnDefinitions>
@@ -113,7 +117,7 @@
Height="23" />
</Grid>
</GroupBox>
<GroupBox Margin="0 0 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="2" Header="Details">
<GroupBox Margin="0 0 0 0" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="2" Header="Details">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="col1" />
@@ -176,7 +180,7 @@
</Grid>
</GroupBox>
<GroupBox Margin="0 0 0 0" Style="{StaticResource ObjectEditGroupBox}" Grid.Row="3" Header="Bilanz">
<GroupBox Margin="0 0 0 0" Style="{DynamicResource ObjectEditGroupBox}" Grid.Row="3" Header="Bilanz">
<ScrollViewer>
<Grid Name="summary_grid" >
<Grid.RowDefinitions>

View File

@@ -1,9 +1,15 @@
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.SettlementInvoiceView" 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:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting" xmlns:val="clr-namespace:BeWo.Validation" xmlns:localsearch="clr-namespace:BeWo.View.Search" xmlns:proxy="clr-namespace:BeWo.ServiceProxy" 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: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"
<localView:BeWoView x:Class="BeWo.View.Detail.Accounting.SettlementInvoiceView"
xmlns:conv="clr-namespace:BeWo.Converter"
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:localViewModel="clr-namespace:BeWo.ViewModel" xmlns:localViewDetail="clr-namespace:BeWo.View.Detail.Accounting" xmlns:val="clr-namespace:BeWo.Validation" xmlns:localsearch="clr-namespace:BeWo.View.Search" xmlns:proxy="clr-namespace:BeWo.ServiceProxy" 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: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"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup">
<localView:BeWoView.Resources>
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<conv:ObjectVisibilityConverter x:Key="ObjectVisibilityConverter" />
<conv:SettlementDCPrintURLConverter x:Key="SettlementDCPrintURLConverter" />
</localView:BeWoView.Resources>
<Grid>
<GroupBox Style="{StaticResource ObjectEditGroupBox}" Header="Spitzabrechnung">
<GroupBox Style="{DynamicResource ObjectEditGroupBox}" Header="Spitzabrechnung">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

View File

@@ -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>(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,

View File

@@ -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">
<localView:BeWoView.Resources>
<conv:BoolVisibilityConverter x:Key="BoolVisibilityConverter" />
<ControlTemplate x:Key="AccountingTransactionListBoxTemplate" TargetType="{x:Type ListBox}">
<Border x:Name="Bd" SnapsToDevicePixels="True" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}">
@@ -21,7 +23,7 @@
</Border>
</ControlTemplate>
<Style x:Key="AccountingTransactionListStyle" TargetType="{x:Type ListBox}">
<Setter Property="Template" Value="{StaticResource AccountingTransactionListBoxTemplate}" />
<Setter Property="Template" Value="{DynamicResource AccountingTransactionListBoxTemplate}" />
<Setter Property="Padding" Value="2,0,2,2" />
</Style>
<Style x:Key="AccountingTransactionListBoxItemStyle" TargetType="{x:Type ListBoxItem}">

View File

@@ -32,7 +32,7 @@ namespace BeWo.View.Detail
{
get
{
return BeWoApp.AppSettings.HideServiceRecordInsertedByAndInsertedOn ? Visibility.Collapsed : Visibility.Visible;
return MainSession.AppSettings.HideServiceRecordInsertedByAndInsertedOn ? Visibility.Collapsed : Visibility.Visible;
}
}
@@ -120,7 +120,7 @@ namespace BeWo.View.Detail
_ViewModel.AccountingTransactionListChanged += ViewModel_AccountingTransactionListChanged;
if (!BeWoApp.LoggedOnUser.HasRight(UserRightType.AccountingTransactionView_Create) && !BeWoApp.LoggedOnUser.HasRight(UserRightType.CreateAll))
if (!MainSession.LoggedOnUser.HasRight(UserRightType.AccountingTransactionView_Create) && !MainSession.LoggedOnUser.HasRight(UserRightType.CreateAll))
{
newObjectInfoGrid.IsEnabled = false;
button_add.IsEnabled = false;
@@ -571,7 +571,7 @@ namespace BeWo.View.Detail
}
}
var path = BeWoApp.GetAndCreateUserAppDataPath() + "\\Abschlagszahlungen.xls";
var path = MainSession.GetAndCreateUserAppDataPath() + "\\Abschlagszahlungen.xls";
var sf = new SaveFileDialog { FileName = Path.GetFileName(path), Filter = "Microsoft Excel 97-2003-Arbeitsblatt|*.xls|Alle Dateien|*.*" };
if (sf.ShowDialog() != true)

View File

@@ -39,7 +39,7 @@ namespace BeWo.View.Detail
{
get
{
return BeWoApp.AppSettings.HideServiceRecordInsertedByAndInsertedOn ? Visibility.Collapsed : Visibility.Visible;
return MainSession.AppSettings.HideServiceRecordInsertedByAndInsertedOn ? Visibility.Collapsed : Visibility.Visible;
}
}

View File

@@ -7,7 +7,7 @@
<Grid Width="500" Height="Auto">
<!--uc:ShadowChrome-->
<GroupBox Style="{StaticResource PopUpWindowStyle}">
<GroupBox Style="{DynamicResource PopUpWindowStyle}">
<GroupBox.Header>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="0,0,0,0">
<Image Source="..\..\Ressources\Icons\CoinsDisabled.png" RenderTransformOrigin="0.5,0.5" Width="Auto" Height="28" Margin="0,0,0,0">
@@ -23,7 +23,7 @@
<TextBox Text="Buchung bearbeiten" Margin="10,4,0,0" Background="{x:Null}" Foreground="{DynamicResource MainGroupBoxForegroundBrush}" FontSize="20" BorderBrush="{x:Null}" VerticalAlignment="Stretch" BorderThickness="0,0,0,0" Padding="0,0,0,0" />
</StackPanel>
</GroupBox.Header>
<Grid Margin="0,3,0,0" Background="{StaticResource ObjectEditBackgroundBrush}">
<Grid Margin="0,3,0,0" Background="{DynamicResource ObjectEditBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />

View File

@@ -4,6 +4,7 @@
<Grid>
<Grid.Resources>
<conv:NumberSmaller0ColorConverter x:Key="NumberSmaller0ColorConverter" />
<conv:StringFormatConverter x:Key="StringFormatConverter" />
<!--xcdg:DataGridCollectionViewSource x:Key="dataSource" Source="{Binding Path=FilterResult}" /-->
</Grid.Resources>
@@ -53,7 +54,7 @@
<GroupBox.Header>
<CheckBox Name="checkbox_supportconceptfilter" Unchecked="checkbox_supportconceptfilter_CheckedChanged" IsChecked="False" Checked="checkbox_supportconceptfilter_CheckedChanged" Content="Nach Hilfeplan filtern" />
</GroupBox.Header>
<localSearchView:SupportConceptTreeSearchView ResultListBackground="{StaticResource AccountingContentBrush}" x:Name="treesearchview_filter" IsEnabled="{Binding Path=IsChecked, ElementName=checkbox_supportconceptfilter}" Grid.Row="2" />
<localSearchView:SupportConceptTreeSearchView ResultListBackground="{DynamicResource AccountingContentBrush}" x:Name="treesearchview_filter" IsEnabled="{Binding Path=IsChecked, ElementName=checkbox_supportconceptfilter}" Grid.Row="2" />
</GroupBox>
<GridSplitter Grid.Column="0" HorizontalAlignment="Right" Grid.Row="0" Grid.RowSpan="3" Width="4" />

Some files were not shown because too many files have changed in this diff Show More