Compare commits
147 Commits
C2026-009
...
Developmen
| Author | SHA1 | Date | |
|---|---|---|---|
| 4d97f29943 | |||
| ab8d59eb2d | |||
| c324fa69b2 | |||
| 1cdb9b4cc2 | |||
| f47fa49b80 | |||
| 6ade96c7ef | |||
| 61d31a3c67 | |||
| 014509ea30 | |||
| 1ce1a45ca6 | |||
| b6da13a653 | |||
| 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 | |||
| 30aedb6eec | |||
| 12f175740f | |||
| 5c0f11aea1 | |||
| 879518c4a9 | |||
| ecaf00c5b3 | |||
| bfdc77da97 | |||
| 9e64e5a60e | |||
| 35eb05432b | |||
| 77c6298067 | |||
| 0ae45eb918 | |||
| 5ce168071c | |||
| d560468f3c | |||
| ac5e49d0fc | |||
| 447d1f510c | |||
| c0651e4e2c | |||
| f8865206e9 | |||
| 5e7d2431b3 | |||
| 99216321a8 | |||
| 5a2c0460aa | |||
| 72c2bd90e4 | |||
| d4ecf28147 | |||
| 751794c1ec | |||
| c561aad661 | |||
| 9023cc76a0 | |||
| 52583a05f6 | |||
| 37b4726925 | |||
| cc66eb5329 | |||
| 563c133676 |
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.
@@ -77,6 +77,7 @@ using System.Xml.Schema;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
{
|
{
|
||||||
@@ -280,6 +281,7 @@ namespace ROEditor
|
|||||||
this.tbXYPlotWid.Size = new System.Drawing.Size(40, 22);
|
this.tbXYPlotWid.Size = new System.Drawing.Size(40, 22);
|
||||||
this.tbXYPlotWid.TabIndex = 11;
|
this.tbXYPlotWid.TabIndex = 11;
|
||||||
this.tbXYPlotWid.Text = "";
|
this.tbXYPlotWid.Text = "";
|
||||||
|
this.tbXYPlotWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// tbTableWid
|
// tbTableWid
|
||||||
//
|
//
|
||||||
@@ -288,6 +290,7 @@ namespace ROEditor
|
|||||||
this.tbTableWid.Size = new System.Drawing.Size(40, 22);
|
this.tbTableWid.Size = new System.Drawing.Size(40, 22);
|
||||||
this.tbTableWid.TabIndex = 10;
|
this.tbTableWid.TabIndex = 10;
|
||||||
this.tbTableWid.Text = "";
|
this.tbTableWid.Text = "";
|
||||||
|
this.tbTableWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// tbVariableTxtWid
|
// tbVariableTxtWid
|
||||||
//
|
//
|
||||||
@@ -296,6 +299,7 @@ namespace ROEditor
|
|||||||
this.tbVariableTxtWid.Size = new System.Drawing.Size(40, 22);
|
this.tbVariableTxtWid.Size = new System.Drawing.Size(40, 22);
|
||||||
this.tbVariableTxtWid.TabIndex = 9;
|
this.tbVariableTxtWid.TabIndex = 9;
|
||||||
this.tbVariableTxtWid.Text = "";
|
this.tbVariableTxtWid.Text = "";
|
||||||
|
this.tbVariableTxtWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// tbSingleTxtWid
|
// tbSingleTxtWid
|
||||||
//
|
//
|
||||||
@@ -304,6 +308,7 @@ namespace ROEditor
|
|||||||
this.tbSingleTxtWid.Size = new System.Drawing.Size(40, 22);
|
this.tbSingleTxtWid.Size = new System.Drawing.Size(40, 22);
|
||||||
this.tbSingleTxtWid.TabIndex = 8;
|
this.tbSingleTxtWid.TabIndex = 8;
|
||||||
this.tbSingleTxtWid.Text = "";
|
this.tbSingleTxtWid.Text = "";
|
||||||
|
this.tbSingleTxtWid.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// lblW4
|
// lblW4
|
||||||
//
|
//
|
||||||
@@ -586,5 +591,18 @@ namespace ROEditor
|
|||||||
|
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
private void txtBox_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
string clpBrd = Clipboard.GetText();
|
||||||
|
if (clpBrd.Any(c => c > 166))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
|
||||||
|
Clipboard.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ using System.Xml.Schema;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
{
|
{
|
||||||
@@ -316,6 +317,22 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
base.Dispose( disposing );
|
base.Dispose( disposing );
|
||||||
}
|
}
|
||||||
|
private void txtBox_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
bool symFlg = false;
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
string clpBrd = Clipboard.GetText();
|
||||||
|
if (clpBrd.Any(c => c > 166))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
|
||||||
|
Clipboard.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -357,6 +374,7 @@ namespace ROEditor
|
|||||||
this.tbFieldName.Size = new System.Drawing.Size(320, 22);
|
this.tbFieldName.Size = new System.Drawing.Size(320, 22);
|
||||||
this.tbFieldName.TabIndex = 2;
|
this.tbFieldName.TabIndex = 2;
|
||||||
this.tbFieldName.Text = "";
|
this.tbFieldName.Text = "";
|
||||||
|
this.tbFieldName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// tbWidth
|
// tbWidth
|
||||||
//
|
//
|
||||||
@@ -365,6 +383,7 @@ namespace ROEditor
|
|||||||
this.tbWidth.Size = new System.Drawing.Size(32, 22);
|
this.tbWidth.Size = new System.Drawing.Size(32, 22);
|
||||||
this.tbWidth.TabIndex = 3;
|
this.tbWidth.TabIndex = 3;
|
||||||
this.tbWidth.Text = "";
|
this.tbWidth.Text = "";
|
||||||
|
this.tbWidth.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// btnOK
|
// btnOK
|
||||||
//
|
//
|
||||||
@@ -402,6 +421,7 @@ namespace ROEditor
|
|||||||
this.tbPattern.TabIndex = 7;
|
this.tbPattern.TabIndex = 7;
|
||||||
this.tbPattern.Text = "";
|
this.tbPattern.Text = "";
|
||||||
this.tbPattern.Visible = false;
|
this.tbPattern.Visible = false;
|
||||||
|
this.tbPattern.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// FieldTextFrm
|
// FieldTextFrm
|
||||||
//
|
//
|
||||||
@@ -425,3 +445,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ using System.Xml;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
{
|
{
|
||||||
@@ -277,6 +278,22 @@ namespace ROEditor
|
|||||||
|
|
||||||
this.Close();
|
this.Close();
|
||||||
}
|
}
|
||||||
|
private void txtBox_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
bool symFlg = false;
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
string clpBrd = Clipboard.GetText();
|
||||||
|
if (clpBrd.Any(c => c > 166))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
|
||||||
|
Clipboard.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
@@ -315,6 +332,7 @@ namespace ROEditor
|
|||||||
this.tbFieldName.Size = new System.Drawing.Size(368, 22);
|
this.tbFieldName.Size = new System.Drawing.Size(368, 22);
|
||||||
this.tbFieldName.TabIndex = 1;
|
this.tbFieldName.TabIndex = 1;
|
||||||
this.tbFieldName.Text = "";
|
this.tbFieldName.Text = "";
|
||||||
|
this.tbFieldName.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// gbFldType
|
// gbFldType
|
||||||
//
|
//
|
||||||
@@ -437,3 +455,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ using System.Xml;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using ROFields;
|
using ROFields;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
{
|
{
|
||||||
@@ -155,6 +156,7 @@ namespace ROEditor
|
|||||||
this.tbGroup.Size = new System.Drawing.Size(248, 22);
|
this.tbGroup.Size = new System.Drawing.Size(248, 22);
|
||||||
this.tbGroup.TabIndex = 8;
|
this.tbGroup.TabIndex = 8;
|
||||||
this.tbGroup.Text = "";
|
this.tbGroup.Text = "";
|
||||||
|
this.tbGroup.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// lblGroup
|
// lblGroup
|
||||||
//
|
//
|
||||||
@@ -421,5 +423,21 @@ namespace ROEditor
|
|||||||
GroupDefFrm grdef = new GroupDefFrm(nelem,myrodb,nelem.InnerText,dbtype);
|
GroupDefFrm grdef = new GroupDefFrm(nelem,myrodb,nelem.InnerText,dbtype);
|
||||||
grdef.ShowDialog();
|
grdef.ShowDialog();
|
||||||
}
|
}
|
||||||
|
private void txtBox_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
string clpBrd = Clipboard.GetText();
|
||||||
|
if (clpBrd.Any(c => c > 166))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
|
||||||
|
Clipboard.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ using ROFields;
|
|||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
using VlnStatus;
|
using VlnStatus;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
|
||||||
namespace ROEditor
|
namespace ROEditor
|
||||||
@@ -1311,6 +1312,22 @@ namespace ROEditor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void txtBox_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
bool symFlg = false;
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
string clpBrd = Clipboard.GetText();
|
||||||
|
if (clpBrd.Any(c => c > 166))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
|
||||||
|
Clipboard.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1375,6 +1392,7 @@ namespace ROEditor
|
|||||||
this.tbRetVal.Size = new System.Drawing.Size(464, 22);
|
this.tbRetVal.Size = new System.Drawing.Size(464, 22);
|
||||||
this.tbRetVal.TabIndex = 4;
|
this.tbRetVal.TabIndex = 4;
|
||||||
this.tbRetVal.Text = "textBox1";
|
this.tbRetVal.Text = "textBox1";
|
||||||
|
this.tbRetVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// tbMenuVal
|
// tbMenuVal
|
||||||
//
|
//
|
||||||
@@ -1383,6 +1401,7 @@ namespace ROEditor
|
|||||||
this.tbMenuVal.Size = new System.Drawing.Size(464, 22);
|
this.tbMenuVal.Size = new System.Drawing.Size(464, 22);
|
||||||
this.tbMenuVal.TabIndex = 5;
|
this.tbMenuVal.TabIndex = 5;
|
||||||
this.tbMenuVal.Text = "textBox1";
|
this.tbMenuVal.Text = "textBox1";
|
||||||
|
this.tbMenuVal.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
|
||||||
//
|
//
|
||||||
// lblGroupText
|
// lblGroupText
|
||||||
//
|
//
|
||||||
@@ -1608,3 +1627,4 @@ namespace ROEditor
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -109,6 +109,10 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Reference Include="DevComponents.DotNetBar2, Version=14.1.0.37, Culture=neutral, PublicKeyToken=7eb7c3a35b91de04, processorArchitecture=MSIL">
|
||||||
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\..\..\..\..\..\..\3rdPartyLibraries\DotNetBar\DotNetBar4.6Build\DevComponents.DotNetBar2.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
<Reference Include="System">
|
<Reference Include="System">
|
||||||
<Name>System</Name>
|
<Name>System</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
@@ -124,10 +128,6 @@
|
|||||||
<Reference Include="System.Xml">
|
<Reference Include="System.Xml">
|
||||||
<Name>System.XML</Name>
|
<Name>System.XML</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Volian.Base.Library, Version=1.0.0.0, Culture=neutral, processorArchitecture=x86">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AboutROEditor.cs">
|
<Compile Include="AboutROEditor.cs">
|
||||||
@@ -168,6 +168,7 @@
|
|||||||
<Compile Include="RO_FST.cs">
|
<Compile Include="RO_FST.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Content Include="Symbols.xml" />
|
||||||
<EmbeddedResource Include="AboutROEditor.resx">
|
<EmbeddedResource Include="AboutROEditor.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<DependentUpon>AboutROEditor.cs</DependentUpon>
|
<DependentUpon>AboutROEditor.cs</DependentUpon>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACE
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAe
|
||||||
CwAAAk1TRnQBSQFMAgEBBgEAASwBAAEsAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CwAAAk1TRnQBSQFMAgEBBgEAAUQBAAFEAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAASADAAEBAQABCAYAAQgYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ using System.Runtime.InteropServices;
|
|||||||
using VlnStatus;
|
using VlnStatus;
|
||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
using ROFST_FILE;
|
using ROFST_FILE;
|
||||||
using Volian.Base.Library;
|
|
||||||
|
|
||||||
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
//using VlnProfiler; //don't forget to add VlnProfiler to the reference list
|
||||||
|
|
||||||
@@ -885,3 +884,4 @@ namespace ROEditor
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -263,6 +263,7 @@ using System.Collections.Specialized;
|
|||||||
using Org.Mentalis.Files;
|
using Org.Mentalis.Files;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
|
||||||
namespace RODBInterface
|
namespace RODBInterface
|
||||||
@@ -1909,6 +1910,8 @@ namespace RODBInterface
|
|||||||
string Info = DBE.GetString(3);
|
string Info = DBE.GetString(3);
|
||||||
//B2022-043 &pos; was missing the ;
|
//B2022-043 &pos; was missing the ;
|
||||||
Info = Info.Replace("'", "\'"); // B2021-071: crash when getting/saving field names
|
Info = Info.Replace("'", "\'"); // B2021-071: crash when getting/saving field names
|
||||||
|
Info = Regex.Replace(Info, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // RO Editor add symbols C2022 - 003
|
||||||
|
|
||||||
node.SetAttribute("HasChild", "True");
|
node.SetAttribute("HasChild", "True");
|
||||||
|
|
||||||
// Store data in the VlnXmlElement as a subgroup
|
// Store data in the VlnXmlElement as a subgroup
|
||||||
@@ -2139,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;
|
||||||
@@ -2182,10 +2198,27 @@ namespace RODBInterface
|
|||||||
parent.SetAttribute("ChildLoaded", "True");
|
parent.SetAttribute("ChildLoaded", "True");
|
||||||
}
|
}
|
||||||
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"))
|
||||||
{
|
{
|
||||||
string accid = ro.GetAttribute("AccPageID");
|
string accid = ro.GetAttribute("AccPageID");
|
||||||
|
|
||||||
|
|
||||||
int quote = accid.IndexOf("'");
|
int quote = accid.IndexOf("'");
|
||||||
if (quote >= 0)
|
if (quote >= 0)
|
||||||
wraccid = accid.Insert(quote, "'");
|
wraccid = accid.Insert(quote, "'");
|
||||||
@@ -2203,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() + "');";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2217,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
|
||||||
@@ -2251,7 +2284,7 @@ namespace RODBInterface
|
|||||||
// select all of the field definition records in this table.
|
// select all of the field definition records in this table.
|
||||||
// strGetFields = "SELECT RecID, Info from " + elem.GetAttribute("Table");
|
// strGetFields = "SELECT RecID, Info from " + elem.GetAttribute("Table");
|
||||||
strGetFields = "SELECT RecID, Info from " + TableName;
|
strGetFields = "SELECT RecID, Info from " + TableName;
|
||||||
strGetFields = strGetFields + " where RecType = 2"; // + rtype.ToString();
|
strGetFields = strGetFields + " where RecType = 2";
|
||||||
DBE.Command(strGetFields);
|
DBE.Command(strGetFields);
|
||||||
DBE.Reader();
|
DBE.Reader();
|
||||||
|
|
||||||
@@ -2625,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,7 +518,8 @@ namespace RODBInterface
|
|||||||
strtmp.Append(" ");
|
strtmp.Append(" ");
|
||||||
cnt++;
|
cnt++;
|
||||||
}
|
}
|
||||||
if ((cnt + text.Length) > frmt2) // longer than the field length?
|
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?
|
||||||
strtmp.Append(text.Substring(0,frmt2-cnt));
|
strtmp.Append(text.Substring(0,frmt2-cnt));
|
||||||
else
|
else
|
||||||
strtmp.Append(text);
|
strtmp.Append(text);
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
private System.Windows.Forms.Button btnSave;
|
private System.Windows.Forms.Button btnSave;
|
||||||
private System.Windows.Forms.Button btnCancel;
|
private System.Windows.Forms.Button btnCancel;
|
||||||
private System.Windows.Forms.TextBox tbZoom;
|
private ctlXMLEditLib.roRichTextBox tbZoom; // RO Editor add symbols C2022 - 003
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -88,7 +88,7 @@ namespace ctlXMLEditLib
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.tbZoom = new System.Windows.Forms.TextBox();
|
this.tbZoom = new ctlXMLEditLib.roRichTextBox(); // RO Editor add symbols C2022 - 003
|
||||||
this.btnSave = new System.Windows.Forms.Button();
|
this.btnSave = new System.Windows.Forms.Button();
|
||||||
this.btnCancel = new System.Windows.Forms.Button();
|
this.btnCancel = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
@@ -99,7 +99,7 @@ namespace ctlXMLEditLib
|
|||||||
this.tbZoom.Location = new System.Drawing.Point(24, 16);
|
this.tbZoom.Location = new System.Drawing.Point(24, 16);
|
||||||
this.tbZoom.Multiline = true;
|
this.tbZoom.Multiline = true;
|
||||||
this.tbZoom.Name = "tbZoom";
|
this.tbZoom.Name = "tbZoom";
|
||||||
this.tbZoom.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
this.tbZoom.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.Vertical; // RO Editor add symbols C2022 - 003
|
||||||
this.tbZoom.Size = new System.Drawing.Size(576, 392);
|
this.tbZoom.Size = new System.Drawing.Size(576, 392);
|
||||||
this.tbZoom.TabIndex = 0;
|
this.tbZoom.TabIndex = 0;
|
||||||
//
|
//
|
||||||
@@ -149,3 +149,4 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,11 @@ using System.Xml.Schema;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using RODBInterface;
|
using RODBInterface;
|
||||||
using Org.Mentalis.Files;
|
using Org.Mentalis.Files;
|
||||||
//using IniFileIO;
|
using System.Windows;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Linq;
|
||||||
|
using Volian.Base.Library;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -221,6 +225,7 @@ namespace ctlXMLEditLib
|
|||||||
///
|
///
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
public class ctlXMLEdit : System.Windows.Forms.UserControl
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -237,12 +242,12 @@ namespace ctlXMLEditLib
|
|||||||
private bool dosaveflag;
|
private bool dosaveflag;
|
||||||
private VlnXmlElement editelem;
|
private VlnXmlElement editelem;
|
||||||
private XmlDocument editdoc;
|
private XmlDocument editdoc;
|
||||||
private TextBox zoomtextbox;
|
private roRichTextBox zoomtextbox;
|
||||||
// the following is used for handling images. Note that if we want to have more
|
// the following is used for handling images. Note that if we want to have more
|
||||||
// than one image defined in an ro, this should be become a list.
|
// than one image defined in an ro, this should be become a list.
|
||||||
private TextBox GraphicsFiletextbox;
|
private roRichTextBox GraphicsFiletextbox;
|
||||||
private TextBox GraphicsWdtextbox;
|
private roRichTextBox GraphicsWdtextbox;
|
||||||
private TextBox GraphicsHttextbox;
|
private roRichTextBox GraphicsHttextbox;
|
||||||
private System.Windows.Forms.Button btnFindFile;
|
private System.Windows.Forms.Button btnFindFile;
|
||||||
private string GraphicsText;
|
private string GraphicsText;
|
||||||
private ToolTip zmtooltip;
|
private ToolTip zmtooltip;
|
||||||
@@ -265,6 +270,19 @@ namespace ctlXMLEditLib
|
|||||||
private GroupBox pcGrpBox = null;
|
private GroupBox pcGrpBox = null;
|
||||||
/** end C2021-026 **/
|
/** end C2021-026 **/
|
||||||
|
|
||||||
|
public string _RO_IDEN;
|
||||||
|
public string RO_IDEN
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _RO_IDEN;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_RO_IDEN = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// use this struct to define attributes for the text box fields, storing
|
// use this struct to define attributes for the text box fields, storing
|
||||||
// the pattern, radio button association, required field flag, etc.
|
// the pattern, radio button association, required field flag, etc.
|
||||||
struct TextBoxAttrTag
|
struct TextBoxAttrTag
|
||||||
@@ -311,10 +329,19 @@ namespace ctlXMLEditLib
|
|||||||
public string GetParentHTId { get { return parenthtid; } }
|
public string GetParentHTId { get { return parenthtid; } }
|
||||||
public void SetParentHTId(string id) { this.parenthtid = id; }
|
public void SetParentHTId(string id) { this.parenthtid = id; }
|
||||||
}
|
}
|
||||||
|
private roRichTextBox _TextBoxFocus; // RO Editor add symbols C2022 - 003
|
||||||
|
public roRichTextBox TextBoxFocus
|
||||||
|
{
|
||||||
|
get { return _TextBoxFocus; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_TextBoxFocus = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
|
public ctlXMLEdit(VlnXmlElement myelem, XmlSchema myschema, ArrayList reqfields, ArrayList fldsWithApplic, string [] pckids)
|
||||||
{
|
{
|
||||||
// This call is required by the Windows.Forms Form Designer.
|
// This call is required by the Windows.Forms Form Designer.
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
FieldsWithApplic = fldsWithApplic;
|
FieldsWithApplic = fldsWithApplic;
|
||||||
PCChildren = pckids; //C2021-026 list of Parent/Child children
|
PCChildren = pckids; //C2021-026 list of Parent/Child children
|
||||||
@@ -359,11 +386,12 @@ namespace ctlXMLEditLib
|
|||||||
// Set required fields based on list. (can add message later).
|
// Set required fields based on list. (can add message later).
|
||||||
SetRequiredFields(reqfields);
|
SetRequiredFields(reqfields);
|
||||||
dosaveflag=true;
|
dosaveflag=true;
|
||||||
|
RO_IDEN = myelem.GetAccPageIDTemplate();
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the required fields tag on those fields which are included in the passed
|
// set the required fields tag on those fields which are included in the passed
|
||||||
// in required fields list.
|
// in required fields list.
|
||||||
private void DoSet(TextBox hwnd, string msg)
|
private void DoSet(roRichTextBox hwnd, string msg) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
if (hwnd == null) return;
|
if (hwnd == null) return;
|
||||||
if (hwnd.Tag != null)
|
if (hwnd.Tag != null)
|
||||||
@@ -378,7 +406,7 @@ namespace ctlXMLEditLib
|
|||||||
private void SetRequiredFields(ArrayList reqfields)
|
private void SetRequiredFields(ArrayList reqfields)
|
||||||
{
|
{
|
||||||
Object o;
|
Object o;
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
string field, msg;
|
string field, msg;
|
||||||
int indx;
|
int indx;
|
||||||
foreach (string strfld in reqfields)
|
foreach (string strfld in reqfields)
|
||||||
@@ -397,15 +425,15 @@ namespace ctlXMLEditLib
|
|||||||
o = myHT[field+"a"];
|
o = myHT[field+"a"];
|
||||||
if (o != null) // set all combo types required, the checker
|
if (o != null) // set all combo types required, the checker
|
||||||
{
|
{
|
||||||
DoSet((TextBox)o,msg);
|
DoSet((roRichTextBox)o,msg);
|
||||||
DoSet((TextBox)myHT[field+"b"],msg);
|
DoSet((roRichTextBox)myHT[field+"b"],msg);
|
||||||
DoSet((TextBox)myHT[field+"c"],msg);
|
DoSet((roRichTextBox)myHT[field+"c"],msg);
|
||||||
DoSet((TextBox)myHT[field+"d"],msg);
|
DoSet((roRichTextBox)myHT[field+"d"],msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (o != null)
|
else if (o != null)
|
||||||
{
|
{
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
if (hwnd.Tag != null)
|
if (hwnd.Tag != null)
|
||||||
{
|
{
|
||||||
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
||||||
@@ -419,7 +447,7 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
// C2021-026 If this is a Parent/Child field that has no value saved in the database
|
// C2021-026 If this is a Parent/Child field that has no value saved in the database
|
||||||
// then use the parent's value and display it as grey colored text.
|
// then use the parent's value and display it as grey colored text.
|
||||||
private void GetDefaultParentValue(TextBox tb, XmlNode node, string chldName)
|
private void GetDefaultParentValue(roRichTextBox tb, XmlNode node, string chldName)
|
||||||
{
|
{
|
||||||
XmlNode parentNode = null;
|
XmlNode parentNode = null;
|
||||||
// PCChildren contains a list strings reprenting the Children setup in the current Working Draft Parent/Child property
|
// PCChildren contains a list strings reprenting the Children setup in the current Working Draft Parent/Child property
|
||||||
@@ -463,21 +491,23 @@ namespace ctlXMLEditLib
|
|||||||
private void DisplayFieldContents(XmlNode node)
|
private void DisplayFieldContents(XmlNode node)
|
||||||
{
|
{
|
||||||
Object o;
|
Object o;
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
XmlNode nd;
|
XmlNode nd;
|
||||||
// if we have an image, check it for validity, i.e. file exists, etc.??
|
// if we have an image, check it for validity, i.e. file exists, etc.??
|
||||||
foreach (string str in myHT.Keys)
|
foreach (string str in myHT.Keys)
|
||||||
{
|
{
|
||||||
o = myHT[str];
|
o = myHT[str];
|
||||||
hwnd = (TextBox) 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);
|
||||||
if (nd == null || nd.InnerText.Length==0) // B2024-004 use Parent value if Child text length is zero
|
if (nd == null || nd.InnerText.Length==0) // B2024-004 use Parent value if Child text length is zero
|
||||||
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
|
GetDefaultParentValue(hwnd, node, str); // C2021-026 Parent/Child Field has no value so use parent's value
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
hwnd.Text = nd.InnerText; // set the field's text from XML
|
|
||||||
|
hwnd.Text = Regex.Replace(nd.InnerText, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString()); // set the field's text from XML
|
||||||
|
Size size = hwnd.Size;
|
||||||
|
|
||||||
// check if this window has a button name as part of its tag. If
|
// check if this window has a button name as part of its tag. If
|
||||||
// so it's a combo type & the radio button/visibility may need to
|
// so it's a combo type & the radio button/visibility may need to
|
||||||
@@ -546,7 +576,7 @@ namespace ctlXMLEditLib
|
|||||||
// height/width data of the image.
|
// height/width data of the image.
|
||||||
if (GraphicsFiletextbox != null && GraphicsFiletextbox.Text != "") UpdateHtWd();
|
if (GraphicsFiletextbox != null && GraphicsFiletextbox.Text != "") UpdateHtWd();
|
||||||
}
|
}
|
||||||
public TextBox GetGraphicsFiletextbox()
|
public roRichTextBox GetGraphicsFiletextbox()
|
||||||
{
|
{
|
||||||
return GraphicsFiletextbox;
|
return GraphicsFiletextbox;
|
||||||
}
|
}
|
||||||
@@ -585,13 +615,13 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
dosaveflag=false;
|
dosaveflag=false;
|
||||||
mysavexml=false;
|
mysavexml=false;
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
// first, clear out all of the text boxes.
|
// first, clear out all of the text boxes.
|
||||||
|
|
||||||
foreach (string str in myHT.Keys)
|
foreach (string str in myHT.Keys)
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
hwnd.Text = "";
|
hwnd.Text = "";
|
||||||
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
TextBoxAttrTag tag = (TextBoxAttrTag) hwnd.Tag;
|
||||||
RadioButton radio;
|
RadioButton radio;
|
||||||
@@ -623,7 +653,7 @@ namespace ctlXMLEditLib
|
|||||||
// to the parent's value, then clear the child's textbox so that nothing is saved
|
// to the parent's value, then clear the child's textbox so that nothing is saved
|
||||||
// to the database. This allow us to know that a specific value was not set
|
// to the database. This allow us to know that a specific value was not set
|
||||||
// for this Parent/Child child
|
// for this Parent/Child child
|
||||||
private void RemovePCChildTextIfSameAsParent(XmlNode node, TextBox tb, string chldName)
|
private void RemovePCChildTextIfSameAsParent(XmlNode node, roRichTextBox tb, string chldName)
|
||||||
{
|
{
|
||||||
XmlNode parentNode = null;
|
XmlNode parentNode = null;
|
||||||
// if this is a child node get the parent's value
|
// if this is a child node get the parent's value
|
||||||
@@ -660,18 +690,35 @@ namespace ctlXMLEditLib
|
|||||||
// true if success, false if fail.
|
// true if success, false if fail.
|
||||||
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
|
// Note that the Parent and Child XML node variables below are not coding for Parent/Child Applicabily Fields
|
||||||
public bool SaveData()
|
public bool SaveData()
|
||||||
|
|
||||||
{
|
{
|
||||||
if (mysavexml)
|
if (mysavexml)
|
||||||
{
|
{
|
||||||
TextBox hwnd;
|
roRichTextBox hwnd;
|
||||||
TextBoxAttrTag tag;
|
TextBoxAttrTag tag;
|
||||||
string imgdate;
|
string imgdate;
|
||||||
|
|
||||||
//go thru the hash table to get textboxes. Find the ones that have text.
|
//go thru the hash table to get textboxes. Find the ones that have text.
|
||||||
foreach (string str in myHT.Keys)
|
foreach (string str in myHT.Keys) // RO Editor add symbols C2022 - 003
|
||||||
{
|
{
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
hwnd = (TextBox) o;
|
hwnd = (roRichTextBox) o;
|
||||||
|
|
||||||
|
StringBuilder result1 = new StringBuilder();
|
||||||
|
char[] chrAry = hwnd.Text.ToCharArray();
|
||||||
|
foreach (int chr in chrAry)
|
||||||
|
{
|
||||||
|
if (chr > 166)
|
||||||
|
{
|
||||||
|
result1.Append($"\\u{(int)chr}?");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result1.Append((char)chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hwnd.Text = result1.ToString();
|
||||||
|
|
||||||
imgdate = null;
|
imgdate = null;
|
||||||
// if this is a required field and there is no text, put out an error
|
// if this is a required field and there is no text, put out an error
|
||||||
// message and get out of here.
|
// message and get out of here.
|
||||||
@@ -788,6 +835,7 @@ namespace ctlXMLEditLib
|
|||||||
return (false);
|
return (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region Component Designer generated code
|
#region Component Designer generated code
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
@@ -858,7 +906,7 @@ namespace ctlXMLEditLib
|
|||||||
// 'normalizedString') or a multiline text box(type is 'string'). Also, a radio
|
// 'normalizedString') or a multiline text box(type is 'string'). Also, a radio
|
||||||
// button is passed in if this was called to handle an element within a combo type.
|
// button is passed in if this was called to handle an element within a combo type.
|
||||||
// This button is saved for a given text box so that initialization of these combo types can occur.
|
// This button is saved for a given text box so that initialization of these combo types can occur.
|
||||||
private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, TextBox mytextbox, RadioButton radio,
|
private string DisplayXmlSchemaSimpleType(XmlSchemaSimpleType simpleType, roRichTextBox mytextbox, RadioButton radio,
|
||||||
bool img, string imgname)
|
bool img, string imgname)
|
||||||
{
|
{
|
||||||
// set up for text box tag, which stores whether field is required and
|
// set up for text box tag, which stores whether field is required and
|
||||||
@@ -888,12 +936,17 @@ namespace ctlXMLEditLib
|
|||||||
if (getannot.IndexOf("Lines")>=0)
|
if (getannot.IndexOf("Lines")>=0)
|
||||||
{
|
{
|
||||||
GraphicsHttextbox = mytextbox;
|
GraphicsHttextbox = mytextbox;
|
||||||
|
|
||||||
|
Size size = GraphicsHttextbox.Size;
|
||||||
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
|
mytextbox.LostFocus += new System.EventHandler(this.GraphicsHt_lostfocus);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (getannot.IndexOf("Character")>=0)
|
if (getannot.IndexOf("Character")>=0)
|
||||||
{
|
{
|
||||||
GraphicsWdtextbox = mytextbox;
|
GraphicsWdtextbox = mytextbox;
|
||||||
|
|
||||||
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
|
mytextbox.LostFocus += new System.EventHandler(this.GraphicsWd_lostfocus);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -904,14 +957,17 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
// A Schema Type Restriction is used to define single or multi-line boxes.
|
// A Schema Type Restriction is used to define single or multi-line boxes.
|
||||||
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
|
XmlSchemaSimpleTypeRestriction myRestrictions = (XmlSchemaSimpleTypeRestriction) simpleType.Content;
|
||||||
if (myRestrictions.BaseTypeName.Name == "normalizedString")
|
if (myRestrictions.BaseTypeName.Name == "normalizedString")
|
||||||
|
{
|
||||||
mytextbox.Multiline = false;
|
mytextbox.Multiline = false;
|
||||||
|
mytextbox.Size = new Size(300, 40);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mytextbox.Multiline = true;
|
mytextbox.Multiline = true;
|
||||||
mytextbox.AcceptsReturn = true;
|
mytextbox.AcceptsTab = true;
|
||||||
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
|
mytextbox.Height = (int) mytextbox.Font.GetHeight() * 4;
|
||||||
mytextbox.ScrollBars = ScrollBars.Vertical;
|
mytextbox.ScrollBars = RichTextBoxScrollBars.Vertical;
|
||||||
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
zmtooltip.SetToolTip(mytextbox, "Press Shift F2 To Zoom");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -992,7 +1048,8 @@ namespace ctlXMLEditLib
|
|||||||
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
|
radio.CheckedChanged += new System.EventHandler(this.radiocheckchg);
|
||||||
gbox.Controls.Add(radio);
|
gbox.Controls.Add(radio);
|
||||||
|
|
||||||
TextBox tb = new TextBox();
|
roRichTextBox tb = new roRichTextBox();
|
||||||
|
Size size3 = tb.Size;
|
||||||
tb.Location = new Point(boxx+20, y+25);
|
tb.Location = new Point(boxx+20, y+25);
|
||||||
if (!first) tb.Visible = false;
|
if (!first) tb.Visible = false;
|
||||||
myHT.Add(element.Name,tb);
|
myHT.Add(element.Name,tb);
|
||||||
@@ -1001,7 +1058,7 @@ namespace ctlXMLEditLib
|
|||||||
// the groupbox.
|
// the groupbox.
|
||||||
Controls.Add(tb);
|
Controls.Add(tb);
|
||||||
tb.TextChanged += new System.EventHandler(this.textbox_change);
|
tb.TextChanged += new System.EventHandler(this.textbox_change);
|
||||||
tb.GotFocus += new System.EventHandler(this.textbox_zoombtn);
|
tb.GotFocus += new System.EventHandler(this.currentTextBox);
|
||||||
tb.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
tb.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
||||||
gbox.Contains(tb);
|
gbox.Contains(tb);
|
||||||
// the following will set attributes on the text boxes such as maxlength, multiline, etc.
|
// the following will set attributes on the text boxes such as maxlength, multiline, etc.
|
||||||
@@ -1144,8 +1201,9 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TextBox mytextbox;
|
roRichTextBox mytextbox;
|
||||||
mytextbox = new TextBox();
|
mytextbox = new roRichTextBox();
|
||||||
|
Size size3 = mytextbox.Size;
|
||||||
mytextbox.Location = new Point(screenx+indent, screeny);
|
mytextbox.Location = new Point(screenx+indent, screeny);
|
||||||
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
|
string tFieldName = (pcChildIdx == 0) ? CvtUserFldToFld(element.Name) : CvtUserFldToFld(pcChildFldName);
|
||||||
mytextbox.Name = tFieldName;
|
mytextbox.Name = tFieldName;
|
||||||
@@ -1155,7 +1213,7 @@ namespace ctlXMLEditLib
|
|||||||
screeny = screeny + 10;
|
screeny = screeny + 10;
|
||||||
mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
|
mytextbox.TextChanged += new System.EventHandler(this.textbox_change);
|
||||||
mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating);
|
mytextbox.Validating += new System.ComponentModel.CancelEventHandler(this.textbox_Validating);
|
||||||
mytextbox.GotFocus += new System.EventHandler(this.textbox_zoombtn);
|
mytextbox.GotFocus += new System.EventHandler(this.currentTextBox);
|
||||||
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
mytextbox.KeyDown += new KeyEventHandler(MyOnKeyDown);
|
||||||
if (pcChildIdx > 0)
|
if (pcChildIdx > 0)
|
||||||
{
|
{
|
||||||
@@ -1192,9 +1250,18 @@ namespace ctlXMLEditLib
|
|||||||
// the following is needed to load the control.
|
// the following is needed to load the control.
|
||||||
private void ctlXMLEdit_Load(object sender, System.EventArgs e)
|
private void ctlXMLEdit_Load(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public delegate void ctlXMLEditEvent(object sender, ctlXMLEditEventArgs args); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID field.
|
||||||
|
public event ctlXMLEditEvent EnableDisableSymbolsBtn;
|
||||||
|
private void OnEnableDisableSymbolsBtn(ctlXMLEditEventArgs args)
|
||||||
|
{
|
||||||
|
if (EnableDisableSymbolsBtn != null)
|
||||||
|
EnableDisableSymbolsBtn(this, args);
|
||||||
|
}
|
||||||
|
|
||||||
// when data in a text box has changed, flag it (except for when this
|
// when data in a text box has changed, flag it (except for when this
|
||||||
// happens during loading of original data). This flag will be used
|
// happens during loading of original data). This flag will be used
|
||||||
// later to know whether to save data.
|
// later to know whether to save data.
|
||||||
@@ -1210,7 +1277,7 @@ namespace ctlXMLEditLib
|
|||||||
// When leaving the textbox
|
// When leaving the textbox
|
||||||
private void txtBox_Leave(object sender, EventArgs e)
|
private void txtBox_Leave(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox tb = sender as TextBox;
|
roRichTextBox tb = sender as roRichTextBox;
|
||||||
string dfTxt = "";
|
string dfTxt = "";
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1219,7 +1286,7 @@ namespace ctlXMLEditLib
|
|||||||
{
|
{
|
||||||
object o = myHT[parentid];
|
object o = myHT[parentid];
|
||||||
if (o != null)
|
if (o != null)
|
||||||
dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1227,7 +1294,7 @@ namespace ctlXMLEditLib
|
|||||||
string parName = pcGrpBox.Name.Substring(5);
|
string parName = pcGrpBox.Name.Substring(5);
|
||||||
object o = myHT[parName];
|
object o = myHT[parName];
|
||||||
if (o != null)
|
if (o != null)
|
||||||
dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@@ -1235,7 +1302,7 @@ namespace ctlXMLEditLib
|
|||||||
string parName = pcGrpBox.Name.Substring(5);
|
string parName = pcGrpBox.Name.Substring(5);
|
||||||
object o = myHT[parName];
|
object o = myHT[parName];
|
||||||
if (o != null)
|
if (o != null)
|
||||||
dfTxt = (o as TextBox).Text; // set to use the parent's value (default)
|
dfTxt = (o as roRichTextBox).Text; // set to use the parent's value (default)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dosaveflag) mysavexml = true;
|
if (dosaveflag) mysavexml = true;
|
||||||
@@ -1251,7 +1318,7 @@ namespace ctlXMLEditLib
|
|||||||
// so clear the textbox so that user can enter the value for that child
|
// so clear the textbox so that user can enter the value for that child
|
||||||
private void txtBox_Enter(object sender, EventArgs e)
|
private void txtBox_Enter(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox tb = sender as TextBox;
|
roRichTextBox tb = sender as roRichTextBox;
|
||||||
if (tb.ForeColor == SystemColors.GrayText) // currently no value set - using parent's value
|
if (tb.ForeColor == SystemColors.GrayText) // currently no value set - using parent's value
|
||||||
{
|
{
|
||||||
tb.Text = "";
|
tb.Text = "";
|
||||||
@@ -1264,7 +1331,7 @@ namespace ctlXMLEditLib
|
|||||||
private void radiocheckchg(object sender, System.EventArgs e)
|
private void radiocheckchg(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
RadioButton btnsel = (RadioButton) sender;
|
RadioButton btnsel = (RadioButton) sender;
|
||||||
TextBox assocbox;
|
roRichTextBox assocbox;
|
||||||
string btntext, str;
|
string btntext, str;
|
||||||
|
|
||||||
if(dosaveflag)mysavexml = true;
|
if(dosaveflag)mysavexml = true;
|
||||||
@@ -1277,7 +1344,7 @@ namespace ctlXMLEditLib
|
|||||||
str = btnsel.Name.Replace(btntext,"");
|
str = btnsel.Name.Replace(btntext,"");
|
||||||
object o = myHT[str];
|
object o = myHT[str];
|
||||||
if (o == null) return;
|
if (o == null) return;
|
||||||
assocbox = (TextBox) o;
|
assocbox = (roRichTextBox) o;
|
||||||
// make the text box visible if checked, otherwise, invisible
|
// make the text box visible if checked, otherwise, invisible
|
||||||
assocbox.Visible = btnsel.Checked;
|
assocbox.Visible = btnsel.Checked;
|
||||||
// C2021-026 show or hide the Parent/Child appicability group box
|
// C2021-026 show or hide the Parent/Child appicability group box
|
||||||
@@ -1299,7 +1366,7 @@ namespace ctlXMLEditLib
|
|||||||
c.Visible = vsblState; // show or hide the lable inside the group box
|
c.Visible = vsblState; // show or hide the lable inside the group box
|
||||||
object oo = myHT[c.Name];
|
object oo = myHT[c.Name];
|
||||||
if (oo != null)
|
if (oo != null)
|
||||||
(oo as TextBox).Visible = vsblState; // show or hide the associated text box
|
(oo as roRichTextBox).Visible = vsblState; // show or hide the associated text box
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1391,7 +1458,7 @@ namespace ctlXMLEditLib
|
|||||||
|
|
||||||
// The following can be used to validate the text, i.e. check the text against
|
// The following can be used to validate the text, i.e. check the text against
|
||||||
// the pattern. this needs written yet (5/16/02)
|
// the pattern. this needs written yet (5/16/02)
|
||||||
private void MyValidatingCode(TextBox tb)
|
private void MyValidatingCode(roRichTextBox tb)
|
||||||
{
|
{
|
||||||
//get the text box's tag which contains a flag for whether this is required &
|
//get the text box's tag which contains a flag for whether this is required &
|
||||||
//if it has a pattern. If it has a pattern, validate the field against the pattern.
|
//if it has a pattern. If it has a pattern, validate the field against the pattern.
|
||||||
@@ -1420,20 +1487,33 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
|
|
||||||
// save which box we're on, for zoom processing.
|
// save which box we're on, for zoom processing.
|
||||||
private void textbox_zoombtn(object sender, System.EventArgs e)
|
private void currentTextBox(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox textbox = (TextBox) sender;
|
roRichTextBox textbox = (roRichTextBox) sender;
|
||||||
if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
|
if (textbox.Multiline == true || textbox == GraphicsFiletextbox)
|
||||||
zoomtextbox = textbox;
|
zoomtextbox = textbox;
|
||||||
else
|
else
|
||||||
zoomtextbox = null;
|
zoomtextbox = null;
|
||||||
|
|
||||||
|
TextBoxFocus = textbox;
|
||||||
|
|
||||||
|
string RO_IDENDITY = RO_IDEN.Substring(1, RO_IDEN.Length - 2); // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
|
||||||
|
if (textbox.Name == RO_IDENDITY)
|
||||||
|
{
|
||||||
|
OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:false));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OnEnableDisableSymbolsBtn(new ctlXMLEditEventArgs(DisplaySymBolBtn:true));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
|
private void textbox_Validating(object sender, System.ComponentModel.CancelEventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MyValidatingCode((TextBox) sender);
|
MyValidatingCode((roRichTextBox) sender);
|
||||||
}
|
}
|
||||||
|
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
@@ -1459,11 +1539,18 @@ namespace ctlXMLEditLib
|
|||||||
}
|
}
|
||||||
btnZoom_click(null, null);
|
btnZoom_click(null, null);
|
||||||
}
|
}
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
if (((kea.Modifiers & Keys.ControlKey) == Keys.ControlKey) && kea.KeyCode == Keys.V)
|
||||||
|
{
|
||||||
|
roRichTextBox o = (roRichTextBox)objSender;
|
||||||
|
o.rchtxtBox_KeyDown(objSender, RO_IDEN);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void btnZoom_click(object sender, System.EventArgs e)
|
public void btnZoom_click(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
//TextBox tb = (TextBox) sender;
|
|
||||||
TextBoxAttrTag tag;
|
TextBoxAttrTag tag;
|
||||||
bool doimage = false;
|
bool doimage = false;
|
||||||
if (zoomtextbox.Tag != null)
|
if (zoomtextbox.Tag != null)
|
||||||
@@ -1507,7 +1594,7 @@ namespace ctlXMLEditLib
|
|||||||
// file local & keep width/height of file proportional.
|
// file local & keep width/height of file proportional.
|
||||||
private void GraphicText_lostfocus(object sender, System.EventArgs e)
|
private void GraphicText_lostfocus(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox fnamebox = (TextBox) sender;
|
roRichTextBox fnamebox = (roRichTextBox) sender;
|
||||||
if (fnamebox.Text != "" && fnamebox.Modified == true)
|
if (fnamebox.Text != "" && fnamebox.Modified == true)
|
||||||
{
|
{
|
||||||
FileInfo ifi = new FileInfo(fnamebox.Text);
|
FileInfo ifi = new FileInfo(fnamebox.Text);
|
||||||
@@ -1716,7 +1803,7 @@ namespace ctlXMLEditLib
|
|||||||
// if changed height, calculate associated width
|
// if changed height, calculate associated width
|
||||||
private void GraphicsHt_lostfocus(object sender, System.EventArgs e)
|
private void GraphicsHt_lostfocus(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox ht = (TextBox) sender;
|
roRichTextBox ht = (roRichTextBox) sender;
|
||||||
if (ht.Modified == true)
|
if (ht.Modified == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1733,7 +1820,7 @@ namespace ctlXMLEditLib
|
|||||||
// if changed width, calculate associated height
|
// if changed width, calculate associated height
|
||||||
private void GraphicsWd_lostfocus(object sender, System.EventArgs e)
|
private void GraphicsWd_lostfocus(object sender, System.EventArgs e)
|
||||||
{
|
{
|
||||||
TextBox wd = (TextBox) sender;
|
roRichTextBox wd = (roRichTextBox) sender;
|
||||||
if (wd.Modified == true)
|
if (wd.Modified == true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -1888,7 +1975,7 @@ namespace ctlXMLEditLib
|
|||||||
* and overload a couple of it's functions in order to use it.
|
* and overload a couple of it's functions in order to use it.
|
||||||
* - called in CalculatePromsDate() above.
|
* - called in CalculatePromsDate() above.
|
||||||
*/
|
*/
|
||||||
public class ThisTimeZone : TimeZone
|
public class ThisTimeZone : TimeZone
|
||||||
{
|
{
|
||||||
private TimeZone curTZ;
|
private TimeZone curTZ;
|
||||||
public TimeSpan SpanTZ;
|
public TimeSpan SpanTZ;
|
||||||
@@ -1929,5 +2016,31 @@ namespace ctlXMLEditLib
|
|||||||
return curTZ.GetDaylightChanges(year);
|
return curTZ.GetDaylightChanges(year);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class ctlXMLEditEventArgs : EventArgs // RO Editor add symbols C2022 - 003 for turning off symbols btn for RO ID.
|
||||||
|
{
|
||||||
|
public ctlXMLEditEventArgs() {; }
|
||||||
|
public ctlXMLEditEventArgs(bool DisplaySymBolBtn)
|
||||||
|
{
|
||||||
|
_DisplaySymBolBtn = DisplaySymBolBtn;
|
||||||
|
}
|
||||||
|
private bool _DisplaySymBolBtn;
|
||||||
|
|
||||||
|
public bool DisplaySymBolBtn
|
||||||
|
{
|
||||||
|
get { return _DisplaySymBolBtn; }
|
||||||
|
set { _DisplaySymBolBtn = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum E_FontStyle : byte
|
||||||
|
{
|
||||||
|
FS_NONE = 0,
|
||||||
|
FS_BOLD = 0x01,
|
||||||
|
FS_UNDERLINE = 0x02,
|
||||||
|
FS_ITALIC = 0x04,
|
||||||
|
FS_SUPERSCRIPT = 0x08,
|
||||||
|
FS_SUBSCRIPT = 0x10
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,9 @@
|
|||||||
<Reference Include="System.Xml">
|
<Reference Include="System.Xml">
|
||||||
<Name>System.XML</Name>
|
<Name>System.XML</Name>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Volian.Base.Library">
|
||||||
|
<HintPath>..\..\..\Volian.Base.Library\bin\Debug\Volian.Base.Library.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AssemblyInfo.cs">
|
<Compile Include="AssemblyInfo.cs">
|
||||||
@@ -137,6 +140,12 @@
|
|||||||
<Compile Include="ImageDialog.cs">
|
<Compile Include="ImageDialog.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="roRichTextBox.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="roRichTextBox.Designer.cs">
|
||||||
|
<DependentUpon>roRichTextBox.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="ZoomDialog.cs">
|
<Compile Include="ZoomDialog.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
40
PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.Designer.cs
generated
Normal file
40
PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.Designer.cs
generated
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
|
||||||
|
namespace ctlXMLEditLib
|
||||||
|
{
|
||||||
|
partial class roRichTextBox
|
||||||
|
{
|
||||||
|
/// <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 Component Designer generated code
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Required method for Designer support - do not modify
|
||||||
|
/// the contents of this method with the code editor.
|
||||||
|
/// </summary>
|
||||||
|
System.Windows.Forms.AutoScaleMode AutoScaleMode;
|
||||||
|
private void InitializeComponent()
|
||||||
|
{
|
||||||
|
|
||||||
|
components = new System.ComponentModel.Container();
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
100
PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.cs
Normal file
100
PROMS/ReferencedObjects/LibSource/ctlXMLEditLib/roRichTextBox.cs
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
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;
|
||||||
|
using Volian.Base.Library;
|
||||||
|
|
||||||
|
namespace ctlXMLEditLib
|
||||||
|
{
|
||||||
|
public partial class roRichTextBox : RichTextBox // C2022-003 Symbols in RO Editor. Customized RichTextBox for RO Editor.
|
||||||
|
{
|
||||||
|
public roRichTextBox()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
private string _RtfPrefix; // contains Font table and styles (bold/underline/italics) for rtb from step style
|
||||||
|
public string RtfPrefixForSymbols
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
//B2020-100 RHM Use SelectionFont rather than the font from the format file.
|
||||||
|
StringBuilder selectedRtfSB = new StringBuilder();
|
||||||
|
AddFontTable(selectedRtfSB, FormatFont, true);
|
||||||
|
_RtfPrefix = selectedRtfSB.ToString();
|
||||||
|
return _RtfPrefix + @"\f1\fs" + 10 * 2 + " ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void InsertSymbol( int symbcode)
|
||||||
|
{
|
||||||
|
int position = this.SelectionStart;
|
||||||
|
string sym = symbcode < 256 ? ((char)symbcode).ToString() : string.Format(@"\u{0}", symbcode);
|
||||||
|
this.SelectedRtf = RtfPrefixForSymbols + sym + @"}";
|
||||||
|
Select(position, -1);
|
||||||
|
Select(position + 1, 0);
|
||||||
|
}
|
||||||
|
public void rchtxtBox_KeyDown(object sender,string RO_IDEN) // C2022-003 code used to prevent a symbol from being inserted into RO ID.
|
||||||
|
{
|
||||||
|
bool symFlg = false;
|
||||||
|
|
||||||
|
roRichTextBox o = (roRichTextBox)sender;
|
||||||
|
if (o.Name == RO_IDEN)
|
||||||
|
{
|
||||||
|
if (Clipboard.GetDataObject().GetDataPresent(DataFormats.Text))
|
||||||
|
{
|
||||||
|
string clpBrd = Clipboard.GetText();
|
||||||
|
if (clpBrd.Any(c => c > 166))
|
||||||
|
{
|
||||||
|
MessageBox.Show("Symbols are not allowed in the field. Clipbroad: '" + clpBrd + "'");
|
||||||
|
Clipboard.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private static void AddFontTable(StringBuilder selectedRtfSB, Font myFont, bool isFixed)
|
||||||
|
{
|
||||||
|
StringBuilder sbbeg = new StringBuilder();
|
||||||
|
StringBuilder sbend = new StringBuilder();
|
||||||
|
if (myFont.Bold)
|
||||||
|
{
|
||||||
|
sbbeg.Append(@"\b");
|
||||||
|
sbend.Append(@"\b0");
|
||||||
|
}
|
||||||
|
if (myFont.Underline)
|
||||||
|
{
|
||||||
|
sbbeg.Append(@"\ul");
|
||||||
|
sbend.Insert(0, @"\ulnone");
|
||||||
|
}
|
||||||
|
if (myFont.Italic)
|
||||||
|
{
|
||||||
|
sbbeg.Append(@"\i");
|
||||||
|
sbend.Insert(0, @"\i0");
|
||||||
|
}
|
||||||
|
// RO Editor add symbols C2022-003
|
||||||
|
selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + myFont.FontFamily.Name + @";}");
|
||||||
|
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 FreeMono;}}{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}"); // FreeMono is now used for symbols display.
|
||||||
|
selectedRtfSB.Append("\r\n");
|
||||||
|
selectedRtfSB.Append(@"\viewkind4\uc1\pard" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(myFont.SizeInPoints * 2).ToString() + @" ");
|
||||||
|
}
|
||||||
|
private Font _FormatFont;
|
||||||
|
public Font FormatFont
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (_FormatFont == null)
|
||||||
|
{
|
||||||
|
Font formatFont;
|
||||||
|
formatFont = Font;
|
||||||
|
_FormatFont = formatFont;
|
||||||
|
}
|
||||||
|
return _FormatFont;
|
||||||
|
}
|
||||||
|
set { _FormatFont = value; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
147
PROMS/SQL/ClientSpecific/BNPP_CoverPageConsolidation.sql
Normal file
147
PROMS/SQL/ClientSpecific/BNPP_CoverPageConsolidation.sql
Normal file
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
263
PROMS/SQL/ClientSpecific/BNPP_CoverPageConsolidation_Test.sql
Normal file
263
PROMS/SQL/ClientSpecific/BNPP_CoverPageConsolidation_Test.sql
Normal file
@@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -24329,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
|
||||||
@@ -24355,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
|
||||||
@@ -24578,6 +24582,201 @@ IF (@@Error = 0) PRINT 'Procedure Creation: [GetCurrentApprovedRevisions] Succee
|
|||||||
ELSE PRINT 'Procedure Creation: [GetCurrentApprovedRevisions] Error on Creation'
|
ELSE PRINT 'Procedure Creation: [GetCurrentApprovedRevisions] Error on Creation'
|
||||||
GO
|
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 |
|
||||||
@@ -24611,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 = '02/09/2026 7:00 AM'
|
set @RevDate = '03/13/2026 7:00 AM'
|
||||||
set @RevDescription = 'Added procedure for getting current revisions'
|
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,7 +1312,15 @@ namespace VEPROMS
|
|||||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||||
if (si.IsApproved == 1)
|
if (si.IsApproved == 1)
|
||||||
{
|
{
|
||||||
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (selectedSlave)); // "true tell export to convert ROs and Transitions to text
|
|
||||||
|
//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
|
||||||
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();
|
||||||
dlg.ExportItem(xd, pi, "procedure");
|
dlg.ExportItem(xd, pi, "procedure");
|
||||||
@@ -1319,30 +1328,46 @@ 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);
|
||||||
|
|
||||||
// Clear the change bar override for this procedure:
|
//CSM - C2026-010 - Add Audit Record for Change Bar Audit History
|
||||||
pi.ClearChangeBarOverrides();
|
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:
|
||||||
|
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
|
||||||
DisplayTabItem dti = MyFrmVEPROMS.GetTabContainingProcedure(pi.ItemID);
|
|
||||||
|
//B2026-019 Attempt to prevent an Access Error by utilizing a different Refresh if a Procedure is Open
|
||||||
|
DisplayTabItem dti = MyFrmVEPROMS.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;
|
||||||
|
}
|
||||||
|
|
||||||
//since in a separate form, need to update the tree view
|
dti.MyStepTabPanel.MyStepTabRibbon.RefreshProcedure();
|
||||||
//so "Showing Change Bars" Content Menu Item is correct
|
Application.DoEvents();
|
||||||
MyFrmVEPROMS.RefreshProcedureNode(newproc);
|
newproc = ProcedureInfo.Get(pi.ItemID);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
||||||
|
}
|
||||||
|
|
||||||
|
//since in a separate form, need to update the tree view
|
||||||
|
//so "Showing Change Bars" Content Menu Item is correct
|
||||||
|
MyFrmVEPROMS.RefreshProcedureNode(newproc);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);
|
UpdateProcedureConfig(pi, ap.RevNumber, ap.RevDate, myDTS, selectedSlave);
|
||||||
|
|||||||
@@ -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,8 +1620,15 @@ namespace VEPROMS
|
|||||||
|
|
||||||
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
|
public void ExportItem(XmlDocument xd, ItemInfo ii, string nodename)
|
||||||
{
|
{
|
||||||
XmlElement xe = xd.CreateElement(nodename);
|
//B2026-016 - Fix error pulling Reference Object info into Export
|
||||||
if (ii.IsProcedure)
|
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);
|
||||||
|
if (ii.IsProcedure)
|
||||||
{
|
{
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.RODbID.ToString()));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rodbid", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.RODbID.ToString()));
|
||||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rofolderpath", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath));
|
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "rofolderpath", ii.MyDocVersion.DocVersionAssociations[0].MyROFst.MyRODb.FolderPath));
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
|
using Volian.Base.Library;
|
||||||
using Volian.Controls.Library;
|
using Volian.Controls.Library;
|
||||||
|
|
||||||
namespace VEPROMS
|
namespace VEPROMS
|
||||||
@@ -29,7 +31,7 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
cbdt = DateTime.Now.ToString("MM/dd/yyyy") + " " + DateTime.Now.ToString("HH:mm:ss");
|
cbdt = DateTime.Now.ToString("MM/dd/yyyy") + " " + DateTime.Now.ToString("HH:mm:ss");
|
||||||
dateTimeInput1.Value = DateTime.Parse(cbdt);
|
dateTimeInput1.Value = DateTime.Parse(cbdt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -64,10 +66,14 @@ 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);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void btnNow_Click(object sender, EventArgs e)
|
private void btnNow_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
dateTimeInput1.Value = DateTime.Now;
|
dateTimeInput1.Value = DateTime.Now;
|
||||||
}
|
}
|
||||||
@@ -84,11 +90,16 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
MyProcConfig.Print_ChangeBarDate = "";
|
MyProcConfig.Print_ChangeBarDate = "";
|
||||||
DialogResult = DialogResult.OK;
|
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();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (RevisionData.HasUnits(dt))
|
else if (RevisionData.HasUnits(dt))
|
||||||
{
|
{
|
||||||
|
|
||||||
//any with units
|
//any with units
|
||||||
string maxDTS = RevisionData.MaxDTS(dt).ToString("MM/dd/yyyy HH:mm:ss");
|
string maxDTS = RevisionData.MaxDTS(dt).ToString("MM/dd/yyyy HH:mm:ss");
|
||||||
|
|
||||||
@@ -107,15 +118,22 @@ namespace VEPROMS
|
|||||||
//Change the overall ChangeBarDate
|
//Change the overall ChangeBarDate
|
||||||
MyProcConfig.Print_ChangeBarDate = maxDTS;
|
MyProcConfig.Print_ChangeBarDate = maxDTS;
|
||||||
|
|
||||||
//Change the ChangeBarDate for each unit
|
//Change the ChangeBarDate for each unit
|
||||||
foreach (DataRow r in dt.Rows)
|
foreach (DataRow r in dt.Rows)
|
||||||
{
|
{
|
||||||
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
MyProcConfig.SelectedSlave = Convert.ToInt32(r["UnitID"]);
|
||||||
MyProcConfig.Print_ChangeBarDate = Convert.ToDateTime(r["DTS"]).ToString("MM / dd / yyyy HH: mm: ss");
|
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;
|
MyProcConfig.SelectedSlave = 0;
|
||||||
|
|
||||||
DialogResult = DialogResult.OK;
|
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();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,6 +145,9 @@ namespace VEPROMS
|
|||||||
{
|
{
|
||||||
MyProcConfig.Print_ChangeBarDate = maxDTS;
|
MyProcConfig.Print_ChangeBarDate = maxDTS;
|
||||||
DialogResult = DialogResult.OK;
|
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();
|
Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,11 +650,111 @@ namespace VEPROMS
|
|||||||
this.Cursor = Cursors.Default;
|
this.Cursor = Cursors.Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
// B2022-047 - refresh the Content/Text field for table, i.e. Grid, Data so that search will find text in the Grid
|
private int RegenCounter = 0;
|
||||||
// NOTE that an out of memeory error occurs when having to process alot of tables. A config flag is used on the
|
private int RegenTotal = 0;
|
||||||
// grid record to flag that this operation has been run. And a message is placed in the result window stating to
|
private const int TicksToupdate = 300000; //5 minutes(300 seconds).
|
||||||
// rerun until all tables/text fields are completed.
|
|
||||||
private void RefreshTablesForSearch()
|
// 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
|
||||||
|
// 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
|
||||||
|
// rerun until all tables/text fields are completed.
|
||||||
|
private void RefreshTablesForSearch()
|
||||||
{
|
{
|
||||||
this.Cursor = Cursors.WaitCursor;
|
this.Cursor = Cursors.WaitCursor;
|
||||||
DateTime pStart = DateTime.Now;
|
DateTime pStart = DateTime.Now;
|
||||||
@@ -1305,7 +1407,8 @@ 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 siRefreshTblsSrchTxt = new DevComponents.DotNetBar.StepItem("siRefreshTblsSrchTxt", "Refresh Tables For Search");
|
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");
|
||||||
// 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,7 +1426,9 @@ 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 (swRefreshTblsForSrch.Value)
|
if (swRegenWordAttmts.Value)
|
||||||
|
progressSteps1.Items.Add(siRegenAttmts);
|
||||||
|
if (swRefreshTblsForSrch.Value)
|
||||||
progressSteps1.Items.Add(siRefreshTblsSrchTxt);
|
progressSteps1.Items.Add(siRefreshTblsSrchTxt);
|
||||||
splitContainer3.Panel2Collapsed = false;
|
splitContainer3.Panel2Collapsed = false;
|
||||||
progressSteps1.Visible = true;
|
progressSteps1.Visible = true;
|
||||||
@@ -1487,7 +1592,13 @@ namespace VEPROMS
|
|||||||
DeletePDFs(); // refresh word attachments
|
DeletePDFs(); // refresh word attachments
|
||||||
StepProgress(prgStpIdx, 100);
|
StepProgress(prgStpIdx, 100);
|
||||||
}
|
}
|
||||||
if (swRefreshTblsForSrch.Value)
|
if (swRegenWordAttmts.Value)
|
||||||
|
{
|
||||||
|
StepProgress(++prgStpIdx, 50);
|
||||||
|
RegenPDFs(); // generate missing pdfs
|
||||||
|
StepProgress(prgStpIdx, 100);
|
||||||
|
}
|
||||||
|
if (swRefreshTblsForSrch.Value)
|
||||||
{
|
{
|
||||||
StepProgress(++prgStpIdx, 50);
|
StepProgress(++prgStpIdx, 50);
|
||||||
RefreshTablesForSearch();
|
RefreshTablesForSearch();
|
||||||
|
|||||||
@@ -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">
|
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<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>
|
|
||||||
<data name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing">
|
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</data>
|
</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,6 +224,53 @@ 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 object 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.
|
||||||
@@ -388,8 +357,46 @@ If more than one procedure is selected, it is recommended that this be performed
|
|||||||
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
ud8AKwnMnBpmYFAAAAAASUVORK5CYII=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve">
|
||||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib">
|
<value>This allows the user to remove folders and sub folders as well as their contents.
|
||||||
<value>25</value>
|
|
||||||
|
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>
|
||||||
|
<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>
|
||||||
|
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>25</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -626,21 +626,26 @@ namespace VEPROMS
|
|||||||
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
|
itm.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||||
itm.Save();
|
itm.Save();
|
||||||
|
|
||||||
//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
|
||||||
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
ProcedureInfo newproc = ItemInfo.ResetProcedure(pi.ItemID);
|
||||||
|
|
||||||
|
//// Refresh the StepPanel for the current Procedure
|
||||||
|
//// so change bars update
|
||||||
|
//// 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);
|
||||||
|
if (dti != null)
|
||||||
|
{
|
||||||
|
|
||||||
//// Refresh the StepPanel for the current Procedure
|
|
||||||
//// so change bars update
|
|
||||||
//// on any open StepPanel
|
|
||||||
DisplayTabItem dti = GetTabContainingProcedure(pi.ItemID);
|
|
||||||
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1113,13 +1113,34 @@ namespace VEPROMS
|
|||||||
if (_Apples == null)
|
if (_Apples == null)
|
||||||
{
|
{
|
||||||
_Apples = new List<MiniConfig>();
|
_Apples = new List<MiniConfig>();
|
||||||
}
|
}
|
||||||
_Apples.Add(cfg);
|
|
||||||
|
//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);
|
||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
|
using Csla.Data;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using static System.Net.Mime.MediaTypeNames;
|
||||||
using Csla.Data;
|
|
||||||
|
|
||||||
|
|
||||||
namespace VEPROMS.CSLA.Library
|
namespace VEPROMS.CSLA.Library
|
||||||
@@ -494,6 +494,8 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
roid = FormatRoidKey(roid, true);
|
roid = FormatRoidKey(roid, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
string retval = GetRoChild(roid).value;
|
string retval = GetRoChild(roid).value;
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(retval))
|
if (string.IsNullOrEmpty(retval))
|
||||||
@@ -2162,7 +2164,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return s2;
|
return s2;
|
||||||
|
|
||||||
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace(@"\u160?", "<HSP>"); // convert hard spaces bug fix: B2016-206
|
||||||
s2 = s2.Replace(@"\", @"\u9586?"); // convert backslashes to a backslash symbol
|
s2 = Regex.Replace(s2, @"\\(?!u)", @"\u9586?"); // convert backslashes to a backslash symbol
|
||||||
s2 = s2.Replace("<HSP>", @"\u160?"); // convert hard spaces bug fix: B2016-206
|
s2 = s2.Replace("<HSP>", @"\u160?"); // convert hard spaces bug fix: B2016-206
|
||||||
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
s2 = s2.Replace("`", @"\'b0"); // convert backquote to degree - left over from DOS days.
|
||||||
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
|
s2 = s2.Replace("\xf8", @"\'b0"); // convert \xf8 to degree.
|
||||||
|
|||||||
@@ -1003,40 +1003,34 @@ 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];
|
|
||||||
fs.Read(buf, 0, buf.Length);
|
|
||||||
fs.Close();
|
|
||||||
|
|
||||||
// B2023-022 & B2023-023 commented out the deletion of the temporary Word section PDF file
|
using (FileStream fs = pdfFile.Open(FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
|
||||||
// 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())
|
|
||||||
{
|
{
|
||||||
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
fs.Read(buf, 0, buf.Length);
|
||||||
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
fs.Close();
|
||||||
int ss = sect.MyDocVersion.DocVersionConfig.SelectedSlave;
|
|
||||||
|
|
||||||
if (sc != null && sc.Section_WordMargin == "Y")
|
|
||||||
{
|
|
||||||
using (Pdf myPdf = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)sect.MSWordPageCount, buf)) {; }
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
using (Pdf myPdf1 = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
|
||||||
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) {; }
|
|
||||||
}
|
|
||||||
|
|
||||||
doc.UpdateDRoUsages(roids);
|
|
||||||
doc.Save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using (Document doc = docInfo.Get())
|
||||||
|
{
|
||||||
|
DocStyle myDocStyle = sect.ActiveSection.MyDocStyle;
|
||||||
|
SectionConfig sc = sect.ActiveSection.MyConfig as SectionConfig;
|
||||||
|
int ss = sect.MyDocVersion.DocVersionConfig.SelectedSlave;
|
||||||
|
|
||||||
|
if (sc != null && sc.Section_WordMargin == "Y")
|
||||||
|
{
|
||||||
|
using (Pdf myPdf = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, 0, 0, 0, 0, (double)sect.MSWordPageCount, buf)) {; }
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (Pdf myPdf1 = Pdf.MakePdf(doc, ss * 10 + MSWordToPDF.DebugStatus, (int)myDocStyle.Layout.TopMargin, (int)myDocStyle.Layout.PageLength,
|
||||||
|
(int)myDocStyle.Layout.LeftMargin, (int)myDocStyle.Layout.PageWidth, (double)sect.MSWordPageCount, buf)) {; }
|
||||||
|
}
|
||||||
|
|
||||||
|
doc.UpdateDRoUsages(roids);
|
||||||
|
doc.Save();
|
||||||
|
}
|
||||||
|
|
||||||
docInfo.RefreshConfig();
|
docInfo.RefreshConfig();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1482,12 +1476,22 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
|
|
||||||
if (CloseWordWhenDone)
|
try
|
||||||
|
{
|
||||||
|
if (CloseWordWhenDone)
|
||||||
|
{
|
||||||
|
CloseAppAfterWait();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
CloseAppAfterWait();
|
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++");
|
||||||
|
|
||||||
// [jpr 2022.07.26] - For memory optimization
|
// [jpr 2022.07.26] - For memory optimization
|
||||||
|
|||||||
@@ -3839,9 +3839,17 @@ namespace VEPROMS.CSLA.Library
|
|||||||
_SupInfos = null;
|
_SupInfos = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
//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
|
||||||
public static ProcedureInfo ResetProcedure(int procID)
|
// **********************
|
||||||
|
// 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)
|
||||||
{
|
{
|
||||||
// The following lines reload the procedure info cache
|
// The following lines reload the procedure info cache
|
||||||
ProcedureInfo newproc = ProcedureInfo.Get(procID, true);
|
ProcedureInfo newproc = ProcedureInfo.Get(procID, true);
|
||||||
@@ -3859,26 +3867,27 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ItemInfo newprocitem = Get(procID, true);
|
ItemInfo newprocitem = Get(procID, true);
|
||||||
newprocitem.RefreshConfig();
|
newprocitem.RefreshConfig();
|
||||||
|
|
||||||
//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++)
|
||||||
{
|
|
||||||
ResetParts(itemIDs[index]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//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
|
|
||||||
//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();
|
|
||||||
#pragma warning restore S2971 // LINQ expressions should be simplified
|
|
||||||
for (int index = 0; index < pconfigrefresh_items.Count; index++)
|
|
||||||
{
|
{
|
||||||
pconfigrefresh_items[index].MyProcedure = newproc;
|
ResetParts(itemIDs[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//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
|
||||||
|
//otherwise will get a "Collection was modified; enumeration operation may not execute" error
|
||||||
|
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
|
||||||
|
for (int index = 0; index < pconfigrefresh_items.Count; index++)
|
||||||
|
{
|
||||||
|
pconfigrefresh_items[index].MyProcedure = newproc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//return the changed procedure info
|
//return the changed procedure info
|
||||||
return newproc;
|
return newproc;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,19 +522,22 @@ 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)
|
|
||||||
tmp = tmp.Save();
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
Csla.Validation.BrokenRulesCollection brc = tmp.ValidationRules.GetBrokenRules();
|
if (tmp.IsSavable)
|
||||||
tmp._ErrorMessage = "Failed Validation:";
|
return tmp.Save();
|
||||||
foreach (Csla.Validation.BrokenRule br in brc)
|
else
|
||||||
{
|
{
|
||||||
tmp._ErrorMessage += "\r\n\tFailure: " + br.RuleName;
|
Csla.Validation.BrokenRulesCollection brc = tmp.ValidationRules.GetBrokenRules();
|
||||||
|
tmp._ErrorMessage = "Failed Validation:";
|
||||||
|
foreach (Csla.Validation.BrokenRule br in brc)
|
||||||
|
{
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
|
|||||||
72
PROMS/VEPROMS.CSLA.Library/Minimal/ChangeBarAuditHistory.cs
Normal file
72
PROMS/VEPROMS.CSLA.Library/Minimal/ChangeBarAuditHistory.cs
Normal file
@@ -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
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -86,7 +86,38 @@ namespace VEPROMS.CSLA.Library
|
|||||||
throw new DbCslaException("Error in vesp_GetOtherActiveSessions: retrieving data failed", ex);
|
throw new DbCslaException("Error in vesp_GetOtherActiveSessions: retrieving data failed", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -389,6 +389,7 @@
|
|||||||
<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\RevisionData.cs" />
|
||||||
|
|||||||
@@ -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,15 +53,22 @@ 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -175,7 +184,8 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
WireCheckboxes();
|
|
||||||
|
WireCheckboxes();
|
||||||
MyApplicability = string.Empty;
|
MyApplicability = string.Empty;
|
||||||
string sep = string.Empty;
|
string sep = string.Empty;
|
||||||
foreach (int i in MyCheckBoxes.Keys)
|
foreach (int i in MyCheckBoxes.Keys)
|
||||||
@@ -216,8 +226,8 @@ namespace Volian.Controls.Library
|
|||||||
// return internal and external for the procedure level)
|
// return internal and external for the procedure level)
|
||||||
if ((!MyItemInfo.IsProcedure && invalidTrans.Count == 0) || IsProcWithNoExternalTrans(MyItemInfo, invalidTrans))
|
if ((!MyItemInfo.IsProcedure && invalidTrans.Count == 0) || IsProcWithNoExternalTrans(MyItemInfo, invalidTrans))
|
||||||
{
|
{
|
||||||
// C2021 - 027: Procedure level PC/PC
|
// C2021 - 027: Procedure level PC/PC
|
||||||
if (MyItemInfo.IsProcedure && MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl)
|
if (MyItemInfo.IsProcedure && MyItemInfo.ActiveFormat.PlantFormat.FormatData.ProcData.ProcAppl)
|
||||||
{
|
{
|
||||||
ProcedureConfig sc = MyItemInfo.MyConfig as ProcedureConfig;
|
ProcedureConfig sc = MyItemInfo.MyConfig as ProcedureConfig;
|
||||||
sc.MasterSlave_Applicability = Volian.Base.Library.BigNum.MakeBigNum(MyApplicability);
|
sc.MasterSlave_Applicability = Volian.Base.Library.BigNum.MakeBigNum(MyApplicability);
|
||||||
@@ -270,8 +280,61 @@ namespace Volian.Controls.Library
|
|||||||
// s.Save();
|
// s.Save();
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
// B2021-149: for procedure, only consider external transitions as invalid
|
private void BtnApplicabilitychg_Click(object sender, System.EventArgs e)
|
||||||
private bool IsProcWithNoExternalTrans(ItemInfo ii, List<InvalidTransition> invalidTrans)
|
{
|
||||||
|
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
|
||||||
|
private bool IsProcWithNoExternalTrans(ItemInfo ii, List<InvalidTransition> invalidTrans)
|
||||||
{
|
{
|
||||||
if (invalidTrans.Count == 0) return true;
|
if (invalidTrans.Count == 0) return true;
|
||||||
foreach (InvalidTransition iT in invalidTrans)
|
foreach (InvalidTransition iT in invalidTrans)
|
||||||
|
|||||||
@@ -56,7 +56,20 @@ 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
|
||||||
if (value is ProcedureInfo && _MyProcedureInfo is ProcedureInfo && value.ItemID == _MyProcedureInfo.ItemID)
|
|
||||||
|
//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)
|
||||||
return;
|
return;
|
||||||
_MyProcedureInfo = value;
|
_MyProcedureInfo = value;
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
@@ -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,7 +1097,25 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
tvAudits.Height = ((tcpDetail.Height - btnRestore.Height) / 4) * 3;
|
tvAudits.Height = ((tcpDetail.Height - btnRestore.Height) / 4) * 3;
|
||||||
}
|
}
|
||||||
public void RefreshChangeList()
|
|
||||||
|
//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()
|
||||||
{
|
{
|
||||||
myTimer.Enabled = false;
|
myTimer.Enabled = false;
|
||||||
myTimer.Enabled = true;
|
myTimer.Enabled = true;
|
||||||
|
|||||||
BIN
PROMS/Volian.Controls.Library/DisplayHistory.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/DisplayHistory.designer.cs
generated
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>
|
||||||
@@ -81,7 +81,7 @@ namespace Volian.Controls.Library
|
|||||||
this.lbROId.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lbROId.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.lbROId.ForeColor = System.Drawing.SystemColors.Highlight;
|
this.lbROId.ForeColor = System.Drawing.SystemColors.Highlight;
|
||||||
this.lbROId.Location = new System.Drawing.Point(48, 24);
|
this.lbROId.Location = new System.Drawing.Point(48, 24);
|
||||||
this.lbROId.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.lbROId.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.lbROId.Name = "lbROId";
|
this.lbROId.Name = "lbROId";
|
||||||
this.lbROId.Size = new System.Drawing.Size(183, 33);
|
this.lbROId.Size = new System.Drawing.Size(183, 33);
|
||||||
this.superTooltip1.SetSuperTooltip(this.lbROId, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here. Double-Click to open" +
|
this.superTooltip1.SetSuperTooltip(this.lbROId, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here. Double-Click to open" +
|
||||||
@@ -97,7 +97,7 @@ namespace Volian.Controls.Library
|
|||||||
this.lblROID.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
this.lblROID.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||||
this.lblROID.Dock = System.Windows.Forms.DockStyle.Left;
|
this.lblROID.Dock = System.Windows.Forms.DockStyle.Left;
|
||||||
this.lblROID.Location = new System.Drawing.Point(0, 24);
|
this.lblROID.Location = new System.Drawing.Point(0, 24);
|
||||||
this.lblROID.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.lblROID.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.lblROID.Name = "lblROID";
|
this.lblROID.Name = "lblROID";
|
||||||
this.lblROID.Size = new System.Drawing.Size(48, 33);
|
this.lblROID.Size = new System.Drawing.Size(48, 33);
|
||||||
this.superTooltip1.SetSuperTooltip(this.lblROID, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
this.superTooltip1.SetSuperTooltip(this.lblROID, new DevComponents.DotNetBar.SuperTooltipInfo("RO ID", "", "The RO ID for the selected RO Value will be displayed here.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
||||||
@@ -139,7 +139,7 @@ namespace Volian.Controls.Library
|
|||||||
this.btnGoToRO.Dock = System.Windows.Forms.DockStyle.Top;
|
this.btnGoToRO.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.btnGoToRO.Enabled = false;
|
this.btnGoToRO.Enabled = false;
|
||||||
this.btnGoToRO.Location = new System.Drawing.Point(0, 55);
|
this.btnGoToRO.Location = new System.Drawing.Point(0, 55);
|
||||||
this.btnGoToRO.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.btnGoToRO.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnGoToRO.Name = "btnGoToRO";
|
this.btnGoToRO.Name = "btnGoToRO";
|
||||||
this.btnGoToRO.Size = new System.Drawing.Size(233, 18);
|
this.btnGoToRO.Size = new System.Drawing.Size(233, 18);
|
||||||
this.btnGoToRO.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
this.btnGoToRO.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||||
@@ -155,7 +155,7 @@ namespace Volian.Controls.Library
|
|||||||
this.btnPreviewRO.Dock = System.Windows.Forms.DockStyle.Top;
|
this.btnPreviewRO.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.btnPreviewRO.Enabled = false;
|
this.btnPreviewRO.Enabled = false;
|
||||||
this.btnPreviewRO.Location = new System.Drawing.Point(0, 37);
|
this.btnPreviewRO.Location = new System.Drawing.Point(0, 37);
|
||||||
this.btnPreviewRO.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
this.btnPreviewRO.Margin = new System.Windows.Forms.Padding(2);
|
||||||
this.btnPreviewRO.Name = "btnPreviewRO";
|
this.btnPreviewRO.Name = "btnPreviewRO";
|
||||||
this.btnPreviewRO.Size = new System.Drawing.Size(233, 18);
|
this.btnPreviewRO.Size = new System.Drawing.Size(233, 18);
|
||||||
this.superTooltip1.SetSuperTooltip(this.btnPreviewRO, new DevComponents.DotNetBar.SuperTooltipInfo("Preview", "", "This will Preview the selected RO Table, X/Y Plot, or Image.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
this.superTooltip1.SetSuperTooltip(this.btnPreviewRO, new DevComponents.DotNetBar.SuperTooltipInfo("Preview", "", "This will Preview the selected RO Table, X/Y Plot, or Image.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(150, 80)));
|
||||||
@@ -263,6 +263,7 @@ namespace Volian.Controls.Library
|
|||||||
this.Controls.Add(this.tvROFST);
|
this.Controls.Add(this.tvROFST);
|
||||||
this.Controls.Add(this.lbFound);
|
this.Controls.Add(this.lbFound);
|
||||||
this.Controls.Add(this.panelValue);
|
this.Controls.Add(this.panelValue);
|
||||||
|
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.Name = "DisplayRO";
|
this.Name = "DisplayRO";
|
||||||
this.Size = new System.Drawing.Size(233, 507);
|
this.Size = new System.Drawing.Size(233, 507);
|
||||||
this.panelValue.ResumeLayout(false);
|
this.panelValue.ResumeLayout(false);
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
|
using DevComponents.DotNetBar;
|
||||||
|
using JR.Utils.GUI.Forms;
|
||||||
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.Text;
|
using System.Drawing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using VEPROMS.CSLA.Library;
|
using VEPROMS.CSLA.Library;
|
||||||
using XYPlots;
|
|
||||||
using DevComponents.DotNetBar;
|
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
using Volian.Base.Library;
|
using Volian.Base.Library;
|
||||||
using JR.Utils.GUI.Forms;
|
using XYPlots;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Volian.Controls.Library
|
namespace Volian.Controls.Library
|
||||||
{
|
{
|
||||||
@@ -379,6 +379,7 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
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;
|
||||||
|
|
||||||
@@ -770,9 +771,15 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
tmp = new TreeNode(roc.title);
|
tmp = new TreeNode(roc.title);
|
||||||
tmp.Tag = roc;
|
tmp.Tag = roc;
|
||||||
|
|
||||||
|
if (tmp.Text.IndexOf("\\u") > -1) // RO Editor add symbols C2022 - 003
|
||||||
|
{
|
||||||
|
tmp.Text = Regex.Replace(tmp.Text, @"\\u([0-9]{1,4})\?", m => Convert.ToChar(int.Parse(m.Groups[1].Value)).ToString());
|
||||||
|
}
|
||||||
|
|
||||||
if (roc.roid.Length == 16)
|
if (roc.roid.Length == 16)
|
||||||
{
|
{
|
||||||
tn.Nodes.Add(tmp);
|
tn.Nodes.Add(tmp);
|
||||||
@@ -921,11 +928,12 @@ namespace Volian.Controls.Library
|
|||||||
// Pad to 16 to store in the RoUsage table.
|
// Pad to 16 to store in the RoUsage table.
|
||||||
string padroid = ROFSTLookup.FormatRoidKey(roc.roid, true);
|
string padroid = ROFSTLookup.FormatRoidKey(roc.roid, true);
|
||||||
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, MyROFST.RODbID);
|
string linktxt = string.Format(@"#Link:ReferencedObject:<NewID> {0} {1}", padroid, MyROFST.RODbID);
|
||||||
|
|
||||||
// Resolve symbols and scientific notation in the RO return value
|
|
||||||
string valtxt = MyROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, MyRTB.MyItemInfo);
|
|
||||||
|
|
||||||
MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, MyROFST.RODbID));
|
// Resolve symbols and scientific notation in the RO return value
|
||||||
|
string valtxt = MyROFSTLookup.GetTranslatedRoValue(padroid, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta, MyRTB.MyItemInfo.ActiveFormat.PlantFormat.FormatData.SectData.UseTildaPoundCharsForSuperSubScriptInROValues, false, MyRTB.MyItemInfo);
|
||||||
|
|
||||||
|
MyRTB.OnRoInsert(this, new StepRTBRoEventArgs(valtxt, selectedChld.value, linktxt, padroid, MyROFST.RODbID));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1156,13 +1164,23 @@ namespace Volian.Controls.Library
|
|||||||
tbROValue.Text = null;
|
tbROValue.Text = null;
|
||||||
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,20 +112,12 @@
|
|||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.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>
|
||||||
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.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="btnSaveRO.SuperTooltip" xml:space="preserve">
|
|
||||||
<value>For Step Editor sections:
|
|
||||||
- This will place the selected RO at the cursor position.
|
|
||||||
- This will replace an RO with the selected RO.
|
|
||||||
|
|
||||||
For Word sections
|
|
||||||
- This will place the needed RO ID on the clipboard.</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
@@ -215,7 +215,8 @@ 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.DisabledBackColor = System.Drawing.Color.Empty;
|
this.groupPanelCheckoff.Controls.Add(this.cbInitialLine);
|
||||||
|
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);
|
||||||
this.groupPanelCheckoff.Margin = new System.Windows.Forms.Padding(2);
|
this.groupPanelCheckoff.Margin = new System.Windows.Forms.Padding(2);
|
||||||
@@ -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,8 +4162,11 @@ namespace Volian.Controls.Library
|
|||||||
}
|
}
|
||||||
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
void MyConfig_PropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
SaveConfig();
|
//B2026-024 Change bars should not show when updating Applicability.
|
||||||
}
|
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = false;
|
||||||
|
SaveConfig();
|
||||||
|
if (e.PropertyName == "MasterSlave_Applicability") ChangeBarForConfigItemChange = true;
|
||||||
|
}
|
||||||
public void SaveConfig()
|
public void SaveConfig()
|
||||||
{
|
{
|
||||||
if (!MyItemInfo.MyConfig.IsDirty) return;
|
if (!MyItemInfo.MyConfig.IsDirty) return;
|
||||||
|
|||||||
@@ -1400,11 +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;
|
||||||
linkValue = linkValue.Replace("\\u8209?", "\\f1\\u8209?\\f0 ");
|
// B2026-036 fixed issue where numbers after a dash character (in an RO return value) were trucated
|
||||||
linkValue = linkValue.Replace("\\u9586?", "\\f1\\u9586?\\f0 "); // backslash symbol
|
// Needed to add a space after the \f0 in the string replace below. RTF was getting confused
|
||||||
linkValue = linkValue.Replace("\\u916?", "\\f1\\u916?\\f0 ");
|
// 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
|
||||||
|
foreach (Match match in Regex.Matches(linkValue, pattern, RegexOptions.IgnoreCase))
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|||||||
@@ -1669,7 +1669,7 @@ namespace Volian.Controls.Library
|
|||||||
Clipboard.Clear();
|
Clipboard.Clear();
|
||||||
|
|
||||||
Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard
|
Clipboard.SetDataObject(myDO); // this saves the cleaned up information to the Windows clipboard
|
||||||
}
|
}
|
||||||
iData = Clipboard.GetDataObject();
|
iData = Clipboard.GetDataObject();
|
||||||
bool noEquationData = true;
|
bool noEquationData = true;
|
||||||
// part of bug B2017-117 we were running out of window handles when printing, found this similar use of
|
// part of bug B2017-117 we were running out of window handles when printing, found this similar use of
|
||||||
|
|||||||
@@ -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:");
|
||||||
|
|||||||
@@ -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,8 +1614,13 @@ 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)
|
||||||
string fileName = PEIPath + "\\" + str + "Approved_Rev_" + ri.RevisionNumber.Replace(" ", "_").Replace("\\", "-").Replace("/", "-") + "_" + fNametmp;
|
{
|
||||||
|
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;
|
||||||
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()
|
||||||
|
|||||||
@@ -2,13 +2,14 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Drawing;
|
|
||||||
using System.Drawing.Printing;
|
|
||||||
using System.Drawing.Imaging;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.Drawing.Imaging;
|
||||||
|
using System.Drawing.Printing;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Windows.Forms;
|
||||||
using VG;
|
using VG;
|
||||||
//using XYPlots;
|
//using XYPlots;
|
||||||
|
|
||||||
@@ -21,6 +22,10 @@ namespace XYPlots
|
|||||||
public frmXYPlot(string title,string xyPlot)
|
public frmXYPlot(string title,string xyPlot)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
title = Regex.Replace(title, @"\\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.
|
||||||
|
xyPlot = Regex.Replace(xyPlot, @"\\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.
|
||||||
|
|
||||||
int pstart = xyPlot.IndexOf("<<G"); // find the starting Plot Command
|
int pstart = xyPlot.IndexOf("<<G"); // find the starting Plot Command
|
||||||
xyPlot = xyPlot.Substring(pstart); // set val to the start of the plot commands
|
xyPlot = xyPlot.Substring(pstart); // set val to the start of the plot commands
|
||||||
_XYPlot =xyPlot;
|
_XYPlot =xyPlot;
|
||||||
|
|||||||
Reference in New Issue
Block a user