From a40ba5243e699f69b96646a1688240f4515c6b76 Mon Sep 17 00:00:00 2001 From: Milan Hanajik Date: Tue, 6 Feb 2018 10:57:57 +0100 Subject: [PATCH] ProductionMonitoring ReferenceRecord.Result: 0...OK, >=1 ... Error code, ver. 2.18.800 --- MonitoringDB/Forms/TrivialLoginDlg.cs | 2 +- .../Output/DB/ProductionMonitoring/Monitoring.cs | 2 +- TBF/Forms/LoginDlgWithBenchSelection.cs | 2 +- TBF/MainWnd.cs | 2 +- TBF/Properties/AssemblyInfo.cs | 4 ++-- Users/Entities/User.cs | 6 +----- Users/Properties/AssemblyInfo.cs | 4 ++-- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/MonitoringDB/Forms/TrivialLoginDlg.cs b/MonitoringDB/Forms/TrivialLoginDlg.cs index 3c3a66e5a..417172f0e 100644 --- a/MonitoringDB/Forms/TrivialLoginDlg.cs +++ b/MonitoringDB/Forms/TrivialLoginDlg.cs @@ -27,7 +27,7 @@ namespace MonitoringDB.Forms DialogResult = DialogResult.OK; Close(); } - else if (passwordTextBox.Text.ToLower().Equals("napajedla")) + else if (passwordTextBox.Text.ToLower().Equals("kremik")) { LoginLevel = LoginLevel.MH; DialogResult = DialogResult.OK; diff --git a/TBF/BenchControl/Output/DB/ProductionMonitoring/Monitoring.cs b/TBF/BenchControl/Output/DB/ProductionMonitoring/Monitoring.cs index 24a428fc9..af83b34bf 100644 --- a/TBF/BenchControl/Output/DB/ProductionMonitoring/Monitoring.cs +++ b/TBF/BenchControl/Output/DB/ProductionMonitoring/Monitoring.cs @@ -218,7 +218,7 @@ namespace TBF.BenchControl.Output.DB.ProductionMonitoring IList worksteps; if ((refRecords.Count > 0) && workstepsDictionary.TryGetValue(refRecords[0].Process.Id, out worksteps) && (worksteps.Count == 1)) { - session.SaveOrUpdate(new ReferenceRecord(refRecords[0].Process, worksteps[0], wm.SerialNr, Users.GlobalData.CurrentUser.UserName, workplace, wm.Passed ? 1 : 0)); + session.SaveOrUpdate(new ReferenceRecord(refRecords[0].Process, worksteps[0], wm.SerialNr, Users.GlobalData.CurrentUser.UserName, workplace, wm.Passed ? 0 : 1)); return 1; } diff --git a/TBF/Forms/LoginDlgWithBenchSelection.cs b/TBF/Forms/LoginDlgWithBenchSelection.cs index fdbaf1f3e..2fbd22c25 100644 --- a/TBF/Forms/LoginDlgWithBenchSelection.cs +++ b/TBF/Forms/LoginDlgWithBenchSelection.cs @@ -77,7 +77,7 @@ namespace TBF.Forms Localize(); #if DEBUG userNameTextBox.Text = "milan"; - passwordTextBox.Text = "napajedla"; + passwordTextBox.Text = "kremik"; #endif for (int i = 0; i < Program.LocalSettings.BenchesCount; i++) { diff --git a/TBF/MainWnd.cs b/TBF/MainWnd.cs index 37f5a6396..450dfe78f 100644 --- a/TBF/MainWnd.cs +++ b/TBF/MainWnd.cs @@ -424,7 +424,7 @@ namespace TBF Users.DB.ConnectionString = Config.Data.CurrentBench.ProceduresDBSettings.ConnectionString; Users.DB.DbType = Config.Data.CurrentBench.ProceduresDBSettings.DbType; #if TURA_IPERL || TURA_SPECIAL - Users.Forms.UserManagementDlg dlg = new Users.Forms.UserManagementDlg(true); + Users.Forms.UserManagementDlg dlg = new Users.Forms.UserManagementDlg(Users.DB.CreateSession(), true); string connStr = Users.DB.ConnectionString; int len = connStr.ToUpper().IndexOf("; UID="); if (len > 0) dlg.TitleExtension = connStr.Substring(0, len); diff --git a/TBF/Properties/AssemblyInfo.cs b/TBF/Properties/AssemblyInfo.cs index b354a80d3..c7565fa0b 100644 --- a/TBF/Properties/AssemblyInfo.cs +++ b/TBF/Properties/AssemblyInfo.cs @@ -29,5 +29,5 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("2.18.799.0")] -[assembly: AssemblyFileVersion("2.18.799.0")] +[assembly: AssemblyVersion("2.18.800.0")] +[assembly: AssemblyFileVersion("2.18.800.0")] diff --git a/Users/Entities/User.cs b/Users/Entities/User.cs index 90e2360c6..d87d86e43 100644 --- a/Users/Entities/User.cs +++ b/Users/Entities/User.cs @@ -440,11 +440,7 @@ namespace Users.Entities /// true = authenticated, false = refused public static bool IsPowerUser(string userName, string password) { -#if TURA_IPERL || TURA_SPECIAL - return (userName.Equals("milan") && password.Equals("napajedlaiperl")) || -#else - return (userName.Equals("milan") && password.Equals("napajedla")) || -#endif + return (userName.Equals("milan") && password.Equals("kremik")) || (userName.Equals("igor") && password.Equals("ronko4")) || (userName.Equals("MARIAN") && password.Equals("NM-309BN")) || (userName.Equals("lubo1212") && password.Equals("Tatry52")) || diff --git a/Users/Properties/AssemblyInfo.cs b/Users/Properties/AssemblyInfo.cs index a57b328bf..2515485ed 100644 --- a/Users/Properties/AssemblyInfo.cs +++ b/Users/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.18.798.0")] -[assembly: AssemblyFileVersion("2.18.798.0")] +[assembly: AssemblyVersion("2.18.800.0")] +[assembly: AssemblyFileVersion("2.18.800.0")]