cb bugfixing V3.5

This commit is contained in:
Christian
2021-10-18 00:43:47 +02:00
parent 6da9ae3dd3
commit d5a0cd38b5
15 changed files with 102 additions and 42 deletions

View File

@@ -48,8 +48,8 @@ namespace BeWo
public static LoginControl LoginControl;
public static MainControl MainControl;
public static string ShortVersion = "3.4";
public static string Version = "Version 3.4";
public static string ShortVersion = "3.5";
public static string Version = "Version 3.5";
public static int RenderTier = 0;

View File

@@ -53,6 +53,8 @@ namespace BeWo.Scheduler.View
{
public partial class NewSchedulerView : INotifyPropertyChanged
{
private bool _disableUpdateRequestString = false;
private bool _IsEmployeeBrushVisible;
public bool IsEmployeeBrushVisible
@@ -1007,6 +1009,10 @@ namespace BeWo.Scheduler.View
public void UpdateRequestString()
{
if (_disableUpdateRequestString)
{
return;
}
ServiceFacade.DoResourceServiceSync(r => _Liste = r.GetAllOpenAppointmentsForEmployee(BeWoApp.LoggedOnEmployee.EmployeeOid.Value));
var count = 0;

View File

@@ -152,7 +152,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Grid.Column="0" Content="Alle zusagen" Margin="3" Click="ButtonBase_OnClick" />
<Button x:Name="AlleBestaetigen" Grid.Column="0" Content="Alle bestätigen" Margin="3" Click="ButtonBase_OnClick" Width="100" />
<StackPanel x:Name="ZusagenStack" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal" Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=ZusagenStack}">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button Margin="3" Content="Zusagen" Click="Zusagen_OnClick" IsEnabled="{Binding SelektierterTermin, Converter={StaticResource ObjectBoolConverter}}" />
@@ -163,9 +163,9 @@
</StackPanel>
</Grid>
<Button x:Name="OkButton" Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Right" Margin="3" Content="OK" Click="OK_OnClick" Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=OKBtn}" />
<Button x:Name="OkButton" Grid.Row="8" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Right" Margin="3" Width="100" Content="OK" Click="OK_OnClick" Visibility="{Binding Path=SelektierterTermin, Converter={StaticResource Int2VisibilityConverter}, ConverterParameter=OKBtn}" />
</Grid>
</Grid>
<Button Grid.Row="1" x:Name="CloseBtn" Content="Schließen" HorizontalAlignment="Right" Margin="3" Click="CloseButton_Click" />
<Button Grid.Row="1" x:Name="CloseBtn" Content="Schließen" HorizontalAlignment="Right" Margin="3" Width="100" Click="CloseButton_Click" />
</Grid>
</dx:DXWindow>

View File

@@ -24,6 +24,8 @@ namespace BeWo.Scheduler.View
{
public partial class RequestAnswerView : INotifyPropertyChanged
{
private bool raiseChangeEvent = true;
public static readonly RoutedEvent ParticipationChangedEvent = EventManager.RegisterRoutedEvent(nameof(ParticipationChanged), RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(RequestAnswerView));
public event RoutedEventHandler ParticipationChanged
{
@@ -155,6 +157,7 @@ namespace BeWo.Scheduler.View
});
ToggleControls();
raiseChangeEvent = true;
ServiceFacade.DoResourceServiceAsync(s => s.UpdateSchedulerAppointments(new List<SchedulerAppointmentDC> { termin.CommitToDataContract() }), UpdateView);
}
@@ -182,9 +185,13 @@ namespace BeWo.Scheduler.View
this.Dispatch(() =>
{
OffeneTermine = OffeneTermine.Where(w => !w.Equals(vm)).ToObservableCollection();
OnPropertyChanged(nameof(OffeneTermine));
RaiseParticipationChangedEventEvent();
if (raiseChangeEvent)
{
OnPropertyChanged(nameof(OffeneTermine));
RaiseParticipationChangedEventEvent();
}
});
}
else
@@ -193,9 +200,12 @@ namespace BeWo.Scheduler.View
this.Dispatch(() =>
{
OffeneTermine = OffeneTermine.Where(w => !w.Equals(test)).ToObservableCollection();
OnPropertyChanged(nameof(OffeneTermine));
if (raiseChangeEvent)
{
OnPropertyChanged(nameof(OffeneTermine));
RaiseParticipationChangedEventEvent();
RaiseParticipationChangedEventEvent();
}
});
}
}
@@ -207,14 +217,22 @@ namespace BeWo.Scheduler.View
ToggleControls();
if (OffeneTermine.Count == 0 && OTListView.Items.Count == 0)
{
Close();
}
else
{
OTListView.SelectedIndex = 0;
}
if (!raiseChangeEvent)
{
//Close();
}
else
{
if (OffeneTermine.Count == 0 && OTListView.Items.Count == 0)
{
Close();
}
else
{
OTListView.SelectedIndex = 0;
}
}
});
}
@@ -240,6 +258,7 @@ namespace BeWo.Scheduler.View
}
ToggleControls();
raiseChangeEvent = true;
ServiceFacade.DoResourceServiceAsync(s => s.UpdateSchedulerAppointments(new List<SchedulerAppointmentDC> { ((SchedulerAppointmentVM)SelektierterTermin).DataContract }), UpdateView);
return;
@@ -256,6 +275,7 @@ namespace BeWo.Scheduler.View
customFieldStorage2.EmployeeList.ToList().Find(f => f.Employee2SchedulerAppointmentOid == SelektierterTermin.LabelId).IsPChanged = false;
ToggleControls();
raiseChangeEvent = true;
ServiceFacade.DoResourceServiceAsync(s => s.UpdateSchedulerAppointments(new List<SchedulerAppointmentDC> {((SchedulerAppointmentVM) SelektierterTermin).DataContract}), UpdateView);
}
@@ -269,7 +289,9 @@ namespace BeWo.Scheduler.View
ZusagenStack.IsEnabled = !ZusagenStack.IsEnabled;
OkButton.IsEnabled = !OkButton.IsEnabled;
CloseBtn.IsEnabled = !CloseBtn.IsEnabled;
}
AlleBestaetigen.IsEnabled = !AlleBestaetigen.IsEnabled;
}
private void PopupBaseEdit_OnPopupOpening(object sender, OpenPopupEventArgs e)
{
@@ -292,16 +314,25 @@ namespace BeWo.Scheduler.View
{
var employeeList = customFieldStorage.EmployeeList ?? new ObservableCollection<Employee2SchedulerAppointmentDC>();
var appointmentsToAccept = employeeList.Where(e2Sa => e2Sa.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid).ToList();
//var appointmentsToAccept = employeeList.Where(e2Sa => e2Sa.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid).ToList();
foreach(var e2Sa in appointmentsToAccept)
foreach(var e2Sa in employeeList)
{
e2Sa.IsPC_CheckedTs = DateTime.Now;
e2Sa.IsPChanged = true;
e2Sa.ParticipationAnswer = ParticipationAnswer.Zusage;
if (e2Sa.Employee.EmployeeOid == BeWoApp.LoggedOnEmployee.EmployeeOid)
{
e2Sa.IsPChanged = true;
e2Sa.ParticipationAnswer = ParticipationAnswer.Zusage;
}
else
{
e2Sa.IsPChanged = false;
}
}
if(appointmentsToAccept.Any())
if (employeeList.Any())
{
if(appointment is SchedulerAppointmentVM vm)
{
@@ -310,8 +341,10 @@ namespace BeWo.Scheduler.View
}
}
}
ToggleControls();
raiseChangeEvent = false;
ServiceFacade.DoResourceServiceAsync(s => s.UpdateSchedulerAppointments(appointmentsToUpdate), UpdateView);
Close();
}
}

View File

@@ -21,6 +21,9 @@ namespace BeWo.View.Controls
if (ctrl != null)
{
ctrl.Text = "";
ctrl.ToolTip = "";
if (information != null)
{
if (information.Row == 0 && !information.Statuszeile)

View File

@@ -21,6 +21,9 @@ namespace BeWo.View.Controls
if (ctrl != null)
{
ctrl.Text = "";
ctrl.ToolTip = "";
if (information != null)
{
if (information.Row == 0 && !information.Statuszeile)

View File

@@ -22,9 +22,13 @@ namespace BeWo.View.Controls
var information = (DPCtrlSollInformation)e.NewValue;
var ctrl = (DPCtrlSoll)s;
if(ctrl != null)
if (ctrl != null)
{
if(information != null)
ctrl.Text = "";
ctrl.ToolTip = "";
if (information != null)
{
Debug.WriteLine("Status: " + information.Statuszeile + " | MA: " + information.EmployeeDC + " | Soll: " + information.SollWert);
if (information.Row == 0 && !information.Statuszeile)

View File

@@ -21,6 +21,9 @@ namespace BeWo.View.Controls
if (ctrl != null)
{
ctrl.Text = "";
ctrl.ToolTip = "";
if (information != null)
{
if (information.SpalteFuerUrlaub)

View File

@@ -22,6 +22,8 @@ namespace BeWo.View.Controls
if (c != null)
{
c.Text = "";
c.ToolTip = "";
if (dc != null)
{
//dc.RemoveAll(x => x == null);

View File

@@ -1857,7 +1857,8 @@ namespace BeWo.View.Detail.Report
DienstDict = new Dictionary<int, DienstInfoDC>(),
Employee = zeile.Employee,
StatusListe = null,
Zeile = zeile.Zeile + 1
Zeile = zeile.Zeile + 1,
DebugInfo = "Hinzugefügt"
});
RefreshGrid();
break;

View File

@@ -3,7 +3,7 @@
<PropertyGroup>
<NameOfLastUsedPublishProfile>BeWo2.0</NameOfLastUsedPublishProfile>
<UseIISExpress>true</UseIISExpress>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<Use64BitIISExpress />
<IISExpressSSLPort />
<IISExpressAnonymousAuthentication />

View File

@@ -210,7 +210,7 @@ namespace ReportingService.ServiceImplementations
var customerDllPath = Path.Combine(path, @"bin\" + tenant + "_reports.dll");// Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\" + tenant + "_reports.dll");
#else
var customerDllPath = Path.Combine(path, @"bin\" + tenant + "_reports.dll");//Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Customer\" + tenant + "_reports.dll");
var customerDllPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"Customer\" + tenant + "_reports.dll");
#endif
if (File.Exists(customerDllPath))
{
@@ -236,7 +236,7 @@ namespace ReportingService.ServiceImplementations
creator.TempPath = Path.Combine(path, @"demo\temp");
#else
creator.TempPath = Path.Combine(path, tenant + @"\temp");
creator.TempPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, tenant + @"\temp");
#endif
return creator;

View File

@@ -71,7 +71,7 @@ namespace BeWo.Service.Plugins
//t = "4526293996"; // Fortis
//t = "3647969417"; // Caritas Bottrop
//t = "3963982016"; // Convoi
t = "3057313346"; // SSB Mainz
//t = "3057313346"; // SSB Mainz
//t = "6246287823"; // BeWo Alsdorf
//t = "1420341656"; // Vibb Essen
//t = "4941141927"; // Signcom
@@ -166,7 +166,7 @@ namespace BeWo.Service.Plugins
//t = "7803602698"; // Taubblindendienst
//t = "5518600303"; // Wetterleuchten e.V.
//t = "4096649015"; // AWO Dortmund
//t = "3614251071"; // Pusteblume
t = "3614251071"; // Pusteblume
//t = "7755740484"; // Sawo
//t = "8275654834"; // Twg Jonathan
//t = "6586058528"; // Freundeskreis Suchtkrankenhilfe e.V.
@@ -196,7 +196,7 @@ namespace BeWo.Service.Plugins
//t = "9883255779"; // VKM Menden
//t = "9556218062"; // Diakonie Landshut
//t = "2279593936"; // Diakonie Mülheim
t = "3623837005"; // Betreuwo Wesel
//t = "3623837005"; // Betreuwo Wesel
//t = "8407321888"; // AWO Wesel
//t = "8454426692"; // Mit-Menschen Wuppertal
//t = "0629004412"; // BeWo-Colonia Basaran (Projekt

View File

@@ -256,11 +256,14 @@ namespace BeWo.Service.Plugins
decimal tageNachAbzug = 0;
decimal abzuziehendeTage = 0;
int arbeitstage = contract.WeeklyDays != null ? (int)contract.WeeklyDays : 0; // Vertragliche Arbeitstage
int arbeitstage = contract.WeeklyDays; // Vertragliche Arbeitstage
DateTime? endDate = contract.ContractEndDate == null ? new DateTime(year, 12, 31) : contract.ContractEndDate; // Ende des Vertrags auf letzten Tag des Jahres setzen, wenn kein Ende
var leaveDays = contract.EmploymentType.LeaveDays == null ? contract.LeaveDays : contract.EmploymentType.LeaveDays; // Vertragliche Urlaubstage
if (contract.EntryDate.Value.Year == year || endDate.Value.Year == year) // Wenn Vertrag im gewählten Jahr beginnt oder endet
var leaveDays = contract.EmploymentType?.LeaveDays == null ? contract.LeaveDays : contract.EmploymentType.LeaveDays; // Vertragliche Urlaubstage
if (!leaveDays.HasValue)
{
leaveDays = 0;
}
if (contract.EntryDate.HasValue && (contract.EntryDate.Value.Year == year || endDate.Value.Year == year)) // Wenn Vertrag im gewählten Jahr beginnt oder endet
{
if (contract.EntryDate.Value.Year == year) // Wenn Vertrag im gewählten Jahr beginnt
{
@@ -287,9 +290,11 @@ namespace BeWo.Service.Plugins
var contractStart = contract.EntryDate.Value.ToString().Split(' ');
var contractEnd = contract.ContractEndDate != null ? contract.ContractEndDate.Value.ToString().Split(' ') : null;
var anzahlTage = leaveDays - abzuziehendeTage;
var obereZeile = new UrlaubskontoDarstellungDC()
{
AnzahlTage = contract.EmploymentType.LeaveDays == null ? string.Format("{0:0.00}", (decimal)contract.LeaveDays - abzuziehendeTage) : string.Format("{0:0.00}", (decimal)contract.EmploymentType.LeaveDays - abzuziehendeTage),
AnzahlTage = string.Format("{0:0.00}", anzahlTage),
Herkunft = string.Format("EmpOid:{0} ContractOid:{1}", emp.EmployeeOid, contract.ContractOid),
Tooltip = null,
IsDeletable = false,
@@ -485,10 +490,9 @@ namespace BeWo.Service.Plugins
// Konto für aktuelles Jahr in Schleife auswählen
var tmp = konten[i];
if (contract.EmploymentType.LeaveDays != null)
if (contract.EmploymentType?.LeaveDays != null)
contract.LeaveDays = contract.EmploymentType.LeaveDays;
//Hier wird nun der Urlaubsanspruch für ein Jahr errechnet, in dem der Vertrag beginnt oder aufhört. (Siehe CalcCorrectNumberOfLeaveDaysForSpecialContractSituation())
var urlaubsanspruchFuerVertragInLoop = contract.LeaveDays ?? 0;

View File

@@ -22,7 +22,8 @@ namespace BS.Shared.DataContracts
public Dictionary<int, DienstInfoDC> DienstDict { get; set; }
[DataMember]
public List<BesetzungsstatusDC> StatusListe { get; set; }
public String DebugInfo { get; set; }
public DienstZeileDC() { }