C2024-005-Annotations-Cleanup

This commit is contained in:
Paul Larsen 2024-07-10 08:34:59 -04:00
parent 3c0fa4295f
commit 9f36ccf029
9 changed files with 1347 additions and 584 deletions

View File

@ -1,2 +1,3 @@
C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2
C1.Win.C1SpellChecker.C1SpellChecker, C1.Win.C1SpellChecker.2
C1.Win.C1Input.C1ComboBox, C1.Win.C1Input.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a
C1.Win.C1FlexGrid.C1FlexGrid, C1.Win.C1FlexGrid.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da
C1.Win.C1SpellChecker.C1SpellChecker, C1.Win.C1SpellChecker.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da

View File

@ -99,7 +99,10 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="C1.Win.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=944ae1ea0e47ca04" />
<Reference Include="C1.Win.C1Command.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=e808566f358766d8" />
<Reference Include="C1.Win.C1FlexGrid.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=79882d576c6336da, processorArchitecture=MSIL" />
<Reference Include="C1.Win.C1Input.2, Version=2.0.20213.532, Culture=neutral, PublicKeyToken=7e7ff60f0c214f9a, processorArchitecture=MSIL" />
<Reference Include="Csla">
<HintPath>..\..\..\..\3rdPartyLibraries\CSLA\Csla.dll</HintPath>
</Reference>

View File

@ -1,4 +1,6 @@

using VEPROMS.CSLA.Library;
using Volian.Base.Library;
namespace VEPROMS
{
partial class frmAnnotationsCleanup
@ -30,56 +32,73 @@ namespace VEPROMS
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.lbAnnotations = new System.Windows.Forms.ListBox();
this.lbAnnotationTypes = new System.Windows.Forms.ListBox();
this.itemAnnotationsBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.lblAnnotationsList = new System.Windows.Forms.Label();
this.btnClean = new System.Windows.Forms.Button();
this.lblCountNumber = new System.Windows.Forms.Label();
this.lblCount = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).BeginInit();
this.SuspendLayout();
//
// lbAnnotations
// lbAnnotationTypes
//
this.lbAnnotations.DataSource = this.itemAnnotationsBindingSource;
this.lbAnnotations.FormattingEnabled = true;
this.lbAnnotations.Location = new System.Drawing.Point(25, 48);
this.lbAnnotations.Name = "lbAnnotations";
this.lbAnnotations.Size = new System.Drawing.Size(308, 394);
this.lbAnnotations.TabIndex = 0;
//
// itemAnnotationsBindingSource
//
this.itemAnnotationsBindingSource.DataSource = typeof(VEPROMS.CSLA.Library.ItemAnnotations);
this.lbAnnotationTypes.DataSource = this.itemAnnotationsBindingSource;
this.lbAnnotationTypes.FormattingEnabled = true;
this.lbAnnotationTypes.Location = new System.Drawing.Point(25, 48);
this.lbAnnotationTypes.Name = "lbAnnotationTypes";
this.lbAnnotationTypes.Size = new System.Drawing.Size(295, 433);
this.lbAnnotationTypes.TabIndex = 0;
//
// lblAnnotationsList
//
this.lblAnnotationsList.AutoSize = true;
this.lblAnnotationsList.Location = new System.Drawing.Point(22, 21);
this.lblAnnotationsList.Location = new System.Drawing.Point(26, 21);
this.lblAnnotationsList.Name = "lblAnnotationsList";
this.lblAnnotationsList.Size = new System.Drawing.Size(175, 13);
this.lblAnnotationsList.Size = new System.Drawing.Size(169, 13);
this.lblAnnotationsList.TabIndex = 1;
this.lblAnnotationsList.Text = "Select A Annotation Group to Clean";
this.lblAnnotationsList.Click += new System.EventHandler(this.label1_Click);
this.lblAnnotationsList.Text = "Select a Annotation Type to Clean";
//
// btnClean
//
this.btnClean.Location = new System.Drawing.Point(364, 48);
this.btnClean.Location = new System.Drawing.Point(365, 164);
this.btnClean.Name = "btnClean";
this.btnClean.Size = new System.Drawing.Size(131, 36);
this.btnClean.TabIndex = 2;
this.btnClean.Text = "Clean";
this.btnClean.Text = "Proceed?";
this.btnClean.UseVisualStyleBackColor = true;
this.btnClean.Click += new System.EventHandler(this.button1_Click);
//
// lblCountNumber
//
this.lblCountNumber.AutoSize = true;
this.lblCountNumber.Location = new System.Drawing.Point(412, 114);
this.lblCountNumber.Name = "lblCountNumber";
this.lblCountNumber.Size = new System.Drawing.Size(35, 13);
this.lblCountNumber.TabIndex = 3;
this.lblCountNumber.Text = "Count";
//
// lblCount
//
this.lblCount.AutoSize = true;
this.lblCount.Location = new System.Drawing.Point(331, 70);
this.lblCount.Name = "lblCount";
this.lblCount.Size = new System.Drawing.Size(206, 13);
this.lblCount.TabIndex = 4;
this.lblCount.Text = "Number of Annotations that will be deleted";
//
// frmAnnotationsCleanup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(549, 535);
this.Controls.Add(this.lblCount);
this.Controls.Add(this.lblCountNumber);
this.Controls.Add(this.btnClean);
this.Controls.Add(this.lblAnnotationsList);
this.Controls.Add(this.lbAnnotations);
this.Controls.Add(this.lbAnnotationTypes);
this.Name = "frmAnnotationsCleanup";
this.Text = "frmAnnotationsCleanup";
this.Text = "Clean Annotations";
((System.ComponentModel.ISupportInitialize)(this.itemAnnotationsBindingSource)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@ -88,9 +107,11 @@ namespace VEPROMS
#endregion
private System.Windows.Forms.ListBox lbAnnotations;
private System.Windows.Forms.ListBox lbAnnotationTypes;
private System.Windows.Forms.Label lblAnnotationsList;
private System.Windows.Forms.BindingSource itemAnnotationsBindingSource;
private System.Windows.Forms.Button btnClean;
private System.Windows.Forms.Label lblCountNumber;
private System.Windows.Forms.Label lblCount;
}
}

View File

@ -7,29 +7,158 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using VEPROMS.CSLA.Library;
using Volian.Base.Library;
//using Volian.Pipe.Library;
using System.Xml;
using System.Diagnostics;
using JR.Utils.GUI.Forms;
namespace VEPROMS
{
public partial class frmAnnotationsCleanup : Form
{
public frmAnnotationsCleanup()
Label mylab = new Label();
string procList = "";
string docvList = "";
int AnnotationTyp;
List<ProcedureInfo> pil2 = new List<ProcedureInfo>();
List<DocVersionInfo> dvil2 = new List<DocVersionInfo>();
private frmBatchRefresh mainForm = null;
public frmAnnotationsCleanup(Form callingForm, List<ProcedureInfo> pil, List<DocVersionInfo> dvil)
{
mainForm = callingForm as frmBatchRefresh;
InitializeComponent();
pil2 = pil;
dvil2 = dvil;
myAnnotationTypeInfoList = AnnotationTypeInfoList.Get();
lbAnnotationTypes.DataSource = myLocalAnnotationTypeInfoList = new LocalAnnotationTypeInfoList(myAnnotationTypeInfoList);
Dictionary<string, string> AnnotationsList = new Dictionary<string, string>();
foreach (LocalAnnotationTypeInfo lati in myLocalAnnotationTypeInfoList)
{
AnnotationsList.Add(lati.TypeID.ToString(), lati.Name);
//cbAnnotationTypes.Items.Add(new { Name = lati.Name, Value = lati.TypeID });
}
//cbAnnotationTypes.DroppedDown = true; //DroppedDown
lbAnnotationTypes.DataSource = new BindingSource(AnnotationsList, null);
lbAnnotationTypes.DisplayMember = "Value";
lbAnnotationTypes.ValueMember = "Key";
lbAnnotationTypes.SelectedIndexChanged += lbAnnotationTypes_SelectedIndexChanged;
//List<ProcedureInfo> SelectedProds = new List<ProcedureInfo>();
//SelectedProds = frmBatchRefresh.RetrieveChkAnnotations();
}
private void label1_Click(object sender, EventArgs e)
private string getAnnotationProcItems(List<ProcedureInfo> pil2)
{
foreach (var p in pil2)
{
if (p.IsProcedure)
{
if (procList == "")
{
procList = procList + p.ItemID.ToString();
}
else
{
procList = procList + "," + p.ItemID.ToString();
}
}
}
return procList;
//for( int i = 0; pil2.Count ; i++ )
}
private string getAnnotationDocvItems(List<DocVersionInfo> dvil2)
{
foreach (var d in dvil2)
{
if (d.IsDocVersion)
{
if (docvList == "")
{
docvList = docvList + d.VersionID.ToString();
}
else
{
docvList = docvList + "," + d.VersionID.ToString();
}
}
}
return docvList;
//for( int i = 0; pil2.Count ; i++ )
}
private AnnotationTypeInfoList myAnnotationTypeInfoList = null;
private LocalAnnotationTypeInfoList myLocalAnnotationTypeInfoList = null;
private void button1_Click(object sender, EventArgs e)
{
if (lbAnnotations.SelectedItem != null)
foreach (var p in pil2)
{
if (p.IsProcedure)
{
TextBox frm2 = mainForm.GettxtProcess();
frm2.AppendText(p.DisplayNumber + ' ' + p.DisplayText);
Annotation.DeleteAnnotationProcByGroup(lbAnnotationTypes.SelectedIndex, p.ItemID);
}
}
foreach (var d in dvil2)
{
if (d.IsDocVersion)
{
TextBox frm2 = mainForm.GettxtProcess();
//frm2.AppendText(p);
Annotation.DeleteAnnotationByGroup(lbAnnotationTypes.SelectedIndex, d.VersionID);
}
}
}
//private void cbAnnotationTypes_SelectedIndexChanged(object sender, EventArgs e)
//{
// mylab.Text = mylab.Text + ((KeyValuePair<string, string>)cbAnnotationTypes.SelectedItem).Key;
//}
private void lbAnnotationTypes_SelectedIndexChanged(object sender, EventArgs e)
{
int deletecountProc = 0;
int deletecountDocv = 0;
if (pil2.Count > 0)
{
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, getAnnotationProcItems(pil2));
}
if (dvil2.Count > 0)
{
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, getAnnotationDocvItems(dvil2));
}
lblCountNumber.Text = (deletecountProc + deletecountDocv).ToString();
}
//private void cbAnnotationTypes_(object sender, EventArgs e)
//{
// //mylab.Text = mylab.Text + cbAnnotationTypes.SelectedValue;
// //mylab.Text = mylab.Text + cbAnnotationTypes.SelectedItem.ToString();
// //mylab.Text = mylab.Text + ((KeyValuePair<string, string>)cbAnnotationTypes.SelectedItem).Value;
//}
}
}

View File

@ -120,4 +120,7 @@
<metadata name="itemAnnotationsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="itemAnnotationsBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -22,8 +22,8 @@ namespace VEPROMS
set { _MySessionInfo = value; }
}
private bool IsAdministratorUser = false; //C2020-035 used to control what Set Amins can do
// C2017-030 - new Admin Tools user interface
// pass in session info to constructor
// C2017-030 - new Admin Tools user interface
// pass in session info to constructor
public frmBatchRefresh(SessionInfo sessionInfo)
{
InitializeComponent();
@ -43,18 +43,25 @@ namespace VEPROMS
swStandardHypenChars.Enabled = false;
}
}
// txtProcess text box available to frmAnnotationsClean form.
internal TextBox GettxtProcess()
{
return txtProcess;
}
// NOTE: removed the Refresh ROs and Refresh Transitions and ROs options (now only Transitions can be refreshed)
// the Update ROs and Refresh ROs logic was merged together. The Update ROs will functionally do both
// also annotations will be placed on step elements that have RO changes
// make all of the hyphen character consistant so they can all be found with the Search function
private void FixHyphens()
{
this.Cursor = Cursors.WaitCursor;
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Standardizing Hyphens");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int affectedRows = ESP_FixHyphens.Execute("vesp_FixHyphens") / 2;// Two results for each change
@ -65,7 +72,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
txtResults.AppendText(Environment.NewLine);
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -125,6 +132,60 @@ namespace VEPROMS
myTV.SelectedNode.Expand();
this.Cursor = Cursors.Default;
}
private void ResetDelTV()
{
ResetDelTV(false);
}
private void ResetDelTV(bool noProcs)
{
btnFixLinks.Enabled = false;
this.Cursor = Cursors.WaitCursor;
myTVdel.Nodes.Clear();
myDocVersions.Clear();
FolderInfo fi = FolderInfo.GetTop();
if (fi.ChildFolderCount > 0)
{
if (noProcs)
{
LoadBottomLevelFolders(fi, myTVdel);
}
else
{
TreeNode tn = new TreeNode(fi.Name);
tn.Tag = fi;
tn.StateImageIndex = -1; // Hide the checkbox for the root node
LoadChildFolders(fi, tn, noProcs);
myTVdel.Nodes.Add(tn);
}
}
if (myTVdel.SelectedNode != null)
myTVdel.SelectedNode.Expand();
this.Cursor = Cursors.Default;
//btnFixLinks.Enabled = false;
//this.Cursor = Cursors.WaitCursor;
////myTreeNodePath = new List<string>();
//myTVdel.Nodes.Clear();
//myDocVersions.Clear();
//FolderInfo fi = FolderInfo.GetTop();
//TreeNode tn = myTVdel.Nodes.Add(fi.Name );
//tn.Tag = fi;
//if (fi.ChildFolderCount > 0)
//{
// if (noProcs)
// {
// LoadBottomLevelFolders(fi, myTVdel);
// }
// else
// LoadChildFolders(fi, tn, noProcs);
//}
//if (myTVdel.SelectedNode != null)
// myTVdel.SelectedNode.Expand();
//this.Cursor = Cursors.Default;
}
// B2021-060 Higher level folders where being removed from the tree even if there was a child folder that containe a working draft set
private bool LoadChildFolders(FolderInfo fi, TreeNode tn, bool noProcs)
{
@ -135,8 +196,8 @@ namespace VEPROMS
TreeNode tnc = tn.Nodes.Add(fic.Name);
tnc.Tag = fic;
if (fic.ChildFolderCount > 0)
if(LoadChildFolders(fic, tnc, noProcs))
loadedChildWorkingDraft=true;
if (LoadChildFolders(fic, tnc, noProcs))
loadedChildWorkingDraft = true;
// B2020-114 and C2020-035 only show folders the Set Admin can access
if (fic.FolderDocVersionCount > 0)
{
@ -151,6 +212,34 @@ namespace VEPROMS
tn.Remove();
return loadedWorkingDraft;
}
/// <summary>
/// Load only bottom layer of folders into treenode.
/// </summary>
/// <param name="fi"></param>
/// <param name="tn"></param>
private void LoadBottomLevelFolders(FolderInfo fi, TreeView treeView)
{
foreach (FolderInfo fic in fi.SortedChildFolders)
{
if (fic.ChildFolderCount > 0)
{
// Recursively call for child folders
LoadBottomLevelFolders(fic, treeView);
}
else
{
if (fic.Name != "PROMS")
{
// If the folder is a bottom-level folder (no child folders), add it directly to the TreeView
TreeNode tnc = treeView.Nodes.Add(fic.Name);
tnc.Tag = fic;
}
}
}
}
private bool LoadDocVersions(FolderInfo fic, TreeNode tnc, bool noProcs)
{
bool rtnval = false;
@ -201,7 +290,7 @@ namespace VEPROMS
private void UpdateROValues()
{
this.Cursor = Cursors.WaitCursor;
List<ProcedureInfo> pil = new List<ProcedureInfo>(); // C2023-002: list of checked out procedures, used in frmBatchRefreshCheckedOut dialog
List<ProcedureInfo> pil = new List<ProcedureInfo>(); // C2023-002: list of checked out procedures, used in frmBatchRefreshCheckedOut dialog
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
foreach (TreeNode tn in myDocVersions.Keys)
if (tn.Checked)
@ -251,7 +340,7 @@ namespace VEPROMS
Application.DoEvents();
}
}
Application.DoEvents();
// when processing more than one procedure set, display only one completed message after all are processed
if (ROFstInfo.MessageList != null)
@ -273,7 +362,7 @@ namespace VEPROMS
sb.AppendLine("Have you requested the users to close the procedures and do you want to continue the process?");
frmBatchRefreshCheckedOut frmCO = new frmBatchRefreshCheckedOut(1);
frmCO.MySessionInfo = MySessionInfo;
frmCO.CheckedOutProcedures = pil; // C2023-002: set list of checked out procedures
frmCO.CheckedOutProcedures = pil; // C2023-002: set list of checked out procedures
frmCO.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - frmCO.Width, Screen.PrimaryScreen.WorkingArea.Height - frmCO.Height);
// C2023-002: Allow close of dialog that has list of procedures that are checked out
if (frmCO.ShowDialog(this) != DialogResult.Cancel)
@ -412,7 +501,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Refresh Transitions");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtResults.AppendText("Refresh Transitions");
txtResults.AppendText(Environment.NewLine);
@ -449,19 +538,19 @@ namespace VEPROMS
Application.DoEvents();
}
}
if (numTransFixed == 0 && numTransConverted ==0)
if (numTransFixed == 0 && numTransConverted == 0)
{
txtResults.AppendText("No Transitions Needed Updated.");
txtResults.AppendText(Environment.NewLine);
}
ContentInfo.StaticContentInfoChange -= new StaticContentInfoEvent(ContentInfo_StaticContentInfoChange);
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Checked: {0}",numTransProcessed));
txtProcess.AppendText(string.Format("Transitions Checked: {0}", numTransProcessed));
txtProcess.AppendText(Environment.NewLine);
// B2018-002 - Invalid Transitions - Display Transition Refresh Statistics
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}",numTransProcessed - (numTransConverted + numTransFixed)));
txtProcess.AppendText(string.Format("Transitions Correct As Is: {0}", numTransProcessed - (numTransConverted + numTransFixed)));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Transitions Modified: {0}", numTransFixed));
txtProcess.AppendText(Environment.NewLine);
@ -490,10 +579,10 @@ namespace VEPROMS
}
this.Cursor = Cursors.Default;
// B2018-002 - Invalid Transitions - Display Transition Refresh Statisitic
if (numTransFixed == 0 && numTransConverted ==0)
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.",numTransProcessed), "Refresh Transitions Completed");
if (numTransFixed == 0 && numTransConverted == 0)
MessageBox.Show(string.Format("{0} Transitions Checked.\n\nNo Transitions Modified.", numTransProcessed), "Refresh Transitions Completed");
else
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted),numTransFixed, numTransConverted), "Refresh Transitions Completed");
MessageBox.Show(string.Format("{0} Transitions Checked.\n\n {1} Correct as is.\n\n {2} Transitions modified.\n\n {3} Transitions converted to text.", numTransProcessed, numTransProcessed - (numTransFixed + numTransConverted), numTransFixed, numTransConverted), "Refresh Transitions Completed");
}
// C2017-030 - new Admin Tools user interface
@ -506,7 +595,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Refreshing Word Attachments");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int affectedRows = ESP_DeletePDFs.Execute("vesp_DeletePDFs");
@ -516,7 +605,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
txtResults.AppendText(Environment.NewLine);
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -561,7 +650,7 @@ namespace VEPROMS
private int RefreshForSearch()
{
int cntfix = 0;
List<int> gids = GridInfoList.GetIds(); // get all grids in database
List<int> gids = GridInfoList.GetIds(); // get all grids in database
pbProcess.Minimum = 0;
pbProcess.Maximum = gids.Count;
pbProcess.Step = 1;
@ -570,7 +659,7 @@ namespace VEPROMS
using (Content cc = Content.Get(cid))
{
StepConfig sc = new StepConfig(cc.Config);
if (!sc.Step_FixedTblForSrch) // if not processed through this code already, get searchable text & save
if (!sc.Step_FixedTblForSrch) // if not processed through this code already, get searchable text & save
{
try
{
@ -588,7 +677,7 @@ namespace VEPROMS
cc.UserID = Volian.Base.Library.VlnSettings.UserID;
cc.DTS = DateTime.Now;
cc.Text = srchtxt;
}
sc.Step_FixedTblForSrch = true;
cc.Config = sc.ToString();
@ -615,7 +704,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Identifing Orphan Items");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int rowCount = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
@ -636,7 +725,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
}
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -652,7 +741,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Purging Orphan Items");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int rowCount = ESP_IdentifyDisconnectedItems.Execute("vesp_GetDisconnectedItemsCount");
@ -689,7 +778,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
}
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -704,7 +793,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Identifing Unused RoFsts and Figures");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int rowCountRoFst = ESP_GetUnusedRoFsts.Execute("vesp_GetUnusedRoFstsCount");
@ -727,9 +816,9 @@ namespace VEPROMS
}
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
this.Cursor = Cursors.Default;
@ -742,7 +831,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Purging Unused RoFSTs and Figures Items");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int rowCountRoFst = ESP_GetUnusedRoFsts.Execute("vesp_GetUnusedRoFstsCount");
@ -783,7 +872,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
}
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -798,7 +887,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Identifing Unused RO Associations");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int rowCount = ESP_GetROAssoc.Execute("vesp_GetUnusedROAssociationsCount");
@ -817,7 +906,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
}
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -832,7 +921,7 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Purging Unused Referenced Object Associations");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
int rowCount = ESP_GetROAssoc.Execute("vesp_GetUnusedROAssociationsCount");
@ -866,7 +955,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
}
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -881,11 +970,11 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Identifing Hidden Item Locations");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
List<ItemInfo> myItems = ESP_IdentifyNonEditableItems.Execute("vesp_GetNonEditableItems");
txtProcess.AppendText(string.Format("Hidden Items Count: {0}",myItems.Count));
txtProcess.AppendText(string.Format("Hidden Items Count: {0}", myItems.Count));
txtProcess.AppendText(Environment.NewLine);
if (myItems.Count > 0)
{
@ -906,7 +995,7 @@ namespace VEPROMS
txtResults.AppendText(Environment.NewLine);
}
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
@ -921,16 +1010,16 @@ namespace VEPROMS
DateTime pStart = DateTime.Now;
txtProcess.AppendText("Show Users in PROMS");
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(string.Format("Started: {0}",pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Started: {0}", pStart.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(Environment.NewLine);
Application.DoEvents();
txtResults.Clear();
txtResults.AppendText(ESP_GetDatabaseSessions.Execute("vesp_GetDatabaseSessions"));
DateTime pEnd = DateTime.Now;
txtProcess.AppendText(string.Format("Completed: {0}",pEnd.ToString("MM/dd/yyyy @ HH:mm")));
txtProcess.AppendText(string.Format("Completed: {0}", pEnd.ToString("MM/dd/yyyy @ HH:mm")));
Application.DoEvents();
this.Cursor = Cursors.Default;
MessageBox.Show( "Show Users Completed", "Show Users");
MessageBox.Show("Show Users Completed", "Show Users");
}
private void ProcessUpdateROValues(DocVersionInfo dq)
@ -1068,7 +1157,7 @@ namespace VEPROMS
// show the changes made in the Results pannel, include the ItemId of the step element
void ContentInfo_StaticContentInfoChange(object sender, StaticContentInfoEventArgs args)
{
if (args.Type == "TX")
{
myFixesCount++;
@ -1085,7 +1174,7 @@ namespace VEPROMS
}
else // B2018-002 - Invalid Transitions - Display Transition Cconversion Statistics
{
myFixes.AppendLine(string.Format("Converted Transition to text for {0}({1})", (sender as ItemInfo).ShortPath, (sender as ItemInfo).ItemID));
myFixes.AppendLine(string.Format("Converted Transition to text for {0}({1})", (sender as ItemInfo).ShortPath, (sender as ItemInfo).ItemID));
}
}
@ -1121,10 +1210,40 @@ namespace VEPROMS
CheckChildNodes(e.Node, e.Node.Checked);
}
}
if (swDeleteAnnotations.Value)
{
if (e.Node.Checked)
{
DiselectParentNodes(e.Node.Parent);
DiselectChildNodes(e.Node.Nodes);
}
}
btnFixLinks.Enabled = AtLeastOneNodeChecked(); // C2017-030 support for Refresh Transitions/Update RO Values
}
private void DiselectParentNodes(TreeNode parent)
{
while (parent != null)
{
if (parent.Checked)
parent.Checked = false;
parent = parent.Parent;
}
}
private void DiselectChildNodes(TreeNodeCollection childes)
{
foreach (TreeNode oneChild in childes)
{
if (oneChild.Checked)
oneChild.Checked = false;
DiselectChildNodes(oneChild.Nodes);
}
}
private void CheckChildNodes(TreeNode treeNode, bool ischecked)
{
foreach (TreeNode tn in treeNode.Nodes)
@ -1143,9 +1262,9 @@ namespace VEPROMS
public ProgressBarItem ProgressBar
{
get { return _ProgressBar; }
set
{
_ProgressBar = value;
set
{
_ProgressBar = value;
_ProgressBar.TextVisible = true;
}
}
@ -1246,6 +1365,21 @@ namespace VEPROMS
this.Close();
}
// new Admin Tools user interface for deletes
private void sideNavItemDelete_Click(object sender, EventArgs e)
{
}
// new Admin Tools user interface for deletes
private void sideNavItemDelete_Click_1(object sender, EventArgs e)
{
if (swDeleteFolder.Value)
ResetDelTV(true);
else
ResetDelTV(false);
}
#region On/Off Swiches
// C2017-030 new Admin Tools user interface
@ -1500,5 +1634,141 @@ namespace VEPROMS
}
}
//C2024-005 Delete Annotations, Delete Folders
private void swDeleteAnnotations_ValueChanged(object sender, EventArgs e)
{
swDeleteFolder.Value = !swDeleteAnnotations.Value;
if (swDeleteFolder.Value)
ResetDelTV(true);
else
ResetDelTV(false);
}
private void swDeleteFolder_ValueChanged(object sender, EventArgs e)
{
swDeleteAnnotations.Value = !swDeleteFolder.Value;
if (swDeleteFolder.Value)
ResetDelTV(true);
else
ResetDelTV(false);
}
private void btnDeleteItems_Click(object sender, EventArgs e)
{
//clear
txtResults.Clear();
txtProcess.Clear();
if (swDeleteFolder.Value)
{
//TODO process deletions of folders
txtProcess.AppendText("Deleting Folders...");
//List<ProcedureInfo> pil = new List<ProcedureInfo>();
//foreach (TreeNode tn in myProcedures.Keys)
// if (tn.Checked)
// pil.Add(myProcedures[tn]);
////Load Selected Folders
//Dictionary<int, string> folderData = new Dictionary<int, string>();
//List<DocVersionInfo> dvil = new List<DocVersionInfo>();
//foreach (TreeNode tn in myTVdel.Nodes)
// if (tn.Checked)
// {
// tn.Tag = dvi;
// myDocVersions.Add(tn, dvi);
// }
////foreach (TreeNode tn in myTVdel.Nodes)
////{
//// if (tn.Checked)
//// {
//// var itemInfo = myProcedures[tn];
//// folderData.Add(itemInfo.ItemID, itemInfo.DisplayText);
//// }
////}
//ProcessDelete(dvil);
}
else
{
//TODO process deletions of annotations
txtProcess.AppendText("Deleting Annotations...");
List<ProcedureInfo> pil = new List<ProcedureInfo>();
foreach (TreeNode tn in myProcedures.Keys)
if (tn.Checked)
pil.Add(myProcedures[tn]);
List<DocVersionInfo> dvil = new List<DocVersionInfo>();
foreach (TreeNode tn in myDocVersions.Keys)
if (tn.Checked)
dvil.Add(myDocVersions[tn]);
//List<DocVersionInfo> dvil = new List<DocVersionInfo>();
//foreach (TreeNode tn in myTVdel.Nodes)
// if (tn.Checked)
// {
// tn.Tag = dvil;
// myDocVersions.Add(tn, dvil);
// }
frmAnnotationsCleanup frmAnnoDel = new frmAnnotationsCleanup(this, pil, dvil);
frmAnnoDel.ShowDialog();
}
}
private void ProcessDelete(List<DocVersionInfo> foldersToDelete)
{
DateTime pStart = DateTime.Now;
txtProcess.AppendText(Environment.NewLine);
txtProcess.AppendText(pStart.ToString("MM/dd/yyyy @ HH:mm"));
txtProcess.AppendText(Environment.NewLine);
foreach (var kvp in foldersToDelete)
{
int itemID = (int)kvp.ItemID;
string folderName = kvp.Name;
// Perform the deletion operation
// Assume DeleteFolderByID is a method that deletes the folder by its ItemID
bool deletionSuccessful = DeleteFolderByID(itemID);
// Update txtProcess with the progress
if (deletionSuccessful)
{
txtProcess.AppendText($"Successfully deleted folder: {folderName} (ID: {itemID})");
}
else
{
txtProcess.AppendText($"Failed to delete folder: {folderName} (ID: {itemID})");
}
txtProcess.AppendText(Environment.NewLine);
}
}
// Example deletion method
private bool DeleteFolderByID(int itemID)
{
// Implement your folder deletion logic here
// Return true if deletion was successful, false otherwise
return true; // Placeholder
}
public List<ProcedureInfo> RetrieveChkAnnotations()
{
List<ProcedureInfo> pil = new List<ProcedureInfo>();
foreach (TreeNode tn in myProcedures.Keys)
if (tn.Checked)
pil.Add(myProcedures[tn]);
return pil;
}
}
}

View File

@ -117,75 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<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/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC
</value>
</data>
<metadata name="superTooltip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
</value>
</data>
<data name="swHiddenDataLocs.SuperTooltip" xml:space="preserve">
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="labelX3.SuperTooltip" xml:space="preserve">
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
</value>
</data>
<data name="labelX2.SuperTooltip" xml:space="preserve">
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="swCkOrphanDataRecs.SuperTooltip" xml:space="preserve">
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="labelX1.SuperTooltip" xml:space="preserve">
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="swCheckROLinks.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
@ -207,6 +141,7 @@ 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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="warningBox5.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
@ -270,6 +205,106 @@ If more than one procedure is selected, it is recommended that this be performed
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC
</value>
</data>
<data name="warningBox3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAplJREFUOE+N
k11IU2Ecxv9zouK8CULrzo8SU3QKaSYmOJ2uFL8SK4igEIok6qKUwggySTShC41CRiiGdWNfYBcVWiGl
FqN0lh+UTaekzuWcuu2c9316nSdKLPEHz817/s/zPv9zOPQ/nlVQEGulF3ILPe+8SIHK8eYR5lusLwHy
Oy08RqpXjjfHVCMlsydbGbekg4/r4HmwRbLWUZzyeGNqD5NK1O5lw8L8NQHckgh5SAdXA3UqIxuzZKSj
8ssI8Il9wMQeYDoVfD4HrsdhsNdRgTL2b4yl5Ce1qL+xcQOWxpKxMzwAMVEayIv7IU8XwVnv8+XuEfJV
xtfjMlKZ/CYG3JYJ96wOPj6EoCBfMCkfnJdguSMG89eoVBlfS+tJCpCafa1stgBYzAZbzoFGo0ZIiD84
KwJ350P+UQxHtfr7vUPkp9j+4GqiM1K3FtyVB8h5wlSI4GB/RIQHgjtzwWaywMb1WHwYg7lKOq3YVrlz
jPw8RrWFOUoAJhpwcaNciNDQQMRGB4FNpIMNp4B93A2pXw/7ZbWlufCvFguNdNzzOta7J5S6fP4AdkVq
kKQVAQNJYO8TwHq0kD8kwdkWhZkLdMJrrsonlfu2yszmSsA9Bat1p0XdsTTcvxmJtpowyL1ar/m3PKYM
2MpVgzcySUWTdWRwd+wAXzoo3r5B7CnqDqVg+lW89yuoVARrR/SaANm0F46mUFjOUjYtN9BTaVQYJzPA
RlPB+hNF3XjvP3C9bDuqTm2D9DZuTcCKXN1psJ2ndhGgnpJGciENGyB9zoJk1kMezFonySw0oIf0KVOs
oIO7L3MlYITstVTsrKNHCzXU5aimnvmrZPp5hfrtlWS2X6LBuQoatJWTWQz3C5mEeoS6hNqt5yj7FysJ
zJwL4b/EAAAAAElFTkSuQmCC
</value>
</data>
<data name="swCkObsoleteROData.SuperTooltip" xml:space="preserve">
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
</value>
</data>
<data name="swHiddenDataLocs.SuperTooltip" xml:space="preserve">
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="labelX3.SuperTooltip" xml:space="preserve">
<value>Referenced Objects databases are associated with a procedure set (such as Working Draft).
RO paths, ROFST versions, and the contents of RO figures are stored in the database when referenced. This tool will identify stored RO Paths, ROFST versions, and Figures that are no longer used.
</value>
</data>
<data name="labelX2.SuperTooltip" xml:space="preserve">
<value>Typically, a section in PROMS only has sub-sections or steps. When and existing section is divided into sub-sections, the resulting main section might have both.
When this occurs, the step data in the main section can be marked as non-editable. The user can no longer get to these steps and they can become forgotten as PROMS will ignore these non-editable steps when the procedure is printed.
This tool will identify if the database has non-editable steps and provide a listing of these steps. The use can then go to these main sections, make them editable via the property page, and delete or move these steps.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="swCkOrphanDataRecs.SuperTooltip" xml:space="preserve">
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="labelX1.SuperTooltip" xml:space="preserve">
<value>Everything in PROMS is inter-related. A working draft knows what is its first procedure and a procedure knows what is its first step. Likewise, a procedure knows what procedure is before it and after it.
Should an item become orphaned (disconnected) from the rest of the data, it will no longer be accessible. This tool detects any orphaned items in the database.
This tool may take an extended period of time to execute.
</value>
</data>
<data name="swDeleteFolder.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
Be sure a current backup of the database exists prior performing this function.
It is recommended that this be done during off hours.
</value>
</data>
<data name="labelX13.SuperTooltip" xml:space="preserve">
<value>This allows the user to check referenced objects links in procedure step data for multiple working drafts in a batch mode.
Bad referenced bject links will be identified with an Bad RO Link annotation. Use the PROMS Search tool to list all of the steps that have this annotation.
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 refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
Be sure a current backup of the database exists prior to running this function.
If more than one procedure 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 refresh transitions in all procedures selected below, whether they were selected individually or as a group via a procedure set.
Be sure a current backup of the database exists prior to running this function.
If more than one procedure is selected, it is recommended that this be performed during off hours.</value>
</data>
<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.
@ -368,6 +403,6 @@ Should an item become orphaned (disconnected) from the rest of the data, it will
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>38</value>
<value>25</value>
</metadata>
</root>
</root>

View File

@ -225,6 +225,67 @@ namespace VEPROMS.CSLA.Library
throw new DbCslaException("Error on Annotation.Delete", ex);
}
}
public static void DeleteAnnotationProcByGroup(int typID, int itemID)
{
if (!CanDeleteObject())
throw new System.Security.SecurityException("User not authorized to remove a Annotation");
try
{
DataPortal.Delete(new AnnotationsByGroupCriteria(typID, itemID));
AnnotationInfo.StaticOnInfoChanged();
}
catch (Exception ex)
{
System.Data.SqlClient.SqlException exSQL = SqlException(ex);
if (exSQL != null && exSQL.Message.Contains("###Cannot Delete Item###"))
throw exSQL;
Console.WriteLine("AnnotationExt: Stacktrace = {0}", ex.StackTrace);
throw new DbCslaException("Error on Annotation.Delete", ex);
}
}
public static int getAnnotationProcCnt(int typID, string procList)
{
if (!CanGetObject())
throw new System.Security.SecurityException("User not authorized to remove a Annotation");
try
{
Annotation ProcCnt = DataPortal.Fetch<Annotation>(new getAnnotationCountProcCriteria(typID, procList));
AnnotationInfo.StaticOnInfoChanged();
return Annotation.ProcCnt;
//return Int32.Parse(ProcCnt);
}
catch (Exception ex)
{
System.Data.SqlClient.SqlException exSQL = SqlException(ex);
if (exSQL != null && exSQL.Message.Contains("###Cannot retrieve Item###"))
throw exSQL;
Console.WriteLine("AnnotationExt: Stacktrace = {0}", ex.StackTrace);
throw new DbCslaException("Error on getAnnotationCountProcCriteria", ex);
}
}
public static int getAnnotationCountDocv(int typID, string procList)
{
if (!CanGetObject())
throw new System.Security.SecurityException("User not authorized to remove a Annotation");
try
{
Annotation DocvCnt = DataPortal.Fetch<Annotation>(new getAnnotationCountDocvCriteria(typID, procList));
AnnotationInfo.StaticOnInfoChanged();
return Annotation.DocvCnt;
}
catch (Exception ex)
{
System.Data.SqlClient.SqlException exSQL = SqlException(ex);
if (exSQL != null && exSQL.Message.Contains("###Cannot retrieve Item###"))
throw exSQL;
Console.WriteLine("AnnotationExt: Stacktrace = {0}", ex.StackTrace);
throw new DbCslaException("Error on getAnnotationCountDocvCriteria", ex);
}
}
private static System.Data.SqlClient.SqlException SqlException(Exception ex)
{
Type sqlExType = typeof(System.Data.SqlClient.SqlException);
@ -280,6 +341,165 @@ namespace VEPROMS.CSLA.Library
throw new DbCslaException("Item.DataPortal_Delete", ex);
}
}
[Serializable()]
protected class AnnotationsByGroupCriteria
{
private int _typeID;
public int TypeID
{ get { return _typeID; } }
private string _procList;
public string ProcList
{ get { return _procList; } }
public AnnotationsByGroupCriteria(int typeID, int itemID)
{
_typeID = typeID;
_procList = ProcList;
}
}
[Transactional(TransactionalTypes.TransactionScope)]
private void DataPortal_Delete(AnnotationsByGroupCriteria criteria)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Item.DataPortal_Delete", GetHashCode());
try
{
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "deleteAnnotationsProcByType";
cm.Parameters.AddWithValue("@typeid", criteria.TypeID);
cm.Parameters.AddWithValue("@procList", criteria.ProcList);
cm.ExecuteNonQuery();
}
}
}
catch (Exception ex)
{
if (_MyLog.IsErrorEnabled) _MyLog.Error("Item.DataPortal_Delete", ex);
_ErrorMessage = ex.Message;
throw new DbCslaException("Item.DataPortal_Delete Annotations by group", ex);
}
}
private static int _procCnt;
public static int ProcCnt
{
get { return _procCnt; }
set { _procCnt = value; }
}
[Serializable()]
protected class getAnnotationCountProcCriteria
{
private int _procCnt;
public int ProcCnt
{ get { return _procCnt; }
set { _procCnt = value; }
}
private int _typeID;
public int TypeID
{ get { return _typeID; } }
private string _procList;
public string ProcList
{ get { return _procList; } }
public getAnnotationCountProcCriteria(int typeID, string procList, int procCnt = 0)
{
_typeID = typeID;
_procList = procList;
_procCnt = procCnt;
}
}
[Transactional(TransactionalTypes.TransactionScope)]
private getAnnotationCountProcCriteria DataPortal_Fetch(getAnnotationCountProcCriteria criteria)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Item.DataPortal_Fetch", GetHashCode());
try
{
//int ProcCnt;
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "getAnnotationProcCount";
cm.Parameters.AddWithValue("@procList", criteria.ProcList);
cm.Parameters.AddWithValue("@typeid", criteria.TypeID);
Annotation.ProcCnt = (int)cm.ExecuteScalar();
}
}
return criteria; //_procCnt.ToString();
}
catch (Exception ex)
{
if (_MyLog.IsErrorEnabled) _MyLog.Error("Annotation.GetAnnotationProcCnt", ex);
_ErrorMessage = ex.Message;
throw new DbCslaException("Annotation.GetAnnotationProcCnt by group", ex);
}
}
private static int _docvCnt;
public static int DocvCnt
{ get { return _docvCnt; }
set { _docvCnt = value; }
}
[Serializable()]
protected class getAnnotationCountDocvCriteria
{
private int _docvCnt;
public int DocvCnt
{ get { return _docvCnt; }
set { _docvCnt = value; }
}
private int _TypeID;
public int TypeID
{ get { return _TypeID; } }
private string _docvList;
public string DocvList
{ get { return _docvList; } }
public getAnnotationCountDocvCriteria(int typeID, string docvList, int docvCnt = 0)
{
_TypeID = typeID;
_docvList = docvList;
_docvCnt = docvCnt;
}
}
[Transactional(TransactionalTypes.TransactionScope)]
private getAnnotationCountDocvCriteria DataPortal_Fetch(getAnnotationCountDocvCriteria criteria)
{
if (_MyLog.IsDebugEnabled) _MyLog.DebugFormat("[{0}] Annotation.DataPortal_Fetch", GetHashCode());
try
{
//int ProcCnt;
using (SqlConnection cn = Database.VEPROMS_SqlConnection)
{
using (SqlCommand cm = cn.CreateCommand())
{
cm.CommandType = CommandType.StoredProcedure;
cm.CommandTimeout = Database.SQLTimeout;
cm.CommandText = "getAnnotationDocvCount";
cm.Parameters.AddWithValue("@typeid", criteria.TypeID);
cm.Parameters.AddWithValue("@DocvList", criteria.DocvList);
Annotation.DocvCnt = (int)cm.ExecuteScalar();
}
return criteria;
}
}
catch (Exception ex)
{
if (_MyLog.IsErrorEnabled) _MyLog.Error("Item.DataPortal_Delete", ex);
_ErrorMessage = ex.Message;
throw new DbCslaException("Item.DataPortal_Delete Annotations by group", ex);
}
}
}
//public partial class AnnotationTypeAnnotations
//{