Compare commits

..

No commits in common. "f3efd409c673dab46dffe8e6b544ae786df7da12" and "7c33bad3628f393c5989907c45a007354f7b4288" have entirely different histories.

View File

@ -105,50 +105,47 @@ namespace VEPROMS
// Process used to cleanup annotations "(Proceed?" button) // Process used to cleanup annotations "(Proceed?" button)
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
if (lbAnnotationTypes.SelectedIndex > -1)
TextBox frm2 = mainForm.GettxtProcess();
TextBox frm3 = mainForm.GettxtResults();
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
frm3.AppendText("Deleting Annotations: Annotation Type: " + '"' + AnnotationName + '"');
frm3.AppendText(Environment.NewLine + "P = Procedure, F = Folder" + Environment.NewLine);
int deletecountProc = 0;
int deletecountDocv = 0;
foreach (var p in pil2)
{ {
if (p.IsProcedure)
TextBox frm2 = mainForm.GettxtProcess();
TextBox frm3 = mainForm.GettxtResults();
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
frm3.AppendText("Deleting Annotations: Annotation Type: " + '"' + AnnotationName + '"');
frm3.AppendText(Environment.NewLine + "P = Procedure, F = Folder" + Environment.NewLine);
int deletecountProc = 0;
int deletecountDocv = 0;
foreach (var p in pil2)
{ {
if (p.IsProcedure) //AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
{ //AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
//AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key); //deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, getAnnotationProcItems(p));
//AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value); deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, p.ItemID.ToString());
//deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, getAnnotationProcItems(p)); frm2.AppendText(Environment.NewLine + p.DisplayNumber + ' ' + p.DisplayText);
deletecountProc = Annotation.getAnnotationProcCnt(AnnotationTyp, p.ItemID.ToString()); //frm3.AppendText(Environment.NewLine + "P: " + p.DisplayNumber + '"' + p.DisplayText + '"' + " Type: " + '"' + AnnotationName + '"' + " count: " + deletecountProc);
frm2.AppendText(Environment.NewLine + p.DisplayNumber + ' ' + p.DisplayText); frm3.AppendText(Environment.NewLine + "P: " + p.DisplayNumber + '"' + p.DisplayText + '"' + " Delete count: " + deletecountProc);
//frm3.AppendText(Environment.NewLine + "P: " + p.DisplayNumber + '"' + p.DisplayText + '"' + " Type: " + '"' + AnnotationName + '"' + " count: " + deletecountProc); Annotation.DeleteAnnotationProcByType(AnnotationTyp, p.ItemID.ToString());
frm3.AppendText(Environment.NewLine + "P: " + p.DisplayNumber + '"' + p.DisplayText + '"' + " Delete count: " + deletecountProc); lblCountNumber.Text = "0";
Annotation.DeleteAnnotationProcByType(AnnotationTyp, p.ItemID.ToString());
lblCountNumber.Text = "0";
}
} }
foreach (var d in dvil2)
{
if (d.IsDocVersion)
{
//AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
//AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, d.VersionID.ToString());
frm2.AppendText(Environment.NewLine + d.ActiveParent.ToString());
frm3.AppendText(Environment.NewLine + "F: " + '"' + d.ActiveParent.ToString() + '"' + " Delete count: " + deletecountDocv);
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
Annotation.DeleteAnnotationDocvByType(AnnotationTyp, d.VersionID.ToString());
lblCountNumber.Text = "0";
}
}
frm3.AppendText(Environment.NewLine + Environment.NewLine + "Total Annotations Deleted: " + totalDeleteCnt + Environment.NewLine + Environment.NewLine);
} }
foreach (var d in dvil2)
{
if (d.IsDocVersion)
{
//AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
//AnnotationName = System.Convert.ToString(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Value);
deletecountDocv = Annotation.getAnnotationCountDocv(AnnotationTyp, d.VersionID.ToString());
frm2.AppendText(Environment.NewLine + d.ActiveParent.ToString());
frm3.AppendText(Environment.NewLine + "F: " + '"' + d.ActiveParent.ToString() + '"' + " Delete count: " + deletecountDocv);
AnnotationTyp = System.Convert.ToInt32(((KeyValuePair<string, string>)lbAnnotationTypes.SelectedItem).Key);
Annotation.DeleteAnnotationDocvByType(AnnotationTyp, d.VersionID.ToString());
lblCountNumber.Text = "0";
}
}
frm3.AppendText(Environment.NewLine + Environment.NewLine + "Total Annotations Deleted: " + totalDeleteCnt + Environment.NewLine + Environment.NewLine);
} }