Access rights clean-up for PL
This commit is contained in:
parent
b965541b1c
commit
3fee487c5d
@ -127,7 +127,7 @@ namespace Config
|
||||
case Common.GID.Administrators:
|
||||
#if TURA_IPERL || TURA_IPERL_NEW || TURA_SPECIAL
|
||||
case Common.GID.TraceabilityManagement:
|
||||
#elif KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
#elif LANG_PL
|
||||
case Common.GID.MetrologicalAuthority:
|
||||
case Common.GID.WaterMeterAuthority:
|
||||
#endif
|
||||
|
||||
@ -404,7 +404,7 @@ namespace TBF.Rig.Sequences
|
||||
}
|
||||
while (StateMachine.Procedure == null); /// Make sure a valid procedure is selected
|
||||
|
||||
#if KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
#if LANG_PL
|
||||
///
|
||||
/// Approval of a legalizator
|
||||
///
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2013-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
using TBF.Resources;
|
||||
@ -27,7 +28,9 @@ namespace TBF.UI.Bench.Metrology
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.ParentForm = this;
|
||||
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.Metrologists, Common.GID.MetrologicalAuthority };
|
||||
sharedButtons.RequiredGroupMembership = new GID[] { GID.Metrologists,
|
||||
GID.MetrologicalAuthority,
|
||||
GID.WaterMeterAuthority };
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove;
|
||||
sharedButtons.Unlocked += unlockButton_Click;
|
||||
sharedButtons.OKClicked += okButton_Click;
|
||||
|
||||
@ -75,7 +75,7 @@ namespace TBF.UI.Bench.TestProfiles
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.ParentForm = parentForm;
|
||||
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.MetrologicalAuthority };
|
||||
sharedButtons.RequiredGroupMembership = new GID[] { GID.MetrologicalAuthority };
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add |
|
||||
SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up |
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
/// Copyright (c) 2019-2023 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using log4net;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using TBF.Rig;
|
||||
using TBF.Resources;
|
||||
@ -27,10 +28,10 @@ namespace TBF.UI.Bench.Uncertainties
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.ParentForm = this;
|
||||
#if KEMPNO_50
|
||||
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.MetrologicalAuthority };
|
||||
#if LANG_PL
|
||||
sharedButtons.RequiredGroupMembership = new GID[] { GID.MetrologicalAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = new Common.GID[] { Common.GID.Metrologists };
|
||||
sharedButtons.RequiredGroupMembership = new GID[] { GID.Metrologists, GID.MetrologicalAuthority };
|
||||
#endif
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add | SharedButtons.Buttons.Remove;
|
||||
sharedButtons.Unlocked += unlockButton_Click;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2022 Sensus Slovensko a.s.
|
||||
///
|
||||
#if ORACLE_DB || KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
#if LANG_PL
|
||||
#define SHOW_Q_TG
|
||||
#endif
|
||||
|
||||
@ -71,18 +71,36 @@ namespace TBF.UI.Procedures
|
||||
|
||||
ProcedureDlg()
|
||||
{
|
||||
/// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi.
|
||||
Dpi = (int)this.CreateGraphics().DpiX;
|
||||
initialMode = Mode.Locked;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
/// Detect display setting: 100% = 96dpi, 125% = 120dpi, 150% = 144dpi.
|
||||
Dpi = (int)this.CreateGraphics().DpiX;
|
||||
}
|
||||
|
||||
public ProcedureDlg(Procedure procedure, IList<string> usedNames, Mode initialMode, Form parentForm)
|
||||
: this()
|
||||
{
|
||||
if (procedure == null) throw new ArgumentNullException("procedure");
|
||||
|
||||
LoadedProcedure = procedure;
|
||||
this.usedNames = usedNames;
|
||||
this.initialMode = initialMode;
|
||||
|
||||
/// SharedDlgButtons configuration
|
||||
sharedButtons.ParentForm = parentForm;
|
||||
#if LANG_PL
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.WaterMeterAuthority }
|
||||
: new GID[] { GID.TestingSpecialists, GID.Metrologists, GID.WaterMeterAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.Metrologists }
|
||||
: new GID[] { GID.TestingSpecialists, GID.Metrologists };
|
||||
#endif
|
||||
sharedButtons.OptionalButtons = SharedButtons.Buttons.Add |
|
||||
SharedButtons.Buttons.Remove |
|
||||
SharedButtons.Buttons.Up |
|
||||
SharedButtons.Buttons.Down |
|
||||
SharedButtons.Buttons.Copy;
|
||||
|
||||
#if TURA_SPECIAL || TURA_IPERL || TURA_IPERL_NEW
|
||||
/// Custom button 'Načítaj testy iPerl z Oracle'
|
||||
sharedButtons.OptionalButtons |= SharedButtons.Buttons.Custom1;
|
||||
@ -97,6 +115,7 @@ namespace TBF.UI.Procedures
|
||||
sharedButtons.UpClicked += upButton_Click;
|
||||
sharedButtons.DownClicked += downButton_Click;
|
||||
sharedButtons.CopyClicked += copyButton_Click;
|
||||
if (initialMode == Mode.PermanentlyLocked) sharedButtons.DisableUnlock();
|
||||
|
||||
/// ListViewEx-es configuration
|
||||
metrology1ListViewEx.SubItemClicked += new SubItemEventHandler(metrology1ListViewEx_SubItemClicked);
|
||||
@ -116,28 +135,6 @@ namespace TBF.UI.Procedures
|
||||
parametersListViewEx.SubItemEndEditing += new SubItemEndEditingEventHandler(parametersListViewEx_SubItemEndEditing);
|
||||
|
||||
SelectedTestIx = -1;
|
||||
}
|
||||
|
||||
public ProcedureDlg(Procedure procedure, IList<string> usedNames, Mode initialMode, Form parentForm)
|
||||
: this()
|
||||
{
|
||||
if (procedure == null) throw new ArgumentNullException("procedure");
|
||||
|
||||
LoadedProcedure = procedure;
|
||||
this.usedNames = usedNames;
|
||||
this.initialMode = initialMode;
|
||||
|
||||
/// Dynamic SharedDlgButtons configuration
|
||||
sharedButtons.ParentForm = parentForm;
|
||||
|
||||
#if KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.WaterMeterAuthority }
|
||||
: new GID[] { GID.TestingSpecialists, GID.WaterMeterAuthority };
|
||||
#else
|
||||
sharedButtons.RequiredGroupMembership = procedure.Protected ? new GID[] { GID.Metrologists }
|
||||
: new GID[] { GID.TestingSpecialists, GID.Metrologists };
|
||||
#endif
|
||||
if (initialMode == Mode.PermanentlyLocked) sharedButtons.DisableUnlock();
|
||||
|
||||
using (NHibernate.ISession session = TBF.DB.CreateSession(DBKind.Config))
|
||||
{
|
||||
@ -358,7 +355,7 @@ namespace TBF.UI.Procedures
|
||||
LoadUISettings();
|
||||
|
||||
/// Enable/disable/show/hide controls in General tab
|
||||
#if KEMPNO_50 || KRAKOW_50 || TORUN_50 || WARSAW_50 || WARSAW_END
|
||||
#if LANG_PL
|
||||
altProcNameLabel.Visible = true;
|
||||
altProcNameTextBox.Visible = true;
|
||||
//altProcPeriodLabel.Visible = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user