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"/>