Compare commits
4 Commits
B2025-064_
...
C2026-023
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a186f9f0c | |||
| 14aa39976a | |||
| c077e0ddc2 | |||
| 7f36a33dea |
@@ -1312,6 +1312,14 @@ namespace VEPROMS
|
|||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
if (si.IsApproved == 1)
|
if (si.IsApproved == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//B2026-016 - Fix error pulling Reference Object info into Export
|
||||||
|
if (pi.MyDocVersion.DocVersionAssociationCount == 0)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Prior to Approval you must set the Referenced Object Database", "No RO Database set", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (selectedSlave)); // "true tell export to convert ROs and Transitions to text
|
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (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
|
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();
|
||||||
|
|||||||
@@ -1618,6 +1618,13 @@ namespace VEPROMS
|
|||||||
|
|
||||||
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
|
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
|
||||||
{
|
{
|
||||||
|
//B2026-016 - Fix error pulling Reference Object info into Export
|
||||||
|
if (ii.MyDocVersion.DocVersionAssociationCount == 0)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Prior to Exporting Procedures you must set the Referenced Object Database", "No RO Database set", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
XmlElement xe = xd.CreateElement(nodename);
|
XmlElement xe = xd.CreateElement(nodename);
|
||||||
if (ii.IsProcedure)
|
if (ii.IsProcedure)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
|||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
@@ -284,10 +285,17 @@ namespace Volian.Controls.Library
|
|||||||
Volian.Base.Library.BigNum MasterSlave_ApplicabilityTmp;
|
Volian.Base.Library.BigNum MasterSlave_ApplicabilityTmp;
|
||||||
StepConfig sc = MyItemInfo.MyConfig as StepConfig;
|
StepConfig sc = MyItemInfo.MyConfig as StepConfig;
|
||||||
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
|
||||||
ItemInfo startitm = MyItemInfo.FirstSibling;
|
ItemInfo startitm = MyItemInfo.FirstSibling;
|
||||||
while (startitm != null)
|
while (startitm != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// C2026-023: Check for Transitions when setting Applicability to all for a level
|
||||||
|
List<InvalidTransition> invalidTrans = WillTransitionsBeValidCommand.Execute(startitm.ItemID, MasterSlave_ApplicabilityTmp.ToString());
|
||||||
|
if (IsProcWithNoExternalTrans(startitm, invalidTrans))
|
||||||
|
{
|
||||||
StepConfig sc2 = startitm.MyConfig as StepConfig;
|
StepConfig sc2 = startitm.MyConfig as StepConfig;
|
||||||
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
||||||
{
|
{
|
||||||
@@ -295,11 +303,34 @@ namespace Volian.Controls.Library
|
|||||||
cnt.Config = sc2.ToString();
|
cnt.Config = sc2.ToString();
|
||||||
cnt.Save();
|
cnt.Save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (sb.Length == 0)
|
||||||
|
{
|
||||||
|
sb.AppendLine("The applicability for some Step(s) cannot be changed due to transition links.");
|
||||||
|
sb.AppendLine("Applicability settings for these steps will return to original settings when OK is selected.");
|
||||||
|
sb.AppendLine("Changing the applicability for would invalidate a transition in the following steps:");
|
||||||
|
sb.AppendLine();
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (InvalidTransition inv in invalidTrans.Where(x => !x.TgtStep.StartsWith(x.SrcStep)))
|
||||||
|
{
|
||||||
|
sb.AppendLine(string.Format("{0} : From {1} to {2}.", startitm.MyTab.CleanTextNoSymbols.Trim(), inv.TgtStep, inv.SrcStep));
|
||||||
|
}
|
||||||
|
|
||||||
|
invalidTrans.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
startitm = startitm.GetNext();
|
startitm = startitm.GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
_MyDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
_MyDisplayTabItem.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||||
|
|
||||||
|
if (sb.Length > 0)
|
||||||
|
FlexibleMessageBox.Show(sb.ToString(), "Transitions Affected By Applicability Change");
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// B2021-149: for procedure, only consider external transitions as invalid
|
// B2021-149: for procedure, only consider external transitions as invalid
|
||||||
|
|||||||
Reference in New Issue
Block a user