Compare commits

...

22 Commits

Author SHA1 Message Date
5650df1a9f Merge pull request 'C2025-001 Replace 3rd party Ionic.zip component' (#602) from C2025-001 into Development
good for testing phase
2025-08-25 08:40:01 -04:00
8f154ebf48 C2025-001 Replace 3rd party Ionic.zip component 2025-08-21 14:25:53 -04:00
ba9d56811c Merge pull request 'C2025-035 RO Performance Improvement' (#601) from C2025-035 into Development
Reviewed-on: #601
Reviewed-by: Paul Larsen <plarsen@volian.com>
2025-08-19 14:24:55 -04:00
8eb8a328d1 C2025-035 RO Performance Improvement
Add some code to rebuild specific indexes (like [IX_RofstID_DbiID_ParentID] ON [dbo].[RofstChild])
after a new RO.FST is imported.
2025-08-19 13:32:23 -04:00
e8327316dd Merge pull request 'B2025-041-Set-Quick-Print-overwrite-pdf-to-false' (#599) from B2025-041-Set-Quick-Print-overwrite-pdf-to-false into Development
good for testing phase
2025-08-14 13:52:37 -04:00
3bd7001106 B2025-041-Set-Quick-Print-overwrite-pdf-to-false 2025-08-14 11:23:22 -04:00
2e5ad53c6a Merge pull request 'B2025-042 RO Editor FST Export ParentChild whitespace' (#598) from B2025-042 into Development
good for testing phase
2025-08-14 11:12:32 -04:00
ca0ae279e0 B2025-042 RO Editor FST Export ParentChild whitespace 2025-08-14 10:16:22 -04:00
adf1120436 Merge pull request 'B2025-037 When Export an Approved procedure with multi-unit and ROs with Parent Child, it exports as the default text and not the specific unit text.' (#597) from B2025-037 into Development
good for testing phase
2025-08-13 10:52:17 -04:00
7879391de0 B2025-037 When Export an Approved procedure with multi-unit and ROs with Parent Child, it exports as the default text and not the specific unit text. 2025-08-13 10:45:49 -04:00
11ba9ea418 Merge pull request 'C2025-048-Set-Quick-Print-overwrite-pdf-to-false' (#596) from C2025-048-Set-Quick-Print-overwrite-pdf-to-false into Development
good for testing phase
2025-08-13 10:34:12 -04:00
0fe84ca17c Merge pull request 'C2025-045 Improve Performance loading procedures with Alarms.' (#594) from C2025-045 into Development
good for testing phase
2025-08-13 09:17:55 -04:00
1009ca5111 Merge remote-tracking branch 'origin/Development' into C2025-048-Set-Quick-Print-overwrite-pdf-to-false 2025-08-13 09:14:34 -04:00
2c973fb0be C2025-045 Improve Performance loading procedures with Alarms. 2025-08-13 09:12:04 -04:00
dba1f4e71c C2025-048-Set-Quick-Print-overwrite-pdf-to-false 2025-08-13 09:11:52 -04:00
46fe124fe1 Merge pull request 'C2025-049 Added a check and fix for a different hyphen character that is in Vogtle’s 3 & 4 procedures, introduced by automatic importing and copy/paste from Word documents.' (#593) from C2025-049-update_StandardHyphens_AdminTools into Development
Looks good. Ready for QA testing.
2025-08-13 07:52:27 -04:00
50688d7d8a C2025-049 Added a check and fix for a different hyphen character that is in Vogtle’s 3 & 4 procedures, introduced by automatic importing and copy/paste from Word documents. 2025-08-12 16:16:59 -04:00
a7396e3c4a Merge pull request 'C2025-015 Added logic to make approved PDF names unique to allow procedures from different sets or different revs of the same procedure to be opened (viewed) at the same time.' (#592) from C2025-015_ViewMultipleApprovedPDFsOfSameName into Development
Reviewed-on: #592
Reviewed-by: Matthew Schill <mschill@volian.com>
Reviewed-by: Paul Larsen <plarsen@volian.com> merge after successful code review.
2025-08-12 10:28:04 -04:00
41e969f79e C2025-015 Added logic to make approved PDF names unique to allow procedures from different sets or different revs of the same procedure to be opened (viewed) at the same time. 2025-08-12 09:21:26 -04:00
7b3f78f745 Merge pull request 'B2025-038-Copy-a-step-between-two-screens' (#591) from B2025-038-Copy-a-step-between-two-screens into Development
ready for testing phase
2025-08-12 08:45:59 -04:00
14bc171246 B2025-038-Copy-a-step-between-two-screens 2025-08-12 08:09:38 -04:00
a584c0751e Merge pull request 'C2025-024' (#590) from C2025-024 into Development
good for testing phase
2025-08-08 10:18:59 -04:00
10 changed files with 356 additions and 239 deletions

View File

@@ -735,10 +735,13 @@ namespace RODBInterface
else
parentValue = nd.InnerText;
if (parentName != "#whitespace")
{
//applicValues = "";
applicValues = string.Format("<APL DefaultVal={0}", parentValue);
int pcChildIdx = 0;
//C2022-001 only save the child ro value in the RO.FST if it is different than the parent (default) value
foreach (string c in pcChildern)
{
//string csufx = CvtUserFldToFld(c);
@@ -754,6 +757,7 @@ namespace RODBInterface
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
}
}
}
applicValues += " /APL>";
}
return applicValues;

View File

@@ -66,6 +66,12 @@ namespace VEPROMS
set { _prtSectID = value; }
}
private bool _OverwritePDF;
public bool OverwritePDF
{
get { return cbxOverwritePDF2.Checked; }
set { cbxOverwritePDF2.Checked = value; }
}
// C2018-033 Used to turn off using the date/time PDF file prefix and suffix when doing batch file autmatic baseline print testing (frmVEPROMS.cs RunAutomatic())
// This is needed so the the automatic baselines can compare results from different runs of PROMS

View File

@@ -13635,8 +13635,8 @@ WITH EXECUTE AS OWNER
AS
BEGIN TRY -- Try Block
BEGIN TRANSACTION
Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?')
where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%'
Update Contents set Text = Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Text,'\emdash','\u8209?'),'\endash','\u8209?'),'\u8213?','\u8209?'),'\u8212?','\u8209?'),'\u8211?','\u8209?'),'\u8210?','\u8209?'),'\u8208?','\u8209?'),NCHAR(8209),'\u8209?')
where Text Like '%\u8208?%' or Text Like '%\u8210?%' or Text Like '%\u8211?%' or Text Like '%\u8212?%' or Text Like '%\u8213?%' or Text Like '%\endash%' or Text Like '%\emdash%'or Text Like '%' + NCHAR(8209) + '%' IF( @@TRANCOUNT > 0 ) COMMIT
IF( @@TRANCOUNT > 0 ) COMMIT
END TRY
BEGIN CATCH -- Catch Block
@@ -17320,7 +17320,7 @@ GO
[RofstID] [int] NOT NULL,
[roid] [varchar](50) NOT NULL,
[value] [varchar](max) NOT NULL,
[AccPageID] [varchar](max) NULL,
[AccPageID] [varchar](100) NULL,
CONSTRAINT [PK_RofstDefaultValue] PRIMARY KEY CLUSTERED
(
[RofstID] ASC,
@@ -18918,8 +18918,9 @@ GO
*****************************************************************************/
/*
==========================================================================================================
Author: Jake Ropar
Author: Jake Ropar / Matthew Schill
Create Date: 06/23/2022
Modify Date: 08/18/2025
Description: Finalizes Rofst Header Record / Updates LoadedDate if Success
==========================================================================================================
*/
@@ -18936,13 +18937,18 @@ GO
Set LoadedDate = GetDate()
Where RofstID = @RofstID;
--always rebuild the rofst child and default indexes
DBCC DBREINDEX ('RofstChild');
DBCC DBREINDEX ('RofstDefaultValue');
-- Rebuild/Reorganize Indexes
Exec [dbo].[vesp_UtilityCheckIndexes] 20.0, 5.0, 0, 1;
Return;
End
Go
GO
IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstHeaderFinalizeLoad] Succeeded'
ELSE PRINT 'Procedure Creation: [vesp_RofstHeaderFinalizeLoad] Error on Creation'
@@ -24293,6 +24299,56 @@ Go
--- end changes for:
---C2025-023 - Electronic Procedures - Modifications to PROMS
/*
==========================================================================================================
Begin: C2025-045: Improve Performance loading procedures with Alarms
==========================================================================================================
*/
IF Exists(SELECT 1 from information_schema.columns where character_maximum_length=-1 and column_name = 'AccPageID' and table_name = 'RofstDefaultValue')
Begin
ALTER TABLE RofstDefaultValue ALTER COLUMN AccPageID varchar(100)
END
GO
IF (@@Error = 0) PRINT 'Updating size of RofstDefaultValue.AccPageID Succeeded'
ELSE PRINT 'Updating size of RofstDefaultValue.AccPageID Failed to Execute'
GO
EXEC sp_refreshview [dbo.vwRofstData_RofstDefaultValues]
EXEC sp_refreshview [dbo.vwRofstData_RofstBaseRoids]
GO
IF (@@Error = 0) PRINT 'Refreshing views: (vwRofstData_RofstDefaultValues,vwRofstData_RofstBaseRoids) Succeeded'
ELSE PRINT 'Refreshing views: (vwRofstData_RofstDefaultValues,vwRofstData_RofstBaseRoids) Failed to Execute'
GO
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE name = 'IX_RofstDefaultValue_RofstID_AccPageID')
BEGIN
CREATE NONCLUSTERED INDEX [IX_RofstDefaultValue_RofstID_AccPageID] ON [dbo].[RofstDefaultValue]
(
[RofstID] ASC,
[AccPageID] ASC
)
INCLUDE
(
[roid]
,[value]
)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
END
GO
IF (@@Error = 0) PRINT 'Adding Index IX_RofstDefaultValue_RofstID_AccPageID Succeeded'
ELSE PRINT 'Adding Index IX_RofstDefaultValue_RofstID_AccPageID Failed to Execute'
GO
/*
==========================================================================================================
End: C2025-045: Improve Performance loading procedures with Alarms
==========================================================================================================
*/
/*
---------------------------------------------------------------------------
@@ -24327,8 +24383,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '07/31/2025 10:30 AM'
set @RevDescription = 'SQL Optimization'
set @RevDate = '08/18/2025 2:07 PM'
set @RevDescription = 'Updated Index maintenance that occurs after RO FST Load to improve RO Performance'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription

View File

@@ -111,10 +111,6 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\3rdPartyLibraries\Ionic\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="Itenso.Rtf.Interpreter">
<HintPath>..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Interpreter.dll</HintPath>
</Reference>
@@ -133,6 +129,8 @@
<Reference Include="System.Deployment" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Runtime.Remoting" />
<Reference Include="System.Web" />
<Reference Include="System.Web.Extensions" />

View File

@@ -1309,7 +1309,7 @@ namespace VEPROMS
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
if (si.IsApproved == 1)
{
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0); // "true tell export to convert ROs and Transitions to text
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0, selectedSlave); // "true tell export to convert ROs and Transitions to text
dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
dlg.ExportItem(xd, pi, "procedure");

View File

@@ -7,7 +7,7 @@ using Volian.Controls.Library;
using Volian.Base.Library;
using System.Xml;
using System.IO;
using Ionic.Zip;
using System.IO.Compression;
using System.Text.RegularExpressions;
using JR.Utils.GUI.Forms;
using System.Linq;
@@ -193,8 +193,7 @@ namespace VEPROMS
txtExport.Text = sfd.FileName;
if (File.Exists(txtExport.Text))
File.Delete(txtExport.Text);
MyExpxZipFile = new ZipFile(txtExport.Text, Encoding.UTF8);
MyExpxZipFile.Save();
MyExpZipFileName = txtExport.Text;
}
}
else if (MyProcedure != null)
@@ -211,8 +210,8 @@ namespace VEPROMS
else
lblExportStatus.Text = "Awaiting Export File Name:";
}
private ZipFile MyExpxZipFile = null;
private ZipFile MyImpxZipFile = null;
private string MyExpZipFileName = null;
private string MyImpZipFileName = null;
private DateTime MyStart;
private bool successfullExport = true;
@@ -891,11 +890,17 @@ namespace VEPROMS
return true;
}
private bool LoadImportDataDocument()
{
using (FileStream zipToOpen = new FileStream(MyExpZipFileName, FileMode.OpenOrCreate))
{
using (ZipArchive MyExpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
{
floatFoldout = new Dictionary<int, int>();
ZipEntry ze = MyExpxZipFile[0];
string fn = PEIPath + @"\" + ze.FileName;
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
ZipArchiveEntry ze = MyExpxZipFile.Entries[0];
if (!Directory.Exists(Path.Combine(PEIPath, "folder")))
Directory.CreateDirectory(Path.Combine(PEIPath, "folder"));
string fn = Path.Combine(PEIPath, "folder", ze.Name);
ze.ExtractToFile(fn, true);
XmlDocument xd = new XmlDocument();
xd.Load(fn);
bool didImp = LoadFormats(xd, "folder/formats/format");
@@ -951,11 +956,13 @@ namespace VEPROMS
ProcedureInfo pi = null;
pbImportProcedure.Value = 0;
pbImportProcedure.Maximum = MyExpxZipFile.Entries.Count - 1;
if (!Directory.Exists(Path.Combine(PEIPath, "procedures")))
Directory.CreateDirectory(Path.Combine(PEIPath, "procedures"));
for (int i = 1; i < MyExpxZipFile.Entries.Count; i++)
{
ze = MyExpxZipFile[i];
fn = PEIPath + @"\" + ze.FileName;
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
ze = MyExpxZipFile.Entries[i];
fn = Path.Combine(PEIPath, "procedures", ze.Name);
ze.ExtractToFile(fn, true);
xd = new XmlDocument();
xd.Load(fn);
pi = AddProcedure(xd.DocumentElement, dvi, pi);
@@ -971,6 +978,8 @@ namespace VEPROMS
SaveTransitionAndItemContentIDs();
return true;
}
}
}
private void FixSectionStart(ProcedureInfo pi)
{
Content c = Content.Get(pi.MyContent.ContentID);
@@ -1253,6 +1262,10 @@ namespace VEPROMS
// This will create and save the ItemIDs (old and new), ContentIDs (old andnew), library document IDs (old and new), and pending transitions each in their own xml file
// the xml files are then added (or replaced) in the .impx file.
private void SaveTransitionAndItemContentIDs()
{
using (FileStream zipToOpen = new FileStream(MyImpZipFileName, FileMode.OpenOrCreate))
{
using (ZipArchive MyImpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
{
XmlDocument xd = new XmlDocument();
XmlElement xe = xd.CreateElement("items");
@@ -1266,11 +1279,9 @@ namespace VEPROMS
xd.DocumentElement.AppendChild(xe);
}
xd.Save(fn);
ZipEntry ze = MyImpxZipFile["items.xml"];
MyImpxZipFile.RemoveEntry(ze);
MyImpxZipFile.Save();
MyImpxZipFile.AddFile(fn, "");
MyImpxZipFile.Save();
ZipArchiveEntry ze = MyImpxZipFile.GetEntry("items.xml");
ze.Delete();
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
File.Delete(fn);
xd = new XmlDocument();
xe = xd.CreateElement("contents");
@@ -1284,11 +1295,9 @@ namespace VEPROMS
xd.DocumentElement.AppendChild(xe);
}
xd.Save(fn);
ze = MyImpxZipFile["contents.xml"];
MyImpxZipFile.RemoveEntry(ze);
MyImpxZipFile.Save();
MyImpxZipFile.AddFile(fn, "");
MyImpxZipFile.Save();
ze = MyImpxZipFile.GetEntry("contents.xml");
ze.Delete();
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
File.Delete(fn);
xd = new XmlDocument();
xe = xd.CreateElement("transitions");
@@ -1303,36 +1312,36 @@ namespace VEPROMS
}
}
xd.Save(fn);
ze = MyImpxZipFile["transitions.xml"];
MyImpxZipFile.RemoveEntry(ze);
MyImpxZipFile.Save();
MyImpxZipFile.AddFile(fn, "");
MyImpxZipFile.Save();
ze = MyImpxZipFile.GetEntry("transitions.xml");
ze.Delete();
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
File.Delete(fn);
}
}
}
// This is called only when we are importing an entire folder and there is a .impx file (a zip file)
// the name of the .impx file is based on the folder name containing the export file being imported
// This will read in the saved ItemIDs (old and new), ContentIDs (old andnew), library document IDs (old and new), and pending transitions
private void ReadTransitionAndItemContentIDs()
private void ReadTransitionAndItemContentIDs(ZipArchive MyImpxZipFile)
{
ZipEntry ze = MyImpxZipFile["items.xml"];
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
ZipArchiveEntry ze = MyImpxZipFile.GetEntry("items.xml");
string fn = PEIPath + @"\items.xml";
ze.ExtractToFile(fn, true);
XmlDocument xd = new XmlDocument();
xd.Load(fn);
// B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old item ids
File.Delete(fn);
ze = MyImpxZipFile["contents.xml"];
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
ze = MyImpxZipFile.GetEntry("contents.xml");
fn = PEIPath + @"\contents.xml";
ze.ExtractToFile(fn, true);
xd = new XmlDocument();
xd.Load(fn);
// B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old content ids
File.Delete(fn);
ze = MyImpxZipFile["libdocs.xml"];
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
ze = MyImpxZipFile.GetEntry("libdocs.xml");
fn = PEIPath + @"\libdocs.xml";
ze.ExtractToFile(fn, true);
xd = new XmlDocument();
xd.Load(fn);
XmlNodeList nl = xd.SelectNodes("//libdoc");
@@ -1344,9 +1353,9 @@ namespace VEPROMS
Old2NewLibDoc.Add(oldid, newid);
}
File.Delete(fn);
ze = MyImpxZipFile["transitions.xml"];
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
ze = MyImpxZipFile.GetEntry("transitions.xml");
fn = PEIPath + @"\transitions.xml";
ze.ExtractToFile(fn, true);
PendingTransitions.Load(fn);
File.Delete(fn);
}
@@ -1374,25 +1383,26 @@ namespace VEPROMS
else
dn = fi.Name.Substring(0, fi.Name.IndexOf("."));
txtImport.Text = ofd.FileName;
ReadOptions ro = new ReadOptions();
ro.Encoding = Encoding.UTF8;
MyExpxZipFile = ZipFile.Read(txtImport.Text, ro);
MyExpZipFileName = txtImport.Text;
string fn = string.Format(@"{0}\{1}.impx", PEIPath, dn);
MyImpZipFileName = fn;
if (File.Exists(fn))
{
MyImpxZipFile = ZipFile.Read(fn, ro);
ReadTransitionAndItemContentIDs();
using (ZipArchive MyImpxZipFile = ZipFile.OpenRead(fn))
ReadTransitionAndItemContentIDs(MyImpxZipFile);
}
else
{
MyImpxZipFile = new ZipFile(fn, Encoding.UTF8);
using (FileStream zipToOpen = new FileStream(fn, FileMode.OpenOrCreate))
{
using (ZipArchive MyImpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
{
//transitions
XmlElement xe = PendingTransitions.CreateElement("transitions");
PendingTransitions.AppendChild(xe);
fn = PEIPath + @"\transitions.xml";
PendingTransitions.Save(fn);
MyImpxZipFile.AddFile(fn, "");
MyImpxZipFile.Save();
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
File.Delete(fn);
//itemids
XmlDocument xd = new XmlDocument();
@@ -1400,8 +1410,7 @@ namespace VEPROMS
xd.AppendChild(xe);
fn = PEIPath + @"\items.xml";
xd.Save(fn);
MyImpxZipFile.AddFile(fn, "");
MyImpxZipFile.Save();
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
File.Delete(fn);
//contentids
xd = new XmlDocument();
@@ -1409,8 +1418,7 @@ namespace VEPROMS
xd.AppendChild(xe);
fn = PEIPath + @"\contents.xml";
xd.Save(fn);
MyImpxZipFile.AddFile(fn, "");
MyImpxZipFile.Save();
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
File.Delete(fn);
//libdocids
xd = new XmlDocument();
@@ -1418,11 +1426,12 @@ namespace VEPROMS
xd.AppendChild(xe);
fn = PEIPath + @"\libdocs.xml";
xd.Save(fn);
MyImpxZipFile.AddFile(fn, "");
MyImpxZipFile.Save();
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
File.Delete(fn);
}
}
}
}
if (MyDocVersion != null)
{
ofd.Filter = "PROMS Procedure Export Files|*.pxml";
@@ -1595,8 +1604,11 @@ namespace VEPROMS
ExportAssociation(xe, ai, "association");
string fn = PEIPath + @"\folder.xml";
xn.OwnerDocument.Save(fn);
MyExpxZipFile.AddFile(fn, "folder");
MyExpxZipFile.Save();
using (FileStream zipToOpen = new FileStream(MyExpZipFileName, FileMode.OpenOrCreate))
{
using (ZipArchive MyExpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
{
_ = MyExpxZipFile.CreateEntryFromFile(fn, $"folder/{Path.GetFileName(fn)}");
File.Delete(fn);
//here
lblExportStatus.Text = "Exporting Procedures...";
@@ -1612,13 +1624,14 @@ namespace VEPROMS
ExportItem(xd, ii, "procedure");
fn = string.Format(@"{0}\proc{1}.xml", PEIPath, pbExportProcedure.Value.ToString().PadLeft(4, '0'));
xd.Save(fn);
MyExpxZipFile.AddFile(fn, "procedures");
MyExpxZipFile.Save();
_ = MyExpxZipFile.CreateEntryFromFile(fn, $"procedures/{Path.GetFileName(fn)}");
File.Delete(fn);
xd = null;
}
}
}
}
}
private void ExportAssociation(XmlElement xn, AssociationInfo ai, string nodename)
{
/*
@@ -1839,12 +1852,14 @@ namespace VEPROMS
//and handled/overridden in dlgExportEP.cs
}
protected virtual void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
protected virtual void SetEPEnhancedDocLinks(ref XmlElement xe, ItemInfo ii)
{
//do nothing - this will be for Electronic procedures only
//and handled/overridden in dlgExportEP.cs
}
protected virtual void SetEPEnhancedDocLinks(ref XmlElement xe, ItemInfo ii)
protected virtual void SetROLocation(ref XmlElement xindivid, ROFSTLookup.rochild roc, RODbInfo rodb, bool isMulti)
{
//do nothing - this will be for Electronic procedures only
//and handled/overridden in dlgExportEP.cs

View File

@@ -1245,6 +1245,7 @@ namespace VEPROMS
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
{
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs B2025-041
prnDlg.SelectedSlave = args.UnitIndex;
prnDlg.MySessionInfo = MySessionInfo;
prnDlg.SetupForProcedure(); // Setup filename
@@ -1602,6 +1603,7 @@ namespace VEPROMS
{
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
{
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs C2025-048.
prnDlg.SelectedSlave = pi.ProcedureConfig.SelectedSlave == 0 ? -1 : pi.ProcedureConfig.SelectedSlave; //added by jcb 20130718 to support create pdf button when multi-unit and user selects a unit
prnDlg.MySessionInfo = MySessionInfo;
prnDlg.SetupForProcedure(); // Setup filename

View File

@@ -839,7 +839,7 @@ namespace VEPROMS.CSLA.Library
{
using (SqlCommand cmd = cn.CreateCommand())
{
cmd.CommandTimeout = Database.DefaultTimeout;
cmd.CommandTimeout = 0;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "vesp_RofstHeaderFinalizeLoad";

View File

@@ -4105,6 +4105,7 @@ namespace Volian.Controls.Library
public void DoCopyStep()
{
MyEditItem.SaveCurrentAndContents(); // B2025-038 copy step and text to another procedure in another screen.
// highlight selected step(s) and prompt to see if selection is what user wants:
if (MyFlexGrid != null) MyEditItem.IdentifyMe(true);
MyEditItem.IdentifyChildren(true);

View File

@@ -1606,6 +1606,27 @@ namespace Volian.Controls.Library
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
//C2025-015 Get a partial folder path. This will be used in building the PDF file name when viewing Approved procedures
string ProcFolderPathforApprovedPDF(string fullPath)
{
string rtnStr = "";
try
{
// the fullPath string that is passed in ends with the Working Draft node. We want to trim that off
string[] strParts = fullPath.Substring(0, fullPath.LastIndexOf("\\")).Split('\\'); //fullPath.Replace("\\Working Draft","").Split('\\');
int lastPart = Math.Max(strParts.Length - 1, 0);
rtnStr = strParts[lastPart];
if (rtnStr.ToUpper().StartsWith("UNIT"))
{
rtnStr = strParts[lastPart - 1] + "_" + rtnStr;
}
}
catch
{
rtnStr = fullPath.Replace("\\", "_"); // just return the full path with _ intead of backslashes
}
return rtnStr;
}
void ApprovedRevision_Click(object sender, EventArgs e)
{
@@ -1619,7 +1640,10 @@ namespace Volian.Controls.Library
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
superceded = true;
}
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID);
// C2025-015 build a file name that includes a partial folder path and approved revision number
string approvedPDFName = string.Format("{0}_{1} Revision {2}", ProcFolderPathforApprovedPDF(prcInfo.SearchDVPath_clean), prcInfo.PDFNumber,ri.RevisionNumber);
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(approvedPDFName), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
OnViewPDF(sender, args);
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
}
@@ -1628,6 +1652,7 @@ namespace Volian.Controls.Library
bool superceded = false;
MenuItem mi = sender as MenuItem;
if (mi == null) return;
string childName = "";
//RevisionInfo ri = mi.Tag as RevisionInfo;
RevisionInfo ri = RevisionInfo.Get(int.Parse(mi.Tag.ToString()));
{
@@ -1635,12 +1660,22 @@ namespace Volian.Controls.Library
//B2021-086 Added the check for the last revision stage is an Approved stage
if ((ri.RevisionID < int.Parse(mip.Parent.Tag.ToString())) && ri.LatestVersion.MyStage.IsApproved != 0)
superceded = true;
// C2025_015 get the child's name to append to file name
mip = mip.Parent as MenuItem;
if (mip != null)
{
childName = "_" + mip.Text;
}
}
ItemInfo ii = ItemInfo.Get(ri.ItemID);
ii.MyDocVersion.DocVersionConfig.SelectedSlave = ri.MyConfig.Applicability_Index;
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
ProcedureInfo prcInfo = ProcedureInfo.Get(ri.ItemID);
if (prcInfo.MyContent.Number.ToUpper().Contains("<U") || ii.MyDocVersion.DocVersionConfig.Unit_ProcedureNumber.Contains("#"))
childName = ""; // unit identification already part of procedure number-no need to add the child name to the PDF file name
// C2025-015 build a file name that includes a partial folder path, the child name and approved revision number
string approvedPDFName = string.Format("{0}{1}_{2} Revision {3}", ProcFolderPathforApprovedPDF(prcInfo.SearchDVPath_clean),childName, prcInfo.PDFNumber, ri.RevisionNumber);
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(approvedPDFName), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
OnViewPDF(sender, args);
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
}
void SummaryOfChanges_Click(object sender, EventArgs e)
{