Compare commits
131 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ce1a45ca6 | |||
| 604b4d1751 | |||
| 874aaf2857 | |||
| 17a28def4e | |||
| e72a1aa9e7 | |||
| 7b96ef1b4c | |||
| ea048e6d82 | |||
| 109abfb4ad | |||
| 3f662ab19d | |||
| b0de38909a | |||
| 267de44103 | |||
| b7b0e55d94 | |||
| c0d12f5721 | |||
| 27a945485f | |||
| d76c81a9d8 | |||
| 143a3622dd | |||
| 75992293c6 | |||
| 0e004828b3 | |||
| 714751f404 | |||
| 27576e946e | |||
| e548dddcbd | |||
| 8cbc8c497e | |||
| c328140441 | |||
| a10798c983 | |||
| 06909e260f | |||
| 5eca8a5150 | |||
| 88a13f9864 | |||
| e03ae6195a | |||
| c3cacaf407 | |||
| 4b479b3ceb | |||
| c78cb805fb | |||
| d17688fc9d | |||
| fd59b9d5f0 | |||
| 0e71c9f5f5 | |||
| bc3c14589e | |||
| 4331f49f6f | |||
| 294d19e9d1 | |||
| ed615dbb31 | |||
| e9ad57f588 | |||
| 7fee639b53 | |||
| c2a5a8ec7d | |||
| ec823cab97 | |||
| 83f88b6df3 | |||
| 7636fe7686 | |||
| 1e12c82be4 | |||
| 9879a80569 | |||
| 13b03f4f89 | |||
| 331de6ecfe | |||
| 7b649c4a62 | |||
| 9ccdaef354 | |||
| fa114f4467 | |||
| 33cc650871 | |||
| 95737d05e1 | |||
| 955ffc48d3 | |||
| d79dd908f6 | |||
| 4656ec30af | |||
| a0be60a1b9 | |||
| d296d6f000 | |||
| 8df4bd2537 | |||
| cc5cdb88ff | |||
| f66c6a93c5 | |||
| a7b5ee33e2 | |||
| fe90af5aa4 | |||
| 7e672d91e9 | |||
| 09f472bee2 | |||
| 30da0c5105 | |||
| d2082cdbea | |||
| c42596811e | |||
| d095a19187 | |||
| 8089e2c898 | |||
| a657d03fb0 | |||
| 4e829200f5 | |||
| bef9be5cbe | |||
| 56f14323d1 | |||
| 4fcd22ca68 | |||
| 21890e74fe | |||
| ef32564fba | |||
| d95505726f | |||
| bb7b892f7c | |||
| 836cdaf087 | |||
| 6f5c41abb8 | |||
| 6379321785 | |||
| e4c6e4393e | |||
| 3e6bb81e39 | |||
| ded6f18dd5 | |||
| 81643e2aef | |||
| 8a186f9f0c | |||
| 14aa39976a | |||
| c077e0ddc2 | |||
| d198a7b63a | |||
| 7f36a33dea | |||
| db3d9fc65f | |||
| f9738451db | |||
| ec73b5cbea | |||
| f3bd6b6469 | |||
| fd50993fb9 | |||
| 079381dbb0 | |||
| 85bdc35342 | |||
| 2aaaa55e42 | |||
| e999bea228 | |||
| 287c06383b | |||
| 202409c140 | |||
| 34886beccb | |||
| 3d200cc34e | |||
| b13883530a | |||
| 032e04bc50 | |||
| 625b715832 | |||
| e1ac360271 | |||
| 7eda88bdbe | |||
| 90fdb94e95 | |||
| 15979203ce | |||
| 53360a03af | |||
| 9f6f7c23f6 | |||
| 7419f4e886 | |||
| f90a80c366 | |||
| d9ec756e22 | |||
| 9f7c24c540 | |||
| fe2833395d | |||
| a181cf3815 | |||
| dfce44a47a | |||
| 22280bf1e3 | |||
| 30aedb6eec | |||
| 12f175740f | |||
| 5c0f11aea1 | |||
| 879518c4a9 | |||
| 7afca6a254 | |||
| 1c56aa2eb1 | |||
| ecaf00c5b3 | |||
| bfdc77da97 | |||
| f38aa4595f | |||
| aa0b906a9f |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -101,7 +101,6 @@ namespace ROEditor
|
|||||||
private System.Windows.Forms.TextBox tbVariableTxtWid;
|
private System.Windows.Forms.TextBox tbVariableTxtWid;
|
||||||
private System.Windows.Forms.TextBox tbTableWid;
|
private System.Windows.Forms.TextBox tbTableWid;
|
||||||
private System.Windows.Forms.TextBox tbXYPlotWid;
|
private System.Windows.Forms.TextBox tbXYPlotWid;
|
||||||
|
|
||||||
private System.Windows.Forms.Button btnOK;
|
private System.Windows.Forms.Button btnOK;
|
||||||
private System.Windows.Forms.Button btnCancel;
|
private System.Windows.Forms.Button btnCancel;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -224,7 +223,6 @@ namespace ROEditor
|
|||||||
this.tbTableWid = new System.Windows.Forms.TextBox();
|
this.tbTableWid = new System.Windows.Forms.TextBox();
|
||||||
this.tbVariableTxtWid = new System.Windows.Forms.TextBox();
|
this.tbVariableTxtWid = new System.Windows.Forms.TextBox();
|
||||||
this.tbSingleTxtWid = new System.Windows.Forms.TextBox();
|
this.tbSingleTxtWid = new System.Windows.Forms.TextBox();
|
||||||
|
|
||||||
this.lblW4 = new System.Windows.Forms.Label();
|
this.lblW4 = new System.Windows.Forms.Label();
|
||||||
this.lblW3 = new System.Windows.Forms.Label();
|
this.lblW3 = new System.Windows.Forms.Label();
|
||||||
this.lblW2 = new System.Windows.Forms.Label();
|
this.lblW2 = new System.Windows.Forms.Label();
|
||||||
@@ -607,3 +605,4 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -445,3 +445,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -455,3 +455,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -440,3 +440,4 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1627,3 +1627,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -313,7 +313,6 @@ namespace ROEditor
|
|||||||
/// Summary description for Form1.
|
/// Summary description for Form1.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
///
|
///
|
||||||
|
|
||||||
public class Form1 : System.Windows.Forms.Form
|
public class Form1 : System.Windows.Forms.Form
|
||||||
{
|
{
|
||||||
private ctlXMLEditLib.ctlXMLEdit ctlXMLEdit2;
|
private ctlXMLEditLib.ctlXMLEdit ctlXMLEdit2;
|
||||||
@@ -344,7 +343,6 @@ namespace ROEditor
|
|||||||
private System.Windows.Forms.MenuItem menuROProperties;
|
private System.Windows.Forms.MenuItem menuROProperties;
|
||||||
private System.Windows.Forms.MenuItem menuROExit;
|
private System.Windows.Forms.MenuItem menuROExit;
|
||||||
private System.Windows.Forms.MenuItem menuItem1;
|
private System.Windows.Forms.MenuItem menuItem1;
|
||||||
|
|
||||||
private XmlDocument myroXmlDoc;
|
private XmlDocument myroXmlDoc;
|
||||||
private VlnXmlElement newone;
|
private VlnXmlElement newone;
|
||||||
private TreeNode TreeNewparent;
|
private TreeNode TreeNewparent;
|
||||||
@@ -474,7 +472,7 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
myroXmlDoc = myrodb.RODB_GetRoot();
|
myroXmlDoc = myrodb.RODB_GetRoot();
|
||||||
rootXml = (VlnXmlElement)myroXmlDoc.FirstChild;
|
rootXml = (VlnXmlElement)myroXmlDoc.FirstChild;
|
||||||
rootNode = new TreeNode("Referenced Objects", ROGROUPIMAGE, ROGROUPIMAGE);
|
rootNode = new TreeNode("Referenced Objects",ROGROUPIMAGE,ROGROUPIMAGE);
|
||||||
rootNode.Tag = rootXml;
|
rootNode.Tag = rootXml;
|
||||||
roTreeView.Nodes.Add(rootNode);
|
roTreeView.Nodes.Add(rootNode);
|
||||||
roTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.roTreeView_AfterSelect);
|
roTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.roTreeView_AfterSelect);
|
||||||
@@ -491,7 +489,7 @@ namespace ROEditor
|
|||||||
while (group != null)
|
while (group != null)
|
||||||
{
|
{
|
||||||
// Add the top groups to tree control as a node.
|
// Add the top groups to tree control as a node.
|
||||||
TreeNode grnode = new TreeNode(CvtFldToUserFld(group.InnerText), ROGROUPIMAGE, ROGROUPIMAGE);
|
TreeNode grnode = new TreeNode(CvtFldToUserFld(group.InnerText),ROGROUPIMAGE,ROGROUPIMAGE);
|
||||||
grnode.Tag = group;
|
grnode.Tag = group;
|
||||||
rootNode.Nodes.Add(grnode);
|
rootNode.Nodes.Add(grnode);
|
||||||
string haskids = group.GetAttribute("HasChild");
|
string haskids = group.GetAttribute("HasChild");
|
||||||
@@ -516,11 +514,11 @@ namespace ROEditor
|
|||||||
// edit it through the ctlXmledit.
|
// edit it through the ctlXmledit.
|
||||||
// from the input tbl string, get a table name.
|
// from the input tbl string, get a table name.
|
||||||
ArrayList levelRecids = new ArrayList();
|
ArrayList levelRecids = new ArrayList();
|
||||||
int itbl = System.Convert.ToInt32(specificro.Substring(0, 4), 16);
|
int itbl = System.Convert.ToInt32(specificro.Substring(0,4),16);
|
||||||
string stbl = System.Convert.ToString(itbl, 10);
|
string stbl = System.Convert.ToString(itbl,10);
|
||||||
string pstbl = stbl.PadLeft(6, '0');
|
string pstbl = stbl.PadLeft(6,'0');
|
||||||
string tbname = "RO" + pstbl;
|
string tbname = "RO" + pstbl;
|
||||||
string recid = specificro.Substring(4, 8);
|
string recid = specificro.Substring(4,8);
|
||||||
|
|
||||||
// read in this element from the table.
|
// read in this element from the table.
|
||||||
VlnXmlElement spro;
|
VlnXmlElement spro;
|
||||||
@@ -561,20 +559,20 @@ namespace ROEditor
|
|||||||
string attrspro;
|
string attrspro;
|
||||||
TreeNode trnd = rootNode.FirstNode;
|
TreeNode trnd = rootNode.FirstNode;
|
||||||
VlnXmlElement ele;
|
VlnXmlElement ele;
|
||||||
for (int i = levelRecids.Count - 1; i >= 0; i--)
|
for (int i = levelRecids.Count-1;i>=0;i--)
|
||||||
{
|
{
|
||||||
ele = (VlnXmlElement)trnd.Tag;
|
ele = (VlnXmlElement) trnd.Tag;
|
||||||
attrele = ele.GetAttribute((i == levelRecids.Count - 1) ? "Table" : "RecID");
|
attrele = ele.GetAttribute((i==levelRecids.Count-1)?"Table":"RecID");
|
||||||
if (i == levelRecids.Count - 1)
|
if (i == levelRecids.Count-1)
|
||||||
attrspro = spro.GetAttribute("Table");
|
attrspro = spro.GetAttribute("Table");
|
||||||
else
|
else
|
||||||
attrspro = (string)levelRecids[i];
|
attrspro = (string) levelRecids[i];
|
||||||
while (attrele != attrspro)
|
while (attrele != attrspro)
|
||||||
{
|
{
|
||||||
// get next one.
|
// get next one.
|
||||||
trnd = trnd.NextNode;
|
trnd = trnd.NextNode;
|
||||||
ele = (VlnXmlElement)trnd.Tag;
|
ele = (VlnXmlElement)trnd.Tag;
|
||||||
attrele = ele.GetAttribute((i == levelRecids.Count - 1) ? "Table" : "RecID");
|
attrele = ele.GetAttribute((i==levelRecids.Count - 1)?"Table":"RecID");
|
||||||
}
|
}
|
||||||
if (trnd == null)
|
if (trnd == null)
|
||||||
{
|
{
|
||||||
@@ -590,12 +588,12 @@ namespace ROEditor
|
|||||||
MessageBox.Show("Error editting RO");
|
MessageBox.Show("Error editting RO");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ele = (VlnXmlElement)trnd.Tag;
|
ele = (VlnXmlElement) trnd.Tag;
|
||||||
attrele = ele.GetAttribute("RecID");
|
attrele = ele.GetAttribute("RecID");
|
||||||
while (attrele != spro.GetAttribute("RecID"))
|
while (attrele != spro.GetAttribute("RecID"))
|
||||||
{
|
{
|
||||||
trnd = trnd.NextNode;
|
trnd = trnd.NextNode;
|
||||||
ele = (VlnXmlElement)trnd.Tag;
|
ele = (VlnXmlElement) trnd.Tag;
|
||||||
attrele = ele.GetAttribute("RecID");
|
attrele = ele.GetAttribute("RecID");
|
||||||
}
|
}
|
||||||
if (trnd == null)
|
if (trnd == null)
|
||||||
@@ -606,7 +604,7 @@ namespace ROEditor
|
|||||||
roTreeView.SelectedNode = trnd;
|
roTreeView.SelectedNode = trnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void roTreeView_AfterSelect(object sender,
|
protected void roTreeView_AfterSelect (object sender,
|
||||||
System.Windows.Forms.TreeViewEventArgs e)
|
System.Windows.Forms.TreeViewEventArgs e)
|
||||||
{
|
{
|
||||||
TreeNode PreviousNode = LastSelectedNode;
|
TreeNode PreviousNode = LastSelectedNode;
|
||||||
@@ -632,7 +630,7 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if selected to make new, but didn't add any data, remove it.
|
// if selected to make new, but didn't add any data, remove it.
|
||||||
if (newone != null)
|
if (newone!=null)
|
||||||
{
|
{
|
||||||
XmlNode parent = newone.ParentNode;
|
XmlNode parent = newone.ParentNode;
|
||||||
parent.RemoveChild(newone);
|
parent.RemoveChild(newone);
|
||||||
@@ -647,7 +645,7 @@ namespace ROEditor
|
|||||||
roTreeView.ContextMenu.MenuItems[6].Enabled = rbtnSave.Enabled;
|
roTreeView.ContextMenu.MenuItems[6].Enabled = rbtnSave.Enabled;
|
||||||
|
|
||||||
// Should the properties menu item be available?
|
// Should the properties menu item be available?
|
||||||
VlnXmlElement curelem = (VlnXmlElement)CurrentNode.Tag;
|
VlnXmlElement curelem = (VlnXmlElement) CurrentNode.Tag;
|
||||||
if (curelem.Name == "vlnGroup")
|
if (curelem.Name == "vlnGroup")
|
||||||
menuROProperties.Enabled = true;
|
menuROProperties.Enabled = true;
|
||||||
else
|
else
|
||||||
@@ -757,12 +755,12 @@ namespace ROEditor
|
|||||||
return fldname;
|
return fldname;
|
||||||
// a digit cannot start an xml fieldname, prepend a "__" to it.
|
// a digit cannot start an xml fieldname, prepend a "__" to it.
|
||||||
string tmp0;
|
string tmp0;
|
||||||
if (char.IsDigit(fldname, 0))
|
if (char.IsDigit(fldname,0))
|
||||||
tmp0 = "__" + fldname;
|
tmp0 = "__" + fldname;
|
||||||
else
|
else
|
||||||
tmp0 = fldname;
|
tmp0 = fldname;
|
||||||
// an xml fieldname cannot have a space, change it to a "__"
|
// an xml fieldname cannot have a space, change it to a "__"
|
||||||
string tmpstr = tmp0.Replace(" ", "__");
|
string tmpstr = tmp0.Replace(" ","__");
|
||||||
int len = tmpstr.Length;
|
int len = tmpstr.Length;
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
@@ -795,12 +793,12 @@ namespace ROEditor
|
|||||||
string tmpstr0;
|
string tmpstr0;
|
||||||
if (fldname.Length < 2) return fldname;
|
if (fldname.Length < 2) return fldname;
|
||||||
// an xml element name cannot begin with a digit. we had prepended a "__"
|
// an xml element name cannot begin with a digit. we had prepended a "__"
|
||||||
if (fldname.Substring(0, 2) == "__" && char.IsDigit(fldname, 2))
|
if (fldname.Substring(0,2) == "__" && char.IsDigit(fldname,2))
|
||||||
tmpstr0 = fldname.Substring(2, fldname.Length - 2);
|
tmpstr0 = fldname.Substring(2,fldname.Length-2);
|
||||||
else
|
else
|
||||||
tmpstr0 = fldname;
|
tmpstr0 = fldname;
|
||||||
// an xml element name cannot have a space, we converted to a "__"
|
// an xml element name cannot have a space, we converted to a "__"
|
||||||
string tmpstr = tmpstr0.Replace("__", " ");
|
string tmpstr = tmpstr0.Replace("__"," ");
|
||||||
int len = tmpstr.Length;
|
int len = tmpstr.Length;
|
||||||
int cur = 0;
|
int cur = 0;
|
||||||
|
|
||||||
@@ -810,24 +808,24 @@ namespace ROEditor
|
|||||||
|
|
||||||
string outstr = "";
|
string outstr = "";
|
||||||
int decval, indx;
|
int decval, indx;
|
||||||
if (tmpstr.Length < 6)
|
if (tmpstr.Length <6)
|
||||||
indx = -1;
|
indx = -1;
|
||||||
else
|
else
|
||||||
indx = tmpstr.IndexOf(OKpunch, cur);
|
indx=tmpstr.IndexOf(OKpunch, cur);
|
||||||
string asc_spchar;
|
string asc_spchar;
|
||||||
while (indx >= 0)
|
while (indx>=0)
|
||||||
{
|
{
|
||||||
outstr += tmpstr.Substring(cur, indx - cur);
|
outstr += tmpstr.Substring(cur,indx-cur);
|
||||||
asc_spchar = tmpstr.Substring(indx + 3, 3);
|
asc_spchar = tmpstr.Substring(indx+3,3);
|
||||||
decval = System.Convert.ToInt16(asc_spchar, 10);
|
decval = System.Convert.ToInt16(asc_spchar,10);
|
||||||
outstr += System.Convert.ToChar(decval).ToString();
|
outstr += System.Convert.ToChar(decval).ToString();
|
||||||
cur = indx + 6;
|
cur = indx+6;
|
||||||
if (cur + 6 > len)
|
if (cur+6 > len)
|
||||||
indx = -1;
|
indx = -1;
|
||||||
else
|
else
|
||||||
indx = tmpstr.IndexOf(OKpunch, cur);
|
indx = tmpstr.IndexOf(OKpunch, cur);
|
||||||
}
|
}
|
||||||
if (cur < len) outstr += tmpstr.Substring(cur, len - cur);
|
if (cur<len) outstr += tmpstr.Substring(cur,len-cur);
|
||||||
|
|
||||||
return outstr;
|
return outstr;
|
||||||
}
|
}
|
||||||
@@ -850,7 +848,7 @@ namespace ROEditor
|
|||||||
{
|
{
|
||||||
// Get the tree node at the current mouse position and set it
|
// Get the tree node at the current mouse position and set it
|
||||||
// to be the the currently selected node (i.e. selecti that node)
|
// to be the the currently selected node (i.e. selecti that node)
|
||||||
TreeNode CurrentNode = roTreeView.GetNodeAt(e.X, e.Y);
|
TreeNode CurrentNode = roTreeView.GetNodeAt(e.X,e.Y);
|
||||||
if (CurrentNode != null)
|
if (CurrentNode != null)
|
||||||
{
|
{
|
||||||
roTreeView.SelectedNode = CurrentNode; // select this node
|
roTreeView.SelectedNode = CurrentNode; // select this node
|
||||||
@@ -884,7 +882,7 @@ namespace ROEditor
|
|||||||
menuROSave.Enabled = rbtnSave.Enabled;
|
menuROSave.Enabled = rbtnSave.Enabled;
|
||||||
|
|
||||||
// Should the properties menu item be available?
|
// Should the properties menu item be available?
|
||||||
VlnXmlElement curelem = (VlnXmlElement)CurrentNode.Tag;
|
VlnXmlElement curelem = (VlnXmlElement) CurrentNode.Tag;
|
||||||
if (curelem.Name == "vlnGroup")
|
if (curelem.Name == "vlnGroup")
|
||||||
roTreeView.ContextMenu.MenuItems[7].Enabled = true;
|
roTreeView.ContextMenu.MenuItems[7].Enabled = true;
|
||||||
else
|
else
|
||||||
@@ -916,7 +914,7 @@ namespace ROEditor
|
|||||||
{
|
{
|
||||||
bool rtnval = false;
|
bool rtnval = false;
|
||||||
TreeNode CurrentNode = roTreeView.SelectedNode;
|
TreeNode CurrentNode = roTreeView.SelectedNode;
|
||||||
VlnXmlElement curelem = (VlnXmlElement)CurrentNode.Tag;
|
VlnXmlElement curelem = (VlnXmlElement) CurrentNode.Tag;
|
||||||
if (curelem.Name != "RO_Root")
|
if (curelem.Name != "RO_Root")
|
||||||
{
|
{
|
||||||
if (curelem.Name == "vlnGroup")
|
if (curelem.Name == "vlnGroup")
|
||||||
@@ -947,7 +945,7 @@ namespace ROEditor
|
|||||||
DialogResult dr = MessageBox.Show("Do you want to save your changes?", "Warning:", MessageBoxButtons.YesNoCancel);
|
DialogResult dr = MessageBox.Show("Do you want to save your changes?", "Warning:", MessageBoxButtons.YesNoCancel);
|
||||||
if (dr == DialogResult.Yes)
|
if (dr == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
TreeNode tr = null;
|
TreeNode tr=null;
|
||||||
bool ok = SaveRO(ref tr); // savero needs a tree node
|
bool ok = SaveRO(ref tr); // savero needs a tree node
|
||||||
if (ok == false) return -1;
|
if (ok == false) return -1;
|
||||||
}
|
}
|
||||||
@@ -982,19 +980,19 @@ namespace ROEditor
|
|||||||
{
|
{
|
||||||
roListView.Dispose();
|
roListView.Dispose();
|
||||||
this.panel1.Controls.Remove(roListView);
|
this.panel1.Controls.Remove(roListView);
|
||||||
roListView = null;
|
roListView=null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CreateCtlXmlEdit2(VlnXmlElement curelem, XmlSchema myschema, ArrayList reqfields, ArrayList fieldsWithApplic)
|
private void CreateCtlXmlEdit2(VlnXmlElement curelem, XmlSchema myschema, ArrayList reqfields, ArrayList fieldsWithApplic)
|
||||||
{
|
{
|
||||||
ctlXMLEdit2 = new ctlXMLEditLib.ctlXMLEdit(curelem, myschema, reqfields, fieldsWithApplic, PCChildren); // C2021-026 pass in P/C enabled information
|
ctlXMLEdit2 = new ctlXMLEditLib.ctlXMLEdit(curelem,myschema,reqfields,fieldsWithApplic,PCChildren); // C2021-026 pass in P/C enabled information
|
||||||
ctlXMLEdit2.AutoScroll = true;
|
ctlXMLEdit2.AutoScroll = true;
|
||||||
ctlXMLEdit2.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
ctlXMLEdit2.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
|
||||||
ctlXMLEdit2.Name = "ctlXMLEdit2";
|
ctlXMLEdit2.Name = "ctlXMLEdit2";
|
||||||
ctlXMLEdit2.Size = new System.Drawing.Size(ctlXMLEdit2.GetMaxWidth(), ctlXMLEdit2.GetMaxLength());
|
ctlXMLEdit2.Size = new System.Drawing.Size(ctlXMLEdit2.GetMaxWidth(),ctlXMLEdit2.GetMaxLength());
|
||||||
this.panel2.Visible = true;
|
this.panel2.Visible = true;
|
||||||
this.panel2.Size = new System.Drawing.Size(ctlXMLEdit2.GetMaxWidth() + 20, ctlXMLEdit2.GetMaxLength() + 10);
|
this.panel2.Size = new System.Drawing.Size(ctlXMLEdit2.GetMaxWidth()+20,ctlXMLEdit2.GetMaxLength()+10);
|
||||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
ctlXMLEdit2.TabIndex = 4;
|
ctlXMLEdit2.TabIndex = 4;
|
||||||
ctlXMLEdit2.Tag = "";
|
ctlXMLEdit2.Tag = "";
|
||||||
@@ -1011,7 +1009,7 @@ namespace ROEditor
|
|||||||
TmpInfo = (Control)ctlEnumerator.Current;
|
TmpInfo = (Control)ctlEnumerator.Current;
|
||||||
if (TmpInfo is GroupBox)
|
if (TmpInfo is GroupBox)
|
||||||
{
|
{
|
||||||
System.Collections.IEnumerator ctlGroup = TmpInfo.Controls.GetEnumerator(); ;
|
System.Collections.IEnumerator ctlGroup = TmpInfo.Controls.GetEnumerator();;
|
||||||
while (ctlGroup.MoveNext())
|
while (ctlGroup.MoveNext())
|
||||||
{
|
{
|
||||||
Control tmpradio = (Control)ctlGroup.Current;
|
Control tmpradio = (Control)ctlGroup.Current;
|
||||||
@@ -1053,7 +1051,7 @@ namespace ROEditor
|
|||||||
private void EditRO(VlnXmlElement curelem)
|
private void EditRO(VlnXmlElement curelem)
|
||||||
{
|
{
|
||||||
ArrayList fieldsWithApplic = null;
|
ArrayList fieldsWithApplic = null;
|
||||||
newone = null;
|
newone=null;
|
||||||
// can't edit fields for top or top group nodes (top node not editable,
|
// can't edit fields for top or top group nodes (top node not editable,
|
||||||
// and top group node data change at properties level).
|
// and top group node data change at properties level).
|
||||||
if (curelem.Name == "RO_Root" || curelem.ParentNode.Name == "RO_Root") return;
|
if (curelem.Name == "RO_Root" || curelem.ParentNode.Name == "RO_Root") return;
|
||||||
@@ -1072,7 +1070,7 @@ namespace ROEditor
|
|||||||
fieldsWithApplic = GetApplcFieldListForElement(curelem);
|
fieldsWithApplic = GetApplcFieldListForElement(curelem);
|
||||||
|
|
||||||
myschema = myrodb.RODB_GetSchema(curelem);
|
myschema = myrodb.RODB_GetSchema(curelem);
|
||||||
if (myschema == null)
|
if (myschema==null)
|
||||||
{
|
{
|
||||||
MessageBox.Show("RO Definition does not exist, check RO Definition under Properties for the Group that contains this RO.");
|
MessageBox.Show("RO Definition does not exist, check RO Definition under Properties for the Group that contains this RO.");
|
||||||
return;
|
return;
|
||||||
@@ -1084,7 +1082,7 @@ namespace ROEditor
|
|||||||
VlnXmlElement sch = curelem;
|
VlnXmlElement sch = curelem;
|
||||||
if (curelem.ParentNode.Name != "RO_Root") sch = (VlnXmlElement)sch.ParentNode;
|
if (curelem.ParentNode.Name != "RO_Root") sch = (VlnXmlElement)sch.ParentNode;
|
||||||
myschema = myrodb.RODB_GetGroupSchema(sch);
|
myschema = myrodb.RODB_GetGroupSchema(sch);
|
||||||
if (myschema == null)
|
if (myschema==null)
|
||||||
{
|
{
|
||||||
MessageBox.Show("Subgroup Definition does not exist, check Subgroup Definition under Properties for the Group that contains this Subgroup.");
|
MessageBox.Show("Subgroup Definition does not exist, check Subgroup Definition under Properties for the Group that contains this Subgroup.");
|
||||||
return;
|
return;
|
||||||
@@ -1092,20 +1090,20 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
|
|
||||||
ArrayList reqfields = curelem.GetRequiredFields();
|
ArrayList reqfields = curelem.GetRequiredFields();
|
||||||
CreateCtlXmlEdit2(curelem, myschema, reqfields, fieldsWithApplic); // C2021-026 pass in P/C enabled fields
|
CreateCtlXmlEdit2(curelem,myschema, reqfields, fieldsWithApplic); // C2021-026 pass in P/C enabled fields
|
||||||
this.panel2.Controls.Add(ctlXMLEdit2);
|
this.panel2.Controls.Add(ctlXMLEdit2);
|
||||||
rbtnSave.Enabled = false; // set initial states of buttons on edit RO Editor add symbols C2025 - 003
|
rbtnSave.Enabled=false; // set initial states of buttons on edit RO Editor add symbols C2025 - 003
|
||||||
rbtnRestore.Enabled = false;
|
rbtnRestore.Enabled=false;
|
||||||
rbtnCancel.Enabled = true;
|
rbtnCancel.Enabled=true;
|
||||||
rbtnSaveAs.Enabled = false;
|
rbtnSaveAs.Enabled=false;
|
||||||
rbtnDuplicate.Enabled = true;
|
rbtnDuplicate.Enabled=true;
|
||||||
rbtnZoom.Enabled = false;
|
rbtnZoom.Enabled = false;
|
||||||
rbtnSymbols.Enabled = true;
|
rbtnSymbols.Enabled = true;
|
||||||
ctlXMLEdit2.Focus();
|
ctlXMLEdit2.Focus();
|
||||||
}
|
}
|
||||||
protected void roTreeView_OnDoubleClick(object sender, System.EventArgs e)
|
protected void roTreeView_OnDoubleClick(object sender,System.EventArgs e)
|
||||||
{
|
{
|
||||||
VlnXmlElement curelem = (VlnXmlElement)roTreeView.SelectedNode.Tag;
|
VlnXmlElement curelem = (VlnXmlElement) roTreeView.SelectedNode.Tag;
|
||||||
EditRO(curelem);
|
EditRO(curelem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1165,7 +1163,7 @@ namespace ROEditor
|
|||||||
|
|
||||||
object dataobj = System.Windows.Forms.Clipboard.GetDataObject();
|
object dataobj = System.Windows.Forms.Clipboard.GetDataObject();
|
||||||
if (dataobj != null)
|
if (dataobj != null)
|
||||||
this.menuEditPaste.Enabled = true;
|
this.menuEditPaste.Enabled=true;
|
||||||
}
|
}
|
||||||
else if (sender is RadioButton)
|
else if (sender is RadioButton)
|
||||||
{
|
{
|
||||||
@@ -1224,36 +1222,36 @@ namespace ROEditor
|
|||||||
string kidsloaded;
|
string kidsloaded;
|
||||||
haskids = elem.GetAttribute("HasChild");
|
haskids = elem.GetAttribute("HasChild");
|
||||||
kidsloaded = elem.GetAttribute("ChildLoaded");
|
kidsloaded = elem.GetAttribute("ChildLoaded");
|
||||||
if (haskids == "True" && kidsloaded == "False")
|
if (haskids == "True" && kidsloaded == "False" )
|
||||||
{
|
{
|
||||||
// if there's a dummy tree node (used to have tree control expansion for
|
// if there's a dummy tree node (used to have tree control expansion for
|
||||||
// items not yet loaded, delete child in tree control)
|
// items not yet loaded, delete child in tree control)
|
||||||
XmlNode tmpnode = (XmlNode)elem;
|
XmlNode tmpnode = (XmlNode) elem;
|
||||||
XmlNode chldnode;
|
XmlNode chldnode;
|
||||||
VlnXmlElement echild;
|
VlnXmlElement echild;
|
||||||
if (enode.FirstNode.Text == "VLN_DUMMY_FOR_TREE") enode.FirstNode.Remove();
|
if (enode.FirstNode.Text == "VLN_DUMMY_FOR_TREE") enode.FirstNode.Remove();
|
||||||
Cursor.Current = Cursors.WaitCursor;
|
Cursor.Current = Cursors.WaitCursor;
|
||||||
myrodb.RODB_GetChildData(elem, true);
|
myrodb.RODB_GetChildData(elem,true);
|
||||||
chldnode = tmpnode.FirstChild;
|
chldnode = tmpnode.FirstChild;
|
||||||
while (chldnode != null)
|
while (chldnode != null)
|
||||||
{
|
{
|
||||||
if (chldnode is VlnXmlElement)
|
if (chldnode is VlnXmlElement)
|
||||||
{
|
{
|
||||||
echild = (VlnXmlElement)chldnode;
|
echild = (VlnXmlElement) chldnode;
|
||||||
TreeNode chldnd;
|
TreeNode chldnd;
|
||||||
if (echild.Name == "vlnGroup")
|
if (echild.Name == "vlnGroup")
|
||||||
{
|
{
|
||||||
chldnd = new TreeNode(echild.GetAttribute("MenuTitle"), ROGROUPIMAGE, ROGROUPIMAGE);
|
chldnd = new TreeNode(echild.GetAttribute("MenuTitle"),ROGROUPIMAGE,ROGROUPIMAGE);
|
||||||
chldnd.Tag = echild;
|
chldnd.Tag = echild;
|
||||||
enode.Nodes.Add(chldnd);
|
enode.Nodes.Add(chldnd);
|
||||||
// add a 'dummy' node to tree if there are any children
|
// add a 'dummy' node to tree if there are any children
|
||||||
string haskids1 = "False";
|
string haskids1="False";
|
||||||
string kidsloaded1 = "False";
|
string kidsloaded1="False";
|
||||||
if (echild.HasAttribute("HasChild") == true)
|
if (echild.HasAttribute("HasChild")==true)
|
||||||
haskids1 = echild.GetAttribute("HasChild");
|
haskids1 = echild.GetAttribute("HasChild");
|
||||||
if (echild.HasAttribute("ChildLoaded") == true)
|
if (echild.HasAttribute("ChildLoaded")==true)
|
||||||
kidsloaded1 = echild.GetAttribute("ChildLoaded");
|
kidsloaded1 = echild.GetAttribute("ChildLoaded");
|
||||||
if (haskids1 == "True" && kidsloaded1 == "False")
|
if (haskids1 == "True" && kidsloaded1=="False")
|
||||||
{
|
{
|
||||||
TreeNode subch = new TreeNode("VLN_DUMMY_FOR_TREE");
|
TreeNode subch = new TreeNode("VLN_DUMMY_FOR_TREE");
|
||||||
chldnd.Nodes.Add(subch);
|
chldnd.Nodes.Add(subch);
|
||||||
@@ -1266,9 +1264,9 @@ namespace ROEditor
|
|||||||
// include these in the tree.
|
// include these in the tree.
|
||||||
int levelcnt = chldnode.ChildNodes.Count;
|
int levelcnt = chldnode.ChildNodes.Count;
|
||||||
string TheMenuTitle = echild.GetAttribute("MenuTitle");
|
string TheMenuTitle = echild.GetAttribute("MenuTitle");
|
||||||
if (levelcnt >= 1 && !TheMenuTitle.Equals(""))
|
if (levelcnt>=1 && !TheMenuTitle.Equals(""))
|
||||||
{
|
{
|
||||||
chldnd = new TreeNode(TheMenuTitle, ROIMAGE, ROIMAGE);
|
chldnd = new TreeNode(TheMenuTitle,ROIMAGE,ROIMAGE);
|
||||||
chldnd.Tag = echild;
|
chldnd.Tag = echild;
|
||||||
chldnd.Name = echild.GetAttribute("RecID");
|
chldnd.Name = echild.GetAttribute("RecID");
|
||||||
enode.Nodes.Add(chldnd);
|
enode.Nodes.Add(chldnd);
|
||||||
@@ -1290,16 +1288,16 @@ namespace ROEditor
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clean up any resources being used.
|
/// Clean up any resources being used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose( bool disposing )
|
||||||
{
|
{
|
||||||
if (disposing)
|
if ( disposing )
|
||||||
{
|
{
|
||||||
if (components != null)
|
if (components != null)
|
||||||
{
|
{
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose( disposing );
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
@@ -1811,11 +1809,6 @@ namespace ROEditor
|
|||||||
this.lblDuplicateRO.Text = "Working With Duplicate RO";
|
this.lblDuplicateRO.Text = "Working With Duplicate RO";
|
||||||
this.lblDuplicateRO.Visible = false;
|
this.lblDuplicateRO.Visible = false;
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
@@ -2052,8 +2045,8 @@ namespace ROEditor
|
|||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
bool StartupROEditor = true;
|
bool StartupROEditor = true;
|
||||||
FileStream fsown = null;
|
FileStream fsown=null;
|
||||||
FileInfo fiown = null;
|
FileInfo fiown=null;
|
||||||
String specificro = null;
|
String specificro = null;
|
||||||
string ConnectionPath = "";
|
string ConnectionPath = "";
|
||||||
// Let's open the database & set up for the tree structure...
|
// Let's open the database & set up for the tree structure...
|
||||||
@@ -2109,7 +2102,7 @@ namespace ROEditor
|
|||||||
if (ConnectionPath == null)
|
if (ConnectionPath == null)
|
||||||
{
|
{
|
||||||
// no RO directory
|
// no RO directory
|
||||||
MessageBox.Show("Could not locate a Referenced Objects (RO) directory.\n\nIt should be inside your VExxx directory or at the same level as your VExxx directory.", "RO Editor");
|
MessageBox.Show("Could not locate a Referenced Objects (RO) directory.\n\nIt should be inside your VExxx directory or at the same level as your VExxx directory.","RO Editor");
|
||||||
StartupROEditor = false;
|
StartupROEditor = false;
|
||||||
}
|
}
|
||||||
else if (ConnectionPath.Equals(""))
|
else if (ConnectionPath.Equals(""))
|
||||||
@@ -2138,14 +2131,13 @@ namespace ROEditor
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
fiown = new FileInfo("RoEditor.own");
|
fiown = new FileInfo("RoEditor.own");
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
// Try to delete the owner file. If another process has the file open, this delete will fail.
|
// Try to delete the owner file. If another process has the file open, this delete will fail.
|
||||||
// If the file is closed, it will be deleted, and the user will be placed in the editor. The users
|
// If the file is closed, it will be deleted, and the user will be placed in the editor. The users
|
||||||
// name and the time when this session began will be placed in the owner file.
|
// name and the time when this session began will be placed in the owner file.
|
||||||
fiown.Delete();
|
fiown.Delete();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
fsown = fiown.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
fsown = fiown.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
||||||
TextReader tr1 = new StreamReader(fsown);
|
TextReader tr1 = new StreamReader(fsown);
|
||||||
@@ -2164,12 +2156,12 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MessageBox.Show(e.Message, "fileinfo");
|
MessageBox.Show(e.Message,"fileinfo");
|
||||||
}
|
}
|
||||||
// Open the file just specified. Open it so that no-one else can use it
|
// Open the file just specified. Open it so that no-one else can use it
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
fsown = fiown.Open(FileMode.Create, FileAccess.ReadWrite, FileShare.Read);
|
fsown = fiown.Open( FileMode.Create, FileAccess.ReadWrite, FileShare.Read );
|
||||||
TextWriter tw = new StreamWriter(fsown);
|
TextWriter tw = new StreamWriter(fsown);
|
||||||
tw.WriteLine("Current User: {0}, Date and Time Started: {1}", Environment.UserName.ToUpper(), DateTime.Now.ToString("MM/dd/yyyy @ hh:mm"));
|
tw.WriteLine("Current User: {0}, Date and Time Started: {1}", Environment.UserName.ToUpper(), DateTime.Now.ToString("MM/dd/yyyy @ hh:mm"));
|
||||||
tw.Flush();
|
tw.Flush();
|
||||||
@@ -2183,17 +2175,6 @@ namespace ROEditor
|
|||||||
if (who.Contains(Environment.UserName.ToUpper()))
|
if (who.Contains(Environment.UserName.ToUpper()))
|
||||||
{
|
{
|
||||||
BringWindowToFront();
|
BringWindowToFront();
|
||||||
|
|
||||||
//Process[] p = Process.GetProcessesByName("ROEditor");
|
|
||||||
//Process cp = Process.GetCurrentProcess();
|
|
||||||
//for (int i = 0; i < p.Length; i++)
|
|
||||||
//{
|
|
||||||
// if (p[i].SessionId != cp.SessionId)
|
|
||||||
// {
|
|
||||||
// SetForegroundWindow(p[i].MainWindowHandle);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
MessageBox.Show(who, "Another user is executing the RoEditor");
|
MessageBox.Show(who, "Another user is executing the RoEditor");
|
||||||
@@ -2204,13 +2185,13 @@ namespace ROEditor
|
|||||||
if (!File.Exists("ROMaster.mdb") && !UsingSQLServer(Directory.GetCurrentDirectory()))
|
if (!File.Exists("ROMaster.mdb") && !UsingSQLServer(Directory.GetCurrentDirectory()))
|
||||||
{
|
{
|
||||||
DialogResult AnswerYN;
|
DialogResult AnswerYN;
|
||||||
string msgstr = "The RO directory (" + Directory.GetCurrentDirectory() + ") is empty.\n\n Create an empty RO database?";
|
string msgstr = "The RO directory (" + Directory.GetCurrentDirectory() +") is empty.\n\n Create an empty RO database?";
|
||||||
AnswerYN = MessageBox.Show(msgstr, "RO Editor", MessageBoxButtons.YesNo);
|
AnswerYN = MessageBox.Show(msgstr,"RO Editor",MessageBoxButtons.YesNo);
|
||||||
if (AnswerYN == DialogResult.Yes)
|
if (AnswerYN == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
string SourceRODatabase = Application.StartupPath + "\\ROMaster.mdb";
|
string SourceRODatabase = Application.StartupPath + "\\ROMaster.mdb";
|
||||||
string DestRODatabase = Directory.GetCurrentDirectory() + "\\ROMaster.mdb";
|
string DestRODatabase = Directory.GetCurrentDirectory() + "\\ROMaster.mdb";
|
||||||
File.Copy(SourceRODatabase, DestRODatabase);
|
File.Copy(SourceRODatabase,DestRODatabase);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
StartupROEditor = false;
|
StartupROEditor = false;
|
||||||
@@ -2219,7 +2200,7 @@ namespace ROEditor
|
|||||||
|
|
||||||
if (StartupROEditor)
|
if (StartupROEditor)
|
||||||
{
|
{
|
||||||
Application.Run(new Form1(ConnectionPath, specificro));
|
Application.Run(new Form1(ConnectionPath,specificro));
|
||||||
|
|
||||||
if (fsown != null)
|
if (fsown != null)
|
||||||
{
|
{
|
||||||
@@ -2324,12 +2305,11 @@ namespace ROEditor
|
|||||||
|
|
||||||
testParadoxFile += "ROMASTER.DB"; // Paradox file
|
testParadoxFile += "ROMASTER.DB"; // Paradox file
|
||||||
testAccessFile += "ROMaster.mdb"; // Access file
|
testAccessFile += "ROMaster.mdb"; // Access file
|
||||||
// if (File.Exists(testParadoxFile))
|
|
||||||
if (File.Exists(testParadoxFile) && !(File.Exists(testAccessFile) || UsingSQLServer(ROdir)))
|
if (File.Exists(testParadoxFile) && !(File.Exists(testAccessFile) || UsingSQLServer(ROdir)))
|
||||||
{
|
{
|
||||||
// Display a message to the user that the data needs converted
|
// Display a message to the user that the data needs converted
|
||||||
DialogResult AnswerYN;
|
DialogResult AnswerYN;
|
||||||
AnswerYN = MessageBox.Show("The RO data needs to be converted for the New RO Editor.\n\n Proceed with the data conversion?", "RO Editor", MessageBoxButtons.YesNo);
|
AnswerYN = MessageBox.Show("The RO data needs to be converted for the New RO Editor.\n\n Proceed with the data conversion?","RO Editor",MessageBoxButtons.YesNo);
|
||||||
if (AnswerYN == DialogResult.Yes)
|
if (AnswerYN == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
// Convert old RO Data
|
// Convert old RO Data
|
||||||
@@ -2344,7 +2324,7 @@ namespace ROEditor
|
|||||||
// create a process & wait until it exits.
|
// create a process & wait until it exits.
|
||||||
Process myProcess = new Process();
|
Process myProcess = new Process();
|
||||||
myProcess.StartInfo.FileName = ConversionExePath;
|
myProcess.StartInfo.FileName = ConversionExePath;
|
||||||
myProcess.StartInfo.Arguments = argstr;
|
myProcess.StartInfo.Arguments=argstr;
|
||||||
|
|
||||||
myProcess.Start();
|
myProcess.Start();
|
||||||
myProcess.WaitForExit();
|
myProcess.WaitForExit();
|
||||||
@@ -2381,7 +2361,7 @@ namespace ROEditor
|
|||||||
int cnt = nd.Nodes.Count;
|
int cnt = nd.Nodes.Count;
|
||||||
bool add_dummykid = false;
|
bool add_dummykid = false;
|
||||||
if (cnt > 0) add_dummykid = true;
|
if (cnt > 0) add_dummykid = true;
|
||||||
for (int i = 0; i < cnt; i++)
|
for (int i=0; i<cnt; i++)
|
||||||
nd.Nodes[0].Remove();
|
nd.Nodes[0].Remove();
|
||||||
// if haskids & kids loaded, delete them and add a VLN_DUMMY_FOR_TREE in the
|
// if haskids & kids loaded, delete them and add a VLN_DUMMY_FOR_TREE in the
|
||||||
// tree control if there isn't one. This will sink up tree with xml tree in
|
// tree control if there isn't one. This will sink up tree with xml tree in
|
||||||
@@ -2390,7 +2370,7 @@ namespace ROEditor
|
|||||||
string haskids, kidsloaded;
|
string haskids, kidsloaded;
|
||||||
haskids = curelem.GetAttribute("HasChild");
|
haskids = curelem.GetAttribute("HasChild");
|
||||||
kidsloaded = curelem.GetAttribute("ChildLoaded");
|
kidsloaded = curelem.GetAttribute("ChildLoaded");
|
||||||
if (haskids == "True" && kidsloaded == "True")
|
if (haskids == "True" && kidsloaded == "True" )
|
||||||
{
|
{
|
||||||
VlnXmlElement kid, delkid;
|
VlnXmlElement kid, delkid;
|
||||||
XmlNode ndkid;
|
XmlNode ndkid;
|
||||||
@@ -2400,7 +2380,7 @@ namespace ROEditor
|
|||||||
delkid = null;
|
delkid = null;
|
||||||
if (ndkid is VlnXmlElement)
|
if (ndkid is VlnXmlElement)
|
||||||
{
|
{
|
||||||
kid = (VlnXmlElement)ndkid;
|
kid = (VlnXmlElement) ndkid;
|
||||||
if (kid.HasAttribute("RecID")) delkid = kid;
|
if (kid.HasAttribute("RecID")) delkid = kid;
|
||||||
}
|
}
|
||||||
ndkid = ndkid.NextSibling;
|
ndkid = ndkid.NextSibling;
|
||||||
@@ -2419,13 +2399,13 @@ namespace ROEditor
|
|||||||
private void menuROProperties_Click(object sender, System.EventArgs e)
|
private void menuROProperties_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
roListView_ClearListDisplay();
|
roListView_ClearListDisplay();
|
||||||
bool didcleanup = false; // flags whether we needed to remove elements from trees
|
bool didcleanup=false; // flags whether we needed to remove elements from trees
|
||||||
// to match xml data to tree.
|
// to match xml data to tree.
|
||||||
VlnXmlElement curelem = (VlnXmlElement)roTreeView.SelectedNode.Tag;
|
VlnXmlElement curelem = (VlnXmlElement)roTreeView.SelectedNode.Tag;
|
||||||
LoadKids(roTreeView.SelectedNode);
|
LoadKids(roTreeView.SelectedNode);
|
||||||
if (curelem.Name == "vlnGroup")
|
if (curelem.Name == "vlnGroup")
|
||||||
{
|
{
|
||||||
GroupDefFrm grdef = new GroupDefFrm(curelem, myrodb, roTreeView.SelectedNode.Text, -1);
|
GroupDefFrm grdef = new GroupDefFrm(curelem,myrodb,roTreeView.SelectedNode.Text,-1);
|
||||||
grdef.ShowDialog();
|
grdef.ShowDialog();
|
||||||
|
|
||||||
// if the group text was modified, update the tree. If it was a subgroup,
|
// if the group text was modified, update the tree. If it was a subgroup,
|
||||||
@@ -2457,7 +2437,7 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
topele = (VlnXmlElement)topele.NextSibling;
|
topele = (VlnXmlElement) topele.NextSibling;
|
||||||
}
|
}
|
||||||
// if a fieldname changed, we may even have to check the 'top' group nodes
|
// if a fieldname changed, we may even have to check the 'top' group nodes
|
||||||
|
|
||||||
@@ -2472,7 +2452,7 @@ namespace ROEditor
|
|||||||
*/
|
*/
|
||||||
private void menuNewGroup_Click(object sender, System.EventArgs e)
|
private void menuNewGroup_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
VlnXmlElement curelem = (VlnXmlElement)roTreeView.SelectedNode.Tag;
|
VlnXmlElement curelem = (VlnXmlElement) roTreeView.SelectedNode.Tag;
|
||||||
// if this is being added from the top, do a new table and main group.
|
// if this is being added from the top, do a new table and main group.
|
||||||
// otherwise, handle like a new ro.
|
// otherwise, handle like a new ro.
|
||||||
if (curelem.Name == "RO_Root")
|
if (curelem.Name == "RO_Root")
|
||||||
@@ -2487,7 +2467,7 @@ namespace ROEditor
|
|||||||
if (topele.HasAttribute("TreeNotData"))
|
if (topele.HasAttribute("TreeNotData"))
|
||||||
{
|
{
|
||||||
topele.RemoveAttribute("TreeNotData");
|
topele.RemoveAttribute("TreeNotData");
|
||||||
TreeNode topnd = new TreeNode(topele.GetAttribute("MenuTitle"), ROGROUPIMAGE, ROGROUPIMAGE);
|
TreeNode topnd = new TreeNode(topele.GetAttribute("MenuTitle"),ROGROUPIMAGE,ROGROUPIMAGE);
|
||||||
topnd.Tag = topele;
|
topnd.Tag = topele;
|
||||||
roTreeView.SelectedNode.Nodes.Add(topnd);
|
roTreeView.SelectedNode.Nodes.Add(topnd);
|
||||||
roTreeView.Refresh();
|
roTreeView.Refresh();
|
||||||
@@ -2504,7 +2484,7 @@ namespace ROEditor
|
|||||||
MessageBox.Show("Subgroup Definition does not exist, check Subgroup Definition under Properties for the Group that contains this Subgroup.");
|
MessageBox.Show("Subgroup Definition does not exist, check Subgroup Definition under Properties for the Group that contains this Subgroup.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
VlnXmlElement nelem = (VlnXmlElement)curelem.OwnerDocument.CreateElement("vlnGroup");
|
VlnXmlElement nelem = (VlnXmlElement) curelem.OwnerDocument.CreateElement("vlnGroup");
|
||||||
if (curelem.Name != "vlnGroup") // selected new group off ro, add to parent
|
if (curelem.Name != "vlnGroup") // selected new group off ro, add to parent
|
||||||
{
|
{
|
||||||
curelem.ParentNode.AppendChild((XmlNode)nelem);
|
curelem.ParentNode.AppendChild((XmlNode)nelem);
|
||||||
@@ -2513,7 +2493,7 @@ namespace ROEditor
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
curelem.AppendChild(nelem);
|
curelem.AppendChild(nelem);
|
||||||
TreeNewparent = roTreeView.SelectedNode;
|
TreeNewparent=roTreeView.SelectedNode;
|
||||||
}
|
}
|
||||||
newone = nelem;
|
newone = nelem;
|
||||||
|
|
||||||
@@ -2521,7 +2501,7 @@ namespace ROEditor
|
|||||||
int retval = roTreeView_ClearEditDisplay(false);
|
int retval = roTreeView_ClearEditDisplay(false);
|
||||||
if (retval == -1) return;
|
if (retval == -1) return;
|
||||||
roListView_ClearListDisplay();
|
roListView_ClearListDisplay();
|
||||||
CreateCtlXmlEdit2(nelem, myschema, reqfields, null);
|
CreateCtlXmlEdit2(nelem,myschema,reqfields, null);
|
||||||
|
|
||||||
ctlXMLEdit2.Focus();
|
ctlXMLEdit2.Focus();
|
||||||
rbtnSave.Enabled = false; // initial disable the save button
|
rbtnSave.Enabled = false; // initial disable the save button
|
||||||
@@ -2537,7 +2517,7 @@ namespace ROEditor
|
|||||||
private void menuNewRefObj_Click(object sender, System.EventArgs e)
|
private void menuNewRefObj_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
int retval = roTreeView_ClearEditDisplay(false);
|
int retval = roTreeView_ClearEditDisplay(false);
|
||||||
ArrayList InUseApplcList = null;
|
ArrayList InUseApplcList=null;
|
||||||
if (retval == -1) return;
|
if (retval == -1) return;
|
||||||
roListView_ClearListDisplay();
|
roListView_ClearListDisplay();
|
||||||
VlnXmlElement curelem = (VlnXmlElement)roTreeView.SelectedNode.Tag;
|
VlnXmlElement curelem = (VlnXmlElement)roTreeView.SelectedNode.Tag;
|
||||||
@@ -2546,24 +2526,24 @@ namespace ROEditor
|
|||||||
// make a dummy parent which is the 'group' level so that it can be
|
// make a dummy parent which is the 'group' level so that it can be
|
||||||
// associated with a schema.
|
// associated with a schema.
|
||||||
XmlNode parent = curelem.ParentNode;
|
XmlNode parent = curelem.ParentNode;
|
||||||
VlnXmlElement nmele = curelem;
|
VlnXmlElement nmele=curelem;
|
||||||
while (parent.Name != "RO_Root")
|
while (parent.Name != "RO_Root")
|
||||||
{
|
{
|
||||||
nmele = (VlnXmlElement)parent;
|
nmele = (VlnXmlElement) parent;
|
||||||
parent = (VlnXmlElement)parent.ParentNode;
|
parent = (VlnXmlElement) parent.ParentNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the name for the new element...
|
// get the name for the new element...
|
||||||
int indx = nmele.InnerXml.IndexOf("<");
|
int indx = nmele.InnerXml.IndexOf("<");
|
||||||
string nm = null;
|
string nm = null;
|
||||||
if (indx < 0) // not found, just use innerxml
|
if (indx<0) // not found, just use innerxml
|
||||||
nm = nmele.InnerText;
|
nm = nmele.InnerText;
|
||||||
else
|
else
|
||||||
nm = nmele.InnerXml.Substring(0, indx);
|
nm = nmele.InnerXml.Substring(0,indx);
|
||||||
VlnXmlElement nelem = (VlnXmlElement)curelem.OwnerDocument.CreateElement(CvtUserFldToFld(nm));
|
VlnXmlElement nelem = (VlnXmlElement) curelem.OwnerDocument.CreateElement(CvtUserFldToFld(nm));
|
||||||
if (curelem.Name != "vlnGroup") // selected new ro off ro, add to parent
|
if (curelem.Name != "vlnGroup") // selected new ro off ro, add to parent
|
||||||
{
|
{
|
||||||
curelem.ParentNode.AppendChild((XmlNode)nelem);
|
curelem.ParentNode.AppendChild((XmlNode) nelem);
|
||||||
TreeNewparent = roTreeView.SelectedNode.Parent;
|
TreeNewparent = roTreeView.SelectedNode.Parent;
|
||||||
InUseApplcList = GetApplcFieldListForElement(curelem); //C2021-026 get list of fields with P/C enabled
|
InUseApplcList = GetApplcFieldListForElement(curelem); //C2021-026 get list of fields with P/C enabled
|
||||||
}
|
}
|
||||||
@@ -2575,7 +2555,7 @@ namespace ROEditor
|
|||||||
newone = nelem;
|
newone = nelem;
|
||||||
ArrayList reqfields = nelem.GetRequiredFields();
|
ArrayList reqfields = nelem.GetRequiredFields();
|
||||||
|
|
||||||
CreateCtlXmlEdit2(nelem, myschema, reqfields, InUseApplcList);
|
CreateCtlXmlEdit2(nelem,myschema,reqfields, InUseApplcList);
|
||||||
ctlXMLEdit2.Focus();
|
ctlXMLEdit2.Focus();
|
||||||
|
|
||||||
rbtnSave.Enabled = false; // initial disable the save button
|
rbtnSave.Enabled = false; // initial disable the save button
|
||||||
@@ -2672,16 +2652,16 @@ namespace ROEditor
|
|||||||
{
|
{
|
||||||
topele.RemoveAttribute("TreeNotData");
|
topele.RemoveAttribute("TreeNotData");
|
||||||
int cnt = rootNode.GetNodeCount(false);
|
int cnt = rootNode.GetNodeCount(false);
|
||||||
for (int i = 0; i < cnt; i++)
|
for(int i=0;i<cnt;i++)
|
||||||
{
|
{
|
||||||
TreeNode nd = rootNode.Nodes[i];
|
TreeNode nd = rootNode.Nodes[i];
|
||||||
if (nd.Tag == topele)
|
if (nd.Tag == topele)
|
||||||
{
|
{
|
||||||
CleanUpTree(topele, nd);
|
CleanUpTree(topele,nd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
topele = (VlnXmlElement)topele.NextSibling;
|
topele = (VlnXmlElement) topele.NextSibling;
|
||||||
}
|
}
|
||||||
// if a fieldname changed, we may even have to check the 'top' group nodes
|
// if a fieldname changed, we may even have to check the 'top' group nodes
|
||||||
|
|
||||||
@@ -2705,7 +2685,7 @@ namespace ROEditor
|
|||||||
*/
|
*/
|
||||||
private void menuROEdit_Click(object sender, System.EventArgs e)
|
private void menuROEdit_Click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
roTreeView_OnDoubleClick(sender, e);
|
roTreeView_OnDoubleClick (sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2812,22 +2792,22 @@ namespace ROEditor
|
|||||||
// check for duplicates on accessory page id, if it changed.
|
// check for duplicates on accessory page id, if it changed.
|
||||||
string acctmpl = myro.GetAccPageIDTemplate();
|
string acctmpl = myro.GetAccPageIDTemplate();
|
||||||
string newacc = myro.GetAccPageIDString(acctmpl);
|
string newacc = myro.GetAccPageIDString(acctmpl);
|
||||||
if (newacc == null) return false;
|
if (newacc==null)return false;
|
||||||
if (newone != null) // if this is new, set the table for accpageid check
|
if (newone != null) // if this is new, set the table for accpageid check
|
||||||
{
|
{
|
||||||
XmlNode nd = (XmlNode)myro.ParentNode;
|
XmlNode nd = (XmlNode) myro.ParentNode;
|
||||||
VlnXmlElement end = (VlnXmlElement)nd;
|
VlnXmlElement end = (VlnXmlElement) nd;
|
||||||
string tb = end.GetAttribute("Table");
|
string tb = end.GetAttribute("Table");
|
||||||
myro.SetAttribute("Table", tb);
|
myro.SetAttribute("Table",tb);
|
||||||
}
|
}
|
||||||
string t1 = newacc.Trim();
|
string t1 = newacc.Trim();
|
||||||
string t2 = myro.GetAttribute("AccPageID");
|
string t2 = myro.GetAttribute("AccPageID");
|
||||||
string t3 = t2.Trim();
|
string t3 = t2.Trim();
|
||||||
if (t1 != t3)
|
if (t1 != t3)
|
||||||
{
|
{
|
||||||
if (myrodb.IsDuplicateAccPageID(myro, newacc) == true)
|
if (myrodb.IsDuplicateAccPageID(myro,newacc)== true)
|
||||||
{
|
{
|
||||||
MessageBox.Show("The fields used for the \"Accessory Pages Access\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.", "Problem saving data");
|
MessageBox.Show("The fields used for the \"Accessory Pages Access\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.","Problem saving data");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
myro.SetAttribute("AccPageID", myro.GetAccPageIDString(acctmpl));
|
myro.SetAttribute("AccPageID", myro.GetAccPageIDString(acctmpl));
|
||||||
@@ -2854,8 +2834,8 @@ namespace ROEditor
|
|||||||
success = myrodb.RODB_InsertRO(myro);
|
success = myrodb.RODB_InsertRO(myro);
|
||||||
if (success == true)
|
if (success == true)
|
||||||
{
|
{
|
||||||
int img = (myro.Name == "vlnGroup") ? ROGROUPIMAGE : ROIMAGE;
|
int img = (myro.Name=="vlnGroup")?ROGROUPIMAGE:ROIMAGE;
|
||||||
newt = new TreeNode(mnutitle, img, img);
|
newt = new TreeNode(mnutitle,img,img);
|
||||||
newt.Tag = myro;
|
newt.Tag = myro;
|
||||||
newt.Name = myro.GetAttribute("RecID");
|
newt.Name = myro.GetAttribute("RecID");
|
||||||
newt.Text = Regex.Replace(newt.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
newt.Text = Regex.Replace(newt.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
||||||
@@ -2864,9 +2844,9 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newt = null;
|
newt=null;
|
||||||
success = myrodb.RODB_WriteRO((VlnXmlElement)roTreeView.SelectedNode.Tag);
|
success = myrodb.RODB_WriteRO((VlnXmlElement)roTreeView.SelectedNode.Tag);
|
||||||
if (success == true && mnutitle != "") roTreeView.SelectedNode.Text = mnutitle; //B2021-077 make sure mnutitle has text or it will clear the node's title in the tree
|
if (success==true && mnutitle != "") roTreeView.SelectedNode.Text = mnutitle; //B2021-077 make sure mnutitle has text or it will clear the node's title in the tree
|
||||||
}
|
}
|
||||||
newone = null;
|
newone = null;
|
||||||
return true;
|
return true;
|
||||||
@@ -2908,8 +2888,8 @@ namespace ROEditor
|
|||||||
{
|
{
|
||||||
bool dup;
|
bool dup;
|
||||||
bool success;
|
bool success;
|
||||||
VlnXmlElement newro = (VlnXmlElement)roTreeView.SelectedNode.Tag;
|
VlnXmlElement newro = (VlnXmlElement) roTreeView.SelectedNode.Tag;
|
||||||
VlnXmlElement origro = (VlnXmlElement)newro.Clone();
|
VlnXmlElement origro = (VlnXmlElement) newro.Clone();
|
||||||
string savedInnerXML = newro.InnerXml;
|
string savedInnerXML = newro.InnerXml;
|
||||||
XmlNode parent = newro.ParentNode;
|
XmlNode parent = newro.ParentNode;
|
||||||
success = ctlXMLEdit2.SaveData();
|
success = ctlXMLEdit2.SaveData();
|
||||||
@@ -2935,7 +2915,7 @@ namespace ROEditor
|
|||||||
// ros (which is what we have hear for saveas or duplicate)
|
// ros (which is what we have hear for saveas or duplicate)
|
||||||
newro.RemoveAttribute("RecID");
|
newro.RemoveAttribute("RecID");
|
||||||
dup = myrodb.IsDuplicateAccPageID(newro, newacc);
|
dup = myrodb.IsDuplicateAccPageID(newro, newacc);
|
||||||
newro.SetAttribute("RecID", savrec);
|
newro.SetAttribute("RecID",savrec);
|
||||||
if (dup == true)
|
if (dup == true)
|
||||||
{
|
{
|
||||||
MessageBox.Show("The fields used for the \"Accessory Pages Access\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.", "Problem saving data");
|
MessageBox.Show("The fields used for the \"Accessory Pages Access\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.", "Problem saving data");
|
||||||
@@ -2948,19 +2928,19 @@ namespace ROEditor
|
|||||||
else
|
else
|
||||||
mnutmp = newro.GetMenuValueTemplate("GroupMenuItem");
|
mnutmp = newro.GetMenuValueTemplate("GroupMenuItem");
|
||||||
string mnutitle = newro.GetMenuString(mnutmp, false);
|
string mnutitle = newro.GetMenuString(mnutmp, false);
|
||||||
parent.AppendChild((XmlNode)origro); // need this for duplicate check.
|
parent.AppendChild((XmlNode) origro); // need this for duplicate check.
|
||||||
dup = newro.IsDuplicateMenuTitle(mnutitle);
|
dup = newro.IsDuplicateMenuTitle(mnutitle);
|
||||||
if (dup == true)
|
if (dup==true)
|
||||||
{
|
{
|
||||||
MessageBox.Show("The fields used for the \"Menu\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.", "Problem saving data");
|
MessageBox.Show("The fields used for the \"Menu\" values must be unique. The fields used in these values can be found under \"Properties\" of an RO Group. Cannot save.","Problem saving data");
|
||||||
parent.RemoveChild(origro);
|
parent.RemoveChild(origro);
|
||||||
rbtnRestore.Enabled = false;
|
rbtnRestore.Enabled = false;
|
||||||
ctlXMLEdit2.SetNotSaved();
|
ctlXMLEdit2.SetNotSaved();
|
||||||
ctlXMLEdit2.RestoreInnerXml(savedInnerXML); //B2017-089 - restore the inner xml so orignial does not get new changes
|
ctlXMLEdit2.RestoreInnerXml(savedInnerXML); //B2017-089 - restore the inner xml so orignial does not get new changes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (acctmpl != null) newro.SetAttribute("AccPageID", newro.GetAccPageIDString(acctmpl));
|
if (acctmpl!=null)newro.SetAttribute("AccPageID", newro.GetAccPageIDString(acctmpl));
|
||||||
newro.SetAttribute("MenuTitle", mnutitle);
|
newro.SetAttribute("MenuTitle",mnutitle);
|
||||||
newro.RemoveAttribute("RecID"); // get a new one.
|
newro.RemoveAttribute("RecID"); // get a new one.
|
||||||
|
|
||||||
success = myrodb.RODB_InsertRO(newro);
|
success = myrodb.RODB_InsertRO(newro);
|
||||||
@@ -3039,7 +3019,7 @@ namespace ROEditor
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ele.Name != "vlnGroup" && attop == false)
|
if (ele.Name != "vlnGroup" && attop==false)
|
||||||
EditRO(ele);
|
EditRO(ele);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3047,7 +3027,7 @@ namespace ROEditor
|
|||||||
private void DisplayGroupElements(VlnXmlElement selele)
|
private void DisplayGroupElements(VlnXmlElement selele)
|
||||||
{
|
{
|
||||||
ROField rof;
|
ROField rof;
|
||||||
string nm, tmp = null;
|
string nm, tmp=null;
|
||||||
roListView.Clear();
|
roListView.Clear();
|
||||||
bool AllGroups = true;
|
bool AllGroups = true;
|
||||||
ArrayList InUseList = null;
|
ArrayList InUseList = null;
|
||||||
@@ -3061,9 +3041,9 @@ namespace ROEditor
|
|||||||
// Put out fields and their associated data.
|
// Put out fields and their associated data.
|
||||||
if (InUseList != null)
|
if (InUseList != null)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < InUseList.Count; i++)
|
for (int i=0;i< InUseList.Count; i++)
|
||||||
{
|
{
|
||||||
rof = (ROField)InUseList[i];
|
rof = (ROField) InUseList[i];
|
||||||
if (rof.GetFieldname != null)
|
if (rof.GetFieldname != null)
|
||||||
{
|
{
|
||||||
uint ftype = rof.GetFieldType;
|
uint ftype = rof.GetFieldType;
|
||||||
@@ -3081,7 +3061,7 @@ namespace ROEditor
|
|||||||
{
|
{
|
||||||
if (curnd is VlnXmlElement)
|
if (curnd is VlnXmlElement)
|
||||||
{
|
{
|
||||||
VlnXmlElement curele = (VlnXmlElement)curnd;
|
VlnXmlElement curele = (VlnXmlElement) curnd;
|
||||||
if (curele.Name == "vlnGroup")
|
if (curele.Name == "vlnGroup")
|
||||||
{
|
{
|
||||||
if (selele.Name == "RO_Root")
|
if (selele.Name == "RO_Root")
|
||||||
@@ -3096,14 +3076,14 @@ namespace ROEditor
|
|||||||
{
|
{
|
||||||
int levelcnt = curele.ChildNodes.Count;
|
int levelcnt = curele.ChildNodes.Count;
|
||||||
string TheMenuTitle = curele.GetAttribute("MenuTitle");
|
string TheMenuTitle = curele.GetAttribute("MenuTitle");
|
||||||
if ((levelcnt > 1) || (levelcnt == 1 && !TheMenuTitle.Equals("")))
|
if ((levelcnt > 1) || (levelcnt==1 && !TheMenuTitle.Equals("")))
|
||||||
{
|
{
|
||||||
AllGroups = false;
|
AllGroups = false;
|
||||||
ListViewItem item = null;
|
ListViewItem item=null;
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (int i = 0; i < InUseList.Count; i++)
|
for (int i = 0; i < InUseList.Count; i++)
|
||||||
{
|
{
|
||||||
rof = (ROField)InUseList[i];
|
rof = (ROField) InUseList[i];
|
||||||
if (rof.GetFieldname != null)
|
if (rof.GetFieldname != null)
|
||||||
{
|
{
|
||||||
uint ftype = rof.GetFieldType;
|
uint ftype = rof.GetFieldType;
|
||||||
@@ -3145,16 +3125,16 @@ namespace ROEditor
|
|||||||
if (AllGroups == true)
|
if (AllGroups == true)
|
||||||
{
|
{
|
||||||
roListView.Columns.Clear();
|
roListView.Columns.Clear();
|
||||||
roListView.Columns.Add("Group", 250, HorizontalAlignment.Left);
|
roListView.Columns.Add("Group",250,HorizontalAlignment.Left);
|
||||||
}
|
}
|
||||||
|
|
||||||
roListView.Visible = true;
|
roListView.Visible=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateRoListView(TreeNode node)
|
private void updateRoListView(TreeNode node)
|
||||||
{
|
{
|
||||||
VlnXmlElement selele;
|
VlnXmlElement selele;
|
||||||
selele = (VlnXmlElement)node.Tag;
|
selele = (VlnXmlElement) node.Tag;
|
||||||
if (selele.Name != "vlnGroup" && selele.Name != "RO_Root")
|
if (selele.Name != "vlnGroup" && selele.Name != "RO_Root")
|
||||||
{
|
{
|
||||||
// if we already have a list view, and we're still under the same parent,
|
// if we already have a list view, and we're still under the same parent,
|
||||||
@@ -3163,7 +3143,7 @@ namespace ROEditor
|
|||||||
if (roListView != null && roListView.Items.Count > 0)
|
if (roListView != null && roListView.Items.Count > 0)
|
||||||
{
|
{
|
||||||
curele = (VlnXmlElement)roListView.Items[0].Tag;
|
curele = (VlnXmlElement)roListView.Items[0].Tag;
|
||||||
if (selele.ParentNode != curele.ParentNode) roListView_ClearListDisplay();
|
if (selele.ParentNode != curele.ParentNode)roListView_ClearListDisplay();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -3196,7 +3176,7 @@ namespace ROEditor
|
|||||||
void roListView_Column_Header_OnClick(object sender, ColumnClickEventArgs e)
|
void roListView_Column_Header_OnClick(object sender, ColumnClickEventArgs e)
|
||||||
{
|
{
|
||||||
int indx = e.Column;
|
int indx = e.Column;
|
||||||
MyListViewComparer LVCompare = (MyListViewComparer)roListView.ListViewItemSorter;
|
MyListViewComparer LVCompare = (MyListViewComparer) roListView.ListViewItemSorter;
|
||||||
LVCompare.SetColumnToSortBy(indx);
|
LVCompare.SetColumnToSortBy(indx);
|
||||||
roListView.Sort();
|
roListView.Sort();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -884,3 +884,4 @@ namespace ROEditor
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2142,7 +2142,20 @@ namespace RODBInterface
|
|||||||
wraccid = accid;
|
wraccid = accid;
|
||||||
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
|
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
|
||||||
string xmlstr = GenerateXmlString(ro, false);
|
string xmlstr = GenerateXmlString(ro, false);
|
||||||
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
|
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||||
|
char[] chrAry = xmlstr.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp.ToString() + "'";
|
||||||
if (movedRO)
|
if (movedRO)
|
||||||
{
|
{
|
||||||
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
|
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
|
||||||
@@ -2186,6 +2199,20 @@ namespace RODBInterface
|
|||||||
}
|
}
|
||||||
string xmlstr = GenerateXmlString(ro, false);
|
string xmlstr = GenerateXmlString(ro, false);
|
||||||
|
|
||||||
|
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||||
|
char[] chrAry = xmlstr.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
xmlstrTmp.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
string wraccid = null;
|
string wraccid = null;
|
||||||
if (ro.HasAttribute("AccPageID"))
|
if (ro.HasAttribute("AccPageID"))
|
||||||
{
|
{
|
||||||
@@ -2209,13 +2236,13 @@ namespace RODBInterface
|
|||||||
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
|
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
|
||||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
|
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
|
||||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
||||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
|
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
|
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
|
||||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
|
||||||
strInsert = strInsert + "','" + dt + "','" + xmlstr + "');";
|
strInsert = strInsert + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2223,7 +2250,7 @@ namespace RODBInterface
|
|||||||
{
|
{
|
||||||
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
|
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
|
||||||
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
|
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
|
||||||
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
|
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
@@ -2631,7 +2658,21 @@ namespace RODBInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
|
StatMsgWindow.StatusMessage = echild.GetAttribute("MenuTitle");
|
||||||
|
StringBuilder tinfo2Tmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
|
||||||
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
|
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2 + "'";
|
||||||
|
char[] chrAry = tinfo2.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
tinfo2Tmp.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tinfo2Tmp.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
str = "UPDATE " + echild.GetAttribute("Table") + " SET Info = '" + tinfo2Tmp.ToString() + "'";
|
||||||
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
|
str = str + ", ModDateTime = '" + dt + "' WHERE RecID = '" + echild.GetAttribute("RecID") + "';";
|
||||||
DBE.Command(str);
|
DBE.Command(str);
|
||||||
DBE.Reader();
|
DBE.Reader();
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ using System.IO;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
using VlnStatus;
|
using VlnStatus;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
||||||
|
|
||||||
namespace RODBInterface
|
namespace RODBInterface
|
||||||
@@ -517,6 +518,7 @@ namespace RODBInterface
|
|||||||
strtmp.Append(" ");
|
strtmp.Append(" ");
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
|
text = Regex.Replace(text, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); //B2026-025 Unicode removed from RO menu titles in treeview.
|
||||||
if ((cnt + text.Length) > frmt2) // longer than the field length?
|
if ((cnt + text.Length) > frmt2) // longer than the field length?
|
||||||
strtmp.Append(text.Substring(0,frmt2-cnt));
|
strtmp.Append(text.Substring(0,frmt2-cnt));
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -149,3 +149,4 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -497,7 +497,7 @@ namespace ctlXMLEditLib
|
|||||||
foreach (string str in myHT.Keys)
|
foreach (string str in myHT.Keys)
|
||||||
{
|
{
|
||||||
o = myHT[str];
|
o = myHT[str];
|
||||||
hwnd = (roRichTextBox)o;
|
hwnd = (roRichTextBox) o;
|
||||||
nd = node.SelectSingleNode(str);
|
nd = node.SelectSingleNode(str);
|
||||||
// if not found with just the string, search the tree.
|
// if not found with just the string, search the tree.
|
||||||
if (nd==null)nd = node.SelectSingleNode("*/"+str);
|
if (nd==null)nd = node.SelectSingleNode("*/"+str);
|
||||||
@@ -966,7 +966,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
mytextbox.Multiline = true;
|
mytextbox.Multiline = true;
|
||||||
mytextbox.AcceptsTab = true;
|
mytextbox.AcceptsTab = true;
|
||||||
mytextbox.Height = (int)mytextbox.Font.GetHeight() * 4;
|
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
|
||||||
mytextbox.ScrollBars = RichTextBoxScrollBars.Vertical;
|
mytextbox.ScrollBars = RichTextBoxScrollBars.Vertical;
|
||||||
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace ctlXMLEditLib
|
|||||||
public void InsertSymbol( int symbcode)
|
public void InsertSymbol( int symbcode)
|
||||||
{
|
{
|
||||||
int position = this.SelectionStart;
|
int position = this.SelectionStart;
|
||||||
string sym = string.Format(symbcode < 256 ? "\'{0:X2}" : @"\u{0}", symbcode);
|
string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode);
|
||||||
this.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
|
this.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
|
||||||
Select(position, -1);
|
Select(position, -1);
|
||||||
Select(position + 1, 0);
|
Select(position + 1, 0);
|
||||||
@@ -97,3 +97,4 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
||||||
|
Copyright 2026 - Volian Enterprises, Inc. All rights reserved.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
-- =============================================
|
||||||
|
-- Author: Matthew Schill
|
||||||
|
-- Create date: 03/20/2026
|
||||||
|
-- Description: Script to consolidate Cover Pages for Barakah
|
||||||
|
-- by Converting multi-unit procedures with Cover Pages
|
||||||
|
-- to use 1 Library Document Cover Page
|
||||||
|
-- =============================================
|
||||||
|
|
||||||
|
select Contents.ContentID
|
||||||
|
, Contenttext = Contents.Text
|
||||||
|
, Items.ItemID
|
||||||
|
, tblDocuments.DocID
|
||||||
|
, ParentContentID
|
||||||
|
, ParentItemID
|
||||||
|
, LibTitle = ISNULL(LibTitle,'')
|
||||||
|
, numLibCP
|
||||||
|
, numCP
|
||||||
|
,BaseFlag = 0
|
||||||
|
INTO #tmpUpdate
|
||||||
|
from Contents
|
||||||
|
inner join Entries on Contents.ContentID = Entries.ContentID
|
||||||
|
inner join tblDocuments on tblDocuments.DocID = Entries.DocID
|
||||||
|
inner join Items on Items.ContentID = Contents.ContentID
|
||||||
|
outer apply
|
||||||
|
(select ParentContentID=ContentID, ParentItemID = PItm.ItemID
|
||||||
|
FROM dbo.vefn_ParentItems(Items.ItemID) PItm
|
||||||
|
where PItm.ItemID <> Items.ItemID
|
||||||
|
) parent
|
||||||
|
outer apply
|
||||||
|
(select numLibCP = Count(*)
|
||||||
|
FROM dbo.vefn_ChildItems(ParentItemID) PItm
|
||||||
|
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
|
||||||
|
INNER JOIN Entries on Contents.ContentID = Entries.ContentID
|
||||||
|
INNER JOIN tblDocuments on tblDocuments.DocID = Entries.DocID
|
||||||
|
where PItm.ItemID <> ParentItemID
|
||||||
|
AND Contents.text like 'Cover Page%' and ISNULL(tblDocuments.LibTitle,'') <> ''
|
||||||
|
) childWithLibTitle
|
||||||
|
outer apply
|
||||||
|
(select numCP = Count(*)
|
||||||
|
FROM dbo.vefn_ChildItems(ParentItemID) PItm
|
||||||
|
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
|
||||||
|
where PItm.ItemID <> ParentItemID
|
||||||
|
AND Contents.text like 'Cover Page%'
|
||||||
|
) child
|
||||||
|
where Contents.text like 'Cover Page%'
|
||||||
|
order by ParentContentID asc, CASE WHEN ISNULL(LibTitle,'') <> '' THEN 1 ELSE 2 END asc, Contents.Text asc
|
||||||
|
|
||||||
|
UPDATE #tmpUpdate SET BaseFlag = 1 where LibTitle <> '' and numLibCP = 1
|
||||||
|
|
||||||
|
UPDATE #tmpUpdate SET BaseFlag = CASE WHEN tU.LibTitle <> '' THEN 1 ELSE 2 END FROM #tmpUpdate tU
|
||||||
|
where BaseFlag = 0 AND tU.ContentID IN
|
||||||
|
(
|
||||||
|
Select ContentID FROM
|
||||||
|
(SELECT sub.ContentID,
|
||||||
|
row_number() OVER(PARTITION BY sub.ParentContentID ORDER BY CASE WHEN ISNULL(sub.LibTitle,'') <> '' THEN 1 ELSE 2 END asc, sub.Contenttext asc) as pos
|
||||||
|
FROM #tmpUpdate sub
|
||||||
|
) x
|
||||||
|
WHERE x.pos = 1
|
||||||
|
)
|
||||||
|
|
||||||
|
declare @Cont TABLE
|
||||||
|
(
|
||||||
|
ContentID int,
|
||||||
|
ItemID int,
|
||||||
|
xConfig xml
|
||||||
|
)
|
||||||
|
insert into @Cont
|
||||||
|
SELECT tU.ContentID, ItemID, xConfig = CAST(tblContents.config AS xml) FROM
|
||||||
|
tblContents
|
||||||
|
INNER JOIN
|
||||||
|
#tmpUpdate tU ON tU.ContentID = tblContents.ContentID
|
||||||
|
where tU.BaseFlag > 0
|
||||||
|
|
||||||
|
Update @Cont Set xConfig.modify('delete //MasterSlave') From @Cont;
|
||||||
|
|
||||||
|
Update tblContents SET Text = 'Cover Page', Config = CAST(xConfig AS varchar(max)),
|
||||||
|
DTS = GETDATE(), UserID = 'CPVolian2026'
|
||||||
|
FROM
|
||||||
|
@Cont CNT INNER JOIN
|
||||||
|
tblContents ON CNT.ContentID = tblContents.ContentID;
|
||||||
|
|
||||||
|
--Update items PreviousIds
|
||||||
|
UPDATE tblItems Set PreviousID = IdToSwapTO.ItemID
|
||||||
|
FROM
|
||||||
|
tblItems
|
||||||
|
INNER JOIN
|
||||||
|
#tmpUpdate tU ON tblItems.PreviousID = tU.ItemID AND tU.BaseFlag = 0
|
||||||
|
INNER JOIN #tmpUpdate IdToSwapTO ON IdToSwapTO.ParentContentID = tU.ParentContentID AND IdToSwapTO.BaseFlag IN (1,2)
|
||||||
|
|
||||||
|
UPDATE tblItems Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
|
||||||
|
FROM
|
||||||
|
#tmpUpdate tU INNER JOIN
|
||||||
|
tblItems ON tU.ContentID = tblItems.ContentID
|
||||||
|
WHERE tU.BaseFlag = 0;
|
||||||
|
|
||||||
|
UPDATE tblContents Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
|
||||||
|
FROM
|
||||||
|
#tmpUpdate tU INNER JOIN
|
||||||
|
tblContents ON tU.ContentID = tblContents.ContentID
|
||||||
|
WHERE tU.BaseFlag = 0;
|
||||||
|
|
||||||
|
DELETE FROM
|
||||||
|
tblEntries
|
||||||
|
FROM
|
||||||
|
tblEntries
|
||||||
|
INNER JOIN
|
||||||
|
#tmpUpdate tU ON tU.ContentID = tblEntries.ContentID
|
||||||
|
WHERE tU.BaseFlag in (0,2);
|
||||||
|
|
||||||
|
INSERT INTO [dbo].[tblEntries]
|
||||||
|
([ContentID]
|
||||||
|
,[DocID]
|
||||||
|
,[DTS]
|
||||||
|
,[UserID]
|
||||||
|
,[DeleteStatus])
|
||||||
|
SELECT
|
||||||
|
DISTINCT tU.ContentID,
|
||||||
|
766, -- docid 766 "Cover Page 1"
|
||||||
|
GETDATE(),
|
||||||
|
'CPVolian2026',
|
||||||
|
0
|
||||||
|
FROM
|
||||||
|
#tmpUpdate tU
|
||||||
|
INNER JOIN
|
||||||
|
@Cont CNT ON tU.ContentID = CNT.ContentID
|
||||||
|
WHERE tU.BaseFlag = 2;
|
||||||
|
|
||||||
|
drop table #tmpUpdate;
|
||||||
|
|
||||||
|
IF (@@Error = 0) SELECT '[Barakah Cover Page Consolidation] Succeeded'
|
||||||
|
ELSE SELECT '[Barakah Cover Page Consolidation] Error'
|
||||||
|
go
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,263 @@
|
|||||||
|
|
||||||
|
-- =============================================
|
||||||
|
-- Author: Matthew Schill
|
||||||
|
-- Create date: 03/20/2026
|
||||||
|
-- Description: Script to consolidate Cover Pages for Barakah
|
||||||
|
-- by Converting multi-unit procedures with Cover Pages
|
||||||
|
-- to use 1 Library Document Cover Page
|
||||||
|
-- =============================================
|
||||||
|
|
||||||
|
----@isTest = 0 will change data
|
||||||
|
----@isTest = 1 for internal testing (no data will be changed)
|
||||||
|
DECLARE @isTest bit = 1;
|
||||||
|
|
||||||
|
----Per Cover Page, pull how many cover pages
|
||||||
|
----Each Cover Page's procedure has
|
||||||
|
----and how many of those are library documents
|
||||||
|
select Contents.ContentID
|
||||||
|
, Contenttext = Contents.Text
|
||||||
|
, Items.ItemID
|
||||||
|
, tblDocuments.DocID
|
||||||
|
, ParentContentID
|
||||||
|
, ParentItemID
|
||||||
|
, LibTitle = ISNULL(LibTitle,'')
|
||||||
|
, numLibCP
|
||||||
|
, numCP
|
||||||
|
,BaseFlag = 0
|
||||||
|
INTO #tmpUpdate
|
||||||
|
from Contents
|
||||||
|
inner join Entries on Contents.ContentID = Entries.ContentID
|
||||||
|
inner join tblDocuments on tblDocuments.DocID = Entries.DocID
|
||||||
|
inner join Items on Items.ContentID = Contents.ContentID
|
||||||
|
outer apply
|
||||||
|
(select ParentContentID=ContentID, ParentItemID = PItm.ItemID
|
||||||
|
FROM dbo.vefn_ParentItems(Items.ItemID) PItm
|
||||||
|
where PItm.ItemID <> Items.ItemID
|
||||||
|
) parent
|
||||||
|
outer apply
|
||||||
|
(select numLibCP = Count(*)
|
||||||
|
FROM dbo.vefn_ChildItems(ParentItemID) PItm
|
||||||
|
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
|
||||||
|
INNER JOIN Entries on Contents.ContentID = Entries.ContentID
|
||||||
|
INNER JOIN tblDocuments on tblDocuments.DocID = Entries.DocID
|
||||||
|
where PItm.ItemID <> ParentItemID
|
||||||
|
AND Contents.text like 'Cover Page%' and ISNULL(tblDocuments.LibTitle,'') <> ''
|
||||||
|
) childWithLibTitle
|
||||||
|
outer apply
|
||||||
|
(select numCP = Count(*)
|
||||||
|
FROM dbo.vefn_ChildItems(ParentItemID) PItm
|
||||||
|
INNER JOIN Contents on Contents.ContentID = PItm.ContentID
|
||||||
|
where PItm.ItemID <> ParentItemID
|
||||||
|
AND Contents.text like 'Cover Page%'
|
||||||
|
) child
|
||||||
|
where Contents.text like 'Cover Page%'
|
||||||
|
order by ParentContentID asc, CASE WHEN ISNULL(LibTitle,'') <> '' THEN 1 ELSE 2 END asc, Contents.Text asc
|
||||||
|
|
||||||
|
--BaseFlag
|
||||||
|
-- 0 = a Cover Page that will be deleted
|
||||||
|
-- 1 = is base item (Cover Page will get renamed and applicability set to all)
|
||||||
|
-- 2 = would be base item but not linked to Lib document (Cover Page will get renamed and applicability set to all + will need linked to library doc)
|
||||||
|
|
||||||
|
---- If only 1 Library Doc CP for the CP's procedure and this is it, then mark this CP as the one we will keep
|
||||||
|
UPDATE #tmpUpdate SET BaseFlag = 1 where LibTitle <> '' and numLibCP = 1
|
||||||
|
|
||||||
|
---- If multiple Library Document CPs, pick the first one as the one we will keep (BaseFlag = 1)
|
||||||
|
---- If no Library Document CPs, pick the first one as the one we will repurpose (BaseFlag = 2)
|
||||||
|
UPDATE #tmpUpdate SET BaseFlag = CASE WHEN tU.LibTitle <> '' THEN 1 ELSE 2 END FROM #tmpUpdate tU
|
||||||
|
where BaseFlag = 0 AND tU.ContentID IN
|
||||||
|
(
|
||||||
|
Select ContentID FROM
|
||||||
|
(SELECT sub.ContentID,
|
||||||
|
row_number() OVER(PARTITION BY sub.ParentContentID ORDER BY CASE WHEN ISNULL(sub.LibTitle,'') <> '' THEN 1 ELSE 2 END asc, sub.Contenttext asc) as pos
|
||||||
|
FROM #tmpUpdate sub
|
||||||
|
) x
|
||||||
|
WHERE x.pos = 1
|
||||||
|
)
|
||||||
|
|
||||||
|
----BEGIN TESTS--
|
||||||
|
if(@isTest = 1)
|
||||||
|
BEGIN
|
||||||
|
select Count(*), 'Should be Zero - not exactly one BaseFlag set to non 0 for each Parent Item' FROM #tmpUpdate TU
|
||||||
|
OUTER APPLY
|
||||||
|
(select numBaseFlagSet = SUM(CASE WHEN sub.BaseFlag > 0 THEN 1 ELSE 0 END)
|
||||||
|
FROM #tmpUpdate sub
|
||||||
|
where sub.ParentContentID = TU.ParentContentID
|
||||||
|
) sub
|
||||||
|
where numBaseFlagSet <> 1
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - 0 Lib Docs, BaseFlag is 1' FROM #tmpUpdate TU
|
||||||
|
where numLibCP = 0 and BaseFlag = 1
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - at least 1 Lib Docs, BaseFlag is 2' FROM #tmpUpdate TU
|
||||||
|
where numLibCP > 0 and BaseFlag = 2
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - 1 Lib Docs, BaseFlag not 1 for that Lib doc' FROM #tmpUpdate TU
|
||||||
|
where numLibCP = 1 and LibTitle <> '' and BaseFlag <> 1
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - 1 Lib Docs, BaseFlag not 0 for ones without Lib Doc' FROM #tmpUpdate TU
|
||||||
|
where numLibCP = 1 and LibTitle = '' and BaseFlag <> 0
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - 1 CP, no Lib Docs, BaseFlag not 2' FROM #tmpUpdate TU
|
||||||
|
where numLibCP = 0 and numCP = 1 and BaseFlag <> 2
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - more than 1 Lib Docs, BaseFlag is 1' FROM #tmpUpdate TU
|
||||||
|
where numLibCP = 0 and BaseFlag = 1
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - not exactly one BaseFlag set to non 0 for each Parent Item' FROM #tmpUpdate TU
|
||||||
|
OUTER APPLY
|
||||||
|
(select numBaseFlagSet = SUM(CASE WHEN sub.BaseFlag > 0 THEN 1 ELSE 0 END)
|
||||||
|
FROM #tmpUpdate sub
|
||||||
|
where sub.ParentContentID = TU.ParentContentID
|
||||||
|
) sub
|
||||||
|
where numBaseFlagSet <> 1
|
||||||
|
|
||||||
|
select Count(*), 'Should be Zero - 0 Lib Docs, BaseFlag is 1' FROM #tmpUpdate TU
|
||||||
|
where numLibCP = 0
|
||||||
|
and BaseFlag = 1
|
||||||
|
|
||||||
|
--all Parents should have exactly 1 Baseflag=1 or BaseFlage = 2
|
||||||
|
select 'Should be No Records where not a BaseFlag 1 or 2'
|
||||||
|
select NumNotBaseFlag12 = Count(*)
|
||||||
|
FROM #tmpUpdate TU
|
||||||
|
Group by ParentContentID
|
||||||
|
HAVING SUM(CASE WHEN BaseFlag in (1,2) THEN 1 ELSE 0 END) <> 1
|
||||||
|
|
||||||
|
select 'Should be No Records where with both a BaseFlag 1 and 2'
|
||||||
|
select NumBothBaseFlag12 = Count(*)
|
||||||
|
FROM #tmpUpdate TU
|
||||||
|
Group by ParentContentID
|
||||||
|
HAVING SUM(BaseFlag) > 2
|
||||||
|
|
||||||
|
END
|
||||||
|
--END TESTS--
|
||||||
|
|
||||||
|
--BaseFlag
|
||||||
|
-- 0 = a Cover Page that will be deleted
|
||||||
|
-- 1 = is base item (Cover Page will get renamed and applicability set to all)
|
||||||
|
-- 2 = would be base item but not linked to Lib document (Cover Page will get renamed and applicability set to all + will need linked to library doc)
|
||||||
|
|
||||||
|
----Update config for Coverpage 1 to remove <MasterSlave Applicability="1" />
|
||||||
|
----from that config
|
||||||
|
----cover page 1s
|
||||||
|
declare @Cont TABLE
|
||||||
|
(
|
||||||
|
ContentID int,
|
||||||
|
ItemID int,
|
||||||
|
xConfig xml
|
||||||
|
)
|
||||||
|
insert into @Cont
|
||||||
|
SELECT tU.ContentID, ItemID, xConfig = CAST(tblContents.config AS xml) FROM
|
||||||
|
tblContents
|
||||||
|
INNER JOIN
|
||||||
|
#tmpUpdate tU ON tU.ContentID = tblContents.ContentID
|
||||||
|
where tU.BaseFlag > 0
|
||||||
|
|
||||||
|
if(@isTest = 1)
|
||||||
|
BEGIN
|
||||||
|
select WRD='Have Masterslave in xconfig', NumwithMasterSlave = Count(*) FROM @Cont CNT
|
||||||
|
INNER JOIN
|
||||||
|
tblContents ON CNT.ContentID = tblContents.ContentID
|
||||||
|
where CAST(xConfig AS varchar(max)) like '%MasterSlave%'
|
||||||
|
END
|
||||||
|
|
||||||
|
Update @Cont Set xConfig.modify('delete //MasterSlave') From @Cont;
|
||||||
|
|
||||||
|
if(@isTest = 1)
|
||||||
|
BEGIN
|
||||||
|
select WRD='None should have Masterslave Removed in xconfig', NumwithMasterSlave = Count(*) FROM @Cont CNT
|
||||||
|
INNER JOIN
|
||||||
|
tblContents ON CNT.ContentID = tblContents.ContentID
|
||||||
|
where CAST(xConfig AS varchar(max)) like '%MasterSlave%'
|
||||||
|
|
||||||
|
select 'Show Records and how the ids will be re-linked'
|
||||||
|
|
||||||
|
Select tblItems.ItemID, tblItems.ContentID, tblItems.PreviousID, tblContents.Text,
|
||||||
|
PreviousItemID = tU.ItemID, PreviousContentID = tU.ContentID, PreviousText = tUCont.Text,
|
||||||
|
RelinkToItemID = IdToSwapTO.ItemID, RelinkToContentID = IdToSwapTO.ContentID, RelinkToText = IdToSwapTOCont.Text
|
||||||
|
FROM
|
||||||
|
tblItems
|
||||||
|
INNER JOIN
|
||||||
|
tblContents on tblContents.ContentID = tblItems.ContentID
|
||||||
|
INNER JOIN
|
||||||
|
#tmpUpdate tU ON tblItems.PreviousID = tU.ItemID AND tU.BaseFlag = 0
|
||||||
|
INNER JOIN
|
||||||
|
tblContents tUCont on tUCont.ContentID = tU.ContentID
|
||||||
|
LEFT OUTER JOIN #tmpUpdate IdToSwapTO ON IdToSwapTO.ParentContentID = tU.ParentContentID AND IdToSwapTO.BaseFlag IN (1,2)
|
||||||
|
LEFT OUTER JOIN tblContents IdToSwapTOCont on IdToSwapTOCont.ContentID = IdToSwapTO.ContentID
|
||||||
|
|
||||||
|
END
|
||||||
|
ELSE
|
||||||
|
BEGIN
|
||||||
|
--Update Config for Contents and set Text = 'Cover Page'
|
||||||
|
Update tblContents SET Text = 'Cover Page', Config = CAST(xConfig AS varchar(max)),
|
||||||
|
DTS = GETDATE(), UserID = 'CPVolian2026'
|
||||||
|
FROM
|
||||||
|
@Cont CNT INNER JOIN
|
||||||
|
tblContents ON CNT.ContentID = tblContents.ContentID;
|
||||||
|
|
||||||
|
--Update items PreviousIds
|
||||||
|
UPDATE tblItems Set PreviousID = IdToSwapTO.ItemID
|
||||||
|
FROM
|
||||||
|
tblItems
|
||||||
|
INNER JOIN
|
||||||
|
#tmpUpdate tU ON tblItems.PreviousID = tU.ItemID AND tU.BaseFlag = 0
|
||||||
|
INNER JOIN #tmpUpdate IdToSwapTO ON IdToSwapTO.ParentContentID = tU.ParentContentID AND IdToSwapTO.BaseFlag IN (1,2)
|
||||||
|
|
||||||
|
--delete where BaseFlag = 0 ---Items,Content,Entries, --set DeleteStatus = 1
|
||||||
|
--these are ones that will be replaced by a library document
|
||||||
|
UPDATE tblItems Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
|
||||||
|
FROM
|
||||||
|
#tmpUpdate tU INNER JOIN
|
||||||
|
tblItems ON tU.ContentID = tblItems.ContentID
|
||||||
|
WHERE tU.BaseFlag = 0;
|
||||||
|
|
||||||
|
UPDATE tblContents Set DeleteStatus = 1, DTS = GETDATE(), UserID = 'CPVolian2026'
|
||||||
|
FROM
|
||||||
|
#tmpUpdate tU INNER JOIN
|
||||||
|
tblContents ON tU.ContentID = tblContents.ContentID
|
||||||
|
WHERE tU.BaseFlag = 0;
|
||||||
|
|
||||||
|
--delete entries where Baseflag = 2
|
||||||
|
--create new entries where Baseflag = 2
|
||||||
|
|
||||||
|
DELETE FROM
|
||||||
|
tblEntries
|
||||||
|
FROM
|
||||||
|
tblEntries
|
||||||
|
INNER JOIN
|
||||||
|
#tmpUpdate tU ON tU.ContentID = tblEntries.ContentID
|
||||||
|
WHERE tU.BaseFlag in (0,2);
|
||||||
|
|
||||||
|
INSERT INTO [dbo].[tblEntries]
|
||||||
|
([ContentID]
|
||||||
|
,[DocID]
|
||||||
|
,[DTS]
|
||||||
|
,[UserID]
|
||||||
|
,[DeleteStatus])
|
||||||
|
SELECT
|
||||||
|
DISTINCT tU.ContentID,
|
||||||
|
766, -- docid 766 "Cover Page 1"
|
||||||
|
GETDATE(),
|
||||||
|
'CPVolian2026',
|
||||||
|
0
|
||||||
|
FROM
|
||||||
|
#tmpUpdate tU
|
||||||
|
INNER JOIN
|
||||||
|
@Cont CNT ON tU.ContentID = CNT.ContentID
|
||||||
|
WHERE tU.BaseFlag = 2;
|
||||||
|
|
||||||
|
END;
|
||||||
|
|
||||||
|
drop table #tmpUpdate;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1643,7 +1643,11 @@ Begin
|
|||||||
Select Cast(i.LastChanged as varbinary(8)) as 'ILastChanged',
|
Select Cast(i.LastChanged as varbinary(8)) as 'ILastChanged',
|
||||||
i.ItemID as 'ItemID',
|
i.ItemID as 'ItemID',
|
||||||
zi.VersionID as 'VersionID',
|
zi.VersionID as 'VersionID',
|
||||||
zi.PPath +
|
CASE WHEN c.[Type] % 20000 = 6 THEN REPLACE(zi.PPath,'Note','Caution')
|
||||||
|
WHEN c.[Type] % 20000 = 7 THEN REPLACE(zi.PPath,'Caution','Note')
|
||||||
|
ELSE zi.PPath
|
||||||
|
END
|
||||||
|
+
|
||||||
Case (c.[Type]/10000)
|
Case (c.[Type]/10000)
|
||||||
When 0 Then @Delim + @UnitPrefix + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Procedure
|
When 0 Then @Delim + @UnitPrefix + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Procedure
|
||||||
When 1 Then @Delim + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Section
|
When 1 Then @Delim + IsNull(c.Number,'') + @DelimNumber + IsNull(c.Text,'') -- Section
|
||||||
@@ -24325,8 +24329,10 @@ BEGIN
|
|||||||
OR FromID in (Select ContentID from tblContents where deletestatus != 0 and ActionDTS < @dte)
|
OR FromID in (Select ContentID from tblContents where deletestatus != 0 and ActionDTS < @dte)
|
||||||
)
|
)
|
||||||
PRINT 'Deleting Items and Parts'
|
PRINT 'Deleting Items and Parts'
|
||||||
|
alter table tblParts nocheck constraint FK_Parts_Items
|
||||||
delete from tblItems where deletestatus != 0 and DTS < @dte
|
delete from tblItems where deletestatus != 0 and DTS < @dte
|
||||||
delete from tblParts where deletestatus != 0 and ItemID Not IN (Select ItemID from Items) and DTS < @dte
|
delete from tblParts where deletestatus != 0 and ItemID Not IN (Select ItemID from Items) and DTS < @dte
|
||||||
|
alter table tblParts check constraint FK_Parts_Items
|
||||||
PRINT 'Purging Parts with deleted Contents'
|
PRINT 'Purging Parts with deleted Contents'
|
||||||
DELETE from Child
|
DELETE from Child
|
||||||
FROM tblParts AS Child
|
FROM tblParts AS Child
|
||||||
@@ -24351,7 +24357,9 @@ BEGIN
|
|||||||
ON Itms.ItemID = tblItems.ItemID AND Itms.deletestatus = tblItems.deletestatus
|
ON Itms.ItemID = tblItems.ItemID AND Itms.deletestatus = tblItems.deletestatus
|
||||||
alter table tblItems check constraint FK_Items_Items
|
alter table tblItems check constraint FK_Items_Items
|
||||||
PRINT 'Purging Contents'
|
PRINT 'Purging Contents'
|
||||||
|
alter table tblEntries nocheck constraint FK_Entries_Contents
|
||||||
delete from tblContents where deletestatus != 0 and ActionDTS < @dte
|
delete from tblContents where deletestatus != 0 and ActionDTS < @dte
|
||||||
|
alter table tblEntries check constraint FK_Entries_Contents
|
||||||
PRINT 'Phase 3'
|
PRINT 'Phase 3'
|
||||||
delete from AnnotationAudits where DTS < @dte
|
delete from AnnotationAudits where DTS < @dte
|
||||||
delete from ContentAudits where DTS < @dte
|
delete from ContentAudits where DTS < @dte
|
||||||
@@ -24529,6 +24537,246 @@ GO
|
|||||||
PRINT 'Added IX_tblROUsagesRODbIDDeleteStatusROID Index. Speeds up RO queries'
|
PRINT 'Added IX_tblROUsagesRODbIDDeleteStatusROID Index. Speeds up RO queries'
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetCurrentApprovedRevisions]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||||
|
DROP PROCEDURE [GetCurrentApprovedRevisions];
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
/****** Object: StoredProcedure [dbo].[GetCurrentApprovedRevisions] Script Date: 02/05/2026 7:54:42 AM ******/
|
||||||
|
|
||||||
|
-- =============================================
|
||||||
|
-- Author: Matthew Schill
|
||||||
|
-- Create date: 02/05/2026
|
||||||
|
-- Description: Gets all current approved revisions
|
||||||
|
-- =============================================
|
||||||
|
CREATE PROCEDURE [dbo].[GetCurrentApprovedRevisions]
|
||||||
|
(
|
||||||
|
@ItemID AS bigint
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
select max(rr.revisionid) revisionid, UnitId, UnitVal.name UnitName, max(rr.DTS) DTS
|
||||||
|
from items ii
|
||||||
|
inner join revisions rr on ii.itemid = rr.itemid
|
||||||
|
inner join versions vv on rr.revisionid = vv.revisionid
|
||||||
|
inner join stages ss on vv.stageid = ss.stageid
|
||||||
|
outer apply
|
||||||
|
(Select UnitId = r1.value('@Index','int') FROM rr.config.nodes('Config/Applicability') t1(r1)) App
|
||||||
|
left outer join
|
||||||
|
(select r1.value('@index','int') indx
|
||||||
|
,r1.value('@Name','varchar') name
|
||||||
|
from (select *,cast(config as xml) xconfig from DocVersions
|
||||||
|
where ItemID in(select itemID from vefn_AllSiblingItems(@ItemID))) SDV
|
||||||
|
cross apply
|
||||||
|
xconfig.nodes('Config/Slaves/Slave') t1(r1)) UnitVal ON UnitVal.indx = UnitId
|
||||||
|
where ss.isapproved = 1
|
||||||
|
and ii.itemid = @ItemID
|
||||||
|
group by UnitId, UnitVal.name
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
END
|
||||||
|
|
||||||
|
IF (@@Error = 0) PRINT 'Procedure Creation: [GetCurrentApprovedRevisions] Succeeded'
|
||||||
|
ELSE PRINT 'Procedure Creation: [GetCurrentApprovedRevisions] Error on Creation'
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
==========================================================================================================
|
||||||
|
-- Begin: C2026-010 Add Audit Ability for ChangeBars
|
||||||
|
-- Author: Matthew Schill
|
||||||
|
-- Create date: 02/17/2026
|
||||||
|
==========================================================================================================
|
||||||
|
*/
|
||||||
|
/*
|
||||||
|
----------------------------------------------------------------------------------
|
||||||
|
Tables:
|
||||||
|
----------------------------------------------------------------------------------
|
||||||
|
[ChangeBarAudits]
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------------
|
||||||
|
Indexes:
|
||||||
|
----------------------------------------------------------------------------------
|
||||||
|
[IX_ChangeBarAudits_ItemID] on [dbo].[ChangeBarAudits]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
IF Not Exists(SELECT * FROM sys.objects Where name = 'ChangeBarAudits' AND type in (N'U'))
|
||||||
|
Begin
|
||||||
|
|
||||||
|
SET ANSI_NULLS ON
|
||||||
|
SET QUOTED_IDENTIFIER ON
|
||||||
|
|
||||||
|
/****** Create Table to hold Audit Information ******/
|
||||||
|
CREATE TABLE [dbo].[ChangeBarAudits](
|
||||||
|
[AuditID] [bigint] IDENTITY(1,1) NOT NULL,
|
||||||
|
[ItemID] [bigint] NOT NULL,
|
||||||
|
[Text] [nvarchar](max) NULL,
|
||||||
|
[DTS] [datetime] NOT NULL,
|
||||||
|
[UserID] [nvarchar](100) NOT NULL,
|
||||||
|
[UnitIndex] [int] NULL,
|
||||||
|
CONSTRAINT [PK_ChangeBarAudits] PRIMARY KEY CLUSTERED
|
||||||
|
(
|
||||||
|
[AuditID] ASC
|
||||||
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||||
|
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||||
|
|
||||||
|
IF (@@Error = 0) PRINT 'Table Creation: [ChangeBarAudits] Succeeded'
|
||||||
|
ELSE PRINT 'Table Creation: [ChangeBarAudits] Error on Creation'
|
||||||
|
|
||||||
|
/****** Table was not previously created - so intially populate with info from Approvals ******/
|
||||||
|
INSERT into ChangeBarAudits([ItemID],[Text],[DTS],[UserID],[UnitIndex])
|
||||||
|
select --rr.RevisionID,
|
||||||
|
rr.ItemID,
|
||||||
|
Text = CASE WHEN r1.value('@Index','int') <> 0 AND UnitName IS NOT NULL THEN
|
||||||
|
'(Unit ' + UnitName + ') '
|
||||||
|
ELSE
|
||||||
|
''
|
||||||
|
END +
|
||||||
|
'Approved by (' + rr.UserID + ') on (' +
|
||||||
|
CAST(rr.DTS AS VARCHAR) + ')',
|
||||||
|
rr.DTS,
|
||||||
|
rr.UserID,
|
||||||
|
UnitIndex = r1.value('@Index','int')
|
||||||
|
-- , UnitName
|
||||||
|
from revisions rr
|
||||||
|
inner join versions vv on rr.revisionid = vv.revisionid
|
||||||
|
inner join stages ss on vv.stageid = ss.stageid
|
||||||
|
outer apply rr.config.nodes('Config/Applicability') t1(r1)
|
||||||
|
outer apply
|
||||||
|
( Select r2.value('@Name','varchar') UnitName
|
||||||
|
FROM
|
||||||
|
(select DocVerSions.ItemID, cast(config as xml) xconfig from DocVersions
|
||||||
|
inner join
|
||||||
|
vefn_AllSiblingItems(rr.ItemID) Sib ON DocVerSions.ItemID = Sib.ItemID) SDV
|
||||||
|
cross apply
|
||||||
|
xconfig.nodes('Config/Slaves/Slave') t2(r2)
|
||||||
|
WHERE r2.value('@index','varchar') = r1.value('@Index','int')
|
||||||
|
) UN
|
||||||
|
where ss.isapproved = 1
|
||||||
|
order by rr.ItemID, rr.RevisionID desc
|
||||||
|
|
||||||
|
IF (@@Error = 0) PRINT '[ChangeBarAudits] Initial Population Succeeded'
|
||||||
|
ELSE PRINT '[ChangeBarAudits] Initial Population Error'
|
||||||
|
|
||||||
|
/****** Create Index to get ChangeBar Audit Information for Item (ItemID = ProcedureID) ******/
|
||||||
|
CREATE NONCLUSTERED INDEX [IX_ChangeBarAudits_ItemID] ON [dbo].[ChangeBarAudits]
|
||||||
|
(
|
||||||
|
[ItemID] ASC
|
||||||
|
)
|
||||||
|
INCLUDE ([AuditID], [Text], [DTS], [UnitIndex])
|
||||||
|
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]
|
||||||
|
|
||||||
|
IF (@@Error = 0) PRINT 'Index Creation: [IX_ChangeBarAudits_ItemID] Succeeded'
|
||||||
|
ELSE PRINT 'Index Creation: [IX_ChangeBarAudits_ItemID] Error on Creation'
|
||||||
|
|
||||||
|
End
|
||||||
|
|
||||||
|
-- =============================================
|
||||||
|
-- Description: Gets ChangeBar Audit History by item
|
||||||
|
-- =============================================
|
||||||
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetChangeBarAuditHistoryByItem]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||||
|
DROP PROCEDURE [GetChangeBarAuditHistoryByItem];
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE PROCEDURE [dbo].[GetChangeBarAuditHistoryByItem]
|
||||||
|
(
|
||||||
|
@ItemID AS bigint
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
Select * FROM ChangeBarAudits where ItemID = @ItemID
|
||||||
|
order by DTS desc
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
END
|
||||||
|
|
||||||
|
IF (@@Error = 0) PRINT 'Procedure Creation: [GetChangeBarAuditHistoryByItem] Succeeded'
|
||||||
|
ELSE PRINT 'Procedure Creation: [GetChangeBarAuditHistoryByItem] Error on Creation'
|
||||||
|
GO
|
||||||
|
|
||||||
|
-- =============================================
|
||||||
|
-- Description: Adds ChangeBar Audit History
|
||||||
|
-- =============================================
|
||||||
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[AddChangeBarAuditHistory]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||||
|
DROP PROCEDURE [AddChangeBarAuditHistory];
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE PROCEDURE [dbo].[AddChangeBarAuditHistory]
|
||||||
|
(
|
||||||
|
@ItemID AS bigint,
|
||||||
|
@Description As nvarchar(max),
|
||||||
|
@DTS AS Datetime,
|
||||||
|
@UserID As nvarchar(100),
|
||||||
|
@UnitIndex AS bigint = NULL
|
||||||
|
)
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
INSERT into ChangeBarAudits([ItemID],[Text],[DTS],[UserID],[UnitIndex])
|
||||||
|
VALUES (@ItemID, @Description, @DTS, @UserID, @UnitIndex)
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
END
|
||||||
|
|
||||||
|
IF (@@Error = 0) PRINT 'Procedure Creation: [AddChangeBarAuditHistory] Succeeded'
|
||||||
|
ELSE PRINT 'Procedure Creation: [AddChangeBarAuditHistory] Error on Creation'
|
||||||
|
GO
|
||||||
|
|
||||||
|
/*
|
||||||
|
==========================================================================================================
|
||||||
|
-- End: C2026-010 Add Audit Ability for ChangeBars
|
||||||
|
==========================================================================================================
|
||||||
|
*/
|
||||||
|
|
||||||
|
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[GetMissingDocsByUnit]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
|
||||||
|
DROP PROCEDURE [GetMissingDocsByUnit];
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
-- =============================================
|
||||||
|
-- Author: Matthew Schill
|
||||||
|
-- Create date: 02/27/2026
|
||||||
|
-- Description: Get Missing Docs by Unit for Generating Pdf table
|
||||||
|
-- =============================================
|
||||||
|
CREATE PROCEDURE [dbo].[GetMissingDocsByUnit]
|
||||||
|
AS
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
select Docs.DocID, UnitID, SectionID = MIN(SectionID)
|
||||||
|
FROM
|
||||||
|
(SELECT DISTINCT [DocID]
|
||||||
|
FROM [tblDocuments]) Docs
|
||||||
|
INNER JOIN Entries on Docs.DocID = Entries.DocID
|
||||||
|
INNER JOIN Contents on Entries.ContentID = Contents.ContentID
|
||||||
|
inner join Items on Items.ContentID = Contents.ContentID
|
||||||
|
outer apply
|
||||||
|
(Select UnitID = ID FROM dbo.vefn_SplitInt([dbo].[ve_GetItemDerivedApplicability](Items.ItemID),',')) Unit
|
||||||
|
outer apply
|
||||||
|
(Select TOP 1 SectionID = ItemID FROM Contents SecC where SecC.ContentID = Contents.ContentID
|
||||||
|
AND (SecC.Type / 10000) = 1
|
||||||
|
AND dbo.vefn_GetVersionIDByItemID(ItemID) IS NOT NULL
|
||||||
|
) Section
|
||||||
|
left outer join Pdfs on Pdfs.DocID = Docs.DocID AND Pdfs.DebugStatus = CASE WHEN UNITID IS NULL THEN 0 ELSE UnitID * 10 END
|
||||||
|
WHERE Pdfs.DocID IS NULL
|
||||||
|
AND SectionID IS NOT NULL
|
||||||
|
Group by Docs.DocID, UnitID
|
||||||
|
order by Docs.DocID, UnitID
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
END
|
||||||
|
|
||||||
|
IF (@@Error = 0) PRINT 'Procedure Creation: [GetMissingDocsByUnit] Succeeded'
|
||||||
|
ELSE PRINT 'Procedure Creation: [GetMissingDocsByUnit] Error on Creation'
|
||||||
|
GO
|
||||||
|
|
||||||
/*
|
/*
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
| ADD New Code Before this Block |
|
| ADD New Code Before this Block |
|
||||||
@@ -24562,8 +24810,8 @@ BEGIN TRY -- Try Block
|
|||||||
DECLARE @RevDate varchar(255)
|
DECLARE @RevDate varchar(255)
|
||||||
DECLARE @RevDescription varchar(255)
|
DECLARE @RevDescription varchar(255)
|
||||||
|
|
||||||
set @RevDate = '01/19/2026 5:00 PM'
|
set @RevDate = '03/13/2026 7:00 AM'
|
||||||
set @RevDescription = 'Sync tree list Sort order between in RO Editor and PROMS'
|
set @RevDescription = 'Added Get Missing Docs by Unit for Generating Pdf table'
|
||||||
|
|
||||||
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
Select cast(@RevDate as datetime) RevDate, @RevDescription RevDescription
|
||||||
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
PRINT 'SQL Code Revision ' + @RevDate + ' - ' + @RevDescription
|
||||||
|
|||||||
@@ -1135,6 +1135,7 @@ namespace VEPROMS
|
|||||||
ViewPDF = ViewPDF && MyProcedures.Count == 1;
|
ViewPDF = ViewPDF && MyProcedures.Count == 1;
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
StageInfo nsi = StageInfo.GetJustStage(RevStage);
|
StageInfo nsi = StageInfo.GetJustStage(RevStage);
|
||||||
|
DateTime now = DateTime.Now; //using variable so dates are consistent
|
||||||
foreach (ApprovalProcedure ap in MyProcedures) //spin thru looking for updating current revision
|
foreach (ApprovalProcedure ap in MyProcedures) //spin thru looking for updating current revision
|
||||||
{
|
{
|
||||||
// ric: current revision info record, not new one being created.
|
// ric: current revision info record, not new one being created.
|
||||||
@@ -1207,7 +1208,7 @@ namespace VEPROMS
|
|||||||
cfg.History_StartDate = myDTS; // if there is a slave, date found from above code
|
cfg.History_StartDate = myDTS; // if there is a slave, date found from above code
|
||||||
cfg.Applicability_Index = ap.ProcInfo.MyDocVersion.DocVersionConfig.SelectedSlave;
|
cfg.Applicability_Index = ap.ProcInfo.MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||||
//cfg.Save();
|
//cfg.Save();
|
||||||
revision = Revision.MakeRevision(pi.ItemID, RevType, ap.RevNumber, ap.RevDate, RevNote, cfg.ToString(), DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
revision = Revision.MakeRevision(pi.ItemID, RevType, ap.RevNumber, ap.RevDate, RevNote, cfg.ToString(), now, Volian.Base.Library.VlnSettings.UserID);
|
||||||
// revision.MyConfig.History_StartDate = pi.DTS;
|
// revision.MyConfig.History_StartDate = pi.DTS;
|
||||||
// revision.MyConfig.Save();
|
// revision.MyConfig.Save();
|
||||||
// revision = revision.Save();
|
// revision = revision.Save();
|
||||||
@@ -1234,7 +1235,7 @@ namespace VEPROMS
|
|||||||
RevisionConfig cfg = new RevisionConfig();
|
RevisionConfig cfg = new RevisionConfig();
|
||||||
cfg.History_StartDate = pi.DTS; // todo: this should probably be myDTS, found during fix of B2019-051.
|
cfg.History_StartDate = pi.DTS; // todo: this should probably be myDTS, found during fix of B2019-051.
|
||||||
//cfg.Save();
|
//cfg.Save();
|
||||||
revision = Revision.MakeRevision(pi.ItemID, RevType, ap.RevNumber, ap.RevDate, RevNote, cfg.ToString(), DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
revision = Revision.MakeRevision(pi.ItemID, RevType, ap.RevNumber, ap.RevDate, RevNote, cfg.ToString(), now, Volian.Base.Library.VlnSettings.UserID);
|
||||||
// revision.MyConfig.History_StartDate = pi.DTS;
|
// revision.MyConfig.History_StartDate = pi.DTS;
|
||||||
// revision.MyConfig.Save();
|
// revision.MyConfig.Save();
|
||||||
// revision = revision.Save();
|
// revision = revision.Save();
|
||||||
@@ -1253,7 +1254,7 @@ namespace VEPROMS
|
|||||||
byte[] summaryBuf = null;
|
byte[] summaryBuf = null;
|
||||||
//B2017-149 Allow the user to choose if they want the Summary of Changes report created during the approval process
|
//B2017-149 Allow the user to choose if they want the Summary of Changes report created during the approval process
|
||||||
if (doSumChg) summaryBuf = CreateSummary(ref pi, summaryPDF, myDTS);
|
if (doSumChg) summaryBuf = CreateSummary(ref pi, summaryPDF, myDTS);
|
||||||
DateTime currentDTS = DateTime.Now;
|
DateTime currentDTS = now;
|
||||||
Check check = Check.MakeCheck(revision, Stage.GetJustStage(RevStage), RevisionInfo.BuildRevisionChecks(pi), currentDTS, VlnSettings.UserID);
|
Check check = Check.MakeCheck(revision, Stage.GetJustStage(RevStage), RevisionInfo.BuildRevisionChecks(pi), currentDTS, VlnSettings.UserID);
|
||||||
//make pdf with promsprinter and get byte stream
|
//make pdf with promsprinter and get byte stream
|
||||||
// Moved to end so that Item and Content are saved at the same time
|
// Moved to end so that Item and Content are saved at the same time
|
||||||
@@ -1311,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();
|
||||||
@@ -1319,17 +1328,22 @@ namespace VEPROMS
|
|||||||
version.ApprovedXML = xd.OuterXml;
|
version.ApprovedXML = xd.OuterXml;
|
||||||
version.Save();
|
version.Save();
|
||||||
dlg.Dispose();
|
dlg.Dispose();
|
||||||
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, DateTime.Now, selectedSlave);
|
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, now, selectedSlave);
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(pi.ItemID, $"{(selectedSlave > 0 ? $"(Unit {pi.MyDocVersion.UnitNames[selectedSlave - 1]}) " : "")}Approved by ({VlnSettings.UserID}) on ({now})", now, VlnSettings.UserID, selectedSlave);
|
||||||
|
|
||||||
// Clear the change bar override for this procedure:
|
// Clear the change bar override for this procedure:
|
||||||
pi.ClearChangeBarOverrides();
|
pi.ClearChangeBarOverrides();
|
||||||
|
|
||||||
//B2019-140 Change bars do not get refreshed when approval is run.
|
//B2019-140 Change bars do not get refreshed when approval is run.
|
||||||
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
ProcedureInfo newproc;
|
||||||
|
|
||||||
//// Refresh the StepPanel for the current Procedure
|
//// Refresh the StepPanel for the current Procedure
|
||||||
//// so change bars update
|
//// so change bars update
|
||||||
//// on any open StepPanel
|
//// on any open StepPanel
|
||||||
|
|
||||||
|
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open
|
||||||
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
|
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
|
||||||
if (dti != null)
|
if (dti != null)
|
||||||
{
|
{
|
||||||
@@ -1337,9 +1351,20 @@ namespace VEPROMS
|
|||||||
dti.MyStepTabPanel.MyStepPanel.Focus();
|
dti.MyStepTabPanel.MyStepPanel.Focus();
|
||||||
|
|
||||||
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
||||||
|
{
|
||||||
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||||
|
Application.DoEvents();
|
||||||
|
newproc = ProcedureInfo.Get(pi.ItemID);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
//since in a separate form, need to update the tree view
|
//since in a separate form, need to update the tree view
|
||||||
//so "Showing Change Bars" Content Menu Item is correct
|
//so "Showing Change Bars" Content Menu Item is correct
|
||||||
MyFrmVEPROMS.RefreshProcedureNode(newproc);
|
MyFrmVEPROMS.RefreshProcedureNode(newproc);
|
||||||
|
|||||||
@@ -947,14 +947,16 @@ namespace VEPROMS
|
|||||||
pi = AddProcedure(xd.DocumentElement, dvi, pi);
|
pi = AddProcedure(xd.DocumentElement, dvi, pi);
|
||||||
GC.Collect(); // need to cleanup memory after importing each procedure due to use of Regular Expressions in processing RO and Transition links
|
GC.Collect(); // need to cleanup memory after importing each procedure due to use of Regular Expressions in processing RO and Transition links
|
||||||
}
|
}
|
||||||
DirectoryInfo di = new DirectoryInfo(PEIPath);
|
|
||||||
DirectoryInfo[] dis = di.GetDirectories();
|
|
||||||
for (int d = 0; d < dis.Length; d++)
|
|
||||||
dis[d].Delete(true);
|
|
||||||
lblImportStatus.Text = "Updating Transitions";
|
lblImportStatus.Text = "Updating Transitions";
|
||||||
AddTransitions();
|
AddTransitions();
|
||||||
FixFloatingFoldouts();
|
FixFloatingFoldouts();
|
||||||
SaveTransitionAndItemContentIDs();
|
SaveTransitionAndItemContentIDs();
|
||||||
|
// B2026-034 remove the folders created from un-ziping the import set file - this was done prior to updating transitions
|
||||||
|
// so if there was an issue deleting these temporay folders and files, the actual importing will be completed
|
||||||
|
DirectoryInfo di = new DirectoryInfo(PEIPath);
|
||||||
|
DirectoryInfo[] dis = di.GetDirectories();
|
||||||
|
for (int d = 0; d < dis.Length; d++)
|
||||||
|
dis[d].Delete(true);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1618,6 +1620,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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ namespace VEPROMS
|
|||||||
MembershipInfo mi = (MembershipInfo)lstMembers.SelectedItem;
|
MembershipInfo mi = (MembershipInfo)lstMembers.SelectedItem;
|
||||||
string selectedUserID = mi.MyUserUserID;
|
string selectedUserID = mi.MyUserUserID;
|
||||||
string msg = "Are you sure you want to remove this Group Member?";
|
string msg = "Are you sure you want to remove this Group Member?";
|
||||||
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
|
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
|
||||||
{
|
{
|
||||||
@@ -255,7 +255,7 @@ namespace VEPROMS
|
|||||||
MessageBox.Show("There are still users who are members of this group. You need to delete all members in order to delete this group.", "Group Has Members", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
MessageBox.Show("There are still users who are members of this group. You need to delete all members in order to delete this group.", "Group Has Members", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (MessageBox.Show("Are you sure you want to delete this group?", "Confirm Deleting Group", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
if (MessageBox.Show("Are you sure you want to delete this group?", "Confirm Deleting Group", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
Group.Delete(gi.GID);
|
Group.Delete(gi.GID);
|
||||||
LoadRefreshGroupUsers();
|
LoadRefreshGroupUsers();
|
||||||
@@ -397,7 +397,7 @@ namespace VEPROMS
|
|||||||
}
|
}
|
||||||
int nummemberships = ui.UserMemberships.Count(mi => mi.EndDate == null || mi.EndDate == string.Empty);
|
int nummemberships = ui.UserMemberships.Count(mi => mi.EndDate == null || mi.EndDate == string.Empty);
|
||||||
string mem_text = nummemberships > 0 ? "\r\nNote that this will remove all memberships that this user has." : "";
|
string mem_text = nummemberships > 0 ? "\r\nNote that this will remove all memberships that this user has." : "";
|
||||||
if (MessageBox.Show($"Are you sure you want to delete this user?{mem_text}", "Confirm Deleting User", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
if (MessageBox.Show($"Are you sure you want to delete this user?{mem_text}", "Confirm Deleting User", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
foreach (MembershipInfo minfo in ui.UserMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty))
|
foreach (MembershipInfo minfo in ui.UserMemberships.Where(mi => mi.EndDate == null || mi.EndDate == string.Empty))
|
||||||
{
|
{
|
||||||
@@ -477,7 +477,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
MembershipInfo mi = (MembershipInfo)lstGroups.SelectedItem;
|
MembershipInfo mi = (MembershipInfo)lstGroups.SelectedItem;
|
||||||
string msg = "Are you sure you want to remove this Group Member?";
|
string msg = "Are you sure you want to remove this Group Member?";
|
||||||
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
|
if (MessageBox.Show(this, msg, "Confirm Group Member Removal", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||||
{
|
{
|
||||||
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
|
if (mi.MyGroup.GroupName == "Administrators" && mi.MyGroup.GroupMemberships.Count(mm => mm.EndDate == null || mm.EndDate == string.Empty) == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||||
this.dateTimeInput1 = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
|
this.dateTimeInput1 = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
|
||||||
this.btnNow = new DevComponents.DotNetBar.ButtonX();
|
this.btnNow = new DevComponents.DotNetBar.ButtonX();
|
||||||
|
this.btnResetToApproved = new DevComponents.DotNetBar.ButtonX();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dateTimeInput1)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
@@ -142,11 +143,26 @@
|
|||||||
this.btnNow.Text = "Today";
|
this.btnNow.Text = "Today";
|
||||||
this.btnNow.Click += new System.EventHandler(this.btnNow_Click);
|
this.btnNow.Click += new System.EventHandler(this.btnNow_Click);
|
||||||
//
|
//
|
||||||
|
// btnResetToApproved
|
||||||
|
//
|
||||||
|
this.btnResetToApproved.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||||
|
this.btnResetToApproved.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||||
|
this.btnResetToApproved.Location = new System.Drawing.Point(30, 77);
|
||||||
|
this.btnResetToApproved.Name = "btnResetToApproved";
|
||||||
|
this.btnResetToApproved.Size = new System.Drawing.Size(201, 23);
|
||||||
|
this.btnResetToApproved.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
|
this.btnResetToApproved.TabIndex = 6;
|
||||||
|
this.btnResetToApproved.Text = "Reset Change Bar To Approved Date";
|
||||||
|
this.btnResetToApproved.Tooltip = "Reset Change Bar to the last approved date. If no approvals, reset to as if no ch" +
|
||||||
|
"ange bar date. After selecting this, press OK to save.";
|
||||||
|
this.btnResetToApproved.Click += new System.EventHandler(this.btnResetToApproved_Click);
|
||||||
|
//
|
||||||
// dlgSetChangeBarStartDate
|
// dlgSetChangeBarStartDate
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(268, 144);
|
this.ClientSize = new System.Drawing.Size(268, 144);
|
||||||
|
this.Controls.Add(this.btnResetToApproved);
|
||||||
this.Controls.Add(this.btnNow);
|
this.Controls.Add(this.btnNow);
|
||||||
this.Controls.Add(this.dateTimeInput1);
|
this.Controls.Add(this.dateTimeInput1);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
@@ -175,5 +191,6 @@
|
|||||||
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
||||||
private DevComponents.Editors.DateTimeAdv.DateTimeInput dateTimeInput1;
|
private DevComponents.Editors.DateTimeAdv.DateTimeInput dateTimeInput1;
|
||||||
private DevComponents.DotNetBar.ButtonX btnNow;
|
private DevComponents.DotNetBar.ButtonX btnNow;
|
||||||
|
private DevComponents.DotNetBar.ButtonX btnResetToApproved;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,31 +1,25 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using DevComponents.DotNetBar;
|
|
||||||
using DevComponents.DotNetBar.Controls;
|
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
|
using Volian.Base.Library;
|
||||||
|
using Volian.Controls.Library;
|
||||||
|
|
||||||
namespace VEPROMS
|
namespace VEPROMS
|
||||||
{
|
{
|
||||||
public partial class dlgSetChangeBarStartDate : DevComponents.DotNetBar.Office2007Form
|
public partial class dlgSetChangeBarStartDate : DevComponents.DotNetBar.Office2007Form
|
||||||
{
|
{
|
||||||
private ProcedureConfig _MyProcConfig = null;
|
public ProcedureConfig MyProcConfig { get; set; } = null;
|
||||||
|
|
||||||
public ProcedureConfig MyProcConfig
|
public ProcedureInfo MyProcInfo { get; set; } = null;
|
||||||
{
|
|
||||||
get { return _MyProcConfig; }
|
|
||||||
set { _MyProcConfig = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public dlgSetChangeBarStartDate(ProcedureConfig pc)
|
public dlgSetChangeBarStartDate(ProcedureConfig pc, ProcedureInfo pi)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
_MyProcConfig = pc;
|
MyProcConfig = pc;
|
||||||
|
MyProcInfo = pi;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void dlgSetChangeBarStartDate_Load(object sender, EventArgs e)
|
private void dlgSetChangeBarStartDate_Load(object sender, EventArgs e)
|
||||||
@@ -72,6 +66,10 @@ namespace VEPROMS
|
|||||||
private void btnOK_Click(object sender, EventArgs e)
|
private void btnOK_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");// ("MM/dd/yyyy HH:mm:ss");
|
MyProcConfig.Print_ChangeBarDate = dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss");// ("MM/dd/yyyy HH:mm:ss");
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Set ChangeBars set to ({ dateTimeInput1.Value.ToString("MM/dd/yyyy HH:mm:ss")}) by ({ VlnSettings.UserID}) on ({DateTime.Now})", DateTime.Now, VlnSettings.UserID, 0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -80,5 +78,80 @@ namespace VEPROMS
|
|||||||
dateTimeInput1.Value = DateTime.Now;
|
dateTimeInput1.Value = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//C2026-009 Add Option to Reset Change Bar to Last Approved Date/Time
|
||||||
|
private void btnResetToApproved_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
System.Data.DataTable dt = RevisionData.GetRevisionDataByUnit(MyProcInfo.ItemID);
|
||||||
|
|
||||||
|
if (dt.Rows.Count == 0)
|
||||||
|
{
|
||||||
|
//no records, remove
|
||||||
|
if (MessageBox.Show("There are currently no approvals set. Selecting yes will set ChangeBars to show all changes since the creation of the procedure.\r\nAre you sure you wish to reset ChangeBars?", "Reset ChangeBar Date", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
MyProcConfig.Print_ChangeBarDate = "";
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show all changes.", DateTime.Now, VlnSettings.UserID, 0);
|
||||||
|
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (RevisionData.HasUnits(dt))
|
||||||
|
{
|
||||||
|
|
||||||
|
//any with units
|
||||||
|
string maxDTS = RevisionData.MaxDTS(dt).ToString("MM/dd/yyyy HH:mm:ss");
|
||||||
|
|
||||||
|
//create wording for ChangeBar changes
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.Append($" The Procedure Viewer Change Bar Date will be set to ({maxDTS}).");
|
||||||
|
foreach (DataRow r in dt.Rows)
|
||||||
|
{
|
||||||
|
sb.Append($"\r\n The Change Bar Date for Unit ({r["UnitName"]}) will be set to ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}).");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.Append("\r\n Any Change Bars for Units not listed above will use the Overall/Procedure Viewer Change Bar Date (as these Units have no approvals).");
|
||||||
|
|
||||||
|
if (CustomMessageBox.Show($"This will reset ChangeBars to show for changes newer than the last approval.\r\nThis includes the following changes:\r\n{sb.ToString()}\r\n\r\nAre you sure you wish to reset ChangeBars?", "Reset ChangeBar Date", "Yes", "No") == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
//Change the overall ChangeBarDate
|
||||||
|
MyProcConfig.Print_ChangeBarDate = maxDTS;
|
||||||
|
|
||||||
|
//Change the ChangeBarDate for each unit
|
||||||
|
foreach (DataRow r in dt.Rows)
|
||||||
|
{
|
||||||
|
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
||||||
|
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({Convert.ToDateTime(r["DTS"]):MM/dd/yyyy HH:mm:ss}) for (Unit {r["UnitName"]})", DateTime.Now, VlnSettings.UserID, MyProcConfig.SelectedSlave);
|
||||||
|
|
||||||
|
}
|
||||||
|
MyProcConfig.SelectedSlave = 0;
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({maxDTS})", DateTime.Now, VlnSettings.UserID, 0);
|
||||||
|
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//no units
|
||||||
|
string maxDTS = RevisionData.MaxDTS(dt).ToString("MM/dd/yyyy HH:mm:ss");
|
||||||
|
if (MessageBox.Show($"This will reset ChangeBars to show for changes newer than the last approval ({maxDTS}).\r\nAre you sure you wish to reset ChangeBars?", "Reset ChangeBar Date", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
MyProcConfig.Print_ChangeBarDate = maxDTS;
|
||||||
|
DialogResult = DialogResult.OK;
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
|
ChangeBarAuditHistory.AddAudit(MyProcInfo.ItemID, $"Reset ChangeBars performed by ({VlnSettings.UserID}) on ({DateTime.Now}). ChangeBars reset to show since last approval ({maxDTS})", DateTime.Now, VlnSettings.UserID, 0);
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+46
-8
@@ -113,6 +113,8 @@
|
|||||||
this.lblAdmToolProgressType = new DevComponents.DotNetBar.LabelX();
|
this.lblAdmToolProgressType = new DevComponents.DotNetBar.LabelX();
|
||||||
this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem();
|
this.buttonItem1 = new DevComponents.DotNetBar.ButtonItem();
|
||||||
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||||
|
this.swRegenWordAttmts = new DevComponents.DotNetBar.Controls.SwitchButton();
|
||||||
|
this.labelX1 = new DevComponents.DotNetBar.LabelX();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
|
||||||
this.splitContainer3.Panel1.SuspendLayout();
|
this.splitContainer3.Panel1.SuspendLayout();
|
||||||
this.splitContainer3.Panel2.SuspendLayout();
|
this.splitContainer3.Panel2.SuspendLayout();
|
||||||
@@ -902,6 +904,8 @@
|
|||||||
//
|
//
|
||||||
// sideNavPanel2
|
// sideNavPanel2
|
||||||
//
|
//
|
||||||
|
this.sideNavPanel2.Controls.Add(this.swRegenWordAttmts);
|
||||||
|
this.sideNavPanel2.Controls.Add(this.labelX1);
|
||||||
this.sideNavPanel2.Controls.Add(this.swRefreshTblsForSrch);
|
this.sideNavPanel2.Controls.Add(this.swRefreshTblsForSrch);
|
||||||
this.sideNavPanel2.Controls.Add(this.lblRefreshTblForSrch);
|
this.sideNavPanel2.Controls.Add(this.lblRefreshTblForSrch);
|
||||||
this.sideNavPanel2.Controls.Add(this.warningBox4);
|
this.sideNavPanel2.Controls.Add(this.warningBox4);
|
||||||
@@ -930,11 +934,11 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.swRefreshTblsForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.swRefreshTblsForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.swRefreshTblsForSrch.Location = new System.Drawing.Point(10, 153);
|
this.swRefreshTblsForSrch.Location = new System.Drawing.Point(10, 178);
|
||||||
this.swRefreshTblsForSrch.Name = "swRefreshTblsForSrch";
|
this.swRefreshTblsForSrch.Name = "swRefreshTblsForSrch";
|
||||||
this.swRefreshTblsForSrch.Size = new System.Drawing.Size(91, 22);
|
this.swRefreshTblsForSrch.Size = new System.Drawing.Size(91, 22);
|
||||||
this.swRefreshTblsForSrch.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
this.swRefreshTblsForSrch.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
this.superTooltip1.SetSuperTooltip(this.swRefreshTblsForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("swRefreshTblsForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200)));
|
this.superTooltip1.SetSuperTooltip(this.swRefreshTblsForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refesh Tables For Search", "", resources.GetString("swRefreshTblsForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 125)));
|
||||||
this.swRefreshTblsForSrch.SwitchClickTogglesValue = true;
|
this.swRefreshTblsForSrch.SwitchClickTogglesValue = true;
|
||||||
this.swRefreshTblsForSrch.TabIndex = 32;
|
this.swRefreshTblsForSrch.TabIndex = 32;
|
||||||
this.swRefreshTblsForSrch.Value = true;
|
this.swRefreshTblsForSrch.Value = true;
|
||||||
@@ -949,10 +953,10 @@
|
|||||||
//
|
//
|
||||||
this.lblRefreshTblForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.lblRefreshTblForSrch.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.lblRefreshTblForSrch.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.lblRefreshTblForSrch.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.lblRefreshTblForSrch.Location = new System.Drawing.Point(107, 153);
|
this.lblRefreshTblForSrch.Location = new System.Drawing.Point(107, 178);
|
||||||
this.lblRefreshTblForSrch.Name = "lblRefreshTblForSrch";
|
this.lblRefreshTblForSrch.Name = "lblRefreshTblForSrch";
|
||||||
this.lblRefreshTblForSrch.Size = new System.Drawing.Size(186, 22);
|
this.lblRefreshTblForSrch.Size = new System.Drawing.Size(186, 22);
|
||||||
this.superTooltip1.SetSuperTooltip(this.lblRefreshTblForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Word Attachments", "", resources.GetString("lblRefreshTblForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 200)));
|
this.superTooltip1.SetSuperTooltip(this.lblRefreshTblForSrch, new DevComponents.DotNetBar.SuperTooltipInfo("Refresh Tables For Search", "", resources.GetString("lblRefreshTblForSrch.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 125)));
|
||||||
this.lblRefreshTblForSrch.TabIndex = 31;
|
this.lblRefreshTblForSrch.TabIndex = 31;
|
||||||
this.lblRefreshTblForSrch.Text = "Refresh Tables For Search";
|
this.lblRefreshTblForSrch.Text = "Refresh Tables For Search";
|
||||||
//
|
//
|
||||||
@@ -961,7 +965,7 @@
|
|||||||
this.warningBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
|
this.warningBox4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
|
||||||
this.warningBox4.CloseButtonVisible = false;
|
this.warningBox4.CloseButtonVisible = false;
|
||||||
this.warningBox4.Image = ((System.Drawing.Image)(resources.GetObject("warningBox4.Image")));
|
this.warningBox4.Image = ((System.Drawing.Image)(resources.GetObject("warningBox4.Image")));
|
||||||
this.warningBox4.Location = new System.Drawing.Point(12, 264);
|
this.warningBox4.Location = new System.Drawing.Point(12, 287);
|
||||||
this.warningBox4.Margin = new System.Windows.Forms.Padding(4);
|
this.warningBox4.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.warningBox4.Name = "warningBox4";
|
this.warningBox4.Name = "warningBox4";
|
||||||
this.warningBox4.OptionsButtonVisible = false;
|
this.warningBox4.OptionsButtonVisible = false;
|
||||||
@@ -974,7 +978,7 @@
|
|||||||
this.warningBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
|
this.warningBox2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(196)))), ((int)(((byte)(219)))), ((int)(((byte)(249)))));
|
||||||
this.warningBox2.CloseButtonVisible = false;
|
this.warningBox2.CloseButtonVisible = false;
|
||||||
this.warningBox2.Image = ((System.Drawing.Image)(resources.GetObject("warningBox2.Image")));
|
this.warningBox2.Image = ((System.Drawing.Image)(resources.GetObject("warningBox2.Image")));
|
||||||
this.warningBox2.Location = new System.Drawing.Point(12, 302);
|
this.warningBox2.Location = new System.Drawing.Point(12, 325);
|
||||||
this.warningBox2.Margin = new System.Windows.Forms.Padding(4);
|
this.warningBox2.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.warningBox2.Name = "warningBox2";
|
this.warningBox2.Name = "warningBox2";
|
||||||
this.warningBox2.OptionsButtonVisible = false;
|
this.warningBox2.OptionsButtonVisible = false;
|
||||||
@@ -1128,7 +1132,7 @@
|
|||||||
// line2
|
// line2
|
||||||
//
|
//
|
||||||
this.line2.BackColor = System.Drawing.Color.Transparent;
|
this.line2.BackColor = System.Drawing.Color.Transparent;
|
||||||
this.line2.Location = new System.Drawing.Point(4, 237);
|
this.line2.Location = new System.Drawing.Point(4, 260);
|
||||||
this.line2.Name = "line2";
|
this.line2.Name = "line2";
|
||||||
this.line2.Size = new System.Drawing.Size(281, 12);
|
this.line2.Size = new System.Drawing.Size(281, 12);
|
||||||
this.line2.TabIndex = 20;
|
this.line2.TabIndex = 20;
|
||||||
@@ -1140,7 +1144,7 @@
|
|||||||
this.btnRunRepair.Checked = true;
|
this.btnRunRepair.Checked = true;
|
||||||
this.btnRunRepair.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
this.btnRunRepair.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||||
this.btnRunRepair.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.btnRunRepair.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.btnRunRepair.Location = new System.Drawing.Point(5, 198);
|
this.btnRunRepair.Location = new System.Drawing.Point(5, 221);
|
||||||
this.btnRunRepair.Name = "btnRunRepair";
|
this.btnRunRepair.Name = "btnRunRepair";
|
||||||
this.btnRunRepair.Size = new System.Drawing.Size(280, 23);
|
this.btnRunRepair.Size = new System.Drawing.Size(280, 23);
|
||||||
this.btnRunRepair.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
this.btnRunRepair.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
@@ -1303,6 +1307,38 @@
|
|||||||
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
|
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
|
||||||
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
||||||
//
|
//
|
||||||
|
// swRegenWordAttmts
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
this.swRegenWordAttmts.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
|
this.swRegenWordAttmts.Location = new System.Drawing.Point(10, 150);
|
||||||
|
this.swRegenWordAttmts.Name = "swRegenWordAttmts";
|
||||||
|
this.swRegenWordAttmts.Size = new System.Drawing.Size(91, 22);
|
||||||
|
this.swRegenWordAttmts.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
|
this.superTooltip1.SetSuperTooltip(this.swRegenWordAttmts, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("swRegenWordAttmts.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 250)));
|
||||||
|
this.swRegenWordAttmts.SwitchClickTogglesValue = true;
|
||||||
|
this.swRegenWordAttmts.TabIndex = 34;
|
||||||
|
this.swRegenWordAttmts.Value = true;
|
||||||
|
this.swRegenWordAttmts.ValueObject = "Y";
|
||||||
|
this.swRegenWordAttmts.ValueChanged += new System.EventHandler(this.swCk_ValueChanged);
|
||||||
|
//
|
||||||
|
// labelX1
|
||||||
|
//
|
||||||
|
this.labelX1.BackColor = System.Drawing.Color.Transparent;
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
|
this.labelX1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.labelX1.Location = new System.Drawing.Point(107, 150);
|
||||||
|
this.labelX1.Name = "labelX1";
|
||||||
|
this.labelX1.Size = new System.Drawing.Size(186, 22);
|
||||||
|
this.superTooltip1.SetSuperTooltip(this.labelX1, new DevComponents.DotNetBar.SuperTooltipInfo("Generate Word Attachments", "", resources.GetString("labelX1.SuperTooltip"), null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(300, 250)));
|
||||||
|
this.labelX1.TabIndex = 33;
|
||||||
|
this.labelX1.Text = "Generate Missing Word Attachments";
|
||||||
|
//
|
||||||
// frmBatchRefresh
|
// frmBatchRefresh
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
@@ -1430,6 +1466,8 @@
|
|||||||
private DevComponents.DotNetBar.PanelEx itemPanel2;
|
private DevComponents.DotNetBar.PanelEx itemPanel2;
|
||||||
private DevComponents.DotNetBar.PanelEx itemPanel3;
|
private DevComponents.DotNetBar.PanelEx itemPanel3;
|
||||||
private DevComponents.DotNetBar.ButtonX btnROsNotUsed;
|
private DevComponents.DotNetBar.ButtonX btnROsNotUsed;
|
||||||
|
private DevComponents.DotNetBar.Controls.SwitchButton swRegenWordAttmts;
|
||||||
|
private DevComponents.DotNetBar.LabelX labelX1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ namespace VEPROMS
|
|||||||
swRmObsoleteROData.Enabled = false;
|
swRmObsoleteROData.Enabled = false;
|
||||||
swRmOrphanDataRecs.Enabled = false;
|
swRmOrphanDataRecs.Enabled = false;
|
||||||
swRefreshWordAttmts.Enabled = false;
|
swRefreshWordAttmts.Enabled = false;
|
||||||
|
swRegenWordAttmts.Enabled = false;
|
||||||
|
swRefreshTblsForSrch.Enabled = false;
|
||||||
swStandardHypenChars.Enabled = false;
|
swStandardHypenChars.Enabled = false;
|
||||||
|
|
||||||
//if not full admin, disable Purge Change History
|
//if not full admin, disable Purge Change History
|
||||||
@@ -648,6 +650,106 @@ namespace VEPROMS
|
|||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int RegenCounter = 0;
|
||||||
|
private int RegenTotal = 0;
|
||||||
|
private const int TicksToupdate = 300000; //5 minutes(300 seconds).
|
||||||
|
|
||||||
|
// C2026-007 - Generate Missing PDFs
|
||||||
|
// regenerates the saved attachment PDFs from the database
|
||||||
|
// so that this is not needed the next time the procedures are printed. This also forces ROs to be refreshed in the attachments
|
||||||
|
private void RegenPDFs()
|
||||||
|
{
|
||||||
|
this.Cursor = Cursors.WaitCursor;
|
||||||
|
DateTime pStart = DateTime.Now;
|
||||||
|
txtProcess.AppendText("Generating missing Word Attachments");
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText("Gathering data for Word Attachments that need generated.");
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
Application.DoEvents();
|
||||||
|
|
||||||
|
//get data of missing Docs by Unit that will need regenerated
|
||||||
|
DataTable dt = Maintenance.GetMissingDocsByUnit();
|
||||||
|
RegenCounter = 0;
|
||||||
|
RegenTotal = dt.Rows.Count;
|
||||||
|
txtProcess.AppendText($"Word Attachments to be generated: {RegenTotal}");
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText($"Note that this will provide updates approximately every {TicksToupdate/60000} minutes. Some attachments may take longer than others due to size/number of pages/number of ROs. If PROMS is in the middle of generating a large attachment, it may delay the update message until generation of that attachment completes (in that case taking more than 5 minutes between updates).");
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtResults.AppendText($"{RegenTotal} Word Attachments to be generated.");
|
||||||
|
txtResults.AppendText(Environment.NewLine);
|
||||||
|
txtResults.AppendText(Environment.NewLine);
|
||||||
|
|
||||||
|
//generate as if not debug
|
||||||
|
int debugstatus = MSWordToPDF.DebugStatus;
|
||||||
|
MSWordToPDF.DebugStatus = 0;
|
||||||
|
MSWordToPDF.OverrideColor = Color.Transparent;
|
||||||
|
|
||||||
|
Timer timer1 = new Timer();
|
||||||
|
timer1.Tick += new EventHandler(UpdateRegenProgress);
|
||||||
|
timer1.Interval = TicksToupdate;
|
||||||
|
timer1.Start();
|
||||||
|
|
||||||
|
foreach (DataRow dr in dt.Rows)
|
||||||
|
{
|
||||||
|
//Do Generation
|
||||||
|
using (Section sect = Section.Get((int)dr["SectionID"]))
|
||||||
|
{
|
||||||
|
using (DocumentInfo docInfo = DocumentInfo.Get((int)dr["DocID"]))
|
||||||
|
{
|
||||||
|
if (!dr.IsNull("UnitID")) sect.MyItemInfo.MyDocVersion.DocVersionConfig.SelectedSlave = (int)dr["UnitID"];
|
||||||
|
MSWordToPDF.SetDocPdf(docInfo, sect.MyItemInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Increment - message every _ minutes
|
||||||
|
RegenCounter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
//done with loop - stop timer and destroy it
|
||||||
|
timer1.Stop();
|
||||||
|
timer1.Dispose();
|
||||||
|
|
||||||
|
//Change DebugStatus Back to what it was
|
||||||
|
if (debugstatus == 1)
|
||||||
|
{
|
||||||
|
MSWordToPDF.DebugStatus = 1;
|
||||||
|
MSWordToPDF.OverrideColor = Color.Red;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MSWordToPDF.DebugStatus = 0;
|
||||||
|
MSWordToPDF.OverrideColor = Color.Transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
//end messaging
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText($"Word Attachments Generated: {RegenTotal}");
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtResults.AppendText(Environment.NewLine);
|
||||||
|
txtResults.AppendText($"{RegenTotal} Word Attachments generated.");
|
||||||
|
txtResults.AppendText(Environment.NewLine);
|
||||||
|
txtResults.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText($"Completed: {DateTime.Now:G}");
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
Application.DoEvents();
|
||||||
|
this.Cursor = Cursors.Default;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Outputs the Progress of Regenerating the PDFs every __ minutes
|
||||||
|
private void UpdateRegenProgress(Object myObject, EventArgs myEventArgs)
|
||||||
|
{
|
||||||
|
string progress_str = $"Generated {RegenCounter} of {RegenTotal} ({(decimal)RegenCounter / RegenTotal * 100M:F2}%): {DateTime.Now:G}";
|
||||||
|
txtProcess.AppendText(progress_str);
|
||||||
|
txtProcess.AppendText(Environment.NewLine);
|
||||||
|
txtResults.AppendText(progress_str);
|
||||||
|
txtResults.AppendText(Environment.NewLine);
|
||||||
|
}
|
||||||
|
|
||||||
// B2022-047 - refresh the Content/Text field for table, i.e. Grid, Data so that search will find text in the Grid
|
// B2022-047 - refresh the Content/Text field for table, i.e. Grid, Data so that search will find text in the Grid
|
||||||
// NOTE that an out of memeory error occurs when having to process alot of tables. A config flag is used on the
|
// NOTE that an out of memeory error occurs when having to process alot of tables. A config flag is used on the
|
||||||
// grid record to flag that this operation has been run. And a message is placed in the result window stating to
|
// grid record to flag that this operation has been run. And a message is placed in the result window stating to
|
||||||
@@ -1305,6 +1407,7 @@ namespace VEPROMS
|
|||||||
DevComponents.DotNetBar.StepItem siObsoleteROData = new DevComponents.DotNetBar.StepItem("siObsoleteROData", "Obsolete RO Data");
|
DevComponents.DotNetBar.StepItem siObsoleteROData = new DevComponents.DotNetBar.StepItem("siObsoleteROData", "Obsolete RO Data");
|
||||||
DevComponents.DotNetBar.StepItem siStandardHyphens = new DevComponents.DotNetBar.StepItem("siStandardHyphens", "Standardize Hyphens");
|
DevComponents.DotNetBar.StepItem siStandardHyphens = new DevComponents.DotNetBar.StepItem("siStandardHyphens", "Standardize Hyphens");
|
||||||
DevComponents.DotNetBar.StepItem siRefreshAttmts = new DevComponents.DotNetBar.StepItem("siRefreshAttmts", "Refresh Word Attachments");
|
DevComponents.DotNetBar.StepItem siRefreshAttmts = new DevComponents.DotNetBar.StepItem("siRefreshAttmts", "Refresh Word Attachments");
|
||||||
|
DevComponents.DotNetBar.StepItem siRegenAttmts = new DevComponents.DotNetBar.StepItem("siRegenAttmts", "Regenerate Word Attachments");
|
||||||
DevComponents.DotNetBar.StepItem siRefreshTblsSrchTxt = new DevComponents.DotNetBar.StepItem("siRefreshTblsSrchTxt", "Refresh Tables For Search");
|
DevComponents.DotNetBar.StepItem siRefreshTblsSrchTxt = new DevComponents.DotNetBar.StepItem("siRefreshTblsSrchTxt", "Refresh Tables For Search");
|
||||||
// this will update/rebuild the progress bar in the bottom panel of Admin Tools
|
// this will update/rebuild the progress bar in the bottom panel of Admin Tools
|
||||||
private void setupProgessSteps1()
|
private void setupProgessSteps1()
|
||||||
@@ -1323,6 +1426,8 @@ namespace VEPROMS
|
|||||||
progressSteps1.Items.Add(siStandardHyphens);
|
progressSteps1.Items.Add(siStandardHyphens);
|
||||||
if (swRefreshWordAttmts.Value)
|
if (swRefreshWordAttmts.Value)
|
||||||
progressSteps1.Items.Add(siRefreshAttmts);
|
progressSteps1.Items.Add(siRefreshAttmts);
|
||||||
|
if (swRegenWordAttmts.Value)
|
||||||
|
progressSteps1.Items.Add(siRegenAttmts);
|
||||||
if (swRefreshTblsForSrch.Value)
|
if (swRefreshTblsForSrch.Value)
|
||||||
progressSteps1.Items.Add(siRefreshTblsSrchTxt);
|
progressSteps1.Items.Add(siRefreshTblsSrchTxt);
|
||||||
splitContainer3.Panel2Collapsed = false;
|
splitContainer3.Panel2Collapsed = false;
|
||||||
@@ -1487,6 +1592,12 @@ namespace VEPROMS
|
|||||||
DeletePDFs(); // refresh word attachments
|
DeletePDFs(); // refresh word attachments
|
||||||
StepProgress(prgStpIdx, 100);
|
StepProgress(prgStpIdx, 100);
|
||||||
}
|
}
|
||||||
|
if (swRegenWordAttmts.Value)
|
||||||
|
{
|
||||||
|
StepProgress(++prgStpIdx, 50);
|
||||||
|
RegenPDFs(); // generate missing pdfs
|
||||||
|
StepProgress(prgStpIdx, 100);
|
||||||
|
}
|
||||||
if (swRefreshTblsForSrch.Value)
|
if (swRefreshTblsForSrch.Value)
|
||||||
{
|
{
|
||||||
StepProgress(++prgStpIdx, 50);
|
StepProgress(++prgStpIdx, 50);
|
||||||
|
|||||||
@@ -117,108 +117,30 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<data name="btnPurgeChange.Tooltip" xml:space="preserve">
|
|
||||||
<value>Purges all audit information and change history older than the above date.
|
|
||||||
It is recommended that you perform a database backup before performing this action.
|
|
||||||
Note after purging the information, this will automatically perform the Index
|
|
||||||
Maintenance function to realign indexes with the cut down audit data.
|
|
||||||
Only Full PROMS Administrator Users can perform this action.</value>
|
|
||||||
</data>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
|
|
||||||
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
|
|
||||||
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
|
|
||||||
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
|
|
||||||
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
|
|
||||||
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
|
|
||||||
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
|
|
||||||
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
|
|
||||||
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
|
|
||||||
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
|
|
||||||
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
|
|
||||||
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
|
|
||||||
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="warningBox6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
|
|
||||||
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
|
|
||||||
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
|
|
||||||
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
|
|
||||||
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
|
|
||||||
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
|
|
||||||
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
|
|
||||||
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
|
|
||||||
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
|
|
||||||
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
|
|
||||||
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
|
|
||||||
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
|
|
||||||
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnIndexMaint.Tooltip" xml:space="preserve">
|
|
||||||
<value>This will perform Index Maintenance to realign indexes to optimize performance.
|
|
||||||
This function will cause no change to data or records in PROMS.
|
|
||||||
It should however be performed when other users are not in PROMS, as it could
|
|
||||||
cause slowdown or errors for other users while it is running.</value>
|
|
||||||
</data>
|
|
||||||
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve">
|
<data name="swRegenWordAttmts.SuperTooltip" xml:space="preserve">
|
||||||
<value>This allows the user to remove folders and sub folders as well as their contents.
|
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time.
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior performing this function.
|
|
||||||
|
|
||||||
It is recommended that this be done during off hours.
|
|
||||||
|
|
||||||
|
This function will generate (and save) any missing saved attachment PDFs stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this).
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelX13.SuperTooltip" xml:space="preserve">
|
<data name="labelX1.SuperTooltip" xml:space="preserve">
|
||||||
<value>This allows the user to remove folders and sub folders as well as their contents.
|
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents. Certain actions like loading a new RO.FST require that these PDFs be regenerated which is normally done at print time.
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior performing this function.
|
|
||||||
|
|
||||||
It is recommended that this be done during off hours.
|
|
||||||
|
|
||||||
|
This function will generate (and save) any missing saved attachment PDFs stored in the database (not the PDFs of the entire procedure that you had previous printed). This will cause printing to be faster when you print after this as the PDFs will be pre-genrated in those cases (and thus not require regeneration unless changes were made to the Word Sections or ROs after running this).
|
||||||
</value>
|
</value>
|
||||||
</data>
|
|
||||||
<data name="swDeleteAnnotations.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>This function will allow the user to remove annotations from the selected working drafts.
|
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior to running this function.
|
|
||||||
|
|
||||||
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
|
|
||||||
</data>
|
|
||||||
<data name="labelX14.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>This function will allow the user to remove annotations from the selected working drafts.
|
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior to running this function.
|
|
||||||
|
|
||||||
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
|
|
||||||
</data>
|
|
||||||
<data name="btnDeleteItems.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete.
|
|
||||||
|
|
||||||
Click on the on/off switches to turn on/off each tool.
|
|
||||||
|
|
||||||
Note that only one of these tools can be run at a time.</value>
|
|
||||||
</data>
|
</data>
|
||||||
<data name="swRefreshTblsForSrch.SuperTooltip" xml:space="preserve">
|
<data name="swRefreshTblsForSrch.SuperTooltip" xml:space="preserve">
|
||||||
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents.
|
<value>To allow for a quicker search of the contents within a PROMS Step editor table, a text version of the table is stored separately. If the PROMS Search function is not finding something in a table, this tool will refresh the content of that separately stored table text. Another search should then be performed for the content that was not originally found.
|
||||||
|
|
||||||
This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed.
|
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="lblRefreshTblForSrch.SuperTooltip" xml:space="preserve">
|
<data name="lblRefreshTblForSrch.SuperTooltip" xml:space="preserve">
|
||||||
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents.
|
<value>To allow for a quicker search of the contents within a PROMS Step editor table, a text version of the table is stored separately. If the PROMS Search function is not finding something in a table, this tool will refresh the content of that separately stored table text. Another search should then be performed for the content that was not originally found.
|
||||||
|
|
||||||
This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed.
|
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
<data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="warningBox4.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
|
||||||
@@ -261,7 +183,7 @@ RO paths, ROFST versions, and the contents of RO figures are stored in the datab
|
|||||||
Be sure a current backup exists prior to running this function!!</value>
|
Be sure a current backup exists prior to running this function!!</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="swRefreshWordAttmts.SuperTooltip" xml:space="preserve">
|
<data name="swRefreshWordAttmts.SuperTooltip" xml:space="preserve">
|
||||||
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents.
|
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents.
|
||||||
|
|
||||||
This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed.
|
This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed.
|
||||||
</value>
|
</value>
|
||||||
@@ -280,9 +202,9 @@ RO paths, ROFST versions, and the contents of RO figures are stored in the datab
|
|||||||
Be sure a current backup exists prior to running this function!!</value>
|
Be sure a current backup exists prior to running this function!!</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelX5.SuperTooltip" xml:space="preserve">
|
<data name="labelX5.SuperTooltip" xml:space="preserve">
|
||||||
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all the of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents.
|
<value>When Word attachments are modified and saved, PROMS will create a PDF of the attachment contents and save it in the database. When this is done, all of the RO references are resolved as well as pagination of the attachment. This speeds up the overall printing of the procedure in that PROMS simply inserts the attachment contents.
|
||||||
|
|
||||||
This function will remove all of the saved attachment PDFS stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed.
|
This function will remove all of the saved attachment PDFs stored in the database (not the PDFs of the entire procedure that you had previous printed). This will force PROMS to regenerate (and save) the word attachment PDFs the next time the procedure is printed.
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelX9.SuperTooltip" xml:space="preserve">
|
<data name="labelX9.SuperTooltip" xml:space="preserve">
|
||||||
@@ -302,24 +224,71 @@ Should an item become orphaned (disconnected) from the rest of the data, it will
|
|||||||
|
|
||||||
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool removes any orphaned items from the database.
|
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool removes any orphaned items from the database.
|
||||||
</value>
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnPurgeChange.Tooltip" xml:space="preserve">
|
||||||
|
<value>Purges all audit information and change history older than the above date.
|
||||||
|
It is recommended that you perform a database backup before performing this action.
|
||||||
|
Note after purging the information, this will automatically perform the Index
|
||||||
|
Maintenance function to realign indexes with the cut down audit data.
|
||||||
|
Only Full PROMS Administrator Users can perform this action.</value>
|
||||||
|
</data>
|
||||||
|
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
|
||||||
|
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
|
||||||
|
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
|
||||||
|
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
|
||||||
|
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
|
||||||
|
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
|
||||||
|
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
|
||||||
|
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
|
||||||
|
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
|
||||||
|
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
|
||||||
|
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
|
||||||
|
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
|
||||||
|
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="warningBox6.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAp5JREFUOE+F
|
||||||
|
k11Ik1Ecxv9zouJ2E4TWnR8V5tAppJmYsLnNlaLTxAoiKIQiibpYSmEEmSSa0IVGISMUw7rpE+yiQiuk
|
||||||
|
/IhROssPyjanpL4udeq29z3nCdcH+Wb1g+fq/zzP+R8Oh+gvPK4kNWujp1IrPek8S5Hy+X9hbXSN9aVC
|
||||||
|
eq1FwEYN8vk/mWqiDPZwI+NOHbhLj8CdDaK7npLlvnWpO0AKqZV62YgO/GMquDMN0rAevkbqlHvXZdlG
|
||||||
|
h6Rn8eATu4GJncB0Fvh8HnwPYuGpJ4vcvwZbGYWJrcpPzGXG8ngGtsZFQJOggrS0B9J0MbwNIR9uHqRQ
|
||||||
|
ee4XPhuVSy814IIB/lk9QkIIanUomFgIzkux0qHB/CUqk+eCtB2jCLEl1M1mLcBSLthKHlQqJaKjw8FZ
|
||||||
|
Mbi/ENKXEizUKD/f2k9h8jz5mumk2K0F9xUAUgE4K0JUVDji4yLBvflgMyYwlxFL9zSYq6ITa8I3DlNY
|
||||||
|
wKZ0soVSgFkAXgwuFSEmJhJJiWqwCR3YSCbY2x0QB4zwnFc6W4p+22KxiY4EXiQF74kf6/L5vdi+TYV0
|
||||||
|
rRpsMB2sPxWsRwvpTTq87QmYOUNHg+HqQlL4ryscbK4UPGD5vu60CWw8G7evbkN7bSykXm0w/FMBew6E
|
||||||
|
CsXQFQMpaLKezP6OLeDL+8AFM5hLBzaciennKcFXUCgI7o7ENQWSfRcWmmPgPEW5tNJIj8QxM9hkDthY
|
||||||
|
FthAGlh/SvAPXC7fjOrjmyC+Sl5TsCpfdzYEK92llUbllDiaD3HEDPG9CaLDCGnI9IdEhwnioBHiOwMC
|
||||||
|
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
|
||||||
|
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnIndexMaint.Tooltip" xml:space="preserve">
|
||||||
|
<value>This will perform Index Maintenance to realign indexes to optimize performance.
|
||||||
|
This function will cause no change to data or records in PROMS.
|
||||||
|
It should however be performed when other users are not in PROMS, as it could
|
||||||
|
cause slowdown or errors for other users while it is running.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
|
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
|
||||||
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
|
<value>This allows the user to check referenced object links in procedure step data for multiple working drafts in a batch mode.
|
||||||
|
|
||||||
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
|
Bad referenced object links will be identified with a Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior performing this function.
|
Be sure a current backup of the database exists prior to performing this function.
|
||||||
|
|
||||||
It is recommended that this be done during off hours.
|
It is recommended that this be done during off hours.
|
||||||
|
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="labelX12.SuperTooltip" xml:space="preserve">
|
<data name="labelX12.SuperTooltip" xml:space="preserve">
|
||||||
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
|
<value>This allows the user to check referenced object links in procedure step data for multiple working drafts in a batch mode.
|
||||||
|
|
||||||
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
|
Bad referenced object links will be identified with a Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
|
||||||
|
|
||||||
Be sure a current backup of the database exists prior performing this function.
|
Be sure a current backup of the database exists prior to performing this function.
|
||||||
|
|
||||||
It is recommended that this be done during off hours.
|
It is recommended that this be done during off hours.
|
||||||
</value>
|
</value>
|
||||||
@@ -387,6 +356,45 @@ If more than one procedure is selected, it is recommended that this be performed
|
|||||||
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
|
dj38fYbVglHy1FGJt57uL9ZS10IN9cxfJPvXCzTgqSKH5xwNzVXSkFBBDsFKA4KV7IKVegQrda2e7j5N
|
||||||
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
||||||
</value>
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve">
|
||||||
|
<value>This allows the user to remove folders and sub folders as well as their contents.
|
||||||
|
|
||||||
|
Be sure a current backup of the database exists prior performing this function.
|
||||||
|
|
||||||
|
It is recommended that this be done during off hours.
|
||||||
|
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="labelX13.SuperTooltip" xml:space="preserve">
|
||||||
|
<value>This allows the user to remove folders and sub folders as well as their contents.
|
||||||
|
|
||||||
|
Be sure a current backup of the database exists prior performing this function.
|
||||||
|
|
||||||
|
It is recommended that this be done during off hours.
|
||||||
|
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="swDeleteAnnotations.SuperTooltip" xml:space="preserve">
|
||||||
|
<value>This function will allow the user to remove annotations from the selected working drafts.
|
||||||
|
|
||||||
|
Be sure a current backup of the database exists prior to running this function.
|
||||||
|
|
||||||
|
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
|
||||||
|
</data>
|
||||||
|
<data name="labelX14.SuperTooltip" xml:space="preserve">
|
||||||
|
<value>This function will allow the user to remove annotations from the selected working drafts.
|
||||||
|
|
||||||
|
Be sure a current backup of the database exists prior to running this function.
|
||||||
|
|
||||||
|
If more than one working draft is selected, it is recommended that this be performed during off hours.</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnDeleteItems.SuperTooltip" xml:space="preserve">
|
||||||
|
<value>This will allow for the deletion of groups of annotations and allow for deleting entire folders within PROMS. Use the tree nodes to select which items to delete.
|
||||||
|
|
||||||
|
Click on the on/off switches to turn on/off each tool.
|
||||||
|
|
||||||
|
Note that only one of these tools can be run at a time.</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>25</value>
|
<value>25</value>
|
||||||
|
|||||||
@@ -678,7 +678,7 @@ namespace VEPROMS
|
|||||||
// to check that there are enough docstyles to map the selected type of section.
|
// to check that there are enough docstyles to map the selected type of section.
|
||||||
PlantFormat pf = _SectionConfig.MyFormat != null ? _SectionConfig.MyFormat.PlantFormat : _SectionConfig.MyDefaultFormat.PlantFormat;
|
PlantFormat pf = _SectionConfig.MyFormat != null ? _SectionConfig.MyFormat.PlantFormat : _SectionConfig.MyDefaultFormat.PlantFormat;
|
||||||
if (!_Initializing && ppCmbxFormat.SelectedIndex >= 0)
|
if (!_Initializing && ppCmbxFormat.SelectedIndex >= 0)
|
||||||
pf = FormatInfoList.SortedFormatInfoList[ppCmbxFormat.SelectedIndex].PlantFormat;
|
pf = ((FormatInfo) ppCmbxFormat.SelectedItem).PlantFormat;
|
||||||
else if (!_Initializing) // if the format was changed, it may have been set to default.
|
else if (!_Initializing) // if the format was changed, it may have been set to default.
|
||||||
pf = _SectionConfig.MyDefaultFormat.PlantFormat;
|
pf = _SectionConfig.MyDefaultFormat.PlantFormat;
|
||||||
_Initializing = true;
|
_Initializing = true;
|
||||||
|
|||||||
+1
-1
@@ -877,7 +877,7 @@ namespace VEPROMS
|
|||||||
this.infoPanel.ExpandOnTitleClick = true;
|
this.infoPanel.ExpandOnTitleClick = true;
|
||||||
this.infoPanel.Location = new System.Drawing.Point(614, 57);
|
this.infoPanel.Location = new System.Drawing.Point(614, 57);
|
||||||
this.infoPanel.Name = "infoPanel";
|
this.infoPanel.Name = "infoPanel";
|
||||||
this.infoPanel.Size = new System.Drawing.Size(230, 490);
|
this.infoPanel.Size = new System.Drawing.Size(300, 490);
|
||||||
this.infoPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
|
this.infoPanel.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||||
this.infoPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
this.infoPanel.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
||||||
this.infoPanel.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
|
this.infoPanel.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
|
||||||
|
|||||||
@@ -617,7 +617,7 @@ namespace VEPROMS
|
|||||||
ProcedureConfig pc = pi.MyConfig as ProcedureConfig;
|
ProcedureConfig pc = pi.MyConfig as ProcedureConfig;
|
||||||
if (pc == null) return;
|
if (pc == null) return;
|
||||||
|
|
||||||
dlgSetChangeBarStartDate cbdDlg = new dlgSetChangeBarStartDate(pc);
|
dlgSetChangeBarStartDate cbdDlg = new dlgSetChangeBarStartDate(pc, pi);
|
||||||
if (cbdDlg.ShowDialog() == DialogResult.OK)
|
if (cbdDlg.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
using (Item itm = Item.Get(pi.ItemID))
|
using (Item itm = Item.Get(pi.ItemID))
|
||||||
@@ -633,18 +633,23 @@ namespace VEPROMS
|
|||||||
//// Refresh the StepPanel for the current Procedure
|
//// Refresh the StepPanel for the current Procedure
|
||||||
//// so change bars update
|
//// so change bars update
|
||||||
//// on any open StepPanel
|
//// on any open StepPanel
|
||||||
|
|
||||||
|
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open
|
||||||
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
|
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
|
||||||
if (dti != null)
|
if (dti != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
|
if (!dti.MyStepTabPanel.MyStepPanel.ContainsFocus)
|
||||||
dti.MyStepTabPanel.MyStepPanel.Focus();
|
dti.MyStepTabPanel.MyStepPanel.Focus();
|
||||||
|
|
||||||
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
foreach (EditItem eitm in dti.MyStepTabPanel.MyStepPanel.Controls.OfType<EditItem>())
|
||||||
|
{
|
||||||
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
eitm.ChangeBar = eitm.MyItemInfo.HasChangeBar;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private bool _SkipRefresh = false;
|
private bool _SkipRefresh = false;
|
||||||
public bool SkipRefresh
|
public bool SkipRefresh
|
||||||
|
|||||||
@@ -1114,11 +1114,32 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
_Apples = new List<MiniConfig>();
|
_Apples = new List<MiniConfig>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B2026-017 Use Pre-typed in information when adding New Applicability
|
||||||
|
if (_Apples.Count == 0)
|
||||||
|
{
|
||||||
|
cfg.ID = textBox1.Text;
|
||||||
|
if (!string.IsNullOrEmpty(textBox2.Text))
|
||||||
|
{
|
||||||
|
cfg.Name = textBox2.Text;
|
||||||
|
}
|
||||||
|
cfg.Number = textBox3.Text;
|
||||||
|
cfg.Text = textBox4.Text;
|
||||||
|
cfg.OtherID = textBox8.Text;
|
||||||
|
cfg.OtherName = textBox9.Text;
|
||||||
|
cfg.OtherNumber = textBox10.Text;
|
||||||
|
cfg.OtherText = textBox11.Text;
|
||||||
|
cfg.ProcedureNumber = textBox5.Text;
|
||||||
|
cfg.SetID = textBox6.Text;
|
||||||
|
cfg.SetName = textBox7.Text;
|
||||||
|
}
|
||||||
_Apples.Add(cfg);
|
_Apples.Add(cfg);
|
||||||
|
|
||||||
bsApples.DataSource = null;
|
bsApples.DataSource = null;
|
||||||
bsApples.DataSource = _Apples;
|
bsApples.DataSource = _Apples;
|
||||||
lbApplicabilities.SelectedItem = cfg;
|
lbApplicabilities.SelectedItem = cfg;
|
||||||
|
lbApplicabilities_SelectedIndexChanged(sender, e);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ApplicIsUsed(MiniConfig cfg) // B2017-230 - don't allow user to remove an applicability that is being used (specified)
|
private bool ApplicIsUsed(MiniConfig cfg) // B2017-230 - don't allow user to remove an applicability that is being used (specified)
|
||||||
|
|||||||
@@ -2291,7 +2291,7 @@ OnPropertyChanged("Default_BkColor");
|
|||||||
public void RemoveSlave(int index)
|
public void RemoveSlave(int index)
|
||||||
{
|
{
|
||||||
XmlNode dd = _Xp.XmlContents.SelectSingleNode("//Slave[@index='" + index.ToString() + "']");
|
XmlNode dd = _Xp.XmlContents.SelectSingleNode("//Slave[@index='" + index.ToString() + "']");
|
||||||
dd.ParentNode.RemoveChild(dd);
|
dd?.ParentNode?.RemoveChild(dd);
|
||||||
}
|
}
|
||||||
public int MaxSlaveIndex
|
public int MaxSlaveIndex
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1003,19 +1003,13 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (pdfTmp == null) return false;
|
if (pdfTmp == null) return false;
|
||||||
|
|
||||||
FileInfo pdfFile = new FileInfo(pdfTmp);
|
FileInfo pdfFile = new FileInfo(pdfTmp);
|
||||||
FileStream fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
|
|
||||||
Byte[] buf = new byte[pdfFile.Length];
|
Byte[] buf = new byte[pdfFile.Length];
|
||||||
|
|
||||||
|
using (FileStream fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||||
|
{
|
||||||
fs.Read(buf, 0, buf.Length);
|
fs.Read(buf, 0, buf.Length);
|
||||||
fs.Close();
|
fs.Close();
|
||||||
|
}
|
||||||
// B2023-022 & B2023-023 commented out the deletion of the temporary Word section PDF file
|
|
||||||
// These files are deleted when the procedure pdf file is closed after being generated.
|
|
||||||
// PROMS was crashing because it could not find these temporary files to delete.
|
|
||||||
//try
|
|
||||||
//{
|
|
||||||
// pdfFile.Delete();
|
|
||||||
//}
|
|
||||||
//catch { }
|
|
||||||
|
|
||||||
using (Document doc = docInfo.Get())
|
using (Document doc = docInfo.Get())
|
||||||
{
|
{
|
||||||
@@ -1482,10 +1476,20 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
if (CloseWordWhenDone)
|
if (CloseWordWhenDone)
|
||||||
{
|
{
|
||||||
CloseAppAfterWait();
|
CloseAppAfterWait();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
System.Windows.Forms.Application.DoEvents();
|
||||||
|
_MyLog.Error("Failed to close Microsoft Word. Collecting reclaimable memory.", ex);
|
||||||
|
GC.Collect();
|
||||||
|
_MyLog.Warn("Finished collecting reclaimable memory.");
|
||||||
|
}
|
||||||
|
|
||||||
if (statusChange != null) statusChange(VolianStatusType.Complete, 0, string.Empty);
|
if (statusChange != null) statusChange(VolianStatusType.Complete, 0, string.Empty);
|
||||||
if (Volian.Base.Library.BaselineMetaFile.IsOpen && Volian.Base.Library.BaselineMetaFile.IncludeWordSecText) Volian.Base.Library.BaselineMetaFile.WriteLine("++EndTxt++");
|
if (Volian.Base.Library.BaselineMetaFile.IsOpen && Volian.Base.Library.BaselineMetaFile.IncludeWordSecText) Volian.Base.Library.BaselineMetaFile.WriteLine("++EndTxt++");
|
||||||
|
|||||||
@@ -3312,6 +3312,25 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.
|
||||||
|
// for enhanced documents, when copying content, need to not resolve the
|
||||||
|
//unit designators until print time
|
||||||
|
public string DisplayTextKeepSpecialCharsKeepUnitSpecific
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
string str = MyContent.Text;
|
||||||
|
foreach (string key in SpecialCharacters.Keys)
|
||||||
|
str = str.Replace(key, SpecialCharacters[key]);
|
||||||
|
string retval = ConvertToDisplayText(str);
|
||||||
|
foreach (string key in SpecialCharacters.Keys)
|
||||||
|
retval = retval.Replace(SpecialCharacters[key], key);
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public string DisplayNumber
|
public string DisplayNumber
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -3822,6 +3841,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
|
|
||||||
//B2019-140 Change bars do not get refreshed when approval is run.
|
//B2019-140 Change bars do not get refreshed when approval is run.
|
||||||
// Reset a Procedure and sub items in the cache
|
// Reset a Procedure and sub items in the cache
|
||||||
|
// **********************
|
||||||
|
// Be carefull calling this when the Procedure is Open
|
||||||
|
// When the Procedure is Open - use StepTabRibbon.RefreshProcedure(); instead
|
||||||
|
// When a Procedure is open and you try to refresh it,
|
||||||
|
// events can fire behind the scenes - causing data to try to be accessed while you are trying to refresh it
|
||||||
|
// When This occurs, it will cause a
|
||||||
|
// "ThreadException ... Collection was modified; enumeration operation may not execute.”
|
||||||
|
// **********************
|
||||||
public static ProcedureInfo ResetProcedure(int procID)
|
public static ProcedureInfo ResetProcedure(int procID)
|
||||||
{
|
{
|
||||||
// The following lines reload the procedure info cache
|
// The following lines reload the procedure info cache
|
||||||
@@ -3843,7 +3870,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//Reload all the child/sub items
|
//Reload all the child/sub items
|
||||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||||
List<int> itemIDs = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.ActiveParent != null && (t.ActiveParent is ItemInfo) && t.MyProcedure.ItemID == procID).Select(x => (x.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
|
List<int> itemIDs = _CacheByPrimaryKey.SelectMany(kvp => kvp.Value).ToList().Where(t => t?.ActiveParent != null && (t.ActiveParent is ItemInfo) && t.MyProcedure.ItemID == procID).Select(x => (x.ActiveParent as ItemInfo).ItemID).Distinct().ToList();
|
||||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
#pragma warning restore S2971 // LINQ expressions should be simplified
|
||||||
for (int index = 0; index < itemIDs.Count; index++)
|
for (int index = 0; index < itemIDs.Count; index++)
|
||||||
{
|
{
|
||||||
@@ -3853,13 +3880,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//reset the procedure config for all items attached to current procedure
|
//reset the procedure config for all items attached to current procedure
|
||||||
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
#pragma warning disable S2971 // LINQ expressions should be simplified - need initial ToList to force enumeration
|
||||||
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||||
List<ItemInfo> pconfigrefresh_items = _CacheByPrimaryKey.Values.ToList().SelectMany(y => y).Where(t => t?.MyProcedure?.ItemID == procID).Distinct().ToList();
|
List<ItemInfo> pconfigrefresh_items = _CacheByPrimaryKey.SelectMany(kvp => kvp.Value).ToList().Where(t => t?.MyProcedure?.ItemID == procID).Distinct().ToList();
|
||||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
#pragma warning restore S2971 // LINQ expressions should be simplified
|
||||||
for (int index = 0; index < pconfigrefresh_items.Count; index++)
|
for (int index = 0; index < pconfigrefresh_items.Count; index++)
|
||||||
{
|
{
|
||||||
pconfigrefresh_items[index].MyProcedure = newproc;
|
pconfigrefresh_items[index].MyProcedure = newproc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//return the changed procedure info
|
//return the changed procedure info
|
||||||
return newproc;
|
return newproc;
|
||||||
}
|
}
|
||||||
@@ -8358,7 +8386,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
ItemInfo srcItem = ItemInfo.Get(seds[0].ItemID);
|
ItemInfo srcItem = ItemInfo.Get(seds[0].ItemID);
|
||||||
// B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced. Null reference check
|
// B2022-049: Copy/paste of enhanced procedure and bad links between source and enhanced. Null reference check
|
||||||
if (srcItem != null && srcItem.DisplayTextKeepSpecialChars != ii.DisplayTextKeepSpecialChars)
|
//B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.
|
||||||
|
// for enhanced documents, when copying content, need to not resolve the
|
||||||
|
//unit designators until print time
|
||||||
|
if (srcItem != null && srcItem.DisplayTextKeepSpecialCharsKeepUnitSpecific != ii.DisplayTextKeepSpecialCharsKeepUnitSpecific)
|
||||||
{
|
{
|
||||||
if (retiil == null) retiil = new ItemInfoList(ii);
|
if (retiil == null) retiil = new ItemInfoList(ii);
|
||||||
else retiil.AddItem(ii);
|
else retiil.AddItem(ii);
|
||||||
@@ -8384,7 +8415,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ItemInfo srcItem = ItemInfo.Get(seds[0].ItemID);
|
ItemInfo srcItem = ItemInfo.Get(seds[0].ItemID);
|
||||||
using (Item enhItem = Item.Get(ii.ItemID))
|
using (Item enhItem = Item.Get(ii.ItemID))
|
||||||
{
|
{
|
||||||
enhItem.MyContent.Text = srcItem.DisplayTextKeepSpecialChars;
|
//B2026-011 Improve the resolution of unit numbers in multi-unit background documents when printing.
|
||||||
|
// for enhanced documents, when copying content, need to not resolve the
|
||||||
|
//unit designators until print time
|
||||||
|
enhItem.MyContent.Text = srcItem.DisplayTextKeepSpecialCharsKeepUnitSpecific;
|
||||||
enhItem.Save();
|
enhItem.Save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -597,13 +597,6 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//if (_RevisionInfoList != null)
|
//if (_RevisionInfoList != null)
|
||||||
// return _RevisionInfoList;
|
// return _RevisionInfoList;
|
||||||
RevisionInfoList tmp = DataPortal.Fetch<RevisionInfoList>(new ItemUnitCriteria(itemID, unitID));
|
RevisionInfoList tmp = DataPortal.Fetch<RevisionInfoList>(new ItemUnitCriteria(itemID, unitID));
|
||||||
|
|
||||||
foreach (var x in tmp)
|
|
||||||
{
|
|
||||||
x.LatestVersion.ApprovedXML = x.RevisionID.ToString();
|
|
||||||
x.LatestVersion.PDF = Encoding.ASCII.GetBytes(x.RevisionID.ToString());
|
|
||||||
x.LatestVersion.SummaryPDF = Encoding.ASCII.GetBytes(x.RevisionID.ToString());
|
|
||||||
}
|
|
||||||
RevisionInfo.AddList(tmp);
|
RevisionInfo.AddList(tmp);
|
||||||
tmp.AddEvents();
|
tmp.AddEvents();
|
||||||
//_RevisionInfoList = tmp;
|
//_RevisionInfoList = tmp;
|
||||||
|
|||||||
@@ -522,9 +522,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
public static Pdf MakePdf(Document myDocument, int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth, double pageCount, byte[] docPdf)
|
public static Pdf MakePdf(Document myDocument, int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth, double pageCount, byte[] docPdf)
|
||||||
{
|
{
|
||||||
Pdf tmp = Pdf.New(myDocument, debugStatus, topRow, pageLength, leftMargin, pageWidth, pageCount, docPdf);
|
using (Pdf tmp = Pdf.New(myDocument, debugStatus, topRow, pageLength, leftMargin, pageWidth, pageCount, docPdf))
|
||||||
|
{
|
||||||
if (tmp.IsSavable)
|
if (tmp.IsSavable)
|
||||||
tmp = tmp.Save();
|
return tmp.Save();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Csla.Validation.BrokenRulesCollection brc = tmp.ValidationRules.GetBrokenRules();
|
Csla.Validation.BrokenRulesCollection brc = tmp.ValidationRules.GetBrokenRules();
|
||||||
@@ -533,9 +534,11 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
tmp._ErrorMessage += "\r\n\tFailure: " + br.RuleName;
|
tmp._ErrorMessage += "\r\n\tFailure: " + br.RuleName;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
public static Pdf Get(int docID, int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth)
|
public static Pdf Get(int docID, int debugStatus, int topRow, int pageLength, int leftMargin, int pageWidth)
|
||||||
{
|
{
|
||||||
if (!CanGetObject())
|
if (!CanGetObject())
|
||||||
|
|||||||
@@ -0,0 +1,72 @@
|
|||||||
|
using System;
|
||||||
|
using Csla.Data;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Minimal Class for Managing Change Bar Audit History
|
||||||
|
namespace VEPROMS.CSLA.Library
|
||||||
|
{
|
||||||
|
public static class ChangeBarAuditHistory
|
||||||
|
{
|
||||||
|
|
||||||
|
#region Add Audit Record for ChangeBar History
|
||||||
|
public static void AddAudit(int itemID, string description, DateTime dts, string userID, int unitIndex)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||||
|
{
|
||||||
|
using (SqlCommand cm = cn.CreateCommand())
|
||||||
|
{
|
||||||
|
cm.CommandType = CommandType.StoredProcedure;
|
||||||
|
cm.CommandText = "AddChangeBarAuditHistory";
|
||||||
|
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||||
|
cm.Parameters.AddWithValue("@Description", description);
|
||||||
|
cm.Parameters.AddWithValue("@DTS", dts);
|
||||||
|
cm.Parameters.AddWithValue("@UserID", userID);
|
||||||
|
if (unitIndex != 0) cm.Parameters.AddWithValue("@UnitIndex", unitIndex);
|
||||||
|
|
||||||
|
cm.CommandTimeout = 0;
|
||||||
|
cm.ExecuteNonQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new DbCslaException("Error in ChangeBarAuditHistory.AddAudit: ", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Get Change Bar Audit History
|
||||||
|
public static DataTable GetChangeBarAuditHistory(int itemID)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||||
|
{
|
||||||
|
using (SqlCommand cm = cn.CreateCommand())
|
||||||
|
{
|
||||||
|
cm.CommandType = CommandType.StoredProcedure;
|
||||||
|
cm.CommandText = "GetChangeBarAuditHistoryByItem";
|
||||||
|
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||||
|
cm.CommandTimeout = Database.DefaultTimeout;
|
||||||
|
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||||
|
{
|
||||||
|
DataTable dt = new DataTable();
|
||||||
|
da.Fill(dt);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new DbCslaException("Error in ChangeBarAuditHistory.GetChangeBarAuditHistoryByItem: retrieving data failed", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -88,5 +88,36 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Get Docs by Unit
|
||||||
|
//C2026-007 Get Missing Docs by Unit
|
||||||
|
// for Generating/Regenerating Pdf table
|
||||||
|
// can be ran overnight to assist with Printing when RO Updates
|
||||||
|
// and large Word Sections conatining ROs
|
||||||
|
public static DataTable GetMissingDocsByUnit()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||||
|
{
|
||||||
|
using (SqlCommand cm = cn.CreateCommand())
|
||||||
|
{
|
||||||
|
cm.CommandType = CommandType.StoredProcedure;
|
||||||
|
cm.CommandText = "GetMissingDocsByUnit";
|
||||||
|
cm.CommandTimeout = Database.DefaultTimeout;
|
||||||
|
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||||
|
{
|
||||||
|
DataTable dt = new DataTable();
|
||||||
|
da.Fill(dt);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new DbCslaException("Error in GetMissingDocsByUnit: retrieving data failed", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
using Csla.Data;
|
||||||
|
using System;
|
||||||
|
using System.Data;
|
||||||
|
using System.Data.SqlClient;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
//CSM - C2026-009 - Minimal Class for Getting Revision Data
|
||||||
|
namespace VEPROMS.CSLA.Library
|
||||||
|
{
|
||||||
|
public static class RevisionData
|
||||||
|
{
|
||||||
|
#region Check Data
|
||||||
|
//Check if Data Has Units
|
||||||
|
public static bool HasUnits(DataTable dt) => dt.AsEnumerable().Any(x => x.Field<int?>("UnitID") > 0);
|
||||||
|
|
||||||
|
//Get Maximum Date Time Stamp
|
||||||
|
public static DateTime MaxDTS(DataTable dt) => dt.AsEnumerable().Max(x => x.Field<DateTime>("DTS"));
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Get Revision Data
|
||||||
|
//CSM - C2026-009 Get Current Revision Data by Unit
|
||||||
|
public static DataTable GetRevisionDataByUnit(int itemID)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
|
||||||
|
{
|
||||||
|
using (SqlCommand cm = cn.CreateCommand())
|
||||||
|
{
|
||||||
|
cm.CommandType = CommandType.StoredProcedure;
|
||||||
|
cm.CommandText = "GetCurrentApprovedRevisions";
|
||||||
|
cm.CommandTimeout = Database.DefaultTimeout;
|
||||||
|
cm.Parameters.AddWithValue("@ItemID", itemID);
|
||||||
|
|
||||||
|
using (SqlDataAdapter da = new SqlDataAdapter(cm))
|
||||||
|
{
|
||||||
|
DataTable dt = new DataTable();
|
||||||
|
da.Fill(dt);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new DbCslaException("Error in GetRevisionDataByUnit: retrieving data failed", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -389,8 +389,10 @@
|
|||||||
<Compile Include="Generated\ZTransition.cs" />
|
<Compile Include="Generated\ZTransition.cs" />
|
||||||
<Compile Include="Generated\ZTransitionInfo.cs" />
|
<Compile Include="Generated\ZTransitionInfo.cs" />
|
||||||
<Compile Include="Minimal\AnnotationstypeSections.cs" />
|
<Compile Include="Minimal\AnnotationstypeSections.cs" />
|
||||||
|
<Compile Include="Minimal\ChangeBarAuditHistory.cs" />
|
||||||
<Compile Include="Minimal\Maintenance.cs" />
|
<Compile Include="Minimal\Maintenance.cs" />
|
||||||
<Compile Include="Minimal\GeneralReports.cs" />
|
<Compile Include="Minimal\GeneralReports.cs" />
|
||||||
|
<Compile Include="Minimal\RevisionData.cs" />
|
||||||
<Compile Include="Minimal\UserReports.cs" />
|
<Compile Include="Minimal\UserReports.cs" />
|
||||||
<Compile Include="Minimal\UserSettings.cs" />
|
<Compile Include="Minimal\UserSettings.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
namespace Volian.Controls.Library
|
||||||
|
{
|
||||||
|
partial class CustomMessageBox
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Required designer variable.
|
||||||
|
/// </summary>
|
||||||
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clean up any resources being used.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
if (disposing && (components != null))
|
||||||
|
{
|
||||||
|
components.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
this.btn1 = new System.Windows.Forms.Button();
|
||||||
|
this.btn2 = new System.Windows.Forms.Button();
|
||||||
|
this.lblMessage = new System.Windows.Forms.Label();
|
||||||
|
this.tableLP1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
|
this.tableLP1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// btn1
|
||||||
|
//
|
||||||
|
this.btn1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
|
this.btn1.AutoSize = true;
|
||||||
|
this.btn1.Location = new System.Drawing.Point(18, 102);
|
||||||
|
this.btn1.Margin = new System.Windows.Forms.Padding(10);
|
||||||
|
this.btn1.MinimumSize = new System.Drawing.Size(60, 20);
|
||||||
|
this.btn1.Name = "btn1";
|
||||||
|
this.btn1.Size = new System.Drawing.Size(60, 20);
|
||||||
|
this.btn1.TabIndex = 0;
|
||||||
|
this.btn1.UseVisualStyleBackColor = true;
|
||||||
|
this.btn1.Click += new System.EventHandler(this.Btn1_Click);
|
||||||
|
//
|
||||||
|
// btn2
|
||||||
|
//
|
||||||
|
this.btn2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.btn2.AutoSize = true;
|
||||||
|
this.btn2.Location = new System.Drawing.Point(335, 102);
|
||||||
|
this.btn2.Margin = new System.Windows.Forms.Padding(10);
|
||||||
|
this.btn2.MinimumSize = new System.Drawing.Size(60, 20);
|
||||||
|
this.btn2.Name = "btn2";
|
||||||
|
this.btn2.Size = new System.Drawing.Size(60, 20);
|
||||||
|
this.btn2.TabIndex = 1;
|
||||||
|
this.btn2.UseVisualStyleBackColor = true;
|
||||||
|
this.btn2.Click += new System.EventHandler(this.Btn2_Click);
|
||||||
|
//
|
||||||
|
// lblMessage
|
||||||
|
//
|
||||||
|
this.lblMessage.AutoSize = true;
|
||||||
|
this.tableLP1.SetColumnSpan(this.lblMessage, 2);
|
||||||
|
this.lblMessage.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.lblMessage.Location = new System.Drawing.Point(11, 8);
|
||||||
|
this.lblMessage.MaximumSize = new System.Drawing.Size(413, 0);
|
||||||
|
this.lblMessage.Name = "lblMessage";
|
||||||
|
this.lblMessage.Size = new System.Drawing.Size(391, 84);
|
||||||
|
this.lblMessage.TabIndex = 2;
|
||||||
|
this.lblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
|
//
|
||||||
|
// tableLP1
|
||||||
|
//
|
||||||
|
this.tableLP1.AutoSize = true;
|
||||||
|
this.tableLP1.ColumnCount = 2;
|
||||||
|
this.tableLP1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLP1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||||
|
this.tableLP1.Controls.Add(this.lblMessage, 0, 0);
|
||||||
|
this.tableLP1.Controls.Add(this.btn1);
|
||||||
|
this.tableLP1.Controls.Add(this.btn2);
|
||||||
|
this.tableLP1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tableLP1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.tableLP1.MaximumSize = new System.Drawing.Size(413, 0);
|
||||||
|
this.tableLP1.MinimumSize = new System.Drawing.Size(413, 130);
|
||||||
|
this.tableLP1.Name = "tableLP1";
|
||||||
|
this.tableLP1.Padding = new System.Windows.Forms.Padding(8);
|
||||||
|
this.tableLP1.RowCount = 2;
|
||||||
|
this.tableLP1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
|
this.tableLP1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
|
||||||
|
this.tableLP1.Size = new System.Drawing.Size(413, 130);
|
||||||
|
this.tableLP1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// CustomMessageBox
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.AutoSize = true;
|
||||||
|
this.ClientSize = new System.Drawing.Size(419, 130);
|
||||||
|
this.Controls.Add(this.tableLP1);
|
||||||
|
this.Name = "CustomMessageBox";
|
||||||
|
this.ShowIcon = false;
|
||||||
|
this.Text = "CustomMessageBox";
|
||||||
|
this.tableLP1.ResumeLayout(false);
|
||||||
|
this.tableLP1.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.Button btn1;
|
||||||
|
private System.Windows.Forms.Button btn2;
|
||||||
|
private System.Windows.Forms.Label lblMessage;
|
||||||
|
private System.Windows.Forms.TableLayoutPanel tableLP1;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Data;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace Volian.Controls.Library
|
||||||
|
{
|
||||||
|
public partial class CustomMessageBox : Form
|
||||||
|
{
|
||||||
|
//Custome Message Box Class to allow renaming of buttons
|
||||||
|
// originally devleoped for use with
|
||||||
|
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
|
||||||
|
// in order to allow the user to decide if they wanted to search on the selected step or the selected procedure
|
||||||
|
public CustomMessageBox(string message, string title, string button1Text = "OK", string button2Text = "")
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.Text = title;
|
||||||
|
lblMessage.Text = message;
|
||||||
|
btn1.Text = button1Text;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(button2Text))
|
||||||
|
{
|
||||||
|
btn2.Text = button2Text;
|
||||||
|
btn2.Visible = true;
|
||||||
|
|
||||||
|
//make buttons uniform
|
||||||
|
btn1.Height = btn2.Height = btn1.Height > btn2.Height ? btn1.Height : btn2.Height;
|
||||||
|
btn1.Width = btn2.Width = btn1.Width > btn2.Width ? btn1.Width : btn2.Width;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
btn2.Visible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Btn1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.Yes;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Btn2_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
DialogResult = DialogResult.No;
|
||||||
|
Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
//static method for calling custommessagebox directly
|
||||||
|
public static DialogResult Show(string message, string title, string button1Text = "OK", string button2Text = "")
|
||||||
|
{
|
||||||
|
using (var messageBox = new CustomMessageBox(message, title, button1Text, button2Text))
|
||||||
|
{
|
||||||
|
return messageBox.ShowDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
</root>
|
||||||
+46
-13
@@ -1,3 +1,6 @@
|
|||||||
|
using System.Security.Cryptography;
|
||||||
|
using VEPROMS.CSLA.Library;
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
partial class DisplayApplicability
|
partial class DisplayApplicability
|
||||||
@@ -20,6 +23,7 @@ namespace Volian.Controls.Library
|
|||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
#region Component Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -30,19 +34,41 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.gpMode = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
this.gpItem = new DevComponents.DotNetBar.Controls.GroupPanel();
|
this.gpItem = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||||
|
this.btnApplicabilitychg2 = new DevComponents.DotNetBar.ButtonItem();
|
||||||
|
this.btnApplicabilitychg = new DevComponents.DotNetBar.ButtonX();
|
||||||
|
this.superTooltip1 = new DevComponents.DotNetBar.SuperTooltip();
|
||||||
|
this.gpItem.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
|
// btnApplicabilitychg
|
||||||
|
//
|
||||||
|
this.btnApplicabilitychg.Location = new System.Drawing.Point(60, 8);
|
||||||
|
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(4);
|
||||||
|
this.btnApplicabilitychg.BackColor = System.Drawing.SystemColors.Control;
|
||||||
|
this.btnApplicabilitychg.Name = "btnApplicabilitychg";
|
||||||
|
this.btnApplicabilitychg.Size = new System.Drawing.Size(80, 22);
|
||||||
|
this.btnApplicabilitychg.Margin = new System.Windows.Forms.Padding(2);
|
||||||
|
this.btnApplicabilitychg.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||||
|
this.superTooltip1.SetSuperTooltip(this.btnApplicabilitychg, new DevComponents.DotNetBar.SuperTooltipInfo("Change applicability settings - All At Level", "", "When clicked, all steps at the level of the current step will have their applicability settings changed. Note that for two column procedures, the left column and right column are handled separately.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||||
|
this.btnApplicabilitychg.TabIndex = 0;
|
||||||
|
this.btnApplicabilitychg.Text = "Set All at Level";
|
||||||
|
this.btnApplicabilitychg.ColorTable = DevComponents.DotNetBar.eButtonColor.BlueOrb;
|
||||||
|
this.btnApplicabilitychg.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
|
this.btnApplicabilitychg.Click += new System.EventHandler(this.BtnApplicabilitychg_Click);
|
||||||
|
//
|
||||||
// gpMode
|
// gpMode
|
||||||
//
|
//
|
||||||
this.gpMode.AutoSize = true;
|
this.gpMode.AutoSize = true;
|
||||||
this.gpMode.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.gpMode.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.gpMode.CanvasColor = System.Drawing.SystemColors.Control;
|
this.gpMode.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.gpMode.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.gpMode.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
|
this.gpMode.DisabledBackColor = System.Drawing.Color.Empty;
|
||||||
this.gpMode.Dock = System.Windows.Forms.DockStyle.Top;
|
this.gpMode.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.gpMode.Location = new System.Drawing.Point(0, 0);
|
this.gpMode.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.gpMode.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.gpMode.Name = "gpMode";
|
this.gpMode.Name = "gpMode";
|
||||||
this.gpMode.Padding = new System.Windows.Forms.Padding(10, 10, 10, 30);
|
this.gpMode.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
|
||||||
this.gpMode.Size = new System.Drawing.Size(324, 40);
|
this.gpMode.Size = new System.Drawing.Size(432, 49);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -58,7 +84,6 @@ namespace Volian.Controls.Library
|
|||||||
this.gpMode.Style.BorderRightWidth = 1;
|
this.gpMode.Style.BorderRightWidth = 1;
|
||||||
this.gpMode.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
this.gpMode.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||||
this.gpMode.Style.BorderTopWidth = 1;
|
this.gpMode.Style.BorderTopWidth = 1;
|
||||||
this.gpMode.Style.Class = "";
|
|
||||||
this.gpMode.Style.CornerDiameter = 4;
|
this.gpMode.Style.CornerDiameter = 4;
|
||||||
this.gpMode.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
this.gpMode.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||||
this.gpMode.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
this.gpMode.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||||
@@ -67,12 +92,10 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.gpMode.StyleMouseDown.Class = "";
|
|
||||||
this.gpMode.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.gpMode.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.gpMode.StyleMouseOver.Class = "";
|
|
||||||
this.gpMode.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.gpMode.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.gpMode.TabIndex = 0;
|
this.gpMode.TabIndex = 0;
|
||||||
this.gpMode.Text = "Viewing Mode";
|
this.gpMode.Text = "Viewing Mode";
|
||||||
@@ -83,11 +106,14 @@ namespace Volian.Controls.Library
|
|||||||
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.gpItem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
this.gpItem.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.gpItem.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
|
//this.gpItem.Controls.Add(this.btnApplicabilitychg);
|
||||||
|
this.gpItem.DisabledBackColor = System.Drawing.Color.Empty;
|
||||||
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
this.gpItem.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.gpItem.Location = new System.Drawing.Point(0, 40);
|
this.gpItem.Location = new System.Drawing.Point(0, 49);
|
||||||
|
this.gpItem.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.gpItem.Name = "gpItem";
|
this.gpItem.Name = "gpItem";
|
||||||
this.gpItem.Padding = new System.Windows.Forms.Padding(10, 10, 10, 30);
|
this.gpItem.Padding = new System.Windows.Forms.Padding(13, 12, 13, 37);
|
||||||
this.gpItem.Size = new System.Drawing.Size(324, 40);
|
this.gpItem.Size = new System.Drawing.Size(432, 85);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -103,7 +129,6 @@ namespace Volian.Controls.Library
|
|||||||
this.gpItem.Style.BorderRightWidth = 1;
|
this.gpItem.Style.BorderRightWidth = 1;
|
||||||
this.gpItem.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
this.gpItem.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||||
this.gpItem.Style.BorderTopWidth = 1;
|
this.gpItem.Style.BorderTopWidth = 1;
|
||||||
this.gpItem.Style.Class = "";
|
|
||||||
this.gpItem.Style.CornerDiameter = 4;
|
this.gpItem.Style.CornerDiameter = 4;
|
||||||
this.gpItem.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
this.gpItem.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||||
this.gpItem.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
this.gpItem.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||||
@@ -112,26 +137,31 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.gpItem.StyleMouseDown.Class = "";
|
|
||||||
this.gpItem.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.gpItem.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
this.gpItem.StyleMouseOver.Class = "";
|
|
||||||
this.gpItem.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.gpItem.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.gpItem.TabIndex = 1;
|
this.gpItem.TabIndex = 1;
|
||||||
this.gpItem.Text = "Item Mode";
|
this.gpItem.Text = "Item Mode";
|
||||||
//
|
//
|
||||||
// DisplayApplicability
|
// DisplayApplicability
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.Controls.Add(this.gpItem);
|
this.Controls.Add(this.gpItem);
|
||||||
this.Controls.Add(this.gpMode);
|
this.Controls.Add(this.gpMode);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(4);
|
||||||
this.Name = "DisplayApplicability";
|
this.Name = "DisplayApplicability";
|
||||||
this.Size = new System.Drawing.Size(324, 656);
|
this.Size = new System.Drawing.Size(432, 807);
|
||||||
|
this.gpItem.ResumeLayout(false);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
//
|
||||||
|
// superTooltip1
|
||||||
|
//
|
||||||
|
this.superTooltip1.DefaultTooltipSettings = new DevComponents.DotNetBar.SuperTooltipInfo("", "", "", null, null, DevComponents.DotNetBar.eTooltipColor.Gray);
|
||||||
|
this.superTooltip1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,6 +169,9 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
private DevComponents.DotNetBar.Controls.GroupPanel gpMode;
|
private DevComponents.DotNetBar.Controls.GroupPanel gpMode;
|
||||||
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
|
private DevComponents.DotNetBar.Controls.GroupPanel gpItem;
|
||||||
|
private DevComponents.DotNetBar.ButtonItem btnApplicabilitychg2;
|
||||||
|
private DevComponents.DotNetBar.ButtonX btnApplicabilitychg;
|
||||||
|
private DevComponents.DotNetBar.SuperTooltip superTooltip1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
|
using JR.Utils.GUI.Forms;
|
||||||
|
using log4net.Util;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Drawing;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
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;
|
||||||
using JR.Utils.GUI.Forms;
|
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@@ -51,18 +53,25 @@ namespace Volian.Controls.Library
|
|||||||
i++;
|
i++;
|
||||||
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
AddViewMode(name.Trim(), i.ToString(), apple == i);
|
||||||
}
|
}
|
||||||
|
|
||||||
AddItemMode("All", "-1");
|
AddItemMode("All", "-1");
|
||||||
i = 0;
|
i = 0;
|
||||||
foreach (string name in names)
|
foreach (string name in names)
|
||||||
AddItemMode(name.Trim(), (++i).ToString());
|
AddItemMode(name.Trim(), (++i).ToString());
|
||||||
AddItemMode("None", "0");
|
AddItemMode("None", "0");
|
||||||
|
gpItem.Controls.Add(btnApplicabilitychg);
|
||||||
|
btnApplicabilitychg.BringToFront();
|
||||||
if (_MyDisplayTabItem.MyStepTabPanel != null)
|
if (_MyDisplayTabItem.MyStepTabPanel != null)
|
||||||
|
{
|
||||||
MyItemInfo = _MyDisplayTabItem.MyStepTabPanel.MyStepPanel.SelectedItemInfo;
|
MyItemInfo = _MyDisplayTabItem.MyStepTabPanel.MyStepPanel.SelectedItemInfo;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
MyItemInfo = _MyDisplayTabItem.MyItemInfo;
|
MyItemInfo = _MyDisplayTabItem.MyItemInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public int ViewMode
|
public int ViewMode
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -175,6 +184,7 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
WireCheckboxes();
|
WireCheckboxes();
|
||||||
MyApplicability = string.Empty;
|
MyApplicability = string.Empty;
|
||||||
string sep = string.Empty;
|
string sep = string.Empty;
|
||||||
@@ -270,6 +280,59 @@ namespace Volian.Controls.Library
|
|||||||
// s.Save();
|
// s.Save();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
private void BtnApplicabilitychg_Click(object sender, System.EventArgs e)
|
||||||
|
{
|
||||||
|
Volian.Base.Library.BigNum MasterSlave_ApplicabilityTmp;
|
||||||
|
StepConfig sc = MyItemInfo.MyConfig as StepConfig;
|
||||||
|
MasterSlave_ApplicabilityTmp = sc.MasterSlave_Applicability;
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
|
||||||
|
ItemInfo startitm = MyItemInfo.FirstSibling;
|
||||||
|
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;
|
||||||
|
using (Content cnt = Content.Get(startitm.MyContent.ContentID))
|
||||||
|
{
|
||||||
|
sc2.MasterSlave_Applicability = (MasterSlave_ApplicabilityTmp);
|
||||||
|
cnt.Config = sc2.ToString();
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
_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
|
||||||
private bool IsProcWithNoExternalTrans(ItemInfo ii, List<InvalidTransition> invalidTrans)
|
private bool IsProcWithNoExternalTrans(ItemInfo ii, List<InvalidTransition> invalidTrans)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -56,6 +56,19 @@ namespace Volian.Controls.Library
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (DesignMode) return; // B2019-043 need to check if we are just saving changes to the user interface
|
if (DesignMode) return; // B2019-043 need to check if we are just saving changes to the user interface
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Set/Show Change Bar Audit History
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
lbChangeBarHistory.DataSource = ChangeBarAuditHistory.GetChangeBarAuditHistory(value.ItemID);
|
||||||
|
lbChangeBarHistory.ValueMember = "AuditID";
|
||||||
|
lbChangeBarHistory.DisplayMember = "Text";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lbChangeBarHistory.DataSource = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (value is ProcedureInfo && _MyProcedureInfo is ProcedureInfo && value.ItemID == _MyProcedureInfo.ItemID)
|
if (value is ProcedureInfo && _MyProcedureInfo is ProcedureInfo && value.ItemID == _MyProcedureInfo.ItemID)
|
||||||
return;
|
return;
|
||||||
_MyProcedureInfo = value;
|
_MyProcedureInfo = value;
|
||||||
@@ -184,6 +197,15 @@ namespace Volian.Controls.Library
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
myRTB.FormatFont = null;
|
myRTB.FormatFont = null;
|
||||||
RefreshRequired = true;
|
RefreshRequired = true;
|
||||||
|
|
||||||
|
if (MyProcedureInfo != null)
|
||||||
|
{
|
||||||
|
lbChangeBarHistory.DataSource = ChangeBarAuditHistory.GetChangeBarAuditHistory(MyProcedureInfo.ItemID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lbChangeBarHistory.DataSource = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lbChanges_VisibleChanged(object sender, System.EventArgs e)
|
private void lbChanges_VisibleChanged(object sender, System.EventArgs e)
|
||||||
@@ -1075,6 +1097,24 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
tvAudits.Height = ((tcpDetail.Height - btnRestore.Height) / 4) * 3;
|
tvAudits.Height = ((tcpDetail.Height - btnRestore.Height) / 4) * 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//CSM - C2026-010 - Set/Show Change Bar Audit History
|
||||||
|
//Display a Tooltip for what was in the list
|
||||||
|
private void LbChangeBarHistory_MouseMove(object sender, MouseEventArgs e)
|
||||||
|
{
|
||||||
|
// Just use the item's value for the tooltip.
|
||||||
|
int index = lbChangeBarHistory.IndexFromPoint(e.Location);
|
||||||
|
|
||||||
|
if (index != ListBox.NoMatches)
|
||||||
|
{
|
||||||
|
DataRow rw = (lbChangeBarHistory.Items[index] as DataRowView)?.Row;
|
||||||
|
|
||||||
|
// Display the item's value as a tooltip.
|
||||||
|
if (tipCBHistory.GetToolTip(lbChangeBarHistory) != rw["Text"].ToString())
|
||||||
|
tipCBHistory.SetToolTip(lbChangeBarHistory, rw["Text"].ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void RefreshChangeList()
|
public void RefreshChangeList()
|
||||||
{
|
{
|
||||||
myTimer.Enabled = false;
|
myTimer.Enabled = false;
|
||||||
|
|||||||
Binary file not shown.
@@ -188,4 +188,7 @@
|
|||||||
<metadata name="myTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="myTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="tipCBHistory.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>119, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
@@ -372,12 +372,14 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
// B2022-088: [JPR] Find Doc Ro button not working in Word Sections
|
||||||
// B2022-098: [JPR] ROs not being resolved in Word Sections
|
// B2022-098: [JPR] ROs not being resolved in Word Sections
|
||||||
if (e.Node.Tag is ROFSTLookup.rochild){
|
if (e.Node.Tag is ROFSTLookup.rochild)
|
||||||
|
{
|
||||||
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
ROFSTLookup.rochild chld = (ROFSTLookup.rochild)e.Node.Tag;
|
||||||
selectedChld = chld;
|
selectedChld = chld;
|
||||||
|
|
||||||
if (chld.value != null)
|
if (chld.value != null)
|
||||||
{
|
{
|
||||||
|
chld.value = Regex.Replace(chld.value, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : "");
|
||||||
RoUsageInfo SavROLink = null;
|
RoUsageInfo SavROLink = null;
|
||||||
if (_savCurROLink != null) SavROLink = _savCurROLink;
|
if (_savCurROLink != null) SavROLink = _savCurROLink;
|
||||||
|
|
||||||
@@ -1163,12 +1165,22 @@ namespace Volian.Controls.Library
|
|||||||
lbROId.Text = string.Empty;
|
lbROId.Text = string.Empty;
|
||||||
|
|
||||||
// Disable all buttons by default
|
// Disable all buttons by default
|
||||||
btnGoToRO.Enabled = false;
|
|
||||||
btnSaveRO.Enabled = false;
|
btnSaveRO.Enabled = false;
|
||||||
btnCancelRO.Enabled = false;
|
btnCancelRO.Enabled = false;
|
||||||
btnPreviewRO.Enabled = false;
|
btnPreviewRO.Enabled = false;
|
||||||
|
|
||||||
|
//B2026-030 GoTo sometimes requires being pressed twice
|
||||||
|
if (MyUserInfo != null && MyDvi != null && selectedChld.value != null)
|
||||||
|
{
|
||||||
|
btnGoToRO.Enabled = UserInfo.CanEditROs(MyUserInfo, MyDvi); // Writers and Reviewers cannot edit ROs (run the RO Editor)
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
btnGoToRO.Enabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -414,6 +414,15 @@ namespace Volian.Controls.Library
|
|||||||
lbSrchResults.Visible = true;
|
lbSrchResults.Visible = true;
|
||||||
lbSrchResultsIncTrans.Visible = false;
|
lbSrchResultsIncTrans.Visible = false;
|
||||||
cbxRnoOnly.Visible = true;
|
cbxRnoOnly.Visible = true;
|
||||||
|
|
||||||
|
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
|
||||||
|
//don't allow changing the Style for Incoming Transitions
|
||||||
|
//but allow them to change it if there are search results and it is another tab
|
||||||
|
if (_SearchResults != null && _SearchResults.Count > 0)
|
||||||
|
{
|
||||||
|
cmbResultsStyle.Enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (e.NewTab == tabIncTrans) // C2020-033: Incoming transitions
|
if (e.NewTab == tabIncTrans) // C2020-033: Incoming transitions
|
||||||
{
|
{
|
||||||
xpSetToSearch.Enabled = false;
|
xpSetToSearch.Enabled = false;
|
||||||
@@ -422,7 +431,7 @@ namespace Volian.Controls.Library
|
|||||||
lbSrchResultsIncTrans.Visible = true;
|
lbSrchResultsIncTrans.Visible = true;
|
||||||
lbSrchResultsIncTrans.CheckBoxesVisible = true;
|
lbSrchResultsIncTrans.CheckBoxesVisible = true;
|
||||||
lbSrchResultsIncTrans.AutoScroll = true;
|
lbSrchResultsIncTrans.AutoScroll = true;
|
||||||
btnSearch.Enabled = false; // C2021 - 002: disable search button - no functionality for Incoming Transitions
|
cmbResultsStyle.Enabled = false;
|
||||||
cbxRnoOnly.Visible = false;
|
cbxRnoOnly.Visible = false;
|
||||||
}
|
}
|
||||||
else if (e.NewTab == tabROSearch)
|
else if (e.NewTab == tabROSearch)
|
||||||
@@ -648,7 +657,6 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
btnTranCvtAllToTxt.Enabled = IncTransCvtAllToTextPerm();
|
btnTranCvtAllToTxt.Enabled = IncTransCvtAllToTextPerm();
|
||||||
btnTranCvtSelToTxt.Enabled = false;
|
btnTranCvtSelToTxt.Enabled = false;
|
||||||
btnSearch.Enabled = false; // C2021 - 002: disable search button - no functionality for Incoming Transitions
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IncTranCvtPerm()
|
public bool IncTranCvtPerm()
|
||||||
@@ -1765,6 +1773,7 @@ namespace Volian.Controls.Library
|
|||||||
btnClearSearchResults.Enabled = true;
|
btnClearSearchResults.Enabled = true;
|
||||||
btnCopySearchResults.Enabled = true;
|
btnCopySearchResults.Enabled = true;
|
||||||
btnSaveSearchResults.Enabled = true;
|
btnSaveSearchResults.Enabled = true;
|
||||||
|
if (tabSearchTypes.SelectedTab != tabIncTrans)
|
||||||
cmbResultsStyle.Enabled = true;
|
cmbResultsStyle.Enabled = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2188,21 +2197,39 @@ namespace Volian.Controls.Library
|
|||||||
// C2019-001: Search in RNO steps only
|
// C2019-001: Search in RNO steps only
|
||||||
if (cbxRnoOnlyTrans.Checked) GetInRNOResults();
|
if (cbxRnoOnlyTrans.Checked) GetInRNOResults();
|
||||||
}
|
}
|
||||||
else if (tabSearchTypes.SelectedTab == tabSearchTypes.Tabs[4])
|
else if (tabSearchTypes.SelectedTab == tabIncTrans)
|
||||||
{
|
{
|
||||||
// C2020-033: Incoming Transitions: Make an iteminfolist from the list returned from
|
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
|
||||||
// GetExternalTransitionsToChildren (also gets transitions to the item itself)
|
|
||||||
// B2021-010: Use IncomingTranGetMergedTranList to get a complete list of incoming transitions (transitions to procedure
|
if (_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure != null)
|
||||||
// were only included if there were NO transitions to items within procedure)
|
|
||||||
ReportTitle = string.Format("Search For Incoming Transitions to {0}: ", SearchIncTransII.Path);
|
|
||||||
SearchResults = IncomingTranGetMergedTranList();
|
|
||||||
cmbResultsStyleIndex = 1; //display step locations in results
|
|
||||||
if (SearchResults == null || SearchResults.Count == 0)
|
|
||||||
{
|
{
|
||||||
FlexibleMessageBox.Show("No Matches Found.", "Search");
|
|
||||||
|
if (_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure.ItemID == _TabControl?.MyEditItem?.MyItemInfo?.ItemID)
|
||||||
|
{
|
||||||
|
_ = _TabControl.OnSearchIncTrans(this, new vlnTreeItemInfoEventArgs(_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//if on a step, check if the user wants to load incoming transitions for that step or the entire procedure
|
||||||
|
switch (CustomMessageBox.Show("Would you like to load incoming transitions for this procedure or this step?", "Load Incoming Transitions", "This Procedure", "This Step"))
|
||||||
|
{
|
||||||
|
case DialogResult.Yes:
|
||||||
|
_ = _TabControl.OnSearchIncTrans(this, new vlnTreeItemInfoEventArgs(_TabControl?.MyEditItem?.MyItemInfo?.MyProcedure));
|
||||||
|
break;
|
||||||
|
case DialogResult.No:
|
||||||
|
_ = _TabControl.OnSearchIncTrans(this, new vlnTreeItemInfoEventArgs(_TabControl?.MyEditItem?.MyItemInfo));
|
||||||
|
break;
|
||||||
|
default: //Cancel was pressed
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (SearchResults != null)
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FlexibleMessageBox.Show("Please open a procedure before selecting this option to load incoming transitions for that procedure.", "Search");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (SearchResults != null && tabSearchTypes.SelectedTab != tabIncTrans)
|
||||||
{
|
{
|
||||||
AddMessageForEmptyAnnotations();
|
AddMessageForEmptyAnnotations();
|
||||||
if (cmbResultsStyleIndex == 3 && cmbResultsStyle.Items.Count == 3) cmbResultsStyleIndex--;
|
if (cmbResultsStyleIndex == 3 && cmbResultsStyle.Items.Count == 3) cmbResultsStyleIndex--;
|
||||||
@@ -2303,6 +2330,17 @@ namespace Volian.Controls.Library
|
|||||||
cmbResultsStyle.Items.Add(comboItem2);
|
cmbResultsStyle.Items.Add(comboItem2);
|
||||||
if (hasAnnot) cmbResultsStyle.Items.Add(comboItem3);
|
if (hasAnnot) cmbResultsStyle.Items.Add(comboItem3);
|
||||||
cmbResultsStyle.Items.Add(comboItem4);
|
cmbResultsStyle.Items.Add(comboItem4);
|
||||||
|
|
||||||
|
// C2025-062 When Search clicked - Load the Incoming transitions for the Active Procedure
|
||||||
|
if (tabSearchTypes.SelectedTab == tabIncTrans)
|
||||||
|
{
|
||||||
|
cmbResultsStyle.SelectedIndex = -1;
|
||||||
|
cmbResultsStyle.Enabled = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmbResultsStyle.Enabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void cbxTextSearchText_Leave(object sender, EventArgs e)
|
private void cbxTextSearchText_Leave(object sender, EventArgs e)
|
||||||
|
|||||||
+3
-3
@@ -215,6 +215,7 @@ namespace Volian.Controls.Library
|
|||||||
this.groupPanelCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
|
this.groupPanelCheckoff.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.groupPanelCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.groupPanelCheckoff.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
this.groupPanelCheckoff.Controls.Add(this.cmbCheckoff);
|
this.groupPanelCheckoff.Controls.Add(this.cmbCheckoff);
|
||||||
|
this.groupPanelCheckoff.Controls.Add(this.cbInitialLine);
|
||||||
this.groupPanelCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
|
this.groupPanelCheckoff.DisabledBackColor = System.Drawing.Color.Empty;
|
||||||
this.groupPanelCheckoff.Dock = System.Windows.Forms.DockStyle.Top;
|
this.groupPanelCheckoff.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.groupPanelCheckoff.Location = new System.Drawing.Point(0, 231);
|
this.groupPanelCheckoff.Location = new System.Drawing.Point(0, 231);
|
||||||
@@ -265,8 +266,7 @@ namespace Volian.Controls.Library
|
|||||||
this.cbInitialLine.Margin = new System.Windows.Forms.Padding(2);
|
this.cbInitialLine.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.cbInitialLine.Name = "cbInitialLine";
|
this.cbInitialLine.Name = "cbInitialLine";
|
||||||
this.cbInitialLine.Size = new System.Drawing.Size(112, 15);
|
this.cbInitialLine.Size = new System.Drawing.Size(112, 15);
|
||||||
this.superTooltipTags.SetSuperTooltip(this.cbInitialLine, new DevComponents.DotNetBar.SuperTooltipInfo("Manual Page Break", "", "When set, starts this step at the top of a page.\r\n\r\nkeyboard command: <Ctrl><Ente" +
|
this.superTooltipTags.SetSuperTooltip(this.cbInitialLine, new DevComponents.DotNetBar.SuperTooltipInfo("Disable Initial Line", "", "When set, The initial line will be removed from this step.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
||||||
"r>", null, null, DevComponents.DotNetBar.eTooltipColor.Gray));
|
|
||||||
this.cbInitialLine.TabIndex = 1;
|
this.cbInitialLine.TabIndex = 1;
|
||||||
this.cbInitialLine.Text = "Disable Initial Line";
|
this.cbInitialLine.Text = "Disable Initial Line";
|
||||||
this.cbInitialLine.Visible = false;
|
this.cbInitialLine.Visible = false;
|
||||||
@@ -276,7 +276,6 @@ namespace Volian.Controls.Library
|
|||||||
//
|
//
|
||||||
this.groupPanelcmbShwRplWds.CanvasColor = System.Drawing.SystemColors.Control;
|
this.groupPanelcmbShwRplWds.CanvasColor = System.Drawing.SystemColors.Control;
|
||||||
this.groupPanelcmbShwRplWds.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
this.groupPanelcmbShwRplWds.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||||
this.groupPanelcmbShwRplWds.Controls.Add(this.cbInitialLine);
|
|
||||||
this.groupPanelcmbShwRplWds.Controls.Add(this.cmbShwRplWds);
|
this.groupPanelcmbShwRplWds.Controls.Add(this.cmbShwRplWds);
|
||||||
this.groupPanelcmbShwRplWds.DisabledBackColor = System.Drawing.Color.Empty;
|
this.groupPanelcmbShwRplWds.DisabledBackColor = System.Drawing.Color.Empty;
|
||||||
this.groupPanelcmbShwRplWds.Dock = System.Windows.Forms.DockStyle.Top;
|
this.groupPanelcmbShwRplWds.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
@@ -880,3 +879,4 @@ namespace Volian.Controls.Library
|
|||||||
private System.Windows.Forms.Button btnSaveChangeID;
|
private System.Windows.Forms.Button btnSaveChangeID;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4162,7 +4162,10 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
|
//B2026-024 Change bars should not show when updating Applicability.
|
||||||
|
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = false;
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = true;
|
||||||
}
|
}
|
||||||
public void SaveConfig()
|
public void SaveConfig()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1400,15 +1400,25 @@ namespace Volian.Controls.Library
|
|||||||
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
|
||||||
int position = SelectionStart;
|
int position = SelectionStart;
|
||||||
SelectionLength = 0;
|
SelectionLength = 0;
|
||||||
|
// B2026-036 fixed issue where numbers after a dash character (in an RO return value) were trucated
|
||||||
|
// Needed to add a space after the \f0 in the string replace below. RTF was getting confused
|
||||||
|
// when there are number right after the \f0. Note also remove the space charcter after
|
||||||
|
// the \f1 command, as it is not needed since the \u commdn follows it.
|
||||||
|
// Here is the old code prior to when the foreach loop was added to handle symbols in RO value:
|
||||||
|
//
|
||||||
|
// linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 "); // dash character
|
||||||
|
// linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
|
||||||
|
// linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 "); // delta symbol
|
||||||
|
|
||||||
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
var pattern = @"\\u([0-9]{1,4})\?"; // RO Editor add symbols C2022 - 003
|
||||||
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
||||||
{
|
{
|
||||||
linkValue = linkValue.Replace(match.Value, "\\f1 " + match.Value + " \\f0");
|
linkValue = linkValue.Replace(match.Value, "\\f1" + match.Value + "\\f0 ");
|
||||||
}
|
}
|
||||||
|
|
||||||
linkValue = linkValue.Replace(@"{", @"\{");
|
linkValue = linkValue.Replace(@"{", @"\{");
|
||||||
linkValue = linkValue.Replace(@"}", @"\}");
|
linkValue = linkValue.Replace(@"}", @"\}");
|
||||||
|
|
||||||
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
|
SelectedRtf = @"{\rtf1\ansi" + FontTable + @"{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}\v" + FontSize + @" <START]\v0\cf1 " + linkValue + @"\cf0\v " + linkUrl + @"[END>\v0 }";
|
||||||
this.SelectionLength = 0;
|
this.SelectionLength = 0;
|
||||||
this.SelectionStart = position;
|
this.SelectionStart = position;
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -2473,6 +2473,17 @@ namespace Volian.Controls.Library
|
|||||||
private string ConvertTableText(string str)
|
private string ConvertTableText(string str)
|
||||||
{
|
{
|
||||||
string rtn = str;
|
string rtn = str;
|
||||||
|
string pattern = @"\\u([0-9]{1,4})\?";
|
||||||
|
|
||||||
|
string mValue, mValue2 = "";
|
||||||
|
foreach (Match match in Regex.Matches(rtn, pattern, RegexOptions.IgnoreCase))
|
||||||
|
{
|
||||||
|
mValue = match.Value;
|
||||||
|
mValue2 = $"\\f1 {mValue}\\f0";
|
||||||
|
rtn = rtn.Replace(match.Value, mValue2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//ShowRawString(str, "ConvertTableText IN");
|
//ShowRawString(str, "ConvertTableText IN");
|
||||||
rtn = rtn.Replace(@"START]\v0", @"START]\cf1\v0");
|
rtn = rtn.Replace(@"START]\v0", @"START]\cf1\v0");
|
||||||
rtn = rtn.Replace(@"\v #Link:", @"\cf0\v #Link:");
|
rtn = rtn.Replace(@"\v #Link:", @"\cf0\v #Link:");
|
||||||
|
|||||||
@@ -154,6 +154,12 @@
|
|||||||
<Compile Include="ConvertTable.cs">
|
<Compile Include="ConvertTable.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="CustomMessageBox.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="CustomMessageBox.Designer.cs">
|
||||||
|
<DependentUpon>CustomMessageBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="DisplayApplicability.cs">
|
<Compile Include="DisplayApplicability.cs">
|
||||||
<SubType>UserControl</SubType>
|
<SubType>UserControl</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -454,6 +460,10 @@
|
|||||||
<DependentUpon>AnnotationSearch.cs</DependentUpon>
|
<DependentUpon>AnnotationSearch.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="CustomMessageBox.resx">
|
||||||
|
<DependentUpon>CustomMessageBox.cs</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="DisplayBookMarks.resx">
|
<EmbeddedResource Include="DisplayBookMarks.resx">
|
||||||
<DependentUpon>DisplayBookMarks.cs</DependentUpon>
|
<DependentUpon>DisplayBookMarks.cs</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
|
|||||||
@@ -1601,12 +1601,11 @@ namespace Volian.Controls.Library
|
|||||||
//B2024-024 create import file for parent/child procedure set
|
//B2024-024 create import file for parent/child procedure set
|
||||||
void MultiUnitImportProcedure_Click(object sender, EventArgs e)
|
void MultiUnitImportProcedure_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
//RevisionInfo ri = (sender as MenuItem).Tag as RevisionInfo;
|
|
||||||
RevisionInfo ri = RevisionInfo.Get(int.Parse((sender as MenuItem).Tag.ToString()));
|
RevisionInfo ri = RevisionInfo.Get(int.Parse((sender as MenuItem).Tag.ToString()));
|
||||||
RevisionConfig rc = ri.MyConfig as RevisionConfig;
|
RevisionConfig rc = ri.MyConfig as RevisionConfig;
|
||||||
// bug fix: B2016-183 - add the child's name (ex Unit 1) to the export file name for Parent/Child procedures.
|
// bug fix: B2016-183 - add the child's name (ex Unit 1) to the export file name for Parent/Child procedures.
|
||||||
int applIdx = rc.Applicability_Index;
|
int applIdx = rc.Applicability_Index;
|
||||||
string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to inlcude the export filename
|
string str = (applIdx > 0) ? _currentPri.MyDocVersion.UnitNames[applIdx - 1] + "_" : ""; // if parent/child get the defined child name to include the export filename
|
||||||
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||||
xd.LoadXml(ri.LatestVersion.ApprovedXML);
|
xd.LoadXml(ri.LatestVersion.ApprovedXML);
|
||||||
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
string PEIPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\VEPROMS\PEI_" + Database.VEPROMS_SqlConnection.Database;
|
||||||
@@ -1615,7 +1614,12 @@ namespace Volian.Controls.Library
|
|||||||
// B2022-048: Crash when creating Procedure to Import from versions. Couldn't handle '/' in proc number.
|
// B2022-048: Crash when creating Procedure to Import from versions. Couldn't handle '/' in proc number.
|
||||||
string fNametmp = xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_").Replace("/", "-") + ".pxml";
|
string fNametmp = xd.SelectSingleNode("procedure/content/@number").InnerText.Replace(" ", "_").Replace(@"\u8209?", "-").Replace(@"\u9586?", "_").Replace("/", "-") + ".pxml";
|
||||||
// B2022-112: If applicability, need to resolve the '<' and '>' characters. Just use the UnitNames, i.e. str, from above.
|
// B2022-112: If applicability, need to resolve the '<' and '>' characters. Just use the UnitNames, i.e. str, from above.
|
||||||
if (applIdx > 0) fNametmp = Regex.Replace(fNametmp, @"\<U-ID\>", str, RegexOptions.IgnoreCase);
|
if (applIdx > 0)
|
||||||
|
{
|
||||||
|
fNametmp = Regex.Replace(fNametmp, @"\<U-ID\>", str, RegexOptions.IgnoreCase);
|
||||||
|
fNametmp = Regex.Replace(fNametmp, @"\<U-NAME\>", str, RegexOptions.IgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp;
|
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp;
|
||||||
xd.Save(fileName);
|
xd.Save(fileName);
|
||||||
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
FlexibleMessageBox.Show("Approved procedure saved to import file " + fileName, "Creating Export of Approved Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
|||||||
@@ -491,10 +491,12 @@ namespace XYPlots
|
|||||||
// remove an extra spaces between ><
|
// remove an extra spaces between ><
|
||||||
//Buff = Regex.Replace(Buff, @"[ ]+<", "<");
|
//Buff = Regex.Replace(Buff, @"[ ]+<", "<");
|
||||||
Buff = Buff.Replace(">\r ", ">\r\n ");
|
Buff = Buff.Replace(">\r ", ">\r\n ");
|
||||||
|
Buff = Buff.Replace(">\n ", ">\r\n "); // C2022-003 if RO has symbols
|
||||||
Buff = Regex.Replace(Buff, @"[ ]+<", "<");
|
Buff = Regex.Replace(Buff, @"[ ]+<", "<");
|
||||||
// some data only had carriage return, replace these with cr/nl so that following code
|
// some data only had carriage return, replace these with cr/nl so that following code
|
||||||
// will work
|
// will work
|
||||||
Buff = Buff.Replace(">\r<", ">\r\n<");
|
Buff = Buff.Replace(">\r<", ">\r\n<");
|
||||||
|
Buff = Buff.Replace(">\n<", ">\r\n<"); // C2022-003 if RO has symbols
|
||||||
Buff = Buff.Replace("><", ">\r\n<");
|
Buff = Buff.Replace("><", ">\r\n<");
|
||||||
// some data had cr/cr/nl, change to cr/nl
|
// some data had cr/cr/nl, change to cr/nl
|
||||||
Buff = Buff.Replace("\r\r\n", "\r\n");
|
Buff = Buff.Replace("\r\r\n", "\r\n");
|
||||||
@@ -520,6 +522,7 @@ namespace XYPlots
|
|||||||
Buff = Buff.Substring(0, Buff.Length - 2) + " \r\n\0x00"; // needs to end with null
|
Buff = Buff.Substring(0, Buff.Length - 2) + " \r\n\0x00"; // needs to end with null
|
||||||
else if (Buff.EndsWith(">")) // doesn't end with return chars...
|
else if (Buff.EndsWith(">")) // doesn't end with return chars...
|
||||||
Buff = Buff.Substring(0, Buff.Length - 1) + " \r\n\0x00"; // needs to end with null
|
Buff = Buff.Substring(0, Buff.Length - 1) + " \r\n\0x00"; // needs to end with null
|
||||||
|
Buff = Regex.Replace(Buff, @"\\u([0-9]{1,4})\?", m => int.TryParse(m?.Groups[1]?.Value, out int result) ? Convert.ToChar(result).ToString() : ""); // C2022-003 RO Symbols. Convert unicode to character.
|
||||||
Buff = Regex.Replace(Buff, @"([0-9])\r\n([0-9])", "$1 $2");
|
Buff = Regex.Replace(Buff, @"([0-9])\r\n([0-9])", "$1 $2");
|
||||||
}
|
}
|
||||||
private void CloseGraph()
|
private void CloseGraph()
|
||||||
|
|||||||
Reference in New Issue
Block a user