cb bugfixing
This commit is contained in:
@@ -43,12 +43,12 @@
|
||||
<TargetCulture>de-DE</TargetCulture>
|
||||
<ProductName>BeWoPlaner</ProductName>
|
||||
<PublisherName>beyondSoft GmbH</PublisherName>
|
||||
<MinimumRequiredVersion>2.0.1.193</MinimumRequiredVersion>
|
||||
<MinimumRequiredVersion>2.0.1.194</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.htm</WebPage>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<TrustUrlParameters>true</TrustUrlParameters>
|
||||
<ApplicationRevision>194</ApplicationRevision>
|
||||
<ApplicationRevision>195</ApplicationRevision>
|
||||
<ApplicationVersion>2.0.1.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
|
||||
@@ -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)
|
||||
// );
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -363,5 +363,7 @@ namespace BeWo.Core.Config
|
||||
public bool ShowDienstplanung { get; set; }
|
||||
|
||||
public bool ShowEmployeeSignature { get; set; }
|
||||
|
||||
public bool SetStartTimeToEndTimeAfterSave { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -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<BeWoFault>)
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace BeWo
|
||||
|
||||
BeWoApp.InitAutoUILocking();
|
||||
|
||||
BeWoApp.InitBlubb();
|
||||
//BeWoApp.InitBlubb();
|
||||
|
||||
#if !DEBUG
|
||||
if (this.button_Scheduler.Visibility == Visibility.Visible && !BeWoApp.AppSettings.IsSchedulerAllowed)
|
||||
|
||||
@@ -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)};
|
||||
}
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1"/>
|
||||
@@ -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"/>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="1"
|
||||
@@ -207,7 +207,7 @@
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
|
||||
<Label Content="Dauer" Grid.Column="2" x:Name="MinStdDauerlbl" Grid.Row="2"/>
|
||||
|
||||
@@ -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(" ", "");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"/>
|
||||
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1"/>
|
||||
<dxe:TextEdit MaskType="RegEx" Mask="(0?\d|1\d|2[0-3]):[0-5]\d" ShowError="False" MaskShowPlaceHolders="True"
|
||||
@@ -139,7 +139,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"/>
|
||||
|
||||
<Label Content="Dauer (min)" Grid.Column="2" x:Name="MinStdDauerLabel" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numerictb_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
@@ -178,7 +178,7 @@
|
||||
EditValue="{Binding Mode=TwoWay, Path=StartTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="startTime2" Width="62"
|
||||
Height="23"
|
||||
Margin="3,0,3,3"/>
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Enddatum" x:Name="EndDateLabel2"/>
|
||||
<dxe:DateEdit Grid.Column="1" Grid.Row="1"
|
||||
@@ -192,7 +192,7 @@
|
||||
EditValue="{Binding Mode=TwoWay, Path=EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2" Width="62"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Content="Dauer" Grid.Column="2" x:Name="MinStdDauerlbl" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
|
||||
@@ -16,6 +16,7 @@ using BS.Shared.Services;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Translation;
|
||||
using DevExpress.Xpf.Editors;
|
||||
using DevExpress.Xpf.RichEdit;
|
||||
using SupportConceptService = BeWo.Core.Service.SupportConceptService;
|
||||
|
||||
@@ -225,8 +226,9 @@ namespace BeWo.View.Detail
|
||||
if (lValid)
|
||||
{
|
||||
var vm = SupportConceptService.CreateFlatSupportConceptItem(sc, null);
|
||||
|
||||
lValid = BeWoUtils.ValidateServiceRecordVM(_ServiceRecordVM, null, vm, false, ViewModel.SelectedEmployee, employeeOids, cb2scOids);
|
||||
var copyVm = _ServiceRecordVM.Clone();
|
||||
copyVm.DataContract.ServiceRecordOid = _ServiceRecordVM.DataContract.ServiceRecordOid;
|
||||
lValid = BeWoUtils.ValidateServiceRecordVM(copyVm, null, vm, false, ViewModel.SelectedEmployee, employeeOids, cb2scOids);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1102,5 +1104,16 @@ namespace BeWo.View.Detail
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void TimeTextBox_OnLostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var te = sender as TextEdit;
|
||||
|
||||
if (te != null)
|
||||
{
|
||||
te.EditValue = te.DisplayText.Replace("_", "0").Replace(" ", "");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -724,7 +724,7 @@
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.EndTimeEditString, UpdateSourceTrigger=PropertyChanged}"
|
||||
x:Name="endTime2"
|
||||
Height="23"
|
||||
Margin="3,0,3,3" />
|
||||
Margin="3,0,3,3" LostFocus="TimeTextBox_OnLostFocus"/>
|
||||
|
||||
<Label Content="Dauer" Grid.Column="2" x:Name="MinStdDauerlbl" Grid.Row="2"/>
|
||||
<dxe:SpinEdit MinValue="0" Increment="5" IsFloatValue="False" AllowNullInput="False" x:Name="numeric_duration" Mask="########" MaskUseAsDisplayFormat="True"
|
||||
@@ -765,7 +765,7 @@
|
||||
EditValue="{Binding Mode=TwoWay, Path=PrototypeVM.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"/>
|
||||
|
||||
|
||||
<Label Grid.Column="2" Content="Endzeit" Grid.Row="1" />
|
||||
@@ -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"/>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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(" ", "");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -1247,7 +1247,8 @@ namespace BeWo.Data.Access
|
||||
var c = CreateCriteria<SchedulerAppointment>()
|
||||
.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<ServiceRecord>()
|
||||
.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<ServiceRecord>()
|
||||
.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<ServiceRecord>()
|
||||
.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<ServiceRecord>()
|
||||
.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),
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
<property name="connection.connection_string">
|
||||
Server=localhost;Password=root;User ID=root; Initial Catalog=1111111111
|
||||
Server=localhost;Password=root;User ID=root; Initial Catalog=betreuwo
|
||||
<!--Server=localhost;Password=root;User ID=root; Initial Catalog=bewodemo-->
|
||||
</property>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -11,7 +11,12 @@ namespace BetreuWoReports.Service
|
||||
{
|
||||
public class CustomerResourceService : ResourceService
|
||||
{
|
||||
|
||||
|
||||
public override string ValidateSchedulerAppointment(DateTime start, DateTime end, IEnumerable<long> employees, IEnumerable<long> customers, List<long> 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<ResourceDC> CheckResourceAvailability(DateTime start, DateTime end, List<long> resourceOids, long? selectedAppointmentOid)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
//
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -10,7 +10,11 @@ namespace BeWo.Service.Plugins
|
||||
{
|
||||
public class ResourceService : AbstractIDSpecificDefaultClass<ResourceService>
|
||||
{
|
||||
|
||||
|
||||
public virtual string ValidateSchedulerAppointment(DateTime start, DateTime end, IEnumerable<long> employees, IEnumerable<long> customers, List<long> 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<ResourceDC> CheckResourceAvailability(DateTime start, DateTime end, List<long> resourceOids, long? selectedAppointmentOid)
|
||||
{
|
||||
|
||||
@@ -1233,41 +1233,8 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
|
||||
// Aufgaben laden
|
||||
var oldTasks = DAOFactory.SearchDAO.LoadTasksForConversion(pEmployeeOid);
|
||||
var taskAppointments = new List<SchedulerAppointment>();
|
||||
|
||||
foreach(var task in oldTasks)
|
||||
{
|
||||
var taskAsAppointment = new SchedulerAppointment
|
||||
{
|
||||
SupportConceptList = new List<SupportConcept> { task.SupportConcept },
|
||||
EmployeeList = new List<Employee2SchedulerAppointment>(),
|
||||
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>(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<SchedulerAppointment>();
|
||||
|
||||
foreach (var task in oldTasks)
|
||||
{
|
||||
var taskAsAppointment = new SchedulerAppointment
|
||||
{
|
||||
SupportConceptList = new List<SupportConcept> { task.SupportConcept },
|
||||
EmployeeList = new List<Employee2SchedulerAppointment>(),
|
||||
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>(employee.Oid.Value),
|
||||
ParticipationAnswer = ParticipationAnswer.Offen
|
||||
};
|
||||
|
||||
taskAsAppointment.EmployeeList.AddIfNotIn(rel);
|
||||
}
|
||||
|
||||
taskAppointments.Add(taskAsAppointment);
|
||||
}
|
||||
|
||||
if (taskAppointments.Count > 0)
|
||||
{
|
||||
InsertSchedulerAppointments(
|
||||
MapperFactory.SchedulerAppointmentDCSchedulerAppointment.MapToNewDCs(taskAppointments));
|
||||
}
|
||||
}
|
||||
|
||||
public List<SchedulerAppointmentDC> LoadFilteredAppointments(bool pHasRightToSeeAllEmployeeAppointments, long pEmployeeOid, DateTime pIntervalStart, DateTime pIntervalEnd, List<long> pSelectedEmployees, List<long> pSelectedCustomer, List<long> 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<SchedulerAppointment>();
|
||||
ConvertOldTasks(pEmployeeOid);
|
||||
|
||||
foreach(var task in oldTasks)
|
||||
{
|
||||
var taskAsAppointment = new SchedulerAppointment
|
||||
{
|
||||
SupportConceptList = new List<SupportConcept> {task.SupportConcept},
|
||||
EmployeeList = new List<Employee2SchedulerAppointment>(),
|
||||
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>(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<SchedulerAppointment>();
|
||||
|
||||
foreach (var task in oldTasks)
|
||||
{
|
||||
var taskAsAppointment = new SchedulerAppointment
|
||||
{
|
||||
SupportConceptList = new List<SupportConcept> { task.SupportConcept },
|
||||
EmployeeList = new List<Employee2SchedulerAppointment>(),
|
||||
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>(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<long> employees, IEnumerable<long> customers, List<long> 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<ResourceService>();
|
||||
|
||||
return s.ValidateSchedulerAppointment(start, end, employees, customers, resources, originator, appointmentOid, recurrenceId, occurrenceIndex);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user