Changes for Xylem Nanjing, ver. 3.1.1676
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using TBF.Resources;
|
||||
|
||||
namespace TBF.UI.ResultsMI
|
||||
@@ -106,9 +107,9 @@ namespace TBF.UI.ResultsMI
|
||||
else if (mode == PreviousResultsMode.Fix)
|
||||
{
|
||||
/// Access only to thise who manage production tracing
|
||||
Users.Entities.GID[] rqrdGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TraceabilityManagement };
|
||||
GID[] rqrdGroupMembership = new GID[] { GID.TraceabilityManagement };
|
||||
|
||||
if ((new Users.Forms.LoginDlg(Users.GlobalData.CurrentUser.UserName, rqrdGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
if ((new SharedDatabase.Forms.LoginDlg(GlobalData.GetCurrentUserName(), rqrdGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4,13 +4,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
#if MANAGED
|
||||
using Oracle.ManagedDataAccess.Client;
|
||||
#else
|
||||
using Oracle.DataAccess.Client;
|
||||
#endif
|
||||
using Common;
|
||||
using Results;
|
||||
using Results.Entities;
|
||||
using TBF.Rig.Output.DB.SensusOracle;
|
||||
using TBF.Resources;
|
||||
using TBF.Rig.Output.DB.SensusOracle;
|
||||
|
||||
namespace TBF.UI.ResultsMI
|
||||
{
|
||||
@@ -209,7 +214,7 @@ namespace TBF.UI.ResultsMI
|
||||
//}
|
||||
//Database.WriteLogsToDisk(logger, b);
|
||||
|
||||
using (ISession configSession = Config.FluentCommon.CreateSession(Users.Entities.DBKind.Config))
|
||||
using (ISession configSession = Config.FluentCommon.CreateSession(DBKind.Config))
|
||||
{
|
||||
IList<Config.Entities.Component> cmpntEntities = configSession.QueryOver<Config.Entities.Component>()
|
||||
.OrderBy(x => x.ItemNr).Asc
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using Results;
|
||||
using TBF.Resources;
|
||||
@@ -15,7 +16,7 @@ namespace TBF.UI.ResultsMI
|
||||
/// <summary>
|
||||
/// Required access rights to make changes with this form
|
||||
/// </summary>
|
||||
static readonly Users.Entities.GID[] RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.GID.Metrologists };
|
||||
static readonly Common.GID[] RequiredGroupMembership = new Common.GID[] { Common.GID.TestingSpecialists, Common.GID.Metrologists };
|
||||
|
||||
public bool Unlocked; /// true = changes enabled
|
||||
|
||||
@@ -90,14 +91,14 @@ namespace TBF.UI.ResultsMI
|
||||
{
|
||||
if (!Unlocked)
|
||||
{
|
||||
if (!Users.GlobalData.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
if (!GlobalData.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
{
|
||||
if ((new Users.Forms.LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
if ((new SharedDatabase.Forms.LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
}
|
||||
else if (Program.LocalSettings.AlwaysAskPasswdWhenUnlocking)
|
||||
{
|
||||
if ((new Users.Forms.LoginDlg(Users.GlobalData.CurrentUser.UserName, RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
if ((new SharedDatabase.Forms.LoginDlg(GlobalData.GetCurrentUserName(), RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -7,11 +7,10 @@ using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using Config.Entities;
|
||||
using Common;
|
||||
using Results;
|
||||
using Results.Forms;
|
||||
using Results.Entities;
|
||||
using TracingDB.Entities;
|
||||
using SharedDatabase.Entities;
|
||||
using TBF.Resources;
|
||||
using TBF.UiBridge;
|
||||
|
||||
@@ -549,15 +548,15 @@ namespace TBF.UI.ResultsMI
|
||||
}
|
||||
|
||||
|
||||
void ShowMoreWMResults(WaterMeter wm)
|
||||
void ShowMoreWMResults(Results.Entities.WaterMeter wm)
|
||||
{
|
||||
if ((TracingDB.DB.SessionFactory == null) || string.IsNullOrEmpty(wm.SerialNr))
|
||||
if ((SharedDatabase.TracingDB.SessionFactory == null) || string.IsNullOrEmpty(wm.SerialNr))
|
||||
{
|
||||
new MoreWMResultsDlg(wm, null).ShowDialog();
|
||||
}
|
||||
else
|
||||
{
|
||||
using (ISession session = TracingDB.DB.SessionFactory.OpenSession())
|
||||
using (ISession session = SharedDatabase.TracingDB.SessionFactory.OpenSession())
|
||||
{
|
||||
IList<ReferenceRecord> refRecords = session.QueryOver<ReferenceRecord>()
|
||||
.Where(x => (x.Code == wm.SerialNr))
|
||||
|
||||
Reference in New Issue
Block a user