B2017-082 Added a check for a RO Path being assigned at the working draft node
This commit is contained in:
parent
243779476c
commit
3b03233003
@ -144,6 +144,7 @@ namespace VEPROMS
|
|||||||
private ZipFile MyExpxZipFile = null;
|
private ZipFile MyExpxZipFile = null;
|
||||||
private ZipFile MyImpxZipFile = null;
|
private ZipFile MyImpxZipFile = null;
|
||||||
private DateTime MyStart;
|
private DateTime MyStart;
|
||||||
|
private bool successfullExport = true;
|
||||||
private void btnDoExport_Click(object sender, EventArgs e)
|
private void btnDoExport_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
btnExport.Enabled = false;
|
btnExport.Enabled = false;
|
||||||
@ -177,7 +178,10 @@ namespace VEPROMS
|
|||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
}
|
||||||
// added message to user when export of a procedure or procedure set has completed
|
// added message to user when export of a procedure or procedure set has completed
|
||||||
|
if (successfullExport)
|
||||||
msg += MyProcedure;
|
msg += MyProcedure;
|
||||||
|
else
|
||||||
|
msg = "Could not complete export";
|
||||||
MessageBox.Show(msg, "Export", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
MessageBox.Show(msg, "Export", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
btnCloseExport.Enabled = true;
|
btnCloseExport.Enabled = true;
|
||||||
}
|
}
|
||||||
@ -1416,6 +1420,18 @@ namespace VEPROMS
|
|||||||
// MyWriter.WriteEndElement();
|
// MyWriter.WriteEndElement();
|
||||||
// MyWriter.WriteEndDocument();
|
// MyWriter.WriteEndDocument();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
// bug fix: B2017-082 don't export if no RO Path - display an message to the user to assign a RO Path
|
||||||
|
private bool ValidDocVersionAssociation(DocVersionInfo dvi)
|
||||||
|
{
|
||||||
|
if (dvi.DocVersionAssociationCount <= 0)
|
||||||
|
{
|
||||||
|
MessageBox.Show("Assign a Referenced Object path to the Working Draft tree node before exporting.", "RO Path not assigned");
|
||||||
|
successfullExport = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
private void ExportDocVersion(XmlElement xn, DocVersionInfo dvi, string nodename)
|
private void ExportDocVersion(XmlElement xn, DocVersionInfo dvi, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1446,6 +1462,7 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", dvi.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", dvi.UserID.ToString()));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName));
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
|
if (!ValidDocVersionAssociation(dvi)) return; // bug fix: B2017-082 don't export if no RO Path
|
||||||
if (dvi.DocVersionAssociationCount > 0)
|
if (dvi.DocVersionAssociationCount > 0)
|
||||||
foreach (AssociationInfo ai in dvi.DocVersionAssociations)
|
foreach (AssociationInfo ai in dvi.DocVersionAssociations)
|
||||||
ExportAssociation(xe, ai, "association");
|
ExportAssociation(xe, ai, "association");
|
||||||
@ -1678,6 +1695,7 @@ namespace VEPROMS
|
|||||||
MyWriter.WriteAttributeString("userid", db.UserID.ToString());
|
MyWriter.WriteAttributeString("userid", db.UserID.ToString());
|
||||||
MyWriter.WriteEndElement();
|
MyWriter.WriteEndElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
|
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
|
||||||
{
|
{
|
||||||
XmlElement xe = xd.CreateElement(nodename);
|
XmlElement xe = xd.CreateElement(nodename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user