Compare commits
1 Commits
C2025-001
...
C2025-048-
Author | SHA1 | Date | |
---|---|---|---|
f866fea500 |
@@ -735,13 +735,10 @@ namespace RODBInterface
|
|||||||
else
|
else
|
||||||
parentValue = nd.InnerText;
|
parentValue = nd.InnerText;
|
||||||
|
|
||||||
if (parentName != "#whitespace")
|
|
||||||
{
|
|
||||||
//applicValues = "";
|
//applicValues = "";
|
||||||
applicValues = string.Format("<APL DefaultVal={0}", parentValue);
|
applicValues = string.Format("<APL DefaultVal={0}", parentValue);
|
||||||
int pcChildIdx = 0;
|
int pcChildIdx = 0;
|
||||||
//C2022-001 only save the child ro value in the RO.FST if it is different than the parent (default) value
|
//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)
|
foreach (string c in pcChildern)
|
||||||
{
|
{
|
||||||
//string csufx = CvtUserFldToFld(c);
|
//string csufx = CvtUserFldToFld(c);
|
||||||
@@ -757,7 +754,6 @@ namespace RODBInterface
|
|||||||
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
|
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
applicValues += " /APL>";
|
applicValues += " /APL>";
|
||||||
}
|
}
|
||||||
return applicValues;
|
return applicValues;
|
||||||
|
@@ -17320,7 +17320,7 @@ GO
|
|||||||
[RofstID] [int] NOT NULL,
|
[RofstID] [int] NOT NULL,
|
||||||
[roid] [varchar](50) NOT NULL,
|
[roid] [varchar](50) NOT NULL,
|
||||||
[value] [varchar](max) NOT NULL,
|
[value] [varchar](max) NOT NULL,
|
||||||
[AccPageID] [varchar](100) NULL,
|
[AccPageID] [varchar](max) NULL,
|
||||||
CONSTRAINT [PK_RofstDefaultValue] PRIMARY KEY CLUSTERED
|
CONSTRAINT [PK_RofstDefaultValue] PRIMARY KEY CLUSTERED
|
||||||
(
|
(
|
||||||
[RofstID] ASC,
|
[RofstID] ASC,
|
||||||
@@ -18918,9 +18918,8 @@ GO
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
/*
|
/*
|
||||||
==========================================================================================================
|
==========================================================================================================
|
||||||
Author: Jake Ropar / Matthew Schill
|
Author: Jake Ropar
|
||||||
Create Date: 06/23/2022
|
Create Date: 06/23/2022
|
||||||
Modify Date: 08/18/2025
|
|
||||||
Description: Finalizes Rofst Header Record / Updates LoadedDate if Success
|
Description: Finalizes Rofst Header Record / Updates LoadedDate if Success
|
||||||
==========================================================================================================
|
==========================================================================================================
|
||||||
*/
|
*/
|
||||||
@@ -18937,18 +18936,13 @@ GO
|
|||||||
Set LoadedDate = GetDate()
|
Set LoadedDate = GetDate()
|
||||||
Where RofstID = @RofstID;
|
Where RofstID = @RofstID;
|
||||||
|
|
||||||
|
|
||||||
--always rebuild the rofst child and default indexes
|
|
||||||
DBCC DBREINDEX ('RofstChild');
|
|
||||||
DBCC DBREINDEX ('RofstDefaultValue');
|
|
||||||
|
|
||||||
-- Rebuild/Reorganize Indexes
|
-- Rebuild/Reorganize Indexes
|
||||||
Exec [dbo].[vesp_UtilityCheckIndexes] 20.0, 5.0, 0, 1;
|
Exec [dbo].[vesp_UtilityCheckIndexes] 20.0, 5.0, 0, 1;
|
||||||
|
|
||||||
|
|
||||||
Return;
|
Return;
|
||||||
End
|
End
|
||||||
GO
|
Go
|
||||||
|
|
||||||
IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstHeaderFinalizeLoad] Succeeded'
|
IF (@@Error = 0) PRINT 'Procedure Creation: [vesp_RofstHeaderFinalizeLoad] Succeeded'
|
||||||
ELSE PRINT 'Procedure Creation: [vesp_RofstHeaderFinalizeLoad] Error on Creation'
|
ELSE PRINT 'Procedure Creation: [vesp_RofstHeaderFinalizeLoad] Error on Creation'
|
||||||
@@ -24299,56 +24293,6 @@ Go
|
|||||||
--- end changes for:
|
--- end changes for:
|
||||||
---C2025-023 - Electronic Procedures - Modifications to PROMS
|
---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
|
|
||||||
==========================================================================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
@@ -24383,8 +24327,8 @@ BEGIN TRY -- Try Block
|
|||||||
DECLARE @RevDate varchar(255)
|
DECLARE @RevDate varchar(255)
|
||||||
DECLARE @RevDescription varchar(255)
|
DECLARE @RevDescription varchar(255)
|
||||||
|
|
||||||
set @RevDate = '08/18/2025 2:07 PM'
|
set @RevDate = '08/12/2025 4:12 PM'
|
||||||
set @RevDescription = 'Updated Index maintenance that occurs after RO FST Load to improve RO Performance'
|
set @RevDescription = 'Updated Fix Hyphen Characters'
|
||||||
|
|
||||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||||
|
@@ -111,6 +111,10 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
|
<HintPath>..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
|
||||||
</Reference>
|
</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">
|
<Reference Include="Itenso.Rtf.Interpreter">
|
||||||
<HintPath>..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Interpreter.dll</HintPath>
|
<HintPath>..\..\..\..\3rdPartyLibraries\RtfConverter\bin\Debug\Itenso.Rtf.Interpreter.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -129,8 +133,6 @@
|
|||||||
<Reference Include="System.Deployment" />
|
<Reference Include="System.Deployment" />
|
||||||
<Reference Include="System.Design" />
|
<Reference Include="System.Design" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.IO.Compression" />
|
|
||||||
<Reference Include="System.IO.Compression.FileSystem" />
|
|
||||||
<Reference Include="System.Runtime.Remoting" />
|
<Reference Include="System.Runtime.Remoting" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
|
@@ -1309,7 +1309,7 @@ namespace VEPROMS
|
|||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
if (si.IsApproved == 1)
|
if (si.IsApproved == 1)
|
||||||
{
|
{
|
||||||
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0, selectedSlave); // "true tell export to convert ROs and Transitions to text
|
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0); // "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
|
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();
|
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||||
dlg.ExportItem(xd, pi, "procedure");
|
dlg.ExportItem(xd, pi, "procedure");
|
||||||
|
@@ -7,7 +7,7 @@ using Volian.Controls.Library;
|
|||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.IO.Compression;
|
using Ionic.Zip;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using JR.Utils.GUI.Forms;
|
using JR.Utils.GUI.Forms;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -193,7 +193,8 @@ namespace VEPROMS
|
|||||||
txtExport.Text = sfd.FileName;
|
txtExport.Text = sfd.FileName;
|
||||||
if (File.Exists(txtExport.Text))
|
if (File.Exists(txtExport.Text))
|
||||||
File.Delete(txtExport.Text);
|
File.Delete(txtExport.Text);
|
||||||
MyExpZipFileName = txtExport.Text;
|
MyExpxZipFile = new ZipFile(txtExport.Text, Encoding.UTF8);
|
||||||
|
MyExpxZipFile.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (MyProcedure != null)
|
else if (MyProcedure != null)
|
||||||
@@ -210,8 +211,8 @@ namespace VEPROMS
|
|||||||
else
|
else
|
||||||
lblExportStatus.Text = "Awaiting Export File Name:";
|
lblExportStatus.Text = "Awaiting Export File Name:";
|
||||||
}
|
}
|
||||||
private string MyExpZipFileName = null;
|
private ZipFile MyExpxZipFile = null;
|
||||||
private string MyImpZipFileName = null;
|
private ZipFile MyImpxZipFile = null;
|
||||||
private DateTime MyStart;
|
private DateTime MyStart;
|
||||||
private bool successfullExport = true;
|
private bool successfullExport = true;
|
||||||
|
|
||||||
@@ -890,17 +891,11 @@ namespace VEPROMS
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
private bool LoadImportDataDocument()
|
private bool LoadImportDataDocument()
|
||||||
{
|
|
||||||
using (FileStream zipToOpen = new FileStream(MyExpZipFileName, FileMode.OpenOrCreate))
|
|
||||||
{
|
|
||||||
using (ZipArchive MyExpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
|
|
||||||
{
|
{
|
||||||
floatFoldout = new Dictionary<int, int>();
|
floatFoldout = new Dictionary<int, int>();
|
||||||
ZipArchiveEntry ze = MyExpxZipFile.Entries[0];
|
ZipEntry ze = MyExpxZipFile[0];
|
||||||
if (!Directory.Exists(Path.Combine(PEIPath, "folder")))
|
string fn = PEIPath + @"\" + ze.FileName;
|
||||||
Directory.CreateDirectory(Path.Combine(PEIPath, "folder"));
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
string fn = Path.Combine(PEIPath, "folder", ze.Name);
|
|
||||||
ze.ExtractToFile(fn, true);
|
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
xd.Load(fn);
|
xd.Load(fn);
|
||||||
bool didImp = LoadFormats(xd, "folder/formats/format");
|
bool didImp = LoadFormats(xd, "folder/formats/format");
|
||||||
@@ -956,13 +951,11 @@ namespace VEPROMS
|
|||||||
ProcedureInfo pi = null;
|
ProcedureInfo pi = null;
|
||||||
pbImportProcedure.Value = 0;
|
pbImportProcedure.Value = 0;
|
||||||
pbImportProcedure.Maximum = MyExpxZipFile.Entries.Count - 1;
|
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++)
|
for (int i = 1; i < MyExpxZipFile.Entries.Count; i++)
|
||||||
{
|
{
|
||||||
ze = MyExpxZipFile.Entries[i];
|
ze = MyExpxZipFile[i];
|
||||||
fn = Path.Combine(PEIPath, "procedures", ze.Name);
|
fn = PEIPath + @"\" + ze.FileName;
|
||||||
ze.ExtractToFile(fn, true);
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
xd = new XmlDocument();
|
xd = new XmlDocument();
|
||||||
xd.Load(fn);
|
xd.Load(fn);
|
||||||
pi = AddProcedure(xd.DocumentElement, dvi, pi);
|
pi = AddProcedure(xd.DocumentElement, dvi, pi);
|
||||||
@@ -978,8 +971,6 @@ namespace VEPROMS
|
|||||||
SaveTransitionAndItemContentIDs();
|
SaveTransitionAndItemContentIDs();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
private void FixSectionStart(ProcedureInfo pi)
|
private void FixSectionStart(ProcedureInfo pi)
|
||||||
{
|
{
|
||||||
Content c = Content.Get(pi.MyContent.ContentID);
|
Content c = Content.Get(pi.MyContent.ContentID);
|
||||||
@@ -1262,10 +1253,6 @@ 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
|
// 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.
|
// the xml files are then added (or replaced) in the .impx file.
|
||||||
private void SaveTransitionAndItemContentIDs()
|
private void SaveTransitionAndItemContentIDs()
|
||||||
{
|
|
||||||
using (FileStream zipToOpen = new FileStream(MyImpZipFileName, FileMode.OpenOrCreate))
|
|
||||||
{
|
|
||||||
using (ZipArchive MyImpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
|
|
||||||
{
|
{
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
XmlElement xe = xd.CreateElement("items");
|
XmlElement xe = xd.CreateElement("items");
|
||||||
@@ -1279,9 +1266,11 @@ namespace VEPROMS
|
|||||||
xd.DocumentElement.AppendChild(xe);
|
xd.DocumentElement.AppendChild(xe);
|
||||||
}
|
}
|
||||||
xd.Save(fn);
|
xd.Save(fn);
|
||||||
ZipArchiveEntry ze = MyImpxZipFile.GetEntry("items.xml");
|
ZipEntry ze = MyImpxZipFile["items.xml"];
|
||||||
ze.Delete();
|
MyImpxZipFile.RemoveEntry(ze);
|
||||||
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
|
MyImpxZipFile.Save();
|
||||||
|
MyImpxZipFile.AddFile(fn, "");
|
||||||
|
MyImpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
xd = new XmlDocument();
|
xd = new XmlDocument();
|
||||||
xe = xd.CreateElement("contents");
|
xe = xd.CreateElement("contents");
|
||||||
@@ -1295,9 +1284,11 @@ namespace VEPROMS
|
|||||||
xd.DocumentElement.AppendChild(xe);
|
xd.DocumentElement.AppendChild(xe);
|
||||||
}
|
}
|
||||||
xd.Save(fn);
|
xd.Save(fn);
|
||||||
ze = MyImpxZipFile.GetEntry("contents.xml");
|
ze = MyImpxZipFile["contents.xml"];
|
||||||
ze.Delete();
|
MyImpxZipFile.RemoveEntry(ze);
|
||||||
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
|
MyImpxZipFile.Save();
|
||||||
|
MyImpxZipFile.AddFile(fn, "");
|
||||||
|
MyImpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
xd = new XmlDocument();
|
xd = new XmlDocument();
|
||||||
xe = xd.CreateElement("transitions");
|
xe = xd.CreateElement("transitions");
|
||||||
@@ -1312,36 +1303,36 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
xd.Save(fn);
|
xd.Save(fn);
|
||||||
ze = MyImpxZipFile.GetEntry("transitions.xml");
|
ze = MyImpxZipFile["transitions.xml"];
|
||||||
ze.Delete();
|
MyImpxZipFile.RemoveEntry(ze);
|
||||||
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
|
MyImpxZipFile.Save();
|
||||||
|
MyImpxZipFile.AddFile(fn, "");
|
||||||
|
MyImpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// This is called only when we are importing an entire folder and there is a .impx file (a zip file)
|
// 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
|
// 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
|
// 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(ZipArchive MyImpxZipFile)
|
private void ReadTransitionAndItemContentIDs()
|
||||||
{
|
{
|
||||||
ZipArchiveEntry ze = MyImpxZipFile.GetEntry("items.xml");
|
ZipEntry ze = MyImpxZipFile["items.xml"];
|
||||||
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
string fn = PEIPath + @"\items.xml";
|
string fn = PEIPath + @"\items.xml";
|
||||||
ze.ExtractToFile(fn, true);
|
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
xd.Load(fn);
|
xd.Load(fn);
|
||||||
// B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old item ids
|
// B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old item ids
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
ze = MyImpxZipFile.GetEntry("contents.xml");
|
ze = MyImpxZipFile["contents.xml"];
|
||||||
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
fn = PEIPath + @"\contents.xml";
|
fn = PEIPath + @"\contents.xml";
|
||||||
ze.ExtractToFile(fn, true);
|
|
||||||
xd = new XmlDocument();
|
xd = new XmlDocument();
|
||||||
xd.Load(fn);
|
xd.Load(fn);
|
||||||
// B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old content ids
|
// B2016-176, B2016-197 Transitions were no always properly resolved - don't load in the old content ids
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
ze = MyImpxZipFile.GetEntry("libdocs.xml");
|
ze = MyImpxZipFile["libdocs.xml"];
|
||||||
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
fn = PEIPath + @"\libdocs.xml";
|
fn = PEIPath + @"\libdocs.xml";
|
||||||
ze.ExtractToFile(fn, true);
|
|
||||||
xd = new XmlDocument();
|
xd = new XmlDocument();
|
||||||
xd.Load(fn);
|
xd.Load(fn);
|
||||||
XmlNodeList nl = xd.SelectNodes("//libdoc");
|
XmlNodeList nl = xd.SelectNodes("//libdoc");
|
||||||
@@ -1353,9 +1344,9 @@ namespace VEPROMS
|
|||||||
Old2NewLibDoc.Add(oldid, newid);
|
Old2NewLibDoc.Add(oldid, newid);
|
||||||
}
|
}
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
ze = MyImpxZipFile.GetEntry("transitions.xml");
|
ze = MyImpxZipFile["transitions.xml"];
|
||||||
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
fn = PEIPath + @"\transitions.xml";
|
fn = PEIPath + @"\transitions.xml";
|
||||||
ze.ExtractToFile(fn, true);
|
|
||||||
PendingTransitions.Load(fn);
|
PendingTransitions.Load(fn);
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
}
|
}
|
||||||
@@ -1383,26 +1374,25 @@ namespace VEPROMS
|
|||||||
else
|
else
|
||||||
dn = fi.Name.Substring(0, fi.Name.IndexOf("."));
|
dn = fi.Name.Substring(0, fi.Name.IndexOf("."));
|
||||||
txtImport.Text = ofd.FileName;
|
txtImport.Text = ofd.FileName;
|
||||||
MyExpZipFileName = txtImport.Text;
|
ReadOptions ro = new ReadOptions();
|
||||||
|
ro.Encoding = Encoding.UTF8;
|
||||||
|
MyExpxZipFile = ZipFile.Read(txtImport.Text, ro);
|
||||||
string fn = string.Format(@"{0}\{1}.impx", PEIPath, dn);
|
string fn = string.Format(@"{0}\{1}.impx", PEIPath, dn);
|
||||||
MyImpZipFileName = fn;
|
|
||||||
if (File.Exists(fn))
|
if (File.Exists(fn))
|
||||||
{
|
{
|
||||||
using (ZipArchive MyImpxZipFile = ZipFile.OpenRead(fn))
|
MyImpxZipFile = ZipFile.Read(fn, ro);
|
||||||
ReadTransitionAndItemContentIDs(MyImpxZipFile);
|
ReadTransitionAndItemContentIDs();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
using (FileStream zipToOpen = new FileStream(fn, FileMode.OpenOrCreate))
|
MyImpxZipFile = new ZipFile(fn, Encoding.UTF8);
|
||||||
{
|
|
||||||
using (ZipArchive MyImpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
|
|
||||||
{
|
|
||||||
//transitions
|
//transitions
|
||||||
XmlElement xe = PendingTransitions.CreateElement("transitions");
|
XmlElement xe = PendingTransitions.CreateElement("transitions");
|
||||||
PendingTransitions.AppendChild(xe);
|
PendingTransitions.AppendChild(xe);
|
||||||
fn = PEIPath + @"\transitions.xml";
|
fn = PEIPath + @"\transitions.xml";
|
||||||
PendingTransitions.Save(fn);
|
PendingTransitions.Save(fn);
|
||||||
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
|
MyImpxZipFile.AddFile(fn, "");
|
||||||
|
MyImpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
//itemids
|
//itemids
|
||||||
XmlDocument xd = new XmlDocument();
|
XmlDocument xd = new XmlDocument();
|
||||||
@@ -1410,7 +1400,8 @@ namespace VEPROMS
|
|||||||
xd.AppendChild(xe);
|
xd.AppendChild(xe);
|
||||||
fn = PEIPath + @"\items.xml";
|
fn = PEIPath + @"\items.xml";
|
||||||
xd.Save(fn);
|
xd.Save(fn);
|
||||||
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
|
MyImpxZipFile.AddFile(fn, "");
|
||||||
|
MyImpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
//contentids
|
//contentids
|
||||||
xd = new XmlDocument();
|
xd = new XmlDocument();
|
||||||
@@ -1418,7 +1409,8 @@ namespace VEPROMS
|
|||||||
xd.AppendChild(xe);
|
xd.AppendChild(xe);
|
||||||
fn = PEIPath + @"\contents.xml";
|
fn = PEIPath + @"\contents.xml";
|
||||||
xd.Save(fn);
|
xd.Save(fn);
|
||||||
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
|
MyImpxZipFile.AddFile(fn, "");
|
||||||
|
MyImpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
//libdocids
|
//libdocids
|
||||||
xd = new XmlDocument();
|
xd = new XmlDocument();
|
||||||
@@ -1426,12 +1418,11 @@ namespace VEPROMS
|
|||||||
xd.AppendChild(xe);
|
xd.AppendChild(xe);
|
||||||
fn = PEIPath + @"\libdocs.xml";
|
fn = PEIPath + @"\libdocs.xml";
|
||||||
xd.Save(fn);
|
xd.Save(fn);
|
||||||
_ = MyImpxZipFile.CreateEntryFromFile(fn, Path.GetFileName(fn));
|
MyImpxZipFile.AddFile(fn, "");
|
||||||
|
MyImpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
if (MyDocVersion != null)
|
if (MyDocVersion != null)
|
||||||
{
|
{
|
||||||
ofd.Filter = "PROMS Procedure Export Files|*.pxml";
|
ofd.Filter = "PROMS Procedure Export Files|*.pxml";
|
||||||
@@ -1604,11 +1595,8 @@ namespace VEPROMS
|
|||||||
ExportAssociation(xe, ai, "association");
|
ExportAssociation(xe, ai, "association");
|
||||||
string fn = PEIPath + @"\folder.xml";
|
string fn = PEIPath + @"\folder.xml";
|
||||||
xn.OwnerDocument.Save(fn);
|
xn.OwnerDocument.Save(fn);
|
||||||
using (FileStream zipToOpen = new FileStream(MyExpZipFileName, FileMode.OpenOrCreate))
|
MyExpxZipFile.AddFile(fn, "folder");
|
||||||
{
|
MyExpxZipFile.Save();
|
||||||
using (ZipArchive MyExpxZipFile = new ZipArchive(zipToOpen, ZipArchiveMode.Update))
|
|
||||||
{
|
|
||||||
_ = MyExpxZipFile.CreateEntryFromFile(fn, $"folder/{Path.GetFileName(fn)}");
|
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
//here
|
//here
|
||||||
lblExportStatus.Text = "Exporting Procedures...";
|
lblExportStatus.Text = "Exporting Procedures...";
|
||||||
@@ -1624,14 +1612,13 @@ namespace VEPROMS
|
|||||||
ExportItem(xd, ii, "procedure");
|
ExportItem(xd, ii, "procedure");
|
||||||
fn = string.Format(@"{0}\proc{1}.xml", PEIPath, pbExportProcedure.Value.ToString().PadLeft(4, '0'));
|
fn = string.Format(@"{0}\proc{1}.xml", PEIPath, pbExportProcedure.Value.ToString().PadLeft(4, '0'));
|
||||||
xd.Save(fn);
|
xd.Save(fn);
|
||||||
_ = MyExpxZipFile.CreateEntryFromFile(fn, $"procedures/{Path.GetFileName(fn)}");
|
MyExpxZipFile.AddFile(fn, "procedures");
|
||||||
|
MyExpxZipFile.Save();
|
||||||
File.Delete(fn);
|
File.Delete(fn);
|
||||||
xd = null;
|
xd = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
private void ExportAssociation(XmlElement xn, AssociationInfo ai, string nodename)
|
private void ExportAssociation(XmlElement xn, AssociationInfo ai, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -1852,14 +1839,12 @@ namespace VEPROMS
|
|||||||
//and handled/overridden in dlgExportEP.cs
|
//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
|
//do nothing - this will be for Electronic procedures only
|
||||||
//and handled/overridden in dlgExportEP.cs
|
//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
|
//do nothing - this will be for Electronic procedures only
|
||||||
//and handled/overridden in dlgExportEP.cs
|
//and handled/overridden in dlgExportEP.cs
|
||||||
|
@@ -1603,7 +1603,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
|
||||||
{
|
{
|
||||||
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs C2025-048.
|
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs B2025-041
|
||||||
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.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.MySessionInfo = MySessionInfo;
|
||||||
prnDlg.SetupForProcedure(); // Setup filename
|
prnDlg.SetupForProcedure(); // Setup filename
|
||||||
|
@@ -839,7 +839,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
using (SqlCommand cmd = cn.CreateCommand())
|
using (SqlCommand cmd = cn.CreateCommand())
|
||||||
{
|
{
|
||||||
cmd.CommandTimeout = 0;
|
cmd.CommandTimeout = Database.DefaultTimeout;
|
||||||
cmd.CommandType = CommandType.StoredProcedure;
|
cmd.CommandType = CommandType.StoredProcedure;
|
||||||
cmd.CommandText = "vesp_RofstHeaderFinalizeLoad";
|
cmd.CommandText = "vesp_RofstHeaderFinalizeLoad";
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user