Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23173074aa | |||
| be8bb9c4e1 | |||
| d07e132216 | |||
| 401fa12851 | |||
| 194ca84d38 | |||
| 7bbf62d735 | |||
| 3924e2fca5 | |||
| 2e39102e7c | |||
| 2a0849fae5 | |||
| 9f4e8f6eef | |||
| d0fe36f86e | |||
| 10da22cd77 | |||
| ec5229101f | |||
| a0e0b1e788 |
Binary file not shown.
@@ -70,6 +70,24 @@ namespace VEPROMS
|
|||||||
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
//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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -107,9 +125,12 @@ namespace VEPROMS
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.Append($" The Procedure Viewer Change Bar Date will be set to ({maxDTS}).");
|
sb.Append($" The Procedure Viewer Change Bar Date will be set to ({maxDTS}).");
|
||||||
foreach (DataRow r in dt.Rows)
|
foreach (DataRow r in dt.Rows)
|
||||||
|
{
|
||||||
|
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 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).");
|
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
|
//Change the ChangeBarDate for each unit
|
||||||
foreach (DataRow r in dt.Rows)
|
foreach (DataRow r in dt.Rows)
|
||||||
{
|
{
|
||||||
|
if (!r.IsNull("UnitID"))
|
||||||
|
{
|
||||||
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
||||||
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
|
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
|
//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);
|
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;
|
MyProcConfig.SelectedSlave = 0;
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ namespace Volian.Controls.Library
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
#region Component Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,7 +33,6 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
this.gpItem = 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.btnApplicabilitychg = new DevComponents.DotNetBar.ButtonX();
|
||||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||||
this.gpItem.SuspendLayout();
|
this.gpItem.SuspendLayout();
|
||||||
@@ -42,14 +40,14 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
// btnApplicabilitychg
|
// 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.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.btnApplicabilitychg.BackColor = System.Drawing.SystemColors.Control;
|
this.btnApplicabilitychg.BackColor = System.Drawing.SystemColors.Control;
|
||||||
this.btnApplicabilitychg.Name = "btnApplicabilitychg";
|
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.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
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)); // C2026-034 fix tool tip text.
|
||||||
this.btnApplicabilitychg.TabIndex = 0;
|
this.btnApplicabilitychg.TabIndex = 0;
|
||||||
this.btnApplicabilitychg.Text = "Set All at Level";
|
this.btnApplicabilitychg.Text = "Set All at Level";
|
||||||
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
||||||
@@ -106,13 +104,12 @@ namespace Volian.Controls.Library
|
|||||||
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
//this.gpItem.Controls.Add(this.btnApplicabilitychg);
|
|
||||||
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
||||||
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
||||||
this.gpItem.Margin = new System.Windows.Forms.Padding(4);
|
this.gpItem.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.gpItem.Name = "gpItem";
|
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);
|
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 gpMode;
|
||||||
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
|
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
|
||||||
private DevComponents.DotNetBar.ButtonItem btnApplicabilitychg2;
|
|
||||||
private DevComponents.DotNetBar.ButtonX btnApplicabilitychg;
|
private DevComponents.DotNetBar.ButtonX btnApplicabilitychg;
|
||||||
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace Volian.Controls.Library
|
|||||||
if (ApplicabilityViewModeChanged != null)
|
if (ApplicabilityViewModeChanged != null)
|
||||||
ApplicabilityViewModeChanged(this, new EventArgs());
|
ApplicabilityViewModeChanged(this, new EventArgs());
|
||||||
}
|
}
|
||||||
|
|
||||||
private DisplayTabItem _MyDisplayTabItem = null;
|
private DisplayTabItem _MyDisplayTabItem = null;
|
||||||
public DisplayTabItem MyDisplayTabItem
|
public DisplayTabItem MyDisplayTabItem
|
||||||
{
|
{
|
||||||
@@ -34,6 +35,9 @@ namespace Volian.Controls.Library
|
|||||||
MyCheckBoxes.Clear();
|
MyCheckBoxes.Clear();
|
||||||
if (_MyDisplayTabItem != null)
|
if (_MyDisplayTabItem != null)
|
||||||
{
|
{
|
||||||
|
//B2026-043 Fix "Set All At Level" button.
|
||||||
|
DevComponents.DotNetBar.Controls.GroupPanel gpSubItem = InitializegpSubItem();
|
||||||
|
|
||||||
DocVersionConfig dcfg = _MyDisplayTabItem.MyItemInfo.MyDocVersion.MyConfig as DocVersionConfig;
|
DocVersionConfig dcfg = _MyDisplayTabItem.MyItemInfo.MyDocVersion.MyConfig as DocVersionConfig;
|
||||||
List<string> names = new List<string>();
|
List<string> names = new List<string>();
|
||||||
for (int n = 1; n <= dcfg.Unit_Count; n++)
|
for (int n = 1; n <= dcfg.Unit_Count; n++)
|
||||||
@@ -54,11 +58,13 @@ namespace Volian.Controls.Library
|
|||||||
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddItemMode("All", "-1");
|
AddItemMode("All", "-1", ref gpSubItem);
|
||||||
i = 0;
|
i = 0;
|
||||||
foreach (string name in names)
|
foreach (string name in names)
|
||||||
AddItemMode(name.Trim(), (++i).ToString());
|
AddItemMode(name.Trim(), (++i).ToString(), ref gpSubItem);
|
||||||
AddItemMode("None", "0");
|
AddItemMode("None", "0", ref gpSubItem);
|
||||||
|
gpItem.Controls.Add(gpSubItem);
|
||||||
|
gpSubItem.BringToFront();
|
||||||
gpItem.Controls.Add(btnApplicabilitychg);
|
gpItem.Controls.Add(btnApplicabilitychg);
|
||||||
btnApplicabilitychg.BringToFront();
|
btnApplicabilitychg.BringToFront();
|
||||||
if (_MyDisplayTabItem.MyStepTabPanel != null)
|
if (_MyDisplayTabItem.MyStepTabPanel != null)
|
||||||
@@ -85,6 +91,37 @@ namespace Volian.Controls.Library
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private DevComponents.DotNetBar.Controls.GroupPanel InitializegpSubItem() //B2026-043 Fix "Set All At Level" button.
|
||||||
|
{
|
||||||
|
DevComponents.DotNetBar.Controls.GroupPanel gpSubItem;
|
||||||
|
gpSubItem = new DevComponents.DotNetBar.Controls.GroupPanel
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// gpSubItem
|
||||||
|
//
|
||||||
|
AutoSize = true,
|
||||||
|
AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink,
|
||||||
|
CanvasColor = System.Drawing.SystemColors.Control,
|
||||||
|
ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007,
|
||||||
|
DisabledBackColor = System.Drawing.Color.Empty,
|
||||||
|
Dock = System.Windows.Forms.DockStyle.Top,
|
||||||
|
Location = new System.Drawing.Point(0, 49),
|
||||||
|
Margin = new System.Windows.Forms.Padding(4),
|
||||||
|
Name = "gpSubItem",
|
||||||
|
Padding = new System.Windows.Forms.Padding(13, 12, 13, 37)
|
||||||
|
};
|
||||||
|
gpSubItem.BackColor = Color.Transparent;
|
||||||
|
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);
|
||||||
|
return gpSubItem;
|
||||||
|
}
|
||||||
private Dictionary<int, CheckBox> MyCheckBoxes = new Dictionary<int, CheckBox>();
|
private Dictionary<int, CheckBox> MyCheckBoxes = new Dictionary<int, CheckBox>();
|
||||||
private string _MyApplicability = string.Empty;
|
private string _MyApplicability = string.Empty;
|
||||||
public string MyApplicability
|
public string MyApplicability
|
||||||
@@ -128,20 +165,25 @@ namespace Volian.Controls.Library
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
//}
|
//}
|
||||||
private void AddItemMode(string name, string value)
|
private void AddItemMode(string name, string value, ref DevComponents.DotNetBar.Controls.GroupPanel gpSubItem)
|
||||||
{
|
{
|
||||||
CheckBox cb = new CheckBox();
|
CheckBox cb = new CheckBox();
|
||||||
cb.BackColor = Color.Transparent;
|
cb.BackColor = Color.Transparent;
|
||||||
|
cb.Height = 24;
|
||||||
|
cb.Width = 75;
|
||||||
|
cb.AutoSize = true;
|
||||||
cb.Text = name;
|
cb.Text = name;
|
||||||
cb.Tag = value;
|
cb.Tag = value;
|
||||||
cb.Dock = DockStyle.Top;
|
cb.Dock = DockStyle.Top;
|
||||||
gpItem.Controls.Add(cb);
|
gpSubItem.Controls.Add(cb);
|
||||||
cb.BringToFront();
|
cb.BringToFront();
|
||||||
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
|
cb.CheckedChanged += new EventHandler(cb_CheckedChanged);
|
||||||
MyCheckBoxes.Add(value == null ? -1 : int.Parse(value), cb);
|
MyCheckBoxes.Add(value == null ? -1 : int.Parse(value), cb);
|
||||||
}
|
}
|
||||||
private void cb_CheckedChanged(object sender, EventArgs e)
|
private void cb_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
|
ei.SaveCurrentAndContents(); // C2026-035 save unsaved step text.
|
||||||
UnwireCheckboxes(false);
|
UnwireCheckboxes(false);
|
||||||
CheckBox cb = sender as CheckBox;
|
CheckBox cb = sender as CheckBox;
|
||||||
CheckState cs = cb.CheckState;
|
CheckState cs = cb.CheckState;
|
||||||
@@ -287,6 +329,10 @@ namespace Volian.Controls.Library
|
|||||||
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
EditItem ei = MyDisplayTabItem.MyStepTabPanel.SelectedEditItem;
|
||||||
|
ei.SaveCurrentAndContents(); // C2026-035 save unsaved step text.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ItemInfo startitm = MyItemInfo.FirstSibling;
|
ItemInfo startitm = MyItemInfo.FirstSibling;
|
||||||
while (startitm != null)
|
while (startitm != null)
|
||||||
@@ -497,7 +543,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
public DisplayApplicability()
|
public DisplayApplicability()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent(); //B2026-043 Fix "Set All At Level" button.
|
||||||
this.VisibleChanged += new EventHandler(DisplayApplicability_VisibleChanged);
|
this.VisibleChanged += new EventHandler(DisplayApplicability_VisibleChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user