Compare commits

...

15 Commits

Author SHA1 Message Date
f11a9536f0 Merge pull request 'Development' (#524) from Development into master
Merging all changes through B2025-015 from development into master after successful testing.
2025-02-20 15:33:44 -05:00
18734e0f85 Merge pull request 'B2025-015 RO Editor - PROMS will get stuck in a loop (hang) while placing RO.FST information in the plant database (loading RO's) when Unit Values contain brackets. Example is Point Beach data.' (#523) from B2025-015 into Development
good for testing phase
2025-02-20 10:08:52 -05:00
9980504c47 B2025-015 RO Editor - PROMS will get stuck in a loop (hang) while placing RO.FST information in the plant database (loading RO's) when Unit Values contain brackets. Example is Point Beach data.
Some of Point Beach RO's have curly braces in the RO return value for the units in P/C.  Found this on some (5-7) Annunciator RO values.  The definition of the return value (multiple return values) uses curly braces so PROMS cannot distinguish between brackets being part of a unit value or part of the format for multiple return values.

Equipment Designation, Main Steam (MS), Annunciators have examples of return values with curly braces.  Look at the Referenced Object Definition on the Annunciators tree node for the definition of the return value.
2025-02-20 10:03:05 -05:00
626960da9f Merge pull request 'C2025-014 The zoom setting on step level bookmarks in generated PDFs will now jump to the page containing the step (like it does when a section bookmark is selected) instead of zooming in on the step.' (#522) from C2025-014_PDF_Step_BckMrk_Zoom into Development
Looks Good - Ready for QA testing
2025-02-18 15:52:52 -05:00
535728b982 C2025-014 The zoom setting on step level bookmarks in generated PDFs will now jump to the page containing the step (like it does when a section bookmark is selected) instead of zooming in on the step. 2025-02-18 15:39:55 -05:00
ace9672a2e Merge pull request 'B2025-019 RO Editor - When selecting an RO Definition, clicking the X in the corner or selecting Cancel prompts you to verify you want to close without saving changes when no changes were made if there is Parent/Child & applicability was never set for …' (#521) from B2025-019 into Development
good for testing phase (remember to build the Reference Objects project)
2025-02-18 15:38:10 -05:00
05a13861ac B2025-019 RO Editor - When selecting an RO Definition, clicking the X in the corner or selecting Cancel prompts you to verify you want to close without saving changes when no changes were made if there is Parent/Child & applicability was never set for the in-use fields. 2025-02-18 15:21:19 -05:00
24374b85c1 Merge pull request 'C2024-038 - Bringing date control to the front so left side of box shows' (#520) from C2024-038_v2 into Development
good for testing phase
2025-02-18 09:01:05 -05:00
8c358f1e3c C2024-038 - Bringing date control to the front so left side of box shows 2025-02-18 07:42:35 -05:00
289285f517 Merge pull request 'F2025-002 Per customer, remove the newly added Action Verbs from the PROMS ReplaceWords list.' (#519) from F2025-002_Farley into Development
Format only change.  Good for testing.
2025-02-17 15:12:22 -05:00
3ee9e0f4eb F2025-002 Per customer, remove the newly added Action Verbs from the PROMS ReplaceWords list. 2025-02-17 15:12:06 -05:00
d6c924a51f Merge pull request 'B2025-016 – Quick Print Shortcut Key' (#518) from B2025-016 into Development
good for testing phase
2025-02-17 08:41:17 -05:00
3a739c5b64 B2025-016 – Quick Print Shortcut Key
Found during Functional Testing:
Using "ALT R" shortcut key shows that Quick Print PDF & Create PDF both then have "P" as their shortcut. Kept Create PDF/Print as Ctrl-P. Changed Quick Print to be shortcut of Ctrl-Q.
2025-02-17 08:21:16 -05:00
3564f4ba8e Merge pull request 'C2024-038 PROMS – Summary of Changes report generation enhancements' (#517) from C2024-038 into Development
Good for testing phase
2025-02-14 15:21:08 -05:00
5ad9d81cc1 C2024-038 PROMS – Summary of Changes report generation enhancements
This is an upgrade item to add a method to exclude annotations and a way run the summary of changes report from a specific date.
2025-02-14 15:10:40 -05:00
18 changed files with 179 additions and 370 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1584,7 +1584,7 @@ namespace ROEditor
if (i + 1 < InUseList.Count) inuserecs = inuserecs + " ";
}
}
if (inuserecs != origFieldsInUse)
if ((inuserecs ?? "") != (origFieldsInUse ?? ""))
return true;
@ -1599,7 +1599,7 @@ namespace ROEditor
if (i + 1 < InUseApplcList.Count) applicfieldrecs = applicfieldrecs + " ";
}
}
if (applicfieldrecs != origApplicFields)
if ((applicfieldrecs ?? "") != (origApplicFields ?? ""))
return true;
//nothing has changed

View File

@ -834,7 +834,7 @@ namespace RODBInterface
ValueType |= FldType;
if (PCApplicability)
text = GetPCReturnValues(theDb, pcChildern, elm, PCApplicability, inusename, text); // C2021-026 Get P/C Children return values
strbld.Append(text);
strbld.Append(text.Replace("{", "&123;").Replace("}", "&125;"));
}
else
{

View File

@ -19791,9 +19791,11 @@ GO
*****************************************************************************/
/*
==========================================================================================================
Author: Jake Ropar
Create Date: 06/23/2022
Description: Inserts New Rofst Child Record / Default Values
Modified: 02/19/2025
Modification
Description: Added support for ROs with brackets in Unit Values
==========================================================================================================
*/
Create Procedure [dbo].[vesp_RofstChildInsert]
@ -19806,19 +19808,26 @@ GO
@title VarChar(Max),
@roid VarChar(50),
@appid VarChar(Max) = null,
@value VarChar(Max) = null
@value VarChar(Max) = null,
@missingDefaultValue VarChar(Max) = null
)
With Execute as Owner
As
Begin
Declare @AccPageID VarChar(Max) = null;
Declare @BaseAccPageID VarChar(Max) = null;
Declare @DefaultValues VarChar(Max);
Declare @RoidExt VarChar(Max);
Declare @AccPageExt VarChar(Max);
-- Create Rofst Child/Group Record
-- Default missing value if Null (Null values not allowed for the [value] field in the RofstDefaultValue table
if (DataLength(IsNull(@missingDefaultValue, '')) <= 0)
Set @missingDefaultValue = '[TBD]';
-- Create Rofst Child/Group Record --> [Roid = (12) Digits]
Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value])
Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value);
Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, REPLACE(REPLACE(@value, '&123;', '{'), '&125;', '}'));
-- Check for appid, if exists, then insert the default value for each return type if multi-value
@ -19826,37 +19835,58 @@ GO
Begin
-- Get Accessory Page ID
Select @AccPageID = Concat(d.dbiAP, '-', @appid)
Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1)
From RofstDatabase d with (NoLock)
Where d.RofstID = @RofstID And d.dbiID = @dbiID;
-- Insert Rofst Default Value (Parent RoChild) [roid = 12]
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Values (@RofstID, @roid, Replace(@title, '\u160?', ' '), @AccPageID);
Select @DefaultValues = dbo.vefn_RofstDataReplaceVars(@value);
-- Insert Rofst Default Value(s) (Children RoChild) [roid = 16] (Do Not Insert Duplicates)
Select @DefaultValues = Replace(dbo.vefn_RofstDataReplaceVars(@value), '{', '');
If (PatIndex('%=%', @DefaultValues) > 0)
Begin
-- Insert Rofst Default Values (Multi-Values) --> [Roid = (16) Digits]
Select @DefaultValues = Replace(@DefaultValues, '{', '');
With ChildrenValues as
(
Select (x.ListPosition + 40) as 'OffsetIndex',
Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue'
From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x
Where Len(x.ListValue) > 0
)
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, Cast(Format(Min(OffsetIndex), 'D4') as VarChar(4))) as 'roid',
DefaultValue as 'value',
null as 'AccPageID'
From ChildrenValues
Group By DefaultValue
Order By Min(OffsetIndex) Asc
With ChildrenValues as
(
Select x.ListPosition as 'OffsetIndex',
Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue'
From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x
Where Len(x.ListValue) > 0
)
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, re.RoidExt) as 'roid',
Case When (DataLength(cv.DefaultValue) > 0) Then
REPLACE(REPLACE(REPLACE(dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0), '&123;', '{'), '&125;}', '}'), '&125;', '}')
Else @missingDefaultValue End as 'value',
Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID'
From ChildrenValues cv
inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex
Order By cv.OffsetIndex Asc
End
Else
Begin
-- Insert Rofst Default Value (Single Value) --> [Roid = (16) Digits]
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, re.RoidExt) as 'roid',
Case When (DataLength(@DefaultValues) > 0) Then
REPLACE(REPLACE(REPLACE(dbo.vefn_RofstDataCleanUnitInfoTags(@DefaultValues, 0), '&123;', '{'), '&125;}', '}'), '&125;', '}')
Else @missingDefaultValue End as 'value',
Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID'
From vwRofstData_RofstExtensions re
Where re.Offset = 1;
End
End -- (Len(@appid) > 0)
Return;
End
Go
@ -20448,98 +20478,6 @@ GO
ELSE PRINT 'Procedure Creation: [vesp_RofstDataGetExtensions] Error on Creation'
GO
/****** Object: StoredProcedure [dbo].[vesp_RofstChildInsert] ***********************/
If Exists(SELECT * FROM sys.objects Where name = 'vesp_RofstChildInsert' AND type in (N'P'))
DROP PROCEDURE [dbo].[vesp_RofstChildInsert]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2020 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
/*
==========================================================================================================
Author: Jake Ropar
Create Date: 03/24/2022
Description:
==========================================================================================================
*/
Create Procedure [dbo].[vesp_RofstChildInsert]
(
@RofstID Int,
@ID Int,
@ParentID Int,
@dbiID Int,
@type Int,
@title VarChar(Max),
@roid VarChar(50),
@appid VarChar(Max) = null,
@value VarChar(Max) = null
)
With Execute as Owner
As
Begin
Declare @BaseAccPageID VarChar(Max) = null;
Declare @DefaultValues VarChar(Max);
-- Create Rofst Child/Group Record --> [Roid = (12) Digits]
Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value])
Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value);
-- Check for appid, if exists, then insert the default value for each return type if multi-value
If (Len(@appid) > 0)
Begin
-- Get Accessory Page ID
Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1)
From RofstDatabase d with (NoLock)
Where d.RofstID = @RofstID And d.dbiID = @dbiID;
-- Insert Rofst Default Value(s) (Children RoChild) --> [Roid = (16) Digits]
Select @DefaultValues = Replace(dbo.vefn_RofstDataReplaceVars(@value), '{', '');
With ChildrenValues as
(
Select x.ListPosition as 'OffsetIndex',
Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue'
From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x
Where Len(x.ListValue) > 0
)
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, re.RoidExt) as 'roid',
Case When (Len(RTrim(LTrim(cv.DefaultValue))) > 0 ) Then dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0) Else '[TBD]' End as 'value',
Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID'
From ChildrenValues cv
inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex
Order By cv.OffsetIndex Asc
End -- (Len(@appid) > 0)
Return;
End
Go
IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstChildInsert] Succeeded'
ELSE PRINT 'Procedure Creation: [vesp_RofstChildInsert] Error on Creation'
GO
/****** Object: StoredProcedure [dbo].[vesp_RofstDataSearch] ***********************/
If Exists(SELECT * FROM sys.objects Where name = 'vesp_RofstDataSearch' AND type in (N'P'))
DROP PROCEDURE [dbo].[vesp_RofstDataSearch]
@ -21239,121 +21177,6 @@ GO
==========================================================================================================
*/
IF EXISTS (Select * From dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[vesp_RofstChildInsert]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP Procedure [dbo].[vesp_RofstChildInsert];
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2020 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
/*
==========================================================================================================
Author: Jake Ropar
Create Date: 03/24/2022
Description: Inserts the RO Child object and associated return values
==========================================================================================================
*/
Create Procedure [dbo].[vesp_RofstChildInsert]
(
@RofstID Int,
@ID Int,
@ParentID Int,
@dbiID Int,
@type Int,
@title VarChar(Max),
@roid VarChar(50),
@appid VarChar(Max) = null,
@value VarChar(Max) = null
)
With Execute as Owner
As
Begin
Declare @BaseAccPageID VarChar(Max) = null;
Declare @DefaultValues VarChar(Max);
Declare @RoidExt VarChar(Max);
Declare @AccPageExt VarChar(Max);
-- Create Rofst Child/Group Record --> [Roid = (12) Digits]
Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value])
Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value);
-- Check for appid, if exists, then insert the default value for each return type if multi-value
If (Len(@appid) > 0)
Begin
-- Get Accessory Page ID
Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1)
From RofstDatabase d with (NoLock)
Where d.RofstID = @RofstID And d.dbiID = @dbiID;
Select @DefaultValues = dbo.vefn_RofstDataReplaceVars(@value);
If (PatIndex('%=%', @DefaultValues) > 0)
Begin
-- Insert Rofst Default Values (Multi-Values) --> [Roid = (16) Digits]
Select @DefaultValues = Replace(@DefaultValues, '{', '');
With ChildrenValues as
(
Select x.ListPosition as 'OffsetIndex',
Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue'
From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x
Where Len(x.ListValue) > 0
)
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, re.RoidExt) as 'roid',
Case When (Len(RTrim(LTrim(cv.DefaultValue))) > 0 ) Then dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0) Else '[TBD]' End as 'value',
Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID'
From ChildrenValues cv
inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex
Order By cv.OffsetIndex Asc
End
Else
Begin
-- Insert Rofst Default Value (Single Value) --> [Roid = (16) Digits]
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, re.RoidExt) as 'roid',
Case When (Len(RTrim(LTrim(@DefaultValues))) > 0 ) Then dbo.vefn_RofstDataCleanUnitInfoTags(@DefaultValues, 0) Else '[TBD]' End as 'value',
Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID'
From vwRofstData_RofstExtensions re
Where re.Offset = 1;
End
End -- (Len(@appid) > 0)
Return;
End
Go
IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstChildInsert] Succeeded'
ELSE PRINT 'Procedure Creation: [vesp_RofstChildInsert] Error on Creation'
GO
If Exists(SELECT * FROM sys.objects Where name = 'vefn_RofstDataReplaceVars' AND type in (N'FN'))
DROP FUNCTION [dbo].[vefn_RofstDataReplaceVars]
GO
@ -21632,124 +21455,6 @@ GO
ELSE PRINT 'Function Creation: [vefn_RofstDataCleanUnitInfoTags] Error on Creation'
GO
If Exists(SELECT * FROM sys.objects Where name = 'vesp_RofstChildInsert' AND type in (N'P'))
DROP PROCEDURE [dbo].[vesp_RofstChildInsert]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*****************************************************************************
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
Copyright 2020 - Volian Enterprises, Inc. All rights reserved.
*****************************************************************************/
/*
==========================================================================================================
Author: Jake Ropar
Create Date: 03/24/2022
Description: Inserts the RO Child object and associated return values
==========================================================================================================
*/
Create Procedure [dbo].[vesp_RofstChildInsert]
(
@RofstID Int,
@ID Int,
@ParentID Int,
@dbiID Int,
@type Int,
@title VarChar(Max),
@roid VarChar(50),
@appid VarChar(Max) = null,
@value VarChar(Max) = null,
@missingDefaultValue VarChar(Max) = null
)
With Execute as Owner
As
Begin
Declare @BaseAccPageID VarChar(Max) = null;
Declare @DefaultValues VarChar(Max);
Declare @RoidExt VarChar(Max);
Declare @AccPageExt VarChar(Max);
-- Default missing value if Null (Null values not allowed for the [value] field in the RofstDefaultValue table
if (DataLength(IsNull(@missingDefaultValue, '')) <= 0)
Set @missingDefaultValue = '[TBD]';
-- Create Rofst Child/Group Record --> [Roid = (12) Digits]
Insert Into RofstChild (RofstID, ID, ParentID, dbiID, [type], title, roid, appid, [value])
Values (@RofstID, @ID, @ParentID, @dbiID, @type, @title, @roid, @appid, @value);
-- Check for appid, if exists, then insert the default value for each return type if multi-value
If (Len(@appid) > 0)
Begin
-- Get Accessory Page ID
Select @BaseAccPageID = dbo.vefn_RofstDataCleanUnitInfoTags(Concat(d.dbiAP, '-', @appid), 1)
From RofstDatabase d with (NoLock)
Where d.RofstID = @RofstID And d.dbiID = @dbiID;
Select @DefaultValues = dbo.vefn_RofstDataReplaceVars(@value);
If (PatIndex('%=%', @DefaultValues) > 0)
Begin
-- Insert Rofst Default Values (Multi-Values) --> [Roid = (16) Digits]
Select @DefaultValues = Replace(@DefaultValues, '{', '');
With ChildrenValues as
(
Select x.ListPosition as 'OffsetIndex',
Case When (PatIndex('%=%', x.ListValue) > 0) Then Right(x.ListValue, Len(x.ListValue)-PatIndex('%=%', x.ListValue)) Else x.ListValue End as 'DefaultValue'
From [dbo].[vefn_ParseStringListToTable](@DefaultValues, '}') x
Where Len(x.ListValue) > 0
)
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, re.RoidExt) as 'roid',
Case When (DataLength(cv.DefaultValue) > 0) Then dbo.vefn_RofstDataCleanUnitInfoTags(cv.DefaultValue, 0) Else @missingDefaultValue End as 'value',
Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID'
From ChildrenValues cv
inner join vwRofstData_RofstExtensions re on re.Offset = cv.OffsetIndex
Order By cv.OffsetIndex Asc
End
Else
Begin
-- Insert Rofst Default Value (Single Value) --> [Roid = (16) Digits]
Insert Into RofstDefaultValue (RofstID, roid, [value], AccPageID)
Select @RofstID as 'RofstID',
Concat(@roid, re.RoidExt) as 'roid',
Case When (DataLength(@DefaultValues) > 0) Then dbo.vefn_RofstDataCleanUnitInfoTags(@DefaultValues, 0) Else @missingDefaultValue End as 'value',
Concat(@BaseAccPageID, '.', re.AccPageExt) as 'AccPageID'
From vwRofstData_RofstExtensions re
Where re.Offset = 1;
End
End -- (Len(@appid) > 0)
Return;
End
Go
IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstChildInsert] Succeeded'
ELSE PRINT 'Procedure Creation: [vesp_RofstChildInsert] Error on Creation'
GO
/*
==========================================================================================================
End: B2022-124: [JPR] Blank RO Values (All Spaces) printing as ?
@ -24132,8 +23837,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '10/28/2024 11:24'
set @RevDescription = 'Add the ability for PROMS to remember the procedure tabs that were open when you closed PROMS'
set @RevDate = '2/19/2025 11:24'
set @RevDescription = 'Added support for legacy ROs with brackets in Unit Values'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription

View File

@ -194,6 +194,23 @@ namespace VEPROMS.CSLA.Library
public partial class AnnotationAuditInfoList
{
/// <summary>
/// C2024- 038 - Summary of Changes report generation enhancements
/// Constructor - takes a Generic list of AnnotationAuditInfo
/// and creates a AnnotationAuditInfoList
/// </summary>
public AnnotationAuditInfoList(List<AnnotationAuditInfo> lst)
{
IsReadOnly = false;
if (lst != null)
{
foreach (AnnotationAuditInfo itm in lst)
this.Add(itm);
}
IsReadOnly = true;
}
/// <summary>
/// Return a list of all AnnotationAuditInfo by ItemID.
/// </summary>
@ -487,6 +504,23 @@ namespace VEPROMS.CSLA.Library
public partial class ContentAuditInfoList
{
/// <summary>
/// C2024- 038 - Summary of Changes report generation enhancements
/// Constructor - takes a Generic list of ContentAuditInfo
/// and creates a ContentAuditInfoList
/// </summary>
public ContentAuditInfoList(List<ContentAuditInfo> lst)
{
IsReadOnly = false;
if (lst != null)
{
foreach (ContentAuditInfo itm in lst)
this.Add(itm);
}
IsReadOnly = true;
}
/// <summary>
/// Return a list of all ContentAuditInfo by ContentID.
/// </summary>

View File

@ -10,6 +10,7 @@ using System.IO;
using System.Text.RegularExpressions;
using JR.Utils.GUI.Forms;
using Volian.Base.Library;
using System.Linq;
namespace Volian.Controls.Library
{
@ -163,7 +164,7 @@ namespace Volian.Controls.Library
else
{
DateTime revDate;
if (!DateTime.TryParse(cfg.Print_RevDate, out revDate)) revDate = MyProcedureInfo.ChangeBarDate; // DateTime.Now;
if (!DateTime.TryParse(cfg.Print_RevDate, out revDate)) revDate = MyProcedureInfo.ChangeBarDate; // DateTime.Now;
SetRevDate(revDate);
//SetRevDate(DateTime.Parse(cfg.Print_RevDate));
}
@ -263,7 +264,7 @@ namespace Volian.Controls.Library
{
AnnotationTypeInfo ati = AnnotationTypeInfo.Get(aai.TypeID);
// B2023-066: Crash when trying to access a deleted annotation type (added the ati==null check)
tn = annotationDeleted.Nodes.Add(ati==null?"Deleted Annotation Type":ati.Name);
tn = annotationDeleted.Nodes.Add(ati == null ? "Deleted Annotation Type" : ati.Name);
}
TreeNode cn = tn.Nodes.Add(aai.ListString());
cn.Tag = aai;
@ -517,7 +518,7 @@ namespace Volian.Controls.Library
if (delC.Type >= 0 && delC.Type < 1000)
{
int indx = delC.Config.IndexOf("DelProcReason");
if (indx >= 0 && delC.Config.Length > indx+15) // 15 accounts for 'DelProcReason = "'
if (indx >= 0 && delC.Config.Length > indx + 15) // 15 accounts for 'DelProcReason = "'
{
string reason = delC.Config.Substring(indx + 15);
if (reason != null && reason.Length > 0)
@ -529,7 +530,7 @@ namespace Volian.Controls.Library
}
}
}
TreeNode tnn = deletedItems.Nodes.Add(iai.ToString()+"; Reason: " + strR);
TreeNode tnn = deletedItems.Nodes.Add(iai.ToString() + "; Reason: " + strR);
tnn.Tag = iai;
#endregion
}
@ -558,7 +559,7 @@ namespace Volian.Controls.Library
if (MyProcedureInfo == null)
{
this.ParentForm.Cursor = Cursors.Default;
btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = lbChanges.Items.Count > 0;
btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = cbSumExcludeAnn.Enabled = DT_SumAsOf.Enabled = lbChanges.Items.Count > 0;
return;
}
ContentAuditInfoList cail2;
@ -586,7 +587,7 @@ namespace Volian.Controls.Library
// B2020-156: When procedure title is changed, it does not print in Summary/Chronolgy of changes.
// Need to only check the date (not the date/time) for some procedures, the original item was listed
// in the list box and should not be because some MyRevDate's did not have time included.
if (CompareDateOrDateTime(cai.DTS,MyRevDate) || cai.ActionWhen > MyRevDate)
if (CompareDateOrDateTime(cai.DTS, MyRevDate) || cai.ActionWhen > MyRevDate)
{
string itemTitle = FixPath(cai.Path);
lbChanges.Items.Add(cai);
@ -614,7 +615,7 @@ namespace Volian.Controls.Library
}
//Console.WriteLine("WalkProcedure fini: {0} seconds", TimeSpan.FromTicks(DateTime.Now.Ticks - start.Ticks).TotalSeconds);
this.ParentForm.Cursor = Cursors.Default;
btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = lbChanges.Items.Count > 0;
btnViewSummaryReport.Enabled = btnViewChronologyReport.Enabled = cbSumExcludeAnn.Enabled = DT_SumAsOf.Enabled = lbChanges.Items.Count > 0;
RefreshRequired = false;
return;
}
@ -648,9 +649,73 @@ namespace Volian.Controls.Library
//_AnnotationList = AnnotationAuditInfoList.GetChronology(0, 0, MyProcedureInfo.ChangeBarDate);
//added setting selected slave in order for reports to replace unit number,etc jcb 20101010
MyItemInfo.MyProcedure.MyDocVersion.DocVersionConfig.SelectedSlave = ApplDisplayMode;
// OnSummaryPrintRequest(new DisplayHistoryReportEventArgs(Volian.Base.Library.VlnSettings.TemporaryFolder + @"\MySummary.pdf", MyItemInfo.MyProcedure, _SummaryAuditList, _AnnotationList));
OnSummaryPrintRequest(new DisplayHistoryReportEventArgs(string.Format(@"{0}\{1} Summary of Changes.pdf", Volian.Base.Library.VlnSettings.TemporaryFolder, MyItemInfo.MyProcedure.PDFNumber), MyItemInfo.MyProcedure, _SummaryAuditList, _AnnotationList));
//}
var dhr = new DisplayHistoryReportEventArgs(string.Format(@"{0}\{1} Summary of Changes.pdf", Volian.Base.Library.VlnSettings.TemporaryFolder, MyItemInfo.MyProcedure.PDFNumber), MyItemInfo.MyProcedure, null, null);
//C2024- 038 - Summary of Changes report generation enhancements
//check if need to modify
// _SummaryAuditList
if (DT_SumAsOf.Checked)
dhr.AuditList = FilterSummaryByDate(_SummaryAuditList, DT_SumAsOf.Value);
else
dhr.AuditList = _SummaryAuditList;
//C2024- 038 - Summary of Changes report generation enhancements
// if Exclude Annotations Checked
// send an empty list instead of
//_AnnotationList
if (cbSumExcludeAnn.Checked)
dhr.AnnotationList = new AnnotationAuditInfoList(null);
else if (DT_SumAsOf.Checked)
dhr.AnnotationList = FilterSummaryByDate_Annotations(_AnnotationList, DT_SumAsOf.Value);
else
{ dhr.AnnotationList = _AnnotationList; }
OnSummaryPrintRequest(dhr);
}
//C2024- 038 - Summary of Changes report generation enhancements
//modify _SummaryAuditList
//to limit to a specific date
private ContentAuditInfoList FilterSummaryByDate(ContentAuditInfoList summaryAuditList, DateTime value)
{
List<ContentAuditInfo> slst = summaryAuditList.Clone().ToList();
//Grab the first change to each item before the date and set that to the AsOf date
foreach (ContentAuditInfo firstbeforedate in slst.GroupBy(x => x.ItemID).Select(x => x.OrderByDescending(y => y.DTS).FirstOrDefault(d => d.DTS < value)))
{
if (firstbeforedate != null && firstbeforedate.ActionWhat != "Deleted")
{
firstbeforedate.ActionWhat = $"As Of: {value.ToShortDateString()}";
}
}
//remove all items before the date we are checking against
//note that for deleted - sometimes the DTS is not correct and
//need to use the ActionWhen
slst.RemoveAll(x => x.DTS < value && !x.ActionWhat.StartsWith("As Of:") && (x.ActionWhat != "Deleted" || (x.ActionWhen < x.DTS ? x.DTS : x.ActionWhen) < value));
//remove all items where first text matches the last text
//unless it was added after the date we are checking against
//or the last item is a deletion that occurred after
//the date we are checking against
var itms = slst.Select(x => x.ItemID).Distinct().ToList();
foreach (int itmID in itms)
{
ContentAuditInfo first = slst.Where(i => i.ItemID == itmID).OrderBy(y => y.DTS).FirstOrDefault();
ContentAuditInfo last = slst.Where(i => i.ItemID == itmID).OrderByDescending(y => y.DTS).FirstOrDefault();
if (first != null && last != null && first.DTS < value && (last.ActionWhat != "Deleted" || (last.ActionWhen < last.DTS ? last.DTS : last.ActionWhen) < value) && ItemInfo.ConvertToDisplayText(first.Text) == ItemInfo.ConvertToDisplayText(last.Text))
slst.RemoveAll(x => x.ItemID == itmID);
}
return new ContentAuditInfoList(slst);
}
//C2024- 038 - Summary of Changes report generation enhancements
//modify _SummaryAuditList
//to limit to a specific date
private AnnotationAuditInfoList FilterSummaryByDate_Annotations(AnnotationAuditInfoList annotationAuditList, DateTime value)
{
return new AnnotationAuditInfoList(annotationAuditList.Where(x => x.DTS >= value).ToList());
}
private void btnRefresh_Click(object sender, EventArgs e)
{
@ -1060,7 +1125,7 @@ namespace Volian.Controls.Library
set { _AuditList = value; }
}
private AnnotationAuditInfoList _AnnotationList;
public AnnotationAuditInfoList AnnotationList
public AnnotationAuditInfoList AnnotationList
{
get { return _AnnotationList; }
set { _AnnotationList = value; }

View File

@ -443,6 +443,9 @@
<DependentUpon>DisplayBookMarks.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DisplayHistory.resx">
<DependentUpon>DisplayHistory.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DisplayLibDocs.resx">
<DependentUpon>DisplayLibDocs.cs</DependentUpon>
<SubType>Designer</SubType>

View File

@ -1090,7 +1090,7 @@ namespace Volian.Print.Library
firstCAI = null;
lastCAI = null;
}
else if (firstCAI.ActionWhat == lastCAI.ActionWhat)
else if (firstCAI.ActionWhat == lastCAI.ActionWhat || firstCAI.ActionWhat.StartsWith("As Of:"))
{
auditList1.Add(firstCAI);
auditList1.Add(lastCAI);
@ -1153,7 +1153,7 @@ namespace Volian.Print.Library
firstCAI = null;
lastCAI = null;
}
else if (firstCAI.ActionWhat == lastCAI.ActionWhat)
else if (firstCAI.ActionWhat == lastCAI.ActionWhat || firstCAI.ActionWhat.StartsWith("As Of:"))
{
auditList1.Add(firstCAI);
auditList1.Add(lastCAI);

View File

@ -647,8 +647,10 @@ namespace Volian.Print.Library
}
if (MyItemInfo.IsHigh)
{
// C2025-014 change the zoom setting on the bookmark of a step from FITBH to FITV so that instead of zooming in
// on the step it will zoom to the page level ( like it does when you select a bookmark on a section.
MyPageHelper.PageBookmarks.Add(MyItemInfo, (MyItemInfo.MyTab == null) ? "" : MyItemInfo.MyTab.CleanText + " " + MyItemInfo.DisplayText,
new PdfDestination(PdfDestination.FITBH, yLocation + YVeryTop - YTopMost + SixLinesPerInch));
new PdfDestination(PdfDestination.FITV, yLocation + YVeryTop - YTopMost + SixLinesPerInch));
}
}
if (MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfcreekCKLFormat)