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
This commit is contained in:
@@ -1479,9 +1479,6 @@ namespace VEPROMS
|
|||||||
ProcedureConfig pc = procedureInfo.MyConfig as ProcedureConfig;
|
ProcedureConfig pc = procedureInfo.MyConfig as ProcedureConfig;
|
||||||
if (pc == null) return;
|
if (pc == null) return;
|
||||||
|
|
||||||
//C2026-015 set overall change bar date
|
|
||||||
pc.Print_ChangeBarDate = dts.ToString("MM/dd/yyyy HH:mm:ss");
|
|
||||||
|
|
||||||
pc.SelectedSlave = selectedSlave;
|
pc.SelectedSlave = selectedSlave;
|
||||||
pc.Print_Rev = revNumber;
|
pc.Print_Rev = revNumber;
|
||||||
//AppRevDate Change
|
//AppRevDate Change
|
||||||
@@ -1493,8 +1490,22 @@ namespace VEPROMS
|
|||||||
//itm.DTS = dts;
|
//itm.DTS = dts;
|
||||||
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
|
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
itm.Save();
|
itm.Save();
|
||||||
}
|
|
||||||
|
|
||||||
|
//C2026-015 set overall change bar date
|
||||||
|
if (selectedSlave > 0)
|
||||||
|
{
|
||||||
|
pc.SelectedSlave = 0;
|
||||||
|
pc.Print_Rev = revNumber;
|
||||||
|
pc.Print_RevDate = revDate.ToString("MM/dd/yyyy");
|
||||||
|
pc.Print_ChangeBarDate = dts.ToString("MM/dd/yyyy HH:mm:ss"); //this is needed to set the changebar date for an indeividual unit also
|
||||||
|
using (Item itm2 = Item.Get(procedureInfo.ItemID))
|
||||||
|
{
|
||||||
|
itm2.MyContent.Config = pc.ToString();
|
||||||
|
itm2.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
|
itm2.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public class RevType
|
public class RevType
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -4054,7 +4054,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// date). Print_ViewableAfterChangeBarDate was created to get only that user specified date, if it exists. If it does exist, we compare
|
// date). Print_ViewableAfterChangeBarDate was created to get only that user specified date, if it exists. If it does exist, we compare
|
||||||
// that with the Content datetime, otherwise we proceed as before.
|
// that with the Content datetime, otherwise we proceed as before.
|
||||||
DateTime? viewableStartingDateTime = (MyProcedure.MyConfig as ProcedureConfig).Print_ViewableStartingChangeBarDate;
|
DateTime? viewableStartingDateTime = (MyProcedure.MyConfig as ProcedureConfig).Print_ViewableStartingChangeBarDate;
|
||||||
if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate)
|
if (viewableStartingDateTime != null && viewableStartingDateTime > MyProcedure.ChangeBarDate && (MyProcedure.MyConfig as ProcedureConfig).SelectedSlave == 0)
|
||||||
return (MyContent.DTS > viewableStartingDateTime);
|
return (MyContent.DTS > viewableStartingDateTime);
|
||||||
return (MyContent.DTS > MyProcedure.ChangeBarDate);
|
return (MyContent.DTS > MyProcedure.ChangeBarDate);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user