diff --git a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs index 339892d1b..c6fdd1379 100644 --- a/BeWo/Scheduler/View/NewSchedulerView.xaml.cs +++ b/BeWo/Scheduler/View/NewSchedulerView.xaml.cs @@ -1460,10 +1460,15 @@ namespace BeWo.Scheduler.View var items = SelectedItems; + var testtesttest = ViewModel.ActiveAppointmentViewModel; + OnPropertyChanged("AllResources"); OnPropertyChanged("SelectedEmployees"); OnPropertyChanged("SelectedItems"); - } + OnPropertyChanged("ViewModel"); + + Scheduler.ActiveView.LayoutChanged(); + } //private void ExportAsiCal(object sender, RoutedEventArgs e) //{ diff --git a/BeWo/Scheduler/ViewModel/NewSchedulerViewModel.cs b/BeWo/Scheduler/ViewModel/NewSchedulerViewModel.cs index dc75de3d0..9d848f35d 100644 --- a/BeWo/Scheduler/ViewModel/NewSchedulerViewModel.cs +++ b/BeWo/Scheduler/ViewModel/NewSchedulerViewModel.cs @@ -29,7 +29,7 @@ namespace BeWo.Scheduler.ViewModel set { - if (mActiveAppointmentViewModel == null && value != null || mActiveAppointmentViewModel != null && !mActiveAppointmentViewModel.Equals(value)) + if(value != null) { mActiveAppointmentViewModel = value; @@ -40,8 +40,6 @@ namespace BeWo.Scheduler.ViewModel public void UpdateAppointmentViewModel(DateTime intervalStart, DateTime intervalEnd) { - BeWoApp.MainControl.StartWaiting(); - if (!BeWoApp.LoggedOnEmployee.EmployeeOid.HasValue) { return; @@ -84,10 +82,9 @@ namespace BeWo.Scheduler.ViewModel var vm = new SchedulerAppointmentListVM(prefilteredAppointments.ToList(), allCust, allEmps, mAllCats2ResInDic); ActiveAppointmentViewModel = vm; + SchedulerSettings = GetActiveSettings(); SchedulerSettings.StartDate = intervalStart; - - BeWoApp.MainControl.EndWaiting(); } public AbstractAppointmentEditForm GetEditAppointmentForm(DevExpress.Xpf.Scheduler.SchedulerControl control, Appointment appointment) diff --git a/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs b/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs index 37475a56f..ba04bf11c 100644 --- a/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs +++ b/BeWo/Scheduler/ViewModel/SchedulerAppointmentListVM.cs @@ -15,7 +15,6 @@ using BS.Shared.DataContracts; using BS.Shared.DataContracts.Compact; using BS.Shared.Extensions; -using DevExpress.Data.Linq; using DevExpress.Xpf.Scheduler; using DevExpress.XtraScheduler; using DevExpress.XtraScheduler.Native; @@ -126,7 +125,7 @@ namespace BeWo.Scheduler.ViewModel } item.Description = "Privater Termin"; - item.Subject = string.Format("Privat ({0})", item.Originator); + item.Subject = $"Privat ({item.Originator})"; } } @@ -462,11 +461,9 @@ 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(BeWoApp.LoggedOnEmployee.EmployeeOid) && employeeList != null && employeeList.Count == 0 || + employeeList != null && employeeList.Any(a => a.Employee.EmployeeOid.Equals(BeWoApp.LoggedOnEmployee.EmployeeOid)); wirdAngezeigt = istEigenerTermin; @@ -479,7 +476,7 @@ namespace BeWo.Scheduler.ViewModel - var cfe = (employeeList == null ? new List() : employeeList.Select(s => s.Employee).ToList()); + var cfe = employeeList?.Select(s => s.Employee).ToList() ?? new List(); var cfr = resourceList ?? new List(); var cfc = customerList ?? new List();