diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj
index c377cd643..a68b345e8 100644
--- a/BeWo/BeWo.csproj
+++ b/BeWo/BeWo.csproj
@@ -43,12 +43,12 @@
de-DE
BeWoPlaner
beyondSoft GmbH
- 2.0.1.193
+ 2.0.1.194
true
publish.htm
false
true
- 194
+ 195
2.0.1.%2a
false
true
diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs
index 7fa167f2f..0823c6862 100644
--- a/BeWo/BeWoApp.xaml.cs
+++ b/BeWo/BeWoApp.xaml.cs
@@ -43,8 +43,8 @@ namespace BeWo
public static LoginControl LoginControl;
public static MainControl MainControl;
- public static string ShortVersion = "3";
- public static string Version = "Version 3.0";
+ public static string ShortVersion = "3.1";
+ public static string Version = "Version 3.1";
public static int RenderTier = 0;
@@ -237,6 +237,9 @@ namespace BeWo
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "ShowOwnChatSettings");
AppSettings.ShowOwnChatSettings = val != null && val.Equals("1");
+ val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "SetStartTimeToEndTimeAfterSave");
+ AppSettings.SetStartTimeToEndTimeAfterSave = val != null && val.Equals("1");
+
val = UserSettingsUtils.GetSettingValue(_Mandator.Settings, "IsServiceRecordNoticeMandatory");
if (val != null && val.Equals("0"))
{
@@ -1062,11 +1065,11 @@ namespace BeWo
}
- public static void InitBlubb()
- {
- var timer = new System.Threading.Timer(
- e => MainControl.AufOffeneTerminePruefen(), null ,TimeSpan.Zero, TimeSpan.FromMinutes(1)
- );
- }
+ //public static void InitBlubb()
+ //{
+ // var timer = new System.Threading.Timer(
+ // e => MainControl.AufOffeneTerminePruefen(), null ,TimeSpan.Zero, TimeSpan.FromMinutes(1)
+ // );
+ //}
}
}
\ No newline at end of file
diff --git a/BeWo/Core/Config/AppSettings.cs b/BeWo/Core/Config/AppSettings.cs
index 29ae88537..62603b1c2 100644
--- a/BeWo/Core/Config/AppSettings.cs
+++ b/BeWo/Core/Config/AppSettings.cs
@@ -363,5 +363,7 @@ namespace BeWo.Core.Config
public bool ShowDienstplanung { get; set; }
public bool ShowEmployeeSignature { get; set; }
+
+ public bool SetStartTimeToEndTimeAfterSave { get; set; }
}
}
\ No newline at end of file
diff --git a/BeWo/LoginControl.xaml.cs b/BeWo/LoginControl.xaml.cs
index bccc0183c..22411cb58 100644
--- a/BeWo/LoginControl.xaml.cs
+++ b/BeWo/LoginControl.xaml.cs
@@ -264,7 +264,7 @@ namespace BeWo
private static String PUB_KEY_R3 = "3082010A0282010100BB021528CCF6A094D30F12EC8D5592C3F882F199A67A4288A75D26AAB52BB9C54CB1AF8E6BF975C8A3D70F4794145535578C9EA8A23919F5823C42A94E6EF53BC32EDB8DC0B05CF35938E7EDCF69F05A0B1BBEC094242587FA3771B313E71CACE19BEFDBE43B45524596A9C153CE34C852EEB5AEED8FDE6070E2A554ABB66D0E97A540346B2BD3BC66EB66347CFA6B8B8F572999F830175DBA726FFB81C5ADD286583D17C7E709BBF12BF786DCC1DA715DD446E3CCAD25C188BC60677566B3F118F7A25CE653FF3A88B647A5FF1318EA9809773F9D53F9CF01E5F5A6701714AF63A4FF99B3939DDC53A706FE48851DA169AE2575BB13CC5203F5ED51A18BDB150203010001";
-
+ private static String PUB_KEY_E1 = "04245C2DA22AFD1C4BA65D97732731ACB2A06962EF65E8A6B0F0AC4B9FFF1C0B700FD3982F4DFC0F009B37F074055732972E05EF2A4325A3FB6E342713F64F7E69D302995EEB244792C1249BE6B1218FC12481FC68CC1F69BA58F51922F774C616";
private bool PinPublicKey(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslpolicyerrors)
@@ -279,7 +279,7 @@ namespace BeWo
foreach (var element in chain.ChainElements)
{
String pk = element.Certificate.GetPublicKeyString();
- if (pk == PUB_KEY_X3 || pk == PUB_KEY_R3)
+ if (pk == PUB_KEY_X3 || pk == PUB_KEY_R3 || pk == PUB_KEY_E1)
{
chainContainsPk = true;
}
@@ -302,7 +302,7 @@ namespace BeWo
return Type.GetType("System.Reflection.ReflectionContext", false) != null;
}
- private bool CheckStatusMessage(BeWoProfile profile, String url)
+ private bool CheckStatusMessage(String url)
{
#if DEBUG
@@ -761,23 +761,23 @@ namespace BeWo
if (!isNet45OrNewer)
{
- if (!CheckStatusMessage(profile, String.Format(GETNETMESSAGE_URL, profile.Tenant, BeWoApp.Version)))
+ if (!CheckStatusMessage(String.Format(GETNETMESSAGE_URL, profile.Tenant, BeWoApp.Version)))
{
return;
}
}
-#if DEBUG
- if (!CheckStatusMessage(profile, String.Format(GETSTATUSMESSAGE_URL, profile.Tenant, BeWoApp.ShortVersion)))
- {
- return;
- }
-#else
- if (!CheckStatusMessage(profile, String.Format(GETSTATUSMESSAGE_URL, profile.Tenant, BeWoApp.ShortVersion)))
- {
- return;
- }
-#endif
+//#if DEBUG
+// if (!CheckStatusMessage(String.Format(GETSTATUSMESSAGE_URL, profile.Tenant, BeWoApp.ShortVersion)))
+// {
+// return;
+// }
+//#else
+// if (!CheckStatusMessage(String.Format(GETSTATUSMESSAGE_URL, profile.Tenant, BeWoApp.ShortVersion)))
+// {
+// return;
+// }
+//#endif
ChangeServerAndTenant(profile);
@@ -804,7 +804,7 @@ namespace BeWo
try
{
//1. Versuch
- UserValidationResult result = TryLogin(lWaitLayer, lUserName, lPassword, lPIN );
+ UserValidationResult result = TryLogin(lWaitLayer, lUserName, lPassword, lTenant, lPIN );
//2. Versuch
if (result == UserValidationResult.UnkownError)
@@ -812,7 +812,7 @@ namespace BeWo
ServiceFacade.DoOperationsServiceAsync(op => op.ResetTenant(lTenant),
delegate
{
- result = TryLogin(lWaitLayer ,lUserName, lPassword, lPIN);
+ result = TryLogin(lWaitLayer ,lUserName, lPassword, lTenant, lPIN);
if (result == UserValidationResult.UnkownError)
{
@@ -820,7 +820,7 @@ namespace BeWo
ServiceFacade.DoOperationsServiceAsync(op => op.ResetAllTenants(),
delegate
{
- result = TryLogin(lWaitLayer,lUserName, lPassword, lPIN);
+ result = TryLogin(lWaitLayer,lUserName, lPassword, lTenant, lPIN);
if (result == UserValidationResult.UnkownError)
{
@@ -905,7 +905,7 @@ namespace BeWo
}
}
- private UserValidationResult TryLogin(WaitLayer2 lWaitLayer, string lUserName, string lPassword, string lPIN = "")
+ private UserValidationResult TryLogin(WaitLayer2 lWaitLayer, string lUserName, string lPassword, string tenant, string lPin)
{
UserValidationResult? result = null;
@@ -942,7 +942,7 @@ namespace BeWo
{
try
{
- return s.IsUserValid(tempUsername, lPassword, lPIN);
+ return s.IsUserValid(tempUsername, lPassword, lPin);
}
catch (Exception)
{
@@ -952,7 +952,13 @@ namespace BeWo
r =>
{
result = r;
- LoginResult(lWaitLayer,r, lUserName, lPassword, lPIN );
+
+ this.Dispatch(delegate
+ {
+ LoginResult(lWaitLayer, r, lUserName, lPassword, tenant, lPin);
+ });
+
+
}, true);
}
catch (FaultException)
@@ -974,25 +980,17 @@ namespace BeWo
return result.Value;
}
- private void LoginResult( WaitLayer2 lWaitLayer, UserValidationResult result, String lUserName, String lPassword, String lPIN = "")
+ private void LoginResult( WaitLayer2 lWaitLayer, UserValidationResult result, String lUserName, String lPassword, String tenant, String lPIN)
{
- //
- // GetState hierhin
- //
- //
+
if (result == UserValidationResult.UserValid)
{
-
- //this.Dispatch(delegate
- //{
- // if (BeWoApp.Tenant == "demo")
- // {
- // var dlg = new ConfirmDemoDialog();
- // dlg.Topmost = true;
- // dlg.Show();
- // }
- //});
-
+ if (!CheckStatusMessage(String.Format(GETSTATUSMESSAGE_URL, tenant, BeWoApp.ShortVersion)))
+ {
+ grid_root.Children.Remove(lWaitLayer);
+ return;
+ }
+
BeWoApp.UserName = lUserName;
BeWoApp.UserPassword = lPassword;
diff --git a/BeWo/MainControl.xaml.cs b/BeWo/MainControl.xaml.cs
index 2ef69f23e..e19ff4847 100644
--- a/BeWo/MainControl.xaml.cs
+++ b/BeWo/MainControl.xaml.cs
@@ -93,7 +93,7 @@ namespace BeWo
BeWoApp.InitAutoUILocking();
- BeWoApp.InitBlubb();
+ //BeWoApp.InitBlubb();
#if !DEBUG
if (this.button_Scheduler.Visibility == Visibility.Visible && !BeWoApp.AppSettings.IsSchedulerAllowed)
diff --git a/BeWo/Scheduler/View/RequestAnswerView.xaml.cs b/BeWo/Scheduler/View/RequestAnswerView.xaml.cs
index 808a8d3f9..294cf7903 100644
--- a/BeWo/Scheduler/View/RequestAnswerView.xaml.cs
+++ b/BeWo/Scheduler/View/RequestAnswerView.xaml.cs
@@ -88,11 +88,11 @@ namespace BeWo.Scheduler.View
private static SchedulerAppointmentVM BuildNewVMFromOldVM(SchedulerAppointmentVM item, long emp2AppOid)
{
var customFieldStorage = (CustomFieldStorage) item.CustomFields[nameof(CustomFieldStorage)];
-
+ var dc = item.CommitToDataContract();
return new SchedulerAppointmentVM(new SchedulerAppointmentDC
{
- SchedulerAppointmentOid = item.CommitToDataContract().SchedulerAppointmentOid,
- NewSchedulerAppointmentVersion = item.CommitToDataContract().NewSchedulerAppointmentVersion,
+ SchedulerAppointmentOid = dc.SchedulerAppointmentOid,
+ NewSchedulerAppointmentVersion = dc.NewSchedulerAppointmentVersion,
IsPrivate = item.IsPrivate,
RecurrenceInfo = item.RecurrenceInfo,
Type = item.EventType,
@@ -108,7 +108,8 @@ namespace BeWo.Scheduler.View
Status = 1,
Originator = customFieldStorage.Originator,
IsTeilnahmeBestaetigung = true,
- SupportConceptList = customFieldStorage.SupportConceptList
+ SupportConceptList = customFieldStorage.SupportConceptList,
+ ActivationType = dc.ActivationType
})
{ CustomFields = item.CustomFields, LabelId = Convert.ToInt32(emp2AppOid)};
}
diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml b/BeWo/View/Detail/ServiceRecordEditView.xaml
index e6a7d6636..efe42527c 100644
--- a/BeWo/View/Detail/ServiceRecordEditView.xaml
+++ b/BeWo/View/Detail/ServiceRecordEditView.xaml
@@ -138,7 +138,7 @@
EditValue="{Binding Mode=TwoWay, Path=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
x:Name="startTime1" Grid.Column="1" Grid.Row="1"
Height="23"
- Margin="3,0,3,3"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
@@ -147,7 +147,7 @@
EditValue="{Binding Mode=TwoWay, Path=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="3" x:Name="endTime1" Grid.Row="1"
Height="23"
- Margin="3,0,3,3" />
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
@@ -193,7 +193,7 @@
EditValue="{Binding Mode=TwoWay, Path=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
x:Name="startTime2"
Height="23"
- Margin="3,0,3,3"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
diff --git a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs
index 1be5ea4ce..95526e3fe 100644
--- a/BeWo/View/Detail/ServiceRecordEditView.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordEditView.xaml.cs
@@ -22,6 +22,7 @@ using BS.Shared.DataContracts.ClientPartials;
using BS.Shared.DataContracts.Compact;
using BS.Shared.Services;
using BS.Shared.Translation;
+using DevExpress.Xpf.Editors;
using DevExpress.Xpf.RichEdit;
using SupportConceptService = BeWo.Core.Service.SupportConceptService;
@@ -382,7 +383,9 @@ namespace BeWo.View.Detail
if (lValid)
{
- lValid = BeWoUtils.ValidateServiceRecordVM(_ServiceRecordVM, ViewModel.StatisticsDC, _ServiceRecordVM.ChoosenNode, false, _ServiceRecordVM.Employee, null, null);
+ var copyVm = _ServiceRecordVM.Clone();
+ copyVm.DataContract.ServiceRecordOid = _ServiceRecordVM.DataContract.ServiceRecordOid;
+ lValid = BeWoUtils.ValidateServiceRecordVM(copyVm, ViewModel.StatisticsDC, _ServiceRecordVM.ChoosenNode, false, _ServiceRecordVM.Employee, null, null);
}
return lValid;
@@ -959,5 +962,16 @@ namespace BeWo.View.Detail
beWoWindow.ShowDialog();
}
+
+ private void TimeTextBox_OnLostFocus(object sender, RoutedEventArgs e)
+ {
+ var te = sender as TextEdit;
+
+ if (te != null)
+ {
+ te.EditValue = te.DisplayText.Replace("_", "0").Replace(" ", "");
+
+ }
+ }
}
}
\ No newline at end of file
diff --git a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml
index 7e49eaa3c..4df9ad53a 100644
--- a/BeWo/View/Detail/ServiceRecordGroupEditView.xaml
+++ b/BeWo/View/Detail/ServiceRecordGroupEditView.xaml
@@ -131,7 +131,7 @@
EditValue="{Binding Mode=TwoWay, Path=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
x:Name="startTime1" Grid.Column="1" Grid.Row="1"
Height="23"
- Margin="3,0,3,3"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
@@ -774,7 +774,7 @@
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
Grid.Column="3" x:Name="endTime1" Grid.Row="1"
Height="23"
- Margin="3,0,3,3" />
+ Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
diff --git a/BeWo/View/Detail/ServiceRecordView2.xaml.cs b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
index ac6737181..f626a6433 100644
--- a/BeWo/View/Detail/ServiceRecordView2.xaml.cs
+++ b/BeWo/View/Detail/ServiceRecordView2.xaml.cs
@@ -1408,6 +1408,11 @@ namespace BeWo.View.Detail
}
ViewModel.PrototypeVM.DistanceInMeter = null;
+
+ if (BeWoApp.AppSettings.SetStartTimeToEndTimeAfterSave)
+ {
+ ViewModel.PrototypeVM.StartTimeEditString = ViewModel.PrototypeVM.EndTimeEditString;
+ }
}
private void SetDefaultCategory()
@@ -4688,8 +4693,8 @@ namespace BeWo.View.Detail
if (te != null)
{
- var text = te.DisplayText;
-
+ te.EditValue = te.DisplayText.Replace("_", "0").Replace(" ", "");
+
}
}
}
diff --git a/BeWo/ViewModel/ServiceRecordVM.cs b/BeWo/ViewModel/ServiceRecordVM.cs
index b4684de0b..45f0a996a 100644
--- a/BeWo/ViewModel/ServiceRecordVM.cs
+++ b/BeWo/ViewModel/ServiceRecordVM.cs
@@ -2807,7 +2807,7 @@ namespace BeWo.ViewModel
}
}
- StoreDirtyInformation(
+ StoreDirtyInformation(
AreDifferent(DataContract.End, (_Date.Value + _StartTime.Value.TimeOfDay).AddMinutes((double)duration)) ||
AreDifferent(DataContract.Start,_Date.Value + _StartTime.Value.TimeOfDay), "TIME");
diff --git a/Data/Access/SearchDAO.cs b/Data/Access/SearchDAO.cs
index 292bce358..73c3c06b2 100644
--- a/Data/Access/SearchDAO.cs
+++ b/Data/Access/SearchDAO.cs
@@ -1247,7 +1247,8 @@ namespace BeWo.Data.Access
var c = CreateCriteria()
.Add(Restrictions.Eq(BeWoEntityBase.PropertyName_IsActive, ActivationTypeId.Active))
.Add(Restrictions.Not(Restrictions.Eq(SchedulerAppointment.PropertyName_Originator + ".Oid", employeeOid)))
- .CreateCriteria(SchedulerAppointment.PropertyName_EmployeeList)
+ .Add(Restrictions.Or(Restrictions.Ge(SchedulerAppointment.PropertyName_EndDate, DateTime.Now.AddDays(-7)), Restrictions.IsNull(SchedulerAppointment.PropertyName_EndDate)))
+ .CreateCriteria(SchedulerAppointment.PropertyName_EmployeeList)
.Add(Restrictions.And(Restrictions.Eq(Employee2SchedulerAppointment.PropertyName_Employee + ".Oid", employeeOid),
Restrictions.Eq(Employee2SchedulerAppointment.PropertyName_ParticipationAnswer, ParticipationAnswer.Offen)));
@@ -3639,7 +3640,8 @@ namespace BeWo.Data.Access
{
var lCriteria = CreateCriteria()
.Add(Restrictions.Eq(nameof(ServiceRecord.CustomerOid), customerOid))
- .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)));
+ .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)))
+ .Add(Restrictions.Gt(nameof(ServiceRecord.DistanceInMeter), 0));
var orCriteria = Restrictions.Or(
Restrictions.Between(nameof(ServiceRecord.Start), pSpan.StartDateTime, pSpan.EndDateTime),
@@ -3661,7 +3663,8 @@ namespace BeWo.Data.Access
{
var lCriteria = CreateCriteria()
.Add(Restrictions.In(nameof(ServiceRecord.CustomerOid), customerOids))
- .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)));
+ .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)))
+ .Add(Restrictions.Gt(nameof(ServiceRecord.DistanceInMeter), 0));
var orCriteria = Restrictions.Or(
Restrictions.Between(nameof(ServiceRecord.Start), span.StartDateTime, span.EndDateTime),
@@ -3769,7 +3772,8 @@ namespace BeWo.Data.Access
{
var lCriteria = CreateCriteria()
.Add(Restrictions.Eq(nameof(ServiceRecord.EmployeeOid), employeeOid))
- .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)));
+ .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)))
+ .Add(Restrictions.Gt(nameof(ServiceRecord.DistanceInMeter), 0));
var orCriteria = Restrictions.Or(
Restrictions.Between(nameof(ServiceRecord.Start), timeSpan.StartDateTime, timeSpan.EndDateTime),
@@ -3791,7 +3795,8 @@ namespace BeWo.Data.Access
{
var lCriteria = CreateCriteria()
.Add(Restrictions.In(nameof(ServiceRecord.EmployeeOid), employeeOids))
- .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)));
+ .Add(Restrictions.IsNotNull(nameof(ServiceRecord.DistanceInMeter)))
+ .Add(Restrictions.Gt(nameof(ServiceRecord.DistanceInMeter), 0));
var orCriteria = Restrictions.Or(
Restrictions.Between(nameof(ServiceRecord.Start), span.StartDateTime, span.EndDateTime),
diff --git a/Host/Multitenancy/demo.config b/Host/Multitenancy/demo.config
index 69337a55e..389b65063 100644
--- a/Host/Multitenancy/demo.config
+++ b/Host/Multitenancy/demo.config
@@ -17,7 +17,7 @@
- Server=localhost;Password=root;User ID=root; Initial Catalog=1111111111
+ Server=localhost;Password=root;User ID=root; Initial Catalog=betreuwo
diff --git a/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs b/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs
index 01facf078..39886eb8f 100644
--- a/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs
+++ b/Report/ReportObjects/EmployeeKilometerauswertungsListRO.cs
@@ -32,9 +32,11 @@ namespace BeWo.Report.ReportObjects
public void CreateEntries()
{
var start = MonthInformation;
- var end = start.AddMonths(1).AddDays(-1);
+ var end = start.AddMonths(1).AddTicks(-1);
- var timeSpan = new DateTimeSpan(start, end);
+ var timeSpan = new DateTimeSpan();
+ timeSpan.StartDateTime = start;
+ timeSpan.EndDateTime = end;
var rawData = DAOFactory.SearchDAO.FindListOfEmployeeServiceRecordsForKilometerauswertung(AllEmployees.Select(employee => employee.EmployeeOid).ToList(), timeSpan);
diff --git a/Report/ReportObjects/KilometerauswertungsListRO.cs b/Report/ReportObjects/KilometerauswertungsListRO.cs
index 7acbd2026..42f2c8be5 100644
--- a/Report/ReportObjects/KilometerauswertungsListRO.cs
+++ b/Report/ReportObjects/KilometerauswertungsListRO.cs
@@ -33,9 +33,11 @@ namespace BeWo.Report.ReportObjects
public void CreateEntries()
{
var start = MonthInformation;
- var end = start.AddMonths(1).AddDays(-1);
+ var end = start.AddMonths(1).AddTicks(-1);
- var timeSpan = new DateTimeSpan(start, end);
+ var timeSpan = new DateTimeSpan();
+ timeSpan.StartDateTime = start;
+ timeSpan.EndDateTime = end;
var rawData = DAOFactory.SearchDAO.FindListOfCustomerServiceRecordsForKilometerauswertung(AllCustomers.Select(customer => customer.CustomerOid).ToList(), timeSpan);
diff --git a/ReportImp/BetreuWoReports/Service/ResourceService.cs b/ReportImp/BetreuWoReports/Service/ResourceService.cs
index 32d1b6b55..da59005ff 100644
--- a/ReportImp/BetreuWoReports/Service/ResourceService.cs
+++ b/ReportImp/BetreuWoReports/Service/ResourceService.cs
@@ -11,7 +11,12 @@ namespace BetreuWoReports.Service
{
public class CustomerResourceService : ResourceService
{
-
+
+ public override string ValidateSchedulerAppointment(DateTime start, DateTime end, IEnumerable employees, IEnumerable customers, List resources, long originator, long? appointmentOid, Guid? recurrenceId, int occurrenceIndex = 0, bool shouldSkipResourceAvailability = false)
+ {
+ return DAOFactory.SearchDAO.ValidateSchedulerAppointment(start, end, employees, customers, resources, originator, appointmentOid, recurrenceId, occurrenceIndex, true);
+ }
+
public override List CheckResourceAvailability(DateTime start, DateTime end, List resourceOids, long? selectedAppointmentOid)
{
diff --git a/ReportImp/BetreuWoReports/ServicesOverviewReport.Designer.cs b/ReportImp/BetreuWoReports/ServicesOverviewReport.Designer.cs
index 6c7f0aa6b..3d9491b34 100644
--- a/ReportImp/BetreuWoReports/ServicesOverviewReport.Designer.cs
+++ b/ReportImp/BetreuWoReports/ServicesOverviewReport.Designer.cs
@@ -58,6 +58,7 @@ namespace BeWo.BetreuWoReports
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.formattingRuleStartDate = new DevExpress.XtraReports.UI.FormattingRule();
this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand();
+ this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
this.lblApprovedMinutes = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel33 = new DevExpress.XtraReports.UI.XRLabel();
this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo();
@@ -81,14 +82,12 @@ namespace BeWo.BetreuWoReports
this.xrLabel14 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel12 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel9 = new DevExpress.XtraReports.UI.XRLabel();
- this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel5 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel4 = new DevExpress.XtraReports.UI.XRLabel();
this.xrLabel3 = new DevExpress.XtraReports.UI.XRLabel();
this.fieldAbrechenbareMinuten = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldMinutenProWoche = new DevExpress.XtraReports.UI.CalculatedField();
this.fieldApprovedMinutesPerWeek = new DevExpress.XtraReports.UI.CalculatedField();
- this.xrLabel10 = new DevExpress.XtraReports.UI.XRLabel();
((System.ComponentModel.ISupportInitialize)(this.xrTableServiceRecords1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
@@ -368,6 +367,18 @@ namespace BeWo.BetreuWoReports
this.ReportHeader.Name = "ReportHeader";
this.ReportHeader.StylePriority.UseFont = false;
//
+ // xrLabel10
+ //
+ this.xrLabel10.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold);
+ this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(6.357829E-05F, 52F);
+ this.xrLabel10.Name = "xrLabel10";
+ this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
+ this.xrLabel10.SizeF = new System.Drawing.SizeF(433.33F, 20F);
+ this.xrLabel10.StylePriority.UseFont = false;
+ this.xrLabel10.StylePriority.UseTextAlignment = false;
+ this.xrLabel10.Text = "Az.: [ReferenceNumber]";
+ this.xrLabel10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
+ //
// lblApprovedMinutes
//
this.lblApprovedMinutes.Font = new System.Drawing.Font("Arial", 9.75F);
@@ -488,7 +499,6 @@ namespace BeWo.BetreuWoReports
this.xrLabel14,
this.xrLabel12,
this.xrLabel9,
- this.xrLabel6,
this.xrLabel5,
this.xrLabel4,
this.xrLabel3});
@@ -612,18 +622,6 @@ namespace BeWo.BetreuWoReports
this.xrLabel9.StylePriority.UseFont = false;
this.xrLabel9.Text = "Minuten";
//
- // xrLabel6
- //
- this.xrLabel6.Borders = DevExpress.XtraPrinting.BorderSide.Top;
- this.xrLabel6.Font = new System.Drawing.Font("Arial", 8F);
- this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(375.6248F, 115.7501F);
- this.xrLabel6.Name = "xrLabel6";
- this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
- this.xrLabel6.SizeF = new System.Drawing.SizeF(220F, 17.99997F);
- this.xrLabel6.StylePriority.UseBorders = false;
- this.xrLabel6.StylePriority.UseFont = false;
- this.xrLabel6.Text = "Bezugsbetreuer/in";
- //
// xrLabel5
//
this.xrLabel5.Borders = DevExpress.XtraPrinting.BorderSide.Top;
@@ -682,18 +680,6 @@ namespace BeWo.BetreuWoReports
this.fieldApprovedMinutesPerWeek.FieldType = DevExpress.XtraReports.UI.FieldType.Decimal;
this.fieldApprovedMinutesPerWeek.Name = "fieldApprovedMinutesPerWeek";
//
- // xrLabel10
- //
- this.xrLabel10.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Bold);
- this.xrLabel10.LocationFloat = new DevExpress.Utils.PointFloat(6.357829E-05F, 52F);
- this.xrLabel10.Name = "xrLabel10";
- this.xrLabel10.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F);
- this.xrLabel10.SizeF = new System.Drawing.SizeF(433.33F, 20F);
- this.xrLabel10.StylePriority.UseFont = false;
- this.xrLabel10.StylePriority.UseTextAlignment = false;
- this.xrLabel10.Text = "Az.: [ReferenceNumber]";
- this.xrLabel10.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft;
- //
// Stundenzettel
//
this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
@@ -758,7 +744,6 @@ namespace BeWo.BetreuWoReports
private DevExpress.XtraReports.UI.CalculatedField fieldAbrechenbareMinuten;
private DevExpress.XtraReports.UI.XRLabel xrLabel4;
private DevExpress.XtraReports.UI.XRLabel xrLabel3;
- private DevExpress.XtraReports.UI.XRLabel xrLabel6;
private DevExpress.XtraReports.UI.XRLabel xrLabel5;
private DevExpress.XtraReports.UI.XRLabel xrLabel32;
private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1;
diff --git a/ReportImp/SHGSchwerte/ServicesOverviewReport.Designer.cs b/ReportImp/SHGSchwerte/ServicesOverviewReport.Designer.cs
index bcec48990..b15e3ebbc 100644
--- a/ReportImp/SHGSchwerte/ServicesOverviewReport.Designer.cs
+++ b/ReportImp/SHGSchwerte/ServicesOverviewReport.Designer.cs
@@ -353,6 +353,7 @@ namespace BeWo.SHGSchwerte
this.xrLabel7});
this.GroupFooter1.Font = new System.Drawing.Font("Arial", 11F);
this.GroupFooter1.HeightF = 205.2083F;
+ this.GroupFooter1.KeepTogether = true;
this.GroupFooter1.Name = "GroupFooter1";
this.GroupFooter1.StylePriority.UseFont = false;
//
diff --git a/Service/Plugins/PluginLoader.cs b/Service/Plugins/PluginLoader.cs
index baa3b0fc2..e3729f9c5 100644
--- a/Service/Plugins/PluginLoader.cs
+++ b/Service/Plugins/PluginLoader.cs
@@ -17,7 +17,7 @@ namespace BeWo.Service.Plugins
#if DEBUG
var t = "demo";
- //t = "irgendwaswasesnichtgibt";
+ t = "irgendwaswasesnichtgibt";
//t = "5473568546"; //Interner Chat
//t = "2356097460"; // Lebenshilfe Würzburg
//t = "1234567890"; // Präsentationsdatenbank
@@ -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.
diff --git a/Service/Plugins/ResourceService.cs b/Service/Plugins/ResourceService.cs
index 41f84be00..327ef44dc 100644
--- a/Service/Plugins/ResourceService.cs
+++ b/Service/Plugins/ResourceService.cs
@@ -10,7 +10,11 @@ namespace BeWo.Service.Plugins
{
public class ResourceService : AbstractIDSpecificDefaultClass
{
-
+
+ public virtual string ValidateSchedulerAppointment(DateTime start, DateTime end, IEnumerable employees, IEnumerable customers, List resources, long originator, long? appointmentOid, Guid? recurrenceId, int occurrenceIndex = 0, bool shouldSkipResourceAvailability = false)
+ {
+ return DAOFactory.SearchDAO.ValidateSchedulerAppointment(start, end, employees, customers, resources, originator, appointmentOid, recurrenceId, occurrenceIndex);
+ }
public virtual List CheckResourceAvailability(DateTime start, DateTime end, List resourceOids, long? selectedAppointmentOid)
{
diff --git a/Service/ServiceImplementations/ResourceServiceImp.cs b/Service/ServiceImplementations/ResourceServiceImp.cs
index 2ef570b52..d0c729e23 100644
--- a/Service/ServiceImplementations/ResourceServiceImp.cs
+++ b/Service/ServiceImplementations/ResourceServiceImp.cs
@@ -1233,41 +1233,8 @@ namespace BeWo.Service.ServiceImplementations
}
// Aufgaben laden
- var oldTasks = DAOFactory.SearchDAO.LoadTasksForConversion(pEmployeeOid);
- var taskAppointments = new List();
-
- foreach(var task in oldTasks)
- {
- var taskAsAppointment = new SchedulerAppointment
- {
- SupportConceptList = new List { task.SupportConcept },
- EmployeeList = new List(),
- FormerTaskOid = task.Oid,
- Subject = task.Title,
- CompletedNotice = task.CompletedNotice,
- TaskDescription = task.Description,
- IsActive = task.IsActive,
- IsTask = true,
- DueDate = task.DueDate,
- StartDate = task.CompletedDate.HasValue ? task.DueDate?.GetShortDateTime() : task.InsTs?.GetShortDateTime(),
- EndDate = task.DueDate?.GetShortDateTime().AddDays(1) ?? DateTime.MaxValue.Date
- };
-
- foreach(var employee in task.EmployeeList)
- {
- var rel = new Employee2SchedulerAppointment
- {
- Employee = DAOFactory.GenericDAO.LoadByID(employee.Oid.Value),
- ParticipationAnswer = ParticipationAnswer.Offen
- };
-
- taskAsAppointment.EmployeeList.AddIfNotIn(rel);
- }
-
- taskAppointments.Add(taskAsAppointment);
- }
-
- InsertSchedulerAppointments(MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDCs(taskAppointments));
+ ConvertOldTasks(pEmployeeOid);
+
var taskAppointmentDCs = MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDCs(DAOFactory.SearchDAO.LoadTaskAppointmentsForEmployee(pEmployeeOid, true));
@@ -1281,6 +1248,50 @@ namespace BeWo.Service.ServiceImplementations
}
}
+ private void ConvertOldTasks(long pEmployeeOid)
+ {
+ var oldTasks = DAOFactory.SearchDAO.LoadTasksForConversion(pEmployeeOid);
+ var taskAppointments = new List();
+
+ foreach (var task in oldTasks)
+ {
+ var taskAsAppointment = new SchedulerAppointment
+ {
+ SupportConceptList = new List { task.SupportConcept },
+ EmployeeList = new List(),
+ FormerTaskOid = task.Oid,
+ Subject = task.Title,
+ CompletedNotice = task.CompletedNotice,
+ TaskDescription = task.Description,
+ IsActive = task.IsActive,
+ IsTask = true,
+ DueDate = task.DueDate,
+ CompletedDate = task.CompletedDate,
+ StartDate = task.CompletedDate.HasValue ? task.DueDate?.GetShortDateTime() : task.InsTs?.GetShortDateTime(),
+ EndDate = task.DueDate?.GetShortDateTime().AddDays(1) ?? DateTime.MaxValue.Date
+ };
+
+ foreach (var employee in task.EmployeeList)
+ {
+ var rel = new Employee2SchedulerAppointment
+ {
+ Employee = DAOFactory.GenericDAO.LoadByID(employee.Oid.Value),
+ ParticipationAnswer = ParticipationAnswer.Offen
+ };
+
+ taskAsAppointment.EmployeeList.AddIfNotIn(rel);
+ }
+
+ taskAppointments.Add(taskAsAppointment);
+ }
+
+ if (taskAppointments.Count > 0)
+ {
+ InsertSchedulerAppointments(
+ MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDCs(taskAppointments));
+ }
+ }
+
public List LoadFilteredAppointments(bool pHasRightToSeeAllEmployeeAppointments, long pEmployeeOid, DateTime pIntervalStart, DateTime pIntervalEnd, List pSelectedEmployees, List pSelectedCustomer, List pSelectedResources, bool pEmployeesOnly, bool pCustomersOnly, bool pResourcesOnly, bool pPrivateAppointmentsOnly, bool pOnlyMyAppointments)
{
try
@@ -1473,41 +1484,8 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
- var oldTasks = DAOFactory.SearchDAO.LoadTasksForConversion(pEmployeeOid);
- var taskAppointments = new List();
+ ConvertOldTasks(pEmployeeOid);
- foreach(var task in oldTasks)
- {
- var taskAsAppointment = new SchedulerAppointment
- {
- SupportConceptList = new List {task.SupportConcept},
- EmployeeList = new List(),
- FormerTaskOid = task.Oid,
- Subject = task.Title,
- CompletedNotice = task.CompletedNotice,
- TaskDescription = task.Description,
- IsActive = task.IsActive,
- IsTask = true,
- DueDate = task.DueDate,
- StartDate = task.CompletedDate.HasValue ? task.DueDate?.GetShortDateTime() : task.InsTs?.GetShortDateTime(),
- EndDate = task.DueDate?.GetShortDateTime().AddDays(1) ?? DateTime.MaxValue.Date
- };
-
- foreach(var employee in task.EmployeeList)
- {
- var rel = new Employee2SchedulerAppointment
- {
- Employee = DAOFactory.GenericDAO.LoadByID(employee.Oid.Value),
- ParticipationAnswer = ParticipationAnswer.Offen
- };
-
- taskAsAppointment.EmployeeList.AddIfNotIn(rel);
- }
-
- taskAppointments.Add(taskAsAppointment);
- }
-
- InsertSchedulerAppointments(MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDCs(taskAppointments));
var taskAppointmentDCs = DAOFactory.SearchDAO.LoadTaskAppointmentsForEmployee(pEmployeeOid, true);
@@ -1547,43 +1525,8 @@ namespace BeWo.Service.ServiceImplementations
{
try
{
- var oldTasks = DAOFactory.SearchDAO.LoadTasksForConversion(pEmployeeOid);
- var taskAppointments = new List();
-
- foreach (var task in oldTasks)
- {
- var taskAsAppointment = new SchedulerAppointment
- {
- SupportConceptList = new List { task.SupportConcept },
- EmployeeList = new List(),
- FormerTaskOid = task.Oid,
- Subject = task.Title,
- CompletedNotice = task.CompletedNotice,
- TaskDescription = task.Description,
- IsActive = task.IsActive,
- IsTask = true,
- DueDate = task.DueDate,
- CompletedDate = task.CompletedDate,
- StartDate = task.CompletedDate.HasValue ? task.DueDate?.GetShortDateTime() : task.InsTs?.GetShortDateTime(),
- EndDate = task.DueDate?.GetShortDateTime().AddDays(1) ?? DateTime.MaxValue.Date
- };
-
- foreach (var employee in task.EmployeeList)
- {
- var rel = new Employee2SchedulerAppointment
- {
- Employee = DAOFactory.GenericDAO.LoadByID(employee.Oid.Value),
- ParticipationAnswer = ParticipationAnswer.Offen
- };
-
- taskAsAppointment.EmployeeList.AddIfNotIn(rel);
- }
-
- taskAppointments.Add(taskAsAppointment);
- }
-
- InsertSchedulerAppointments(MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDCs(taskAppointments));
-
+ ConvertOldTasks(pEmployeeOid);
+
var taskAppointmentDCs = DAOFactory.SearchDAO.LoadTaskAppointmentsForEmployee(pEmployeeOid, false);
var monday = DateTime.Today.FirstDateOfWeek(pInvertalStart.AddDays(-1 * pBufferSize).GetIso8601WeekOfYear());
@@ -2310,7 +2253,17 @@ namespace BeWo.Service.ServiceImplementations
public string ValidateSchedulerAppointment(DateTime start, DateTime end, IEnumerable employees, IEnumerable customers, List resources, long originator, long? appointmentOid, Guid? recurrenceId, int occurrenceIndex = 0, bool shouldSkipResourceAvailability = false)
{
- return DAOFactory.SearchDAO.ValidateSchedulerAppointment(start, end, employees, customers, resources, originator, appointmentOid, recurrenceId, occurrenceIndex);
+ try
+ {
+ var s = PluginLoader.FindClass();
+
+ return s.ValidateSchedulerAppointment(start, end, employees, customers, resources, originator, appointmentOid, recurrenceId, occurrenceIndex);
+
+ }
+ catch (Exception e)
+ {
+ throw Utils.CreateBeWoFaultException(e);
+ }
}
}
}
\ No newline at end of file
diff --git a/Shared/Core/Utils.cs b/Shared/Core/Utils.cs
index 518a8cd8f..506c7accb 100644
--- a/Shared/Core/Utils.cs
+++ b/Shared/Core/Utils.cs
@@ -675,7 +675,9 @@ namespace BS.Shared.Core
var isAllowedToEditEverything = pLoggedOnUser.HasRight(UserRightType.EditAll);
var isAllowedToCreateEverything = pLoggedOnUser.HasRight(UserRightType.CreateAll);
- var isAllowedToViewCustomers = pLoggedOnUser.HasRight(UserRightType.CustomerView_View);
+ var isAllowedToViewCustomers = pLoggedOnUser.HasRight(UserRightType.CustomerView_View) ||
+ pLoggedOnUser.HasRight(UserRightType.Customer_ViewMyTeams) ||
+ pLoggedOnUser.HasRight(UserRightType.Customer_ViewMyCustomers);
var isAllowedToViewAllCustomerAppointments = pLoggedOnUser.HasRight(UserRightType.KalenderKliententermineAlleAnsehen);
var isAllowedToCreateCustomerAppointments = pLoggedOnUser.HasRight(UserRightType.KalenderKliententermineAnlegen);
diff --git a/Shared/DataContracts/ServiceRecordDC.cs b/Shared/DataContracts/ServiceRecordDC.cs
index b3031b79f..b25b647dd 100644
--- a/Shared/DataContracts/ServiceRecordDC.cs
+++ b/Shared/DataContracts/ServiceRecordDC.cs
@@ -90,8 +90,16 @@ namespace BS.Shared.DataContracts
[DataMember]
public long? ServiceRecordVersion { get; set; }
+ private DateTime? test;
+
[DataMember]
- public DateTime? Start { get; set; }
+ public DateTime? Start {
+ get { return test; }
+ set
+ {
+ test = value;
+ }
+ }
[DataMember]
public CompactSupportConceptDC SupportConcept { get; set; }