C2025-024 Electronic Procedures Phase 2 - XML Export
Enhanced Doc Links
This commit is contained in:
@@ -180,6 +180,7 @@
|
|||||||
<Content Include="fmtall\CPL_03all.xml" />
|
<Content Include="fmtall\CPL_03all.xml" />
|
||||||
<Content Include="fmtall\CPSAMGDataall.xml" />
|
<Content Include="fmtall\CPSAMGDataall.xml" />
|
||||||
<Content Include="fmtall\CPSAMGDEVall.xml" />
|
<Content Include="fmtall\CPSAMGDEVall.xml" />
|
||||||
|
<Content Include="fmtall\EPTSTBCK1all.xml" />
|
||||||
<Content Include="fmtall\EPTST1all.xml" />
|
<Content Include="fmtall\EPTST1all.xml" />
|
||||||
<Content Include="fmtall\CWEall.xml" />
|
<Content Include="fmtall\CWEall.xml" />
|
||||||
<Content Include="fmtall\CWEDEVall.xml" />
|
<Content Include="fmtall\CWEDEVall.xml" />
|
||||||
|
BIN
PROMS/Formats/fmtall/EPTSTBCK1all.xml
Normal file
BIN
PROMS/Formats/fmtall/EPTSTBCK1all.xml
Normal file
Binary file not shown.
@@ -1824,7 +1824,7 @@ namespace VEPROMS
|
|||||||
|
|
||||||
//item audits
|
//item audits
|
||||||
ExportItemAudits(xe, ii);
|
ExportItemAudits(xe, ii);
|
||||||
ExportContent(xe, ii.MyContent, "content");
|
ExportContent(xe, ii, "content");
|
||||||
|
|
||||||
if (ii.ItemAnnotationCount > 0)
|
if (ii.ItemAnnotationCount > 0)
|
||||||
foreach (AnnotationInfo ai in ii.ItemAnnotations)
|
foreach (AnnotationInfo ai in ii.ItemAnnotations)
|
||||||
@@ -1844,6 +1844,11 @@ namespace VEPROMS
|
|||||||
//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)
|
||||||
|
{
|
||||||
|
//do nothing - this will be for Electronic procedures only
|
||||||
|
//and handled/overridden in dlgExportEP.cs
|
||||||
|
}
|
||||||
|
|
||||||
//C2025-024 Electronic Procedures Phase 2 - XML Export
|
//C2025-024 Electronic Procedures Phase 2 - XML Export
|
||||||
//use overridden method to set the location for ROs
|
//use overridden method to set the location for ROs
|
||||||
@@ -1908,8 +1913,9 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ExportContent(XmlElement xn, ContentInfo ci, string nodename)
|
private void ExportContent(XmlElement xn, ItemInfo ii, string nodename)
|
||||||
{
|
{
|
||||||
|
ContentInfo ci = ii.MyContent;
|
||||||
/*
|
/*
|
||||||
ContentID
|
ContentID
|
||||||
Number
|
Number
|
||||||
@@ -1939,7 +1945,11 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ci.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ci.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ci.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ci.UserID.ToString()));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatfilename", formatFileName));
|
||||||
if (_ExportBothConvertedandNot) xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "textwithlinks", ci.Text));
|
if (_ExportBothConvertedandNot)
|
||||||
|
{
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "textwithlinks", ci.Text));
|
||||||
|
SetEPEnhancedDocLinks(ref xe, ii);
|
||||||
|
}
|
||||||
|
|
||||||
//content audits
|
//content audits
|
||||||
ExportContentAudits(xe, ci);
|
ExportContentAudits(xe, ci);
|
||||||
|
@@ -322,6 +322,19 @@ namespace VEPROMS
|
|||||||
if (!string.IsNullOrEmpty(imgfile)) xindivid.Attributes.SetNamedItem(AddAttribute(xindivid.OwnerDocument, "Location", imgfile));
|
if (!string.IsNullOrEmpty(imgfile)) xindivid.Attributes.SetNamedItem(AddAttribute(xindivid.OwnerDocument, "Location", imgfile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//overridden - used to set specific enhanced doc info
|
||||||
|
protected override void SetEPEnhancedDocLinks(ref XmlElement xe, ItemInfo ii)
|
||||||
|
{
|
||||||
|
EnhancedDocuments eds = ii.GetMyEnhancedDocuments();
|
||||||
|
|
||||||
|
if (eds != null && eds.Count == 1)
|
||||||
|
{
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocType", eds[0].Type.ToString()));
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToItemID", eds[0].ItemID.ToString()));
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "EnhancedDocToDbSeq", dbSeq(eds[0].ItemID)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//clear objects to release memory
|
//clear objects to release memory
|
||||||
private void OnClose(object sender, EventArgs e)
|
private void OnClose(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
@@ -87,7 +87,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
XmlDocument xd = GetEPFormatData(Name);
|
XmlDocument xd = GetEPFormatData(Name);
|
||||||
return _FieldList == null ? _FieldList = new EPFields(xd.SelectNodes("/EPFormat/EPField")) : _FieldList;
|
return _FieldList ?? (_FieldList = new EPFields(xd.SelectNodes("/EPFormat/EPField")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@@ -315,7 +315,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
throw new ArgumentException($"Error in returncols for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}");
|
throw new ArgumentException($"Error in returncols for EP file, field: {name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
throw new ArgumentException($"Error in validforsteptypes for EP file: {((EPFormatFile) MyParentFormat).Name}.xml, field: {name}");
|
throw new ArgumentException($"Error in validforsteptypes for EP file, field: {name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public bool IsValidForStepType(string StepType)
|
public bool IsValidForStepType(string StepType)
|
||||||
@@ -363,6 +363,9 @@ namespace VEPROMS.CSLA.Library
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion;
|
DocVersionInfo MyDocVersion = currAnn.MyItem.MyDocVersion;
|
||||||
|
|
||||||
|
if (MyDocVersion.DocVersionAssociations != null && MyDocVersion.DocVersionAssociations.Any())
|
||||||
|
{
|
||||||
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||||
|
|
||||||
string roid = FormatRoidKey(rosource, false);
|
string roid = FormatRoidKey(rosource, false);
|
||||||
@@ -374,9 +377,18 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
return mylist;
|
return mylist;
|
||||||
}
|
}
|
||||||
catch (Exception Ex)
|
else
|
||||||
{
|
{
|
||||||
throw new ArgumentException($"Error in rosource for EP file: {((EPFormatFile)MyParentFormat).Name}.xml, field: {name}");
|
return new List<ROListItem>
|
||||||
|
{
|
||||||
|
new ROListItem("", "")
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw new ArgumentException($"Error in rosource for EP file, field: {name}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -120,7 +120,7 @@ namespace Volian.Controls.Library
|
|||||||
foreach (string t in tmps) cmb.Items.Add(t.Trim());
|
foreach (string t in tmps) cmb.Items.Add(t.Trim());
|
||||||
string val = MyConfig.GetValue("EP", EP.name);
|
string val = MyConfig.GetValue("EP", EP.name);
|
||||||
if (val != null && val != "") cmb.SelectedItem = val;
|
if (val != null && val != "") cmb.SelectedItem = val;
|
||||||
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Length).First(), cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Length).FirstOrDefault(), cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||||
cmb.Width = cmb.DropDownWidth;
|
cmb.Width = cmb.DropDownWidth;
|
||||||
_DicComboBox.Add(EP.name, cmb);
|
_DicComboBox.Add(EP.name, cmb);
|
||||||
panelEP.Controls.Add(cmb, 1, panelEP.RowCount - 1);
|
panelEP.Controls.Add(cmb, 1, panelEP.RowCount - 1);
|
||||||
@@ -135,7 +135,7 @@ namespace Volian.Controls.Library
|
|||||||
cmb.ValueMember = "Value";
|
cmb.ValueMember = "Value";
|
||||||
cmb.DataSource = tmps;
|
cmb.DataSource = tmps;
|
||||||
cmb.DropDownStyle = ComboBoxStyle.DropDownList;
|
cmb.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||||
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).First().Text, cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
cmb.DropDownWidth = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).FirstOrDefault()?.Text, cmb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||||
cmb.Width = cmb.DropDownWidth;
|
cmb.Width = cmb.DropDownWidth;
|
||||||
|
|
||||||
_DicSingleRO.Add(EP.name, cmb);
|
_DicSingleRO.Add(EP.name, cmb);
|
||||||
@@ -148,7 +148,7 @@ namespace Volian.Controls.Library
|
|||||||
List<ROListItem> tmps = EP.getROList(currAnn, false);
|
List<ROListItem> tmps = EP.getROList(currAnn, false);
|
||||||
lb.DisplayMember = "Text";
|
lb.DisplayMember = "Text";
|
||||||
lb.ValueMember = "Value";
|
lb.ValueMember = "Value";
|
||||||
lb.Width = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).First().Text, lb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
lb.Width = TextRenderer.MeasureText(tmps.OrderByDescending(x => x.Text.Length).FirstOrDefault()?.Text, lb.Font).Width + SystemInformation.VerticalScrollBarWidth;
|
||||||
|
|
||||||
lb.DataSource = tmps;
|
lb.DataSource = tmps;
|
||||||
_DicMultiRO.Add(EP.name, lb);
|
_DicMultiRO.Add(EP.name, lb);
|
||||||
|
Reference in New Issue
Block a user