Compare commits

..

6 Commits

4 changed files with 75 additions and 22 deletions

View File

@@ -735,23 +735,27 @@ namespace RODBInterface
else
parentValue = nd.InnerText;
//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)
if (parentName != "#whitespace")
{
//string csufx = CvtUserFldToFld(c);
pcChildIdx++;
string csufx = string.Format("_PCCHILD{0}", pcChildIdx);
//applicValues += ",";
XmlNode cn = elmnode.SelectSingleNode(parentName + csufx);
if (cn == null || cn.InnerText.Length == 0) // B2024-004 use Parent value if Child text length is zero
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, parentValue); // use parent value as default
else
//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)
{
if (parentValue != cn.InnerText)
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
//string csufx = CvtUserFldToFld(c);
pcChildIdx++;
string csufx = string.Format("_PCCHILD{0}", pcChildIdx);
//applicValues += ",";
XmlNode cn = elmnode.SelectSingleNode(parentName + csufx);
if (cn == null || cn.InnerText.Length == 0) // B2024-004 use Parent value if Child text length is zero
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, parentValue); // use parent value as default
else
{
if (parentValue != cn.InnerText)
applicValues += string.Format(",UnitIdx={0} Value={1}", pcChildIdx, cn.InnerText);
}
}
}
applicValues += " /APL>";

View File

@@ -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,
@@ -24293,6 +24293,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 +24377,8 @@ BEGIN TRY -- Try Block
DECLARE @RevDate varchar(255)
DECLARE @RevDescription varchar(255)
set @RevDate = '08/12/2025 4:12 PM'
set @RevDescription = 'Updated Fix Hyphen Characters'
set @RevDate = '08/13/2025 8:07 AM'
set @RevDescription = 'Improve Performance loading procedures with Alarms'
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription

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

@@ -1235,7 +1235,7 @@ namespace VEPROMS
void tv_QPrintProcedure(object sender, vlnTreeEventArgs args) // Quick Print right click menu on Procedure name.
{
try
{
{
ProcedureInfo pi = (args.Node as VETreeNode).VEObject as ProcedureInfo;
if (pi == null) return;
@@ -1245,7 +1245,6 @@ 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
@@ -1603,7 +1602,7 @@ namespace VEPROMS
{
using (DlgPrintProcedure prnDlg = new DlgPrintProcedure(pi))
{
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs B2025-041
prnDlg.OverwritePDF = false; // turn off overwriting of PDFs.
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