Compare commits

..

8 Commits

Author SHA1 Message Date
plarsen 3924e2fca5 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-06 07:54:39 -04:00
plarsen 2e39102e7c Merge branch 'Development' into B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-05 22:26:21 -04:00
plarsen 2a0849fae5 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-05 22:08:27 -04:00
jjenko 9f4e8f6eef Merge pull request 'C2026-014 Set Changebar date with multi-unit' (#766) from C2026-014 into Development
good for testing
2026-05-05 09:05:23 -04:00
mschill d0fe36f86e C2026-014 Set Changebar date with multi-unit 2026-05-05 08:50:39 -04:00
jjenko 10da22cd77 Merge pull request 'C2026-015 Set overall Changebar date when approving multi-unit' (#764) from C2026-015 into Development
good for testing
2026-05-05 08:44:47 -04:00
plarsen ec5229101f B2026-043-Fix-Error-for-Set_At_AAll_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-04 17:00:42 -04:00
plarsen a0e0b1e788 B2026-043-Fix-Error-for-Set_At_All_Level-in-the-Applicability-tab-evaluate-having-the-button-grayed-out-for-the-RNO-column-when-clicked-executes-function 2026-05-04 16:33:08 -04:00
3 changed files with 77 additions and 18 deletions
@@ -68,8 +68,26 @@ namespace VEPROMS
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");// ("MM/dd/yyyy HH:mm:ss");
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({ dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss")}) by ({ VlnSettings.UserID}) on ({DateTime.Now})", DateTime.Now, VlnSettings.UserID, 0);
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss")}) by ({VlnSettings.UserID}) on ({DateTime.Now})", DateTime.Now, VlnSettings.UserID, 0);
//CSM C2026-014 if multi-unit, set for each unit
System.Data.DataTable dt = RevisionData.GetRevisionDataByUnit(MyProcInfo.ItemID);
if (RevisionData.HasUnits(dt))
{
//Change the ChangeBarDate for each unit
foreach (DataRow r in dt.Rows)
{
if (!r.IsNull("UnitID"))
{
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss")}) by ({VlnSettings.UserID}) on ({DateTime.Now}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
}
}
MyProcConfig.SelectedSlave = 0;
}
}
@@ -108,7 +126,10 @@ namespace VEPROMS
sb.Append($" The Procedure Viewer Change Bar Date will be set to ({maxDTS}).");
foreach (DataRow r in dt.Rows)
{
sb.Append($"\r\n The Change Bar Date for Unit ({r["UnitName"]}) will be set to ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}).");
if (!r.IsNull("UnitID"))
{
sb.Append($"\r\n The Change Bar Date for Unit ({r["UnitName"]}) will be set to ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}).");
}
}
sb.Append("\r\n Any Change Bars for Units not listed above will use the Overall/Procedure Viewer Change Bar Date (as these Units have no approvals).");
@@ -121,12 +142,14 @@ namespace VEPROMS
//Change the ChangeBarDate for each unit
foreach (DataRow r in dt.Rows)
{
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
if (!r.IsNull("UnitID"))
{
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
}
}
MyProcConfig.SelectedSlave = 0;
DialogResult = DialogResult.OK;
@@ -1,3 +1,4 @@
//using System.Drawing;
using System.Security.Cryptography;
using VEPROMS.CSLA.Library;
@@ -34,7 +35,6 @@ namespace Volian.Controls.Library
{
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
this.gpItem = new DevComponents.DotNetBar.Controls.GroupPanel();
this.btnApplicabilitychg2 = new DevComponents.DotNetBar.ButtonItem();
this.btnApplicabilitychg = new DevComponents.DotNetBar.ButtonX();
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
this.gpItem.SuspendLayout();
@@ -42,14 +42,14 @@ namespace Volian.Controls.Library
//
// btnApplicabilitychg
//
this.btnApplicabilitychg.Location = new System.Drawing.Point(60, 8);
this.btnApplicabilitychg.Location = new System.Drawing.Point(90, 8);
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(4);
this.btnApplicabilitychg.BackColor = System.Drawing.SystemColors.Control;
this.btnApplicabilitychg.Name = "btnApplicabilitychg";
this.btnApplicabilitychg.Size = new System.Drawing.Size(80, 22);
this.btnApplicabilitychg.Size = new System.Drawing.Size(87, 22);
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2);
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Change applicability settings - All At Level", "", "When clicked, all steps at that level of the current step will be set to the selected applicability. Note that this button is disabled when on a RNO step type but enabled for sub-step under it.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Set All at Level", "", "When clicked, all steps at that level of the current step will be set to the selected applicability. Note that the Set All at Level button is disabled for RNO step types unless they are substeps off of a RNO step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
this.btnApplicabilitychg.TabIndex = 0;
this.btnApplicabilitychg.Text = "Set All at Level";
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
@@ -69,9 +69,6 @@ namespace Volian.Controls.Library
this.gpMode.Name = "gpMode";
this.gpMode.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
this.gpMode.Size = new System.Drawing.Size(432, 49);
//
//
//
this.gpMode.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.gpMode.Style.BackColorGradientAngle = 90;
this.gpMode.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
@@ -112,7 +109,7 @@ namespace Volian.Controls.Library
this.gpItem.Location = new System.Drawing.Point(0, 49);
this.gpItem.Margin = new System.Windows.Forms.Padding(4);
this.gpItem.Name = "gpItem";
this.gpItem.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
this.gpItem.Padding = new System.Windows.Forms.Padding(0, 20, 0, 0);
this.gpItem.Size = new System.Drawing.Size(432, 85);
//
//
@@ -169,7 +166,6 @@ namespace Volian.Controls.Library
private DevComponents.DotNetBar.Controls.GroupPanel gpMode;
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
private DevComponents.DotNetBar.ButtonItem btnApplicabilitychg2;
private DevComponents.DotNetBar.ButtonX btnApplicabilitychg;
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
@@ -21,6 +21,7 @@ namespace Volian.Controls.Library
if (ApplicabilityViewModeChanged != null)
ApplicabilityViewModeChanged(this, new EventArgs());
}
private DisplayTabItem _MyDisplayTabItem = null;
public DisplayTabItem MyDisplayTabItem
{
@@ -31,6 +32,7 @@ namespace Volian.Controls.Library
_MyDisplayTabItem = value;
gpMode.Controls.Clear();
gpItem.Controls.Clear();
gpSubItem.Controls.Clear();
MyCheckBoxes.Clear();
if (_MyDisplayTabItem != null)
{
@@ -59,6 +61,8 @@ namespace Volian.Controls.Library
foreach (string name in names)
AddItemMode(name.Trim(), (++i).ToString());
AddItemMode("None", "0");
gpItem.Controls.Add(gpSubItem);
gpSubItem.BringToFront();
gpItem.Controls.Add(btnApplicabilitychg);
btnApplicabilitychg.BringToFront();
if (_MyDisplayTabItem.MyStepTabPanel != null)
@@ -85,6 +89,38 @@ namespace Volian.Controls.Library
return 0;
}
}
private void InitializegpSubItem() //B2026-043 Fix "Set All At Level" button.
{
this.gpSubItem = new DevComponents.DotNetBar.Controls.GroupPanel();
//
// gpSubItem
//
gpSubItem.AutoSize = true;
gpSubItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
gpSubItem.CanvasColor = System.Drawing.SystemColors.Control;
gpSubItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
gpSubItem.DisabledBackColor = System.Drawing.Color.Empty;
gpSubItem.Dock = System.Windows.Forms.DockStyle.Top;
gpSubItem.Location = new System.Drawing.Point(0, 49);
gpSubItem.Margin = new System.Windows.Forms.Padding(4);
gpSubItem.Name = "gpSubItem";
gpSubItem.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
gpSubItem.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
gpSubItem.Style.BackColorGradientAngle = 90;
gpSubItem.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
gpSubItem.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
gpSubItem.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
gpSubItem.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
gpSubItem.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
gpSubItem.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
gpSubItem.TabIndex = 1;
gpSubItem.Text = "";
gpSubItem.Location = new System.Drawing.Point(0, 49);
gpSubItem.Size = new System.Drawing.Size(400, 250);
//
}
private DevComponents.DotNetBar.Controls.GroupPanel gpSubItem;
private Dictionary<int, CheckBox> MyCheckBoxes = new Dictionary<int, CheckBox>();
private string _MyApplicability = string.Empty;
public string MyApplicability
@@ -132,10 +168,13 @@ namespace Volian.Controls.Library
{
CheckBox cb = new CheckBox();
cb.BackColor = Color.Transparent;
cb.Height = 24;
cb.Width = 75;
cb.AutoSize = true;
cb.Text = name;
cb.Tag = value;
cb.Dock = DockStyle.Top;
gpItem.Controls.Add(cb);
gpSubItem.Controls.Add(cb);
cb.BringToFront();
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
MyCheckBoxes.Add(value == null ? -1 : int.Parse(value), cb);
@@ -401,7 +440,7 @@ namespace Volian.Controls.Library
else
{
btnApplicabilitychg.Enabled = true;
}
}
IItemConfig cfg = _MyItemInfo.MyConfig as IItemConfig;
List<int> apples = cfg.MasterSlave_Applicability.GetFlags();
UnwireCheckboxes(true);
@@ -498,6 +537,7 @@ namespace Volian.Controls.Library
public DisplayApplicability()
{
InitializeComponent();
InitializegpSubItem(); //B2026-043 Fix "Set All At Level" button.
this.VisibleChanged += new EventHandler(DisplayApplicability_VisibleChanged);
}