Added code to store the xml representation of the approved version of the procedure in the database for future support of temp mods, etc.
Added code to support handling of Floating Foldouts, implement inclusion of audit reocords and converting invalid referenced objects and invalid transitions to text during import/export operations Added code to support storage of email addresses and cell phone numbers of users which are used as part of the batch refresh process.
This commit is contained in:
parent
3f945b04c5
commit
4ea2dbbe1d
@ -1138,7 +1138,15 @@ namespace VEPROMS
|
|||||||
int selectedSlave = pi.MyDocVersion.DocVersionConfig.SelectedSlave;
|
int selectedSlave = pi.MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
if (si.IsApproved == 1)
|
if (si.IsApproved == 1)
|
||||||
|
{
|
||||||
|
dlgExportImport dlg = new dlgExportImport("Export", pi);
|
||||||
|
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||||
|
dlg.ExportItem(xd, pi, "procedure");
|
||||||
|
version.ApprovedXML = xd.OuterXml;
|
||||||
|
version.Save();
|
||||||
|
dlg.Dispose();
|
||||||
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, DateTime.Now, selectedSlave);
|
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, DateTime.Now, selectedSlave);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);
|
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);
|
||||||
//UpdateProcedureDTS(pi, DateTime.Now);
|
//UpdateProcedureDTS(pi, DateTime.Now);
|
||||||
|
@ -15,6 +15,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
public partial class dlgExportImport : Form
|
public partial class dlgExportImport : Form
|
||||||
{
|
{
|
||||||
|
private Dictionary<int, int> floatFoldout;
|
||||||
private Dictionary<int, string> oldFormat;
|
private Dictionary<int, string> oldFormat;
|
||||||
private Dictionary<string, int> newFormat;
|
private Dictionary<string, int> newFormat;
|
||||||
private int oldRODbID;
|
private int oldRODbID;
|
||||||
@ -109,7 +110,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
else if (MyProcedure != null)
|
else if (MyProcedure != null)
|
||||||
{
|
{
|
||||||
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber);
|
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, MyProcedure.DisplayNumber.Replace("/","_"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void txtExport_TextChanged(object sender, EventArgs e)
|
private void txtExport_TextChanged(object sender, EventArgs e)
|
||||||
@ -183,6 +184,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
TurnChangeManagerOff.Execute();
|
TurnChangeManagerOff.Execute();
|
||||||
LoadImportDataDocument();
|
LoadImportDataDocument();
|
||||||
|
MyDocVersion = null;
|
||||||
TurnChangeManagerOn.Execute();
|
TurnChangeManagerOn.Execute();
|
||||||
}
|
}
|
||||||
if (MyDocVersion != null)
|
if (MyDocVersion != null)
|
||||||
@ -192,7 +194,34 @@ namespace VEPROMS
|
|||||||
xd.Load(txtImport.Text);
|
xd.Load(txtImport.Text);
|
||||||
bool isImported = false;
|
bool isImported = false;
|
||||||
pbImportProcedure.Maximum = 1;
|
pbImportProcedure.Maximum = 1;
|
||||||
MyRODb = RODb.GetByFolderPath(MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath);
|
string rofolderpath = xd.DocumentElement.Attributes.GetNamedItem("rofolderpath").InnerText;
|
||||||
|
int rodbid = int.Parse(xd.DocumentElement.Attributes.GetNamedItem("rodbid").InnerText);
|
||||||
|
int rofstid = int.Parse(xd.DocumentElement.Attributes.GetNamedItem("rofstid").InnerText);
|
||||||
|
List<string> localROPaths = new List<string>();
|
||||||
|
RODbInfoList rolist = RODbInfoList.Get();
|
||||||
|
foreach (RODbInfo dbi in rolist)
|
||||||
|
{
|
||||||
|
if (dbi.FolderPath == rofolderpath && dbi.RODbID == rodbid)
|
||||||
|
{
|
||||||
|
MyRODb = RODb.GetJustRoDb(rodbid);
|
||||||
|
oldRODbID = newRODbID = rodbid;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DirectoryInfo di = new DirectoryInfo(dbi.FolderPath);
|
||||||
|
if (di.Exists)
|
||||||
|
localROPaths.Add(dbi.FolderPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (MyRODb == null)
|
||||||
|
{
|
||||||
|
if (localROPaths.Count == 0)
|
||||||
|
MessageBox.Show("need new ro folder assigned");
|
||||||
|
else
|
||||||
|
MessageBox.Show("pick an ro folder");
|
||||||
|
return;
|
||||||
|
}
|
||||||
foreach (ProcedureInfo pi in MyDocVersion.Procedures)
|
foreach (ProcedureInfo pi in MyDocVersion.Procedures)
|
||||||
{
|
{
|
||||||
if (pi.ItemID == int.Parse(xd.SelectSingleNode("procedure/@itemid").InnerText) || pi.MyContent.Number == xd.SelectSingleNode("procedure/content/@number").InnerText)
|
if (pi.ItemID == int.Parse(xd.SelectSingleNode("procedure/@itemid").InnerText) || pi.MyContent.Number == xd.SelectSingleNode("procedure/content/@number").InnerText)
|
||||||
@ -252,7 +281,8 @@ namespace VEPROMS
|
|||||||
_MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
|
_MyNewProcedure = AddProcedure(xd.DocumentElement, MyDocVersion, lastProcedure);
|
||||||
//update transitions
|
//update transitions
|
||||||
AddTransitions(PendingTransitions);
|
AddTransitions(PendingTransitions);
|
||||||
File.Delete(fn);
|
PendingTransitions.Save(fn);
|
||||||
|
//File.Delete(fn);
|
||||||
}
|
}
|
||||||
private void ImportProcedureCopy(XmlDocument xd)
|
private void ImportProcedureCopy(XmlDocument xd)
|
||||||
{
|
{
|
||||||
@ -321,6 +351,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
private void LoadImportDataDocument()
|
private void LoadImportDataDocument()
|
||||||
{
|
{
|
||||||
|
floatFoldout = new Dictionary<int, int>();
|
||||||
ZipEntry ze = MyExpxZipFile[0];
|
ZipEntry ze = MyExpxZipFile[0];
|
||||||
string fn = PEIPath + @"\" + ze.FileName;
|
string fn = PEIPath + @"\" + ze.FileName;
|
||||||
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||||
@ -336,6 +367,7 @@ namespace VEPROMS
|
|||||||
_MyNewFolder = FolderInfo.Get(ff.FolderID);
|
_MyNewFolder = FolderInfo.Get(ff.FolderID);
|
||||||
AddAnnotationTypes(xd);
|
AddAnnotationTypes(xd);
|
||||||
DocVersionInfo dvi = AddDocVersion(ff, xd);
|
DocVersionInfo dvi = AddDocVersion(ff, xd);
|
||||||
|
MyDocVersion = dvi;
|
||||||
xd = null;
|
xd = null;
|
||||||
lblImportStatus.Text = "Creating Procedures...";
|
lblImportStatus.Text = "Creating Procedures...";
|
||||||
Application.DoEvents();
|
Application.DoEvents();
|
||||||
@ -357,9 +389,27 @@ namespace VEPROMS
|
|||||||
dis[d].Delete(true);
|
dis[d].Delete(true);
|
||||||
lblImportStatus.Text = "Updating Transitions";
|
lblImportStatus.Text = "Updating Transitions";
|
||||||
AddTransitions();
|
AddTransitions();
|
||||||
|
FixFloatingFoldouts();
|
||||||
SaveTransitionAndItemContentIDs();
|
SaveTransitionAndItemContentIDs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FixFloatingFoldouts()
|
||||||
|
{
|
||||||
|
foreach (int key in floatFoldout.Keys)
|
||||||
|
{
|
||||||
|
lblImportStatus.Text = "Updating Floating Foldouts";
|
||||||
|
int cid = Old2NewContent[key];
|
||||||
|
int iid = Old2NewItem[floatFoldout[key]];
|
||||||
|
Content c = Content.Get(cid);
|
||||||
|
XmlDocument xd = new XmlDocument();
|
||||||
|
xd.LoadXml(c.Config);
|
||||||
|
XmlNode xn = xd.SelectSingleNode("Config/Step/@FloatingFoldout");
|
||||||
|
xn.InnerText = iid.ToString();
|
||||||
|
c.Config = xd.OuterXml;
|
||||||
|
c.Save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void LoadFormats(XmlDocument xd)
|
private void LoadFormats(XmlDocument xd)
|
||||||
{
|
{
|
||||||
oldFormat = new Dictionary<int, string>();
|
oldFormat = new Dictionary<int, string>();
|
||||||
@ -899,7 +949,11 @@ namespace VEPROMS
|
|||||||
Old2NewLibDoc = new Dictionary<int, int>();
|
Old2NewLibDoc = new Dictionary<int, int>();
|
||||||
PendingTransitions = new XmlDocument();
|
PendingTransitions = new XmlDocument();
|
||||||
FileInfo fi = new FileInfo(ofd.FileName);
|
FileInfo fi = new FileInfo(ofd.FileName);
|
||||||
string dn = fi.Name.Substring(0, fi.Name.IndexOf("-"));
|
string dn;
|
||||||
|
if (fi.Name.IndexOf("-") > 0)
|
||||||
|
dn = fi.Name.Substring(0, fi.Name.IndexOf("-"));
|
||||||
|
else
|
||||||
|
dn = fi.Name.Substring(0,fi.Name.IndexOf("."));
|
||||||
txtImport.Text = ofd.FileName;
|
txtImport.Text = ofd.FileName;
|
||||||
ReadOptions ro = new ReadOptions();
|
ReadOptions ro = new ReadOptions();
|
||||||
ro.Encoding = Encoding.UTF8;
|
ro.Encoding = Encoding.UTF8;
|
||||||
@ -1309,9 +1363,16 @@ namespace VEPROMS
|
|||||||
MyWriter.WriteAttributeString("userid", db.UserID.ToString());
|
MyWriter.WriteAttributeString("userid", db.UserID.ToString());
|
||||||
MyWriter.WriteEndElement();
|
MyWriter.WriteEndElement();
|
||||||
}
|
}
|
||||||
private 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);
|
||||||
|
if (ii.IsProcedure)
|
||||||
|
{
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.RODbID.ToString()));
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rofolderpath", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath));
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rofstid", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.ROFstID.ToString()));
|
||||||
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rofstdts", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
}
|
||||||
xd.AppendChild(xe);
|
xd.AppendChild(xe);
|
||||||
ExportItem(xe, ii, nodename);
|
ExportItem(xe, ii, nodename);
|
||||||
}
|
}
|
||||||
@ -1382,15 +1443,18 @@ namespace VEPROMS
|
|||||||
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
||||||
foreach (ItemAuditInfo audit in audits)
|
foreach (ItemAuditInfo audit in audits)
|
||||||
{
|
{
|
||||||
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
if (audit.DeleteStatus == 0)
|
||||||
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
{
|
||||||
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "contentid", audit.ContentID.ToString()));
|
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
||||||
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
||||||
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "contentid", audit.ContentID.ToString()));
|
||||||
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "itemid", audit.ItemID.ToString()));
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
||||||
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "previousid", audit.PreviousID.ToString()));
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "itemid", audit.ItemID.ToString()));
|
||||||
xe.AppendChild(xee);
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "previousid", audit.PreviousID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
||||||
|
xe.AppendChild(xee);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
}
|
}
|
||||||
@ -1461,6 +1525,7 @@ 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()));
|
||||||
//content audits
|
//content audits
|
||||||
|
ExportContentAudits(xe, ci);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
if (ci.ContentTransitionCount > 0)
|
if (ci.ContentTransitionCount > 0)
|
||||||
foreach (TransitionInfo ti in ci.ContentTransitions)
|
foreach (TransitionInfo ti in ci.ContentTransitions)
|
||||||
@ -1476,6 +1541,37 @@ namespace VEPROMS
|
|||||||
foreach (PartInfo pi in ci.ContentParts)
|
foreach (PartInfo pi in ci.ContentParts)
|
||||||
ExportPart(xe, pi, ((E_FromTypes)pi.FromType).ToString().ToLower());
|
ExportPart(xe, pi, ((E_FromTypes)pi.FromType).ToString().ToLower());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportContentAudits(XmlElement xn, ContentInfo ci)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
ContentAuditInfoList audits = ContentAuditInfoList.Get(ci.ContentID);
|
||||||
|
if (audits.Count > 0)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
||||||
|
foreach (ContentAuditInfo audit in audits)
|
||||||
|
{
|
||||||
|
if (audit.DeleteStatus == 0)
|
||||||
|
{
|
||||||
|
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "contentid", audit.ContentID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "number", audit.Number));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "text", audit.Text));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "type", audit.Type.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "formatid", audit.FormatID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "config", audit.Config));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "actiondts", audit.ActionWhen.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xe.AppendChild(xee);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportContent(ContentInfo ci, string nodename)
|
private void ExportContent(ContentInfo ci, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1528,8 +1624,38 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", gi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", gi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", gi.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", gi.UserID.ToString()));
|
||||||
//grid audits
|
//grid audits
|
||||||
|
ExportGridAudits(xe, gi);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportGridAudits(XmlElement xn, GridInfo gi)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
GridAuditInfoList audits = GridAuditInfoList.Get(gi.ContentID);
|
||||||
|
if (audits.Count > 0)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
||||||
|
foreach (GridAuditInfo audit in audits)
|
||||||
|
{
|
||||||
|
if (audit.DeleteStatus == 0)
|
||||||
|
{
|
||||||
|
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "contentid", audit.ContentID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "data", audit.Data));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "config", audit.Config));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "contentauditid", audit.ContentAuditID.ToString()));
|
||||||
|
xe.AppendChild(xee);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportGrid(GridInfo gi, string nodename)
|
private void ExportGrid(GridInfo gi, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1561,9 +1687,36 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ei.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ei.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ei.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ei.UserID.ToString()));
|
||||||
//entry audits
|
//entry audits
|
||||||
|
ExportEntryAudits(xe, ei);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
ExportDocument(xe, ei.MyDocument, "document");
|
ExportDocument(xe, ei.MyDocument, "document");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportEntryAudits(XmlElement xn, EntryInfo ei)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
EntryAuditInfoList audits = EntryAuditInfoList.Get(ei.ContentID);
|
||||||
|
if (audits.Count > 0)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
||||||
|
foreach (EntryAuditInfo audit in audits)
|
||||||
|
{
|
||||||
|
if (audit.DeleteStatus == 0)
|
||||||
|
{
|
||||||
|
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "contentid", audit.ContentID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "docid", audit.DocID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
||||||
|
xe.AppendChild(xee);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportEntry(EntryInfo ei, string nodename)
|
private void ExportEntry(EntryInfo ei, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1602,8 +1755,39 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", di.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", di.UserID.ToString()));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "fileextension", di.FileExtension));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "fileextension", di.FileExtension));
|
||||||
//document audits
|
//document audits
|
||||||
|
ExportDocumentAudits(xe, di);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportDocumentAudits(XmlElement xn, DocumentInfo di)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
DocumentAuditInfoList audits = DocumentAuditInfoList.Get(di.DocID);
|
||||||
|
if (audits.Count > 0)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
||||||
|
foreach (DocumentAuditInfo audit in audits)
|
||||||
|
{
|
||||||
|
if (audit.DeleteStatus == 0)
|
||||||
|
{
|
||||||
|
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "docid", audit.DocID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "libtitle", audit.LibTitle));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "doccontent",Convert.ToBase64String(audit.DocContent)));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "docascii", audit.DocAscii));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "config", audit.Config));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "fileextension", audit.FileExtension));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
||||||
|
xe.AppendChild(xee);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportDocument(DocumentInfo di, string nodename)
|
private void ExportDocument(DocumentInfo di, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1647,8 +1831,16 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ri.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ri.UserID.ToString()));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ri.RODbID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ri.RODbID.ToString()));
|
||||||
//rousage audits
|
//rousage audits
|
||||||
|
ExportROUsageAudits(xe, ri);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportROUsageAudits(XmlElement xe, RoUsageInfo ri)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportROUsage(RoUsageInfo ri, string nodename)
|
private void ExportROUsage(RoUsageInfo ri, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1686,10 +1878,38 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", pi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", pi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", pi.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", pi.UserID.ToString()));
|
||||||
//part audits
|
//part audits
|
||||||
|
ExportPartAudits(xe, pi);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
foreach (ItemInfo ii in pi.MyItems)
|
foreach (ItemInfo ii in pi.MyItems)
|
||||||
ExportItem(xe, ii, pi.PartType.ToString().ToLower());
|
ExportItem(xe, ii, pi.PartType.ToString().ToLower());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportPartAudits(XmlElement xn, PartInfo pi)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
PartAuditInfoList audits = PartAuditInfoList.Get(pi.ContentID);
|
||||||
|
if (audits.Count > 0)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
||||||
|
foreach (PartAuditInfo audit in audits)
|
||||||
|
{
|
||||||
|
if (audit.DeleteStatus == 0)
|
||||||
|
{
|
||||||
|
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "contentid", audit.ContentID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "fromtype", audit.FromType.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "itemid", audit.ItemID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
||||||
|
xe.AppendChild(xee);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportPart(PartInfo pi, string nodename)
|
private void ExportPart(PartInfo pi, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1733,8 +1953,16 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ti.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ti.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ti.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ti.UserID.ToString()));
|
||||||
//transition audits
|
//transition audits
|
||||||
|
ExportTransitionAudits(xe, ti);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportTransitionAudits(XmlElement xe, TransitionInfo ti)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportTransition(TransitionInfo ti, string nodename)
|
private void ExportTransition(TransitionInfo ti, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1797,8 +2025,41 @@ namespace VEPROMS
|
|||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ai.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", ai.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ai.UserID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", ai.UserID.ToString()));
|
||||||
//annotation audits
|
//annotation audits
|
||||||
|
ExportAnnotationAudits(xe, ai);
|
||||||
xn.AppendChild(xe);
|
xn.AppendChild(xe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ExportAnnotationAudits(XmlElement xn, AnnotationInfo ai)
|
||||||
|
{
|
||||||
|
if (cbxExportAudits.Checked)
|
||||||
|
{
|
||||||
|
AnnotationAuditInfoList audits = AnnotationAuditInfoList.GetByAnnotationID(ai.AnnotationID);
|
||||||
|
if (audits.Count > 0)
|
||||||
|
{
|
||||||
|
XmlElement xe = xn.OwnerDocument.CreateElement("audits");
|
||||||
|
foreach (AnnotationAuditInfo audit in audits)
|
||||||
|
{
|
||||||
|
if (audit.DeleteStatus == 0)
|
||||||
|
{
|
||||||
|
XmlElement xee = xn.OwnerDocument.CreateElement("audit");
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "auditid", audit.AuditID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "annotationid", audit.AnnotationID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "itemid", audit.ItemID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "typeid", audit.TypeID.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "rtftext", audit.RtfText));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "searchtext", audit.SearchText));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "config", audit.Config));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "deletestatus", audit.DeleteStatus.ToString()));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "dts", audit.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "userid", audit.UserID));
|
||||||
|
xee.Attributes.SetNamedItem(AddAttribute(xee.OwnerDocument, "actiondts", audit.ActionWhen.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||||
|
xe.AppendChild(xee);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xn.AppendChild(xe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
private void ExportAnnotation(AnnotationInfo ai, string nodename)
|
private void ExportAnnotation(AnnotationInfo ai, string nodename)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -1927,6 +2188,7 @@ namespace VEPROMS
|
|||||||
else
|
else
|
||||||
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
||||||
content.Text = content.Text.Replace(lookfor, replacewith);
|
content.Text = content.Text.Replace(lookfor, replacewith);
|
||||||
|
content.FixTransitionText(TransitionInfo.Get(tt.TransitionID));
|
||||||
content.Save();
|
content.Save();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1966,34 +2228,70 @@ namespace VEPROMS
|
|||||||
int fromid = int.Parse(nd.Attributes.GetNamedItem("fromid").InnerText);
|
int fromid = int.Parse(nd.Attributes.GetNamedItem("fromid").InnerText);
|
||||||
int toid = int.Parse(nd.Attributes.GetNamedItem("toid").InnerText);
|
int toid = int.Parse(nd.Attributes.GetNamedItem("toid").InnerText);
|
||||||
int rangeid = int.Parse(nd.Attributes.GetNamedItem("rangeid").InnerText);
|
int rangeid = int.Parse(nd.Attributes.GetNamedItem("rangeid").InnerText);
|
||||||
if (Old2NewContent.ContainsKey(fromid) && Old2NewItem.ContainsKey(toid) && Old2NewItem.ContainsKey(rangeid))
|
int trantype = int.Parse(nd.Attributes.GetNamedItem("trantype").InnerText);
|
||||||
{
|
if (Old2NewContent.ContainsKey(fromid)) //transition from new contentid
|
||||||
int transitionid = int.Parse(nd.Attributes.GetNamedItem("transitionid").InnerText);
|
{
|
||||||
int isrange = int.Parse(nd.Attributes.GetNamedItem("isrange").InnerText);
|
if (Old2NewItem.ContainsKey(toid) && Old2NewItem.ContainsKey(rangeid)) //transition to new itemid (internal)
|
||||||
int trantype = int.Parse(nd.Attributes.GetNamedItem("trantype").InnerText);
|
{
|
||||||
string config = nd.Attributes.GetNamedItem("config").InnerText;
|
int transitionid = int.Parse(nd.Attributes.GetNamedItem("transitionid").InnerText);
|
||||||
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
int isrange = int.Parse(nd.Attributes.GetNamedItem("isrange").InnerText);
|
||||||
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
string config = nd.Attributes.GetNamedItem("config").InnerText;
|
||||||
string lookfor;
|
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||||
if (isrange == 0)
|
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||||
lookfor = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
|
string lookfor;
|
||||||
else
|
if (isrange == 0)
|
||||||
lookfor = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
lookfor = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
|
||||||
fromid = Old2NewContent[fromid];
|
else
|
||||||
toid = Old2NewItem[toid];
|
lookfor = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
||||||
rangeid = Old2NewItem[rangeid];
|
fromid = Old2NewContent[fromid];
|
||||||
Content cc = Content.Get(fromid);
|
toid = Old2NewItem[toid];
|
||||||
Transition tt = Transition.MakeTransition(cc, Item.Get(toid), Item.Get(rangeid), isrange, trantype, config, dts, userid);
|
rangeid = Old2NewItem[rangeid];
|
||||||
transitionid = tt.TransitionID;
|
Content cc = Content.Get(fromid);
|
||||||
string replacewith;
|
Transition tt = Transition.MakeTransition(cc, Item.Get(toid), Item.Get(rangeid), isrange, trantype, config, dts, userid);
|
||||||
if (isrange == 0)
|
transitionid = tt.TransitionID;
|
||||||
replacewith = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
|
string replacewith;
|
||||||
else
|
if (isrange == 0)
|
||||||
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
replacewith = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
|
||||||
cc.Text = cc.Text.Replace(lookfor, replacewith);
|
else
|
||||||
cc.Save();
|
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
||||||
nd.InnerText = "done";
|
cc.Text = cc.Text.Replace(lookfor, replacewith);
|
||||||
}
|
bool forceConvertToText;
|
||||||
|
SectionConfig sc = TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection.MyConfig as SectionConfig;
|
||||||
|
forceConvertToText = (sc.SubSection_Edit == "N");
|
||||||
|
cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText);
|
||||||
|
cc.Save();
|
||||||
|
nd.InnerText = "done";
|
||||||
|
}
|
||||||
|
else //transition to existing itemid (external)
|
||||||
|
{
|
||||||
|
int transitionid = int.Parse(nd.Attributes.GetNamedItem("transitionid").InnerText);
|
||||||
|
int isrange = int.Parse(nd.Attributes.GetNamedItem("isrange").InnerText);
|
||||||
|
string config = nd.Attributes.GetNamedItem("config").InnerText;
|
||||||
|
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||||
|
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||||
|
string lookfor;
|
||||||
|
if (isrange == 0)
|
||||||
|
lookfor = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
|
||||||
|
else
|
||||||
|
lookfor = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
||||||
|
fromid = Old2NewContent[fromid];
|
||||||
|
Content cc = Content.Get(fromid);
|
||||||
|
Transition tt = Transition.MakeTransition(cc, Item.Get(toid), Item.Get(rangeid), isrange, trantype, config, dts, userid);
|
||||||
|
transitionid = tt.TransitionID;
|
||||||
|
string replacewith;
|
||||||
|
if (isrange == 0)
|
||||||
|
replacewith = string.Format("#Link:Transition:{0} {1} {2}", trantype, transitionid, toid);
|
||||||
|
else
|
||||||
|
replacewith = string.Format("#Link:TransitionRange:{0} {1} {2} {3}", trantype, transitionid, toid, rangeid);
|
||||||
|
cc.Text = cc.Text.Replace(lookfor, replacewith);
|
||||||
|
bool forceConvertToText;
|
||||||
|
SectionConfig sc = TransitionInfo.Get(tt.TransitionID).MyItemToID.ActiveSection.MyConfig as SectionConfig;
|
||||||
|
forceConvertToText = (sc.SubSection_Edit == "N");
|
||||||
|
cc.FixTransitionText(TransitionInfo.Get(tt.TransitionID), forceConvertToText);
|
||||||
|
cc.Save();
|
||||||
|
nd.InnerText = "done";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private Dictionary<int, int> Old2NewItem;
|
private Dictionary<int, int> Old2NewItem;
|
||||||
@ -2249,16 +2547,27 @@ namespace VEPROMS
|
|||||||
string config = nd.Attributes.GetNamedItem("config").InnerText;
|
string config = nd.Attributes.GetNamedItem("config").InnerText;
|
||||||
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||||
RoUsage rou = RoUsage.MakeRoUsage(content, roid, config, dts, userid, MyRODb);
|
ROFSTLookup lookup = MyDocVersion.DocVersionAssociations[0].MyROFst.GetROFSTLookup(MyDocVersion);
|
||||||
rou.Save();
|
string roval = lookup.GetRoValue(roid);
|
||||||
string lookFor = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rousageid, roid, oldRODbID.ToString());
|
if (roval == "?")
|
||||||
string replaceWith = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rou.ROUsageID.ToString(), roid, newRODbID.ToString());
|
{
|
||||||
if (lookFor != replaceWith)
|
RoUsageInfo roui = RoUsageInfo.Get(int.Parse(rousageid));
|
||||||
{
|
}
|
||||||
content.Text = content.Text.Replace(lookFor, replaceWith);
|
else
|
||||||
content.Save();
|
{
|
||||||
}
|
RoUsage rou = RoUsage.MakeRoUsage(content, roid, config, dts, userid, MyRODb);
|
||||||
}
|
rou.Save();
|
||||||
|
RoUsageInfo roui = RoUsageInfo.Get(rou.ROUsageID);
|
||||||
|
string lookFor = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rousageid, roid, oldRODbID.ToString());
|
||||||
|
string replaceWith = string.Format("#Link:ReferencedObject:{0} {1} {2}[END>", rou.ROUsageID.ToString(), roid, newRODbID.ToString());
|
||||||
|
if (lookFor != replaceWith)
|
||||||
|
{
|
||||||
|
content.Text = content.Text.Replace(lookFor, replaceWith);
|
||||||
|
content.FixContentText(roui, roval, 0, MyDocVersion.DocVersionAssociations[0].MyROFst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
content.Save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void AddAnnotation(XmlReader xr)
|
private void AddAnnotation(XmlReader xr)
|
||||||
{
|
{
|
||||||
@ -2370,7 +2679,9 @@ namespace VEPROMS
|
|||||||
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
||||||
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
||||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||||
|
CheckForFloatingFoldout(contentid, config);
|
||||||
|
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||||
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Table);
|
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Table);
|
||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
@ -2448,7 +2759,9 @@ namespace VEPROMS
|
|||||||
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
||||||
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
||||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||||
|
CheckForFloatingFoldout(contentid, config);
|
||||||
|
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||||
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Step);
|
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Step);
|
||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
@ -2524,7 +2837,9 @@ namespace VEPROMS
|
|||||||
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
||||||
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
||||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||||
|
CheckForFloatingFoldout(contentid, config);
|
||||||
|
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||||
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.RNO);
|
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.RNO);
|
||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
@ -2600,7 +2915,9 @@ namespace VEPROMS
|
|||||||
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
||||||
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
||||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||||
|
CheckForFloatingFoldout(contentid, config);
|
||||||
|
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||||
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Note);
|
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Note);
|
||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
@ -2676,7 +2993,9 @@ namespace VEPROMS
|
|||||||
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
||||||
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
||||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||||
|
CheckForFloatingFoldout(contentid, config);
|
||||||
|
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||||
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Caution);
|
step = Step.MakeStep(parentInfo, prevInfo, number, text, steptype, E_FromType.Caution);
|
||||||
step.DTS = dts;
|
step.DTS = dts;
|
||||||
@ -2758,6 +3077,8 @@ namespace VEPROMS
|
|||||||
int sectiontype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
int sectiontype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText);
|
||||||
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
string formatid = xc.Attributes.GetNamedItem("formatid").InnerText;
|
||||||
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
string config = xc.Attributes.GetNamedItem("config").InnerText;
|
||||||
|
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||||
|
CheckForFloatingFoldout(contentid, config);
|
||||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||||
sect = Section.MakeSection(parentInfo, prevInfo, number, text, sectiontype);
|
sect = Section.MakeSection(parentInfo, prevInfo, number, text, sectiontype);
|
||||||
@ -2784,6 +3105,18 @@ namespace VEPROMS
|
|||||||
AddParts(xc, prevInfo);
|
AddParts(xc, prevInfo);
|
||||||
return prevInfo;
|
return prevInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void CheckForFloatingFoldout(int contentid, string config)
|
||||||
|
{
|
||||||
|
if (config != string.Empty)
|
||||||
|
{
|
||||||
|
XmlDocument xd = new XmlDocument();
|
||||||
|
xd.LoadXml(config);
|
||||||
|
XmlNode xn = xd.SelectSingleNode("Config/Step/@FloatingFoldout");
|
||||||
|
if (xn != null)
|
||||||
|
floatFoldout.Add(contentid, int.Parse(xn.InnerText));
|
||||||
|
}
|
||||||
|
}
|
||||||
private void AddGrid(XmlReader xr)
|
private void AddGrid(XmlReader xr)
|
||||||
{
|
{
|
||||||
int contentid = int.Parse(xr.GetAttribute("contentid"));
|
int contentid = int.Parse(xr.GetAttribute("contentid"));
|
||||||
|
@ -53,6 +53,7 @@ namespace VEPROMS
|
|||||||
internal class SimpleUser
|
internal class SimpleUser
|
||||||
{
|
{
|
||||||
private User _MyUser;
|
private User _MyUser;
|
||||||
|
private UserConfig _MyUC;
|
||||||
[Browsable(false)]
|
[Browsable(false)]
|
||||||
public User MyUser
|
public User MyUser
|
||||||
{
|
{
|
||||||
@ -61,6 +62,7 @@ namespace VEPROMS
|
|||||||
public SimpleUser(User myUser)
|
public SimpleUser(User myUser)
|
||||||
{
|
{
|
||||||
_MyUser = myUser;
|
_MyUser = myUser;
|
||||||
|
_MyUC = new UserConfig(myUser.Config);
|
||||||
}
|
}
|
||||||
public string CourtesyTitle
|
public string CourtesyTitle
|
||||||
{
|
{
|
||||||
@ -92,6 +94,24 @@ namespace VEPROMS
|
|||||||
get { return _MyUser.PhoneNumber; }
|
get { return _MyUser.PhoneNumber; }
|
||||||
set { _MyUser.PhoneNumber = value; }
|
set { _MyUser.PhoneNumber = value; }
|
||||||
}
|
}
|
||||||
|
public string Email
|
||||||
|
{
|
||||||
|
get { return _MyUC.User_UserEmail; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_MyUC.User_UserEmail = value;
|
||||||
|
_MyUser.Config = _MyUC.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public string CellPhone
|
||||||
|
{
|
||||||
|
get { return _MyUC.User_CellPhone; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_MyUC.User_CellPhone = value;
|
||||||
|
_MyUser.Config = _MyUC.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
public string UserID
|
public string UserID
|
||||||
{
|
{
|
||||||
get { return _MyUser.UserID; }
|
get { return _MyUser.UserID; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user