Merge branch 'Development' into C2022-003-Change-Textboxes-to-RTF-3
This commit is contained in:
@@ -2100,6 +2100,15 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
string resstr = rtnstr.Substring(0, indx);
|
||||
int endHsp = rtnstr.IndexOf(")", indx);
|
||||
|
||||
//B2026 - 002 handle if parens inside a HSP
|
||||
int startpos = indx + 5;
|
||||
while (rtnstr.Substring(startpos, endHsp - startpos).Contains("("))
|
||||
{
|
||||
startpos = rtnstr.IndexOf("(", startpos + 1, endHsp - startpos) + 1;
|
||||
endHsp = rtnstr.IndexOf(")", endHsp + 1);
|
||||
}
|
||||
|
||||
string tmpstr = rtnstr.Substring(indx + 5, endHsp - indx - 5);
|
||||
|
||||
// B2017-012 Don't convert space to hard spaces for XY Plots.
|
||||
|
||||
@@ -1363,9 +1363,14 @@ namespace VEPROMS.CSLA.Library
|
||||
// An X/Y Plot RO type might have text preceding the Plot Commands
|
||||
int pstart = roValue.IndexOf("<<G"); // find the starting Plot Command
|
||||
|
||||
//B2025-065 When Printing a Word Section containing XY Plot ROs - when there is a title on the XY Plot, only the first line is indented.
|
||||
//get x-offset
|
||||
float fx1 = (float)MyApp.ActiveDocument.Range(sel.Start, sel.Start).get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage);
|
||||
fx1 -= (float)MyApp.ActiveDocument.Range(0, 0).get_Information(LBWdInformation.wdHorizontalPositionRelativeToPage);
|
||||
|
||||
// B2017-217 Added logic so that underscores are not converted to underline
|
||||
// C2018-003 fixed use of getting the active section
|
||||
AddPrecedingText(sel, roValue.Substring(0, pstart), 0.0F, (sect.ActiveSection != null) ? sect.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertUnderscoreToUnderline : false);// replace the RO token with what's in front of the X/Y Plot
|
||||
AddPrecedingText(sel, roValue.Substring(0, pstart), fx1, (sect.ActiveSection != null) ? sect.ActiveSection.ActiveFormat.PlantFormat.FormatData.SectData.ConvertUnderscoreToUnderline : false);// replace the RO token with what's in front of the X/Y Plot
|
||||
roValue = roValue.Substring(pstart); // set rovalue to the start of the plot commands
|
||||
|
||||
pngFile = VlnSettings.TemporaryFolder + @"\XYPlot1.png"; //@"C:\Temp\XYPlot1.png";
|
||||
@@ -1386,6 +1391,10 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
float yAdjust = sel.Font.Size;
|
||||
float yyy = yAdjust + y + plotRect.Y;
|
||||
|
||||
//B2025-065 When Printing a Word Section containing XY Plot ROs - when there is a title on the XY Plot, only the first line is indented.
|
||||
xxx += fx1; //shift by x-offset
|
||||
|
||||
LBShape shape = myDoc.Shapes.AddPicture(pngFile, xxx, yyy, sel.Range);
|
||||
|
||||
try
|
||||
|
||||
@@ -3819,6 +3819,51 @@ namespace VEPROMS.CSLA.Library
|
||||
_Tables = null;
|
||||
_SupInfos = null;
|
||||
}
|
||||
|
||||
//B2019-140 Change bars do not get refreshed when approval is run.
|
||||
// Reset a Procedure and sub items in the cache
|
||||
public static ProcedureInfo ResetProcedure(int procID)
|
||||
{
|
||||
// The following lines reload the procedure info cache
|
||||
ProcedureInfo newproc = ProcedureInfo.Get(procID, true);
|
||||
newproc.RefreshConfig();
|
||||
|
||||
//the following is needed to force the ProcedureConfig to reload
|
||||
#pragma warning disable S1656 // Variables should not be self-assigned
|
||||
newproc.MyConfig = newproc.MyConfig;
|
||||
#pragma warning restore S1656 // Variables should not be self-assigned
|
||||
|
||||
//reload the Content Cache for the procedure
|
||||
ContentInfo.Refresh(Content.Get(newproc.MyContent.ContentID, true));
|
||||
|
||||
// The following line actually reloads the item info cache
|
||||
ItemInfo newprocitem = Get(procID, true);
|
||||
newprocitem.RefreshConfig();
|
||||
|
||||
//Reload all the child/sub items
|
||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||
List<int> itemIDs = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.ActiveParent != null && (t.ActiveParent is ItemInfo) && t.MyProcedure.ItemID == procID).Select(x => (x.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
|
||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
||||
for (int index = 0; index < itemIDs.Count; index++)
|
||||
{
|
||||
ResetParts(itemIDs[index]);
|
||||
}
|
||||
|
||||
//reset the procedure config for all items attached to current procedure
|
||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||
List<ItemInfo> pconfigrefresh_items = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.MyProcedure?.ItemID == procID).Distinct().ToList();
|
||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
||||
for (int index = 0; index < pconfigrefresh_items.Count; index++)
|
||||
{
|
||||
pconfigrefresh_items[index].MyProcedure = newproc;
|
||||
}
|
||||
|
||||
//return the changed procedure info
|
||||
return newproc;
|
||||
}
|
||||
|
||||
private ItemInfoList _Procedures;
|
||||
public ItemInfoList Procedures
|
||||
{ get { return Lookup(E_FromType.Procedure, ref _Procedures); } }
|
||||
@@ -4700,6 +4745,26 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
_MyTab.Text = _MyTab.Text.Substring(1);
|
||||
}
|
||||
// C2026-003 Vogtle Continuous Action high level RNO (AER is not continuous action)
|
||||
if (ActiveFormat.MyStepSectionLayoutData.AddContActTagToHighLevelRNOWhenIncludedOnCAS &&
|
||||
IsInRNO && !MyParent.IsInRNO && FormatStepData.TabData.CASPrintMacro != null)
|
||||
{
|
||||
// B2026-009 needed to make sure parent wasn't a continuous action step type
|
||||
// the ExcludeFromContActSum is set to False for continuous action
|
||||
// step types and True for all others
|
||||
StepConfig psc = MyParent.MyConfig as StepConfig;
|
||||
if (MyParent.FormatStepData.ExcludeFromContActSum && psc != null && psc.Step_CAS != "True")
|
||||
{
|
||||
StepConfig sc = MyConfig as StepConfig;
|
||||
if (sc != null && sc.Step_CAS == "True")
|
||||
{
|
||||
if (FormatStepData.TabData.CASPrintMacro != null)
|
||||
_MyTab.Text = FormatStepData.TabData.CASPrintMacro + _MyTab.Text;
|
||||
if (FormatStepData.TabData.CASEditTag != null)
|
||||
_MyTab.CleanText = FormatStepData.TabData.CASEditTag + _MyTab.CleanText;
|
||||
}
|
||||
}
|
||||
}
|
||||
_MyTab.RNOTabWidthAdjust = ((ItemInfo)ActiveParent).FormatStepData.TabData.RNOAdjustTabSize ?? 0;
|
||||
if (((ItemInfo)ActiveParent).MyTab.Offset != 0) _MyTab.Offset = ((ItemInfo)ActiveParent).MyTab.Offset;
|
||||
if (((ItemInfo)ActiveParent).FormatStepData.TabData.RNOExcludeMacros)
|
||||
|
||||
@@ -1148,6 +1148,15 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
|
||||
private LazyLoad<bool> _DontIncludeRNOTabIfHasAERParent;
|
||||
public bool DontIncludeRNOTabIfHasAERParent // F2026-002: Vogtle Units 3&4 Top Continue Message.
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _DontIncludeRNOTabIfHasAERParent, "@DontIncludeRNOTabIfHasAERParent");
|
||||
}
|
||||
}
|
||||
|
||||
private LazyLoad<string> _Message;
|
||||
[Category("Continue Msg")]
|
||||
[DisplayName("Top Continue Msg")]
|
||||
|
||||
@@ -3814,6 +3814,18 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
|
||||
// C2026-003 (for Vogtle Units 3&4) Adds the continuous action tag to a high level RNO
|
||||
// only when it as a tab and the parent is an AER step that is not tagged as a continuous action
|
||||
// Use this with the setting of CASPrintMacro and CASEditTag on the RNO step type TabData definition
|
||||
private LazyLoad<bool> _AddContActTagToHighLevelRNOWhenIncludedOnCAS;
|
||||
public bool AddContActTagToHighLevelRNOWhenIncludedOnCAS
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _AddContActTagToHighLevelRNOWhenIncludedOnCAS, "@AddContActTagToHighLevelRNOWhenIncludedOnCAS");
|
||||
}
|
||||
}
|
||||
|
||||
// treat sub-sections and High Level Steps as if they are at the same procedure structure level. This is used with the TieTabToLevel flag
|
||||
private LazyLoad<bool> _SubSectAndHighSameLevel;
|
||||
public bool SubSectAndHighSameLevel
|
||||
@@ -4341,6 +4353,26 @@ public LeftJustifyList(XmlNodeList xmlNodeList) : base(xmlNodeList) { }
|
||||
return LazyLoad(ref _IncludeSectionNumAndTitle, "@IncludeSectionNumAndTitle");
|
||||
}
|
||||
}
|
||||
|
||||
//F2025-038 default (in base format) is True. The lable "SECTION" will precede the section number an title
|
||||
private LazyLoad<bool> _IncludeSectionLabel;
|
||||
public bool IncludeSectionLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _IncludeSectionLabel, "@IncludeSectionLabel");
|
||||
}
|
||||
}
|
||||
//F2026-001 default (in base format) is False. Put in for Vogtle Units 3 & 4.
|
||||
// this will add the parent sub-step tab if the parent is not identified as a continueous action step
|
||||
private LazyLoad<bool> _AddParentTabToSubStepTab;
|
||||
public bool AddParentTabToSubStepTab
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _AddParentTabToSubStepTab, "@AddParentTabToSubStepTab");
|
||||
}
|
||||
}
|
||||
// the font and font styles to use for the continuous action summary
|
||||
private VE_Font _Font;
|
||||
public VE_Font Font
|
||||
@@ -5688,6 +5720,30 @@ public StepData Equation // equation has a parent of embedded object.
|
||||
return LazyLoad(ref _RNOIdentPrint, "TabData/@RNOIdent");
|
||||
}
|
||||
}
|
||||
// Adds a print macro for the high level RNO when the user want it to be a Continuous Action
|
||||
// while the corresponding AER is not a continuous action
|
||||
// C2026-003 used in RNO step definition for Vogtle 3&4 two column format
|
||||
// use with AddContActTagToHighLevelRNOWhenIncludedOnCAS set to True in the format file's StpSectLayData
|
||||
private LazyLoad<string> _CASPrintMacro;
|
||||
public string CASPrintMacro
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _CASPrintMacro, "TabData/@CASPrintMacro");
|
||||
}
|
||||
}
|
||||
// Adds a character indicator in the step editor for the high level RNO when the user want it to be a Continuous Action
|
||||
// while the corresponding AER is not a continuous action
|
||||
// C2026-003 used in RNO step definition for Vogtle 3&4 two colmn format
|
||||
// use with AddContActTagToHighLevelRNOWhenIncludedOnCAS set to True in the format file's StpSectLayData
|
||||
private LazyLoad<string> _CASEditTag;
|
||||
public string CASEditTag
|
||||
{
|
||||
get
|
||||
{
|
||||
return LazyLoad(ref _CASEditTag, "TabData/@CASEditTag");
|
||||
}
|
||||
}
|
||||
|
||||
// don't use the defined macro when creating a step tab for the step type's RNO
|
||||
private LazyLoad<bool> _RNOExcludeMacros;
|
||||
|
||||
76
PROMS/VEPROMS.CSLA.Library/Minimal/GeneralReports.cs
Normal file
76
PROMS/VEPROMS.CSLA.Library/Minimal/GeneralReports.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using Csla.Data;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
//CSM - C2025-043 - Minimal Class for General Reports
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
public static class GeneralReports
|
||||
{
|
||||
|
||||
#region Get General Reports
|
||||
//CSM - C2025-043 report RO's that are not used in any of the PROMS data.
|
||||
public static DataTable GetROsNotUsedInPROMS(DataTable dtDBids)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.StoredProcedure;
|
||||
cm.CommandText = "vesp_GetROsNotUsed";
|
||||
cm.CommandTimeout = 0;
|
||||
//Pass table Valued parameter to Store Procedure
|
||||
SqlParameter sqlParam = cm.Parameters.AddWithValue("@dbIDs", dtDBids);
|
||||
sqlParam.SqlDbType = SqlDbType.Structured;
|
||||
|
||||
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
da.Fill(dt);
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new DbCslaException("Error in GetROsNotUsedInPROMS Report: retrieving data failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
//C2026-002 Enhancements to new admin Tool for ROs not used.
|
||||
//used to build checkboxes of dbs to include
|
||||
public static DataTable GetRODBs()
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||
{
|
||||
using (SqlCommand cm = cn.CreateCommand())
|
||||
{
|
||||
cm.CommandType = CommandType.Text;
|
||||
cm.CommandText = "select RofstDatabase.*, RODbID FROM RofstDatabase INNER JOIN (Select FSTID = max(RoFSTID), RODbID from ROFsts GROUP BY RODbID) fsts ON fsts.FSTID = RofstDatabase.RofstID ORDER BY RofstID, RODbID, dbiTitle";
|
||||
|
||||
cm.CommandTimeout = 0;
|
||||
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||
{
|
||||
DataTable dt = new DataTable();
|
||||
da.Fill(dt);
|
||||
return dt;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new DbCslaException("Error in GetROsNotUsedInPROMS Report - GetRODBs: retrieving data failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
@@ -390,6 +390,7 @@
|
||||
<Compile Include="Generated\ZTransitionInfo.cs" />
|
||||
<Compile Include="Minimal\AnnotationstypeSections.cs" />
|
||||
<Compile Include="Minimal\Maintenance.cs" />
|
||||
<Compile Include="Minimal\GeneralReports.cs" />
|
||||
<Compile Include="Minimal\UserReports.cs" />
|
||||
<Compile Include="Minimal\UserSettings.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
Reference in New Issue
Block a user